-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: DA Automation <[email protected]> Co-authored-by: DA Automation <[email protected]>
- Loading branch information
1 parent
be8e098
commit d5f9f82
Showing
30 changed files
with
264 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
apps/app/src/test/resources/dumps/alice-plaintext-id-identity-dump.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,4 +57,5 @@ | |
sequencer = "sv1" | ||
mediator = "sv1" | ||
} | ||
domains.global.url = null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ _sv { | |
domains { | ||
global { | ||
alias = "global" | ||
url = "http://localhost:9108" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...zedtrust/splice/integration/tests/ParticipantPlaintextIdentitiesDumpIntegrationTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package org.lfdecentralizedtrust.splice.integration.tests | ||
|
||
import com.digitalasset.canton.topology.ParticipantId | ||
import org.lfdecentralizedtrust.splice.identities.NodeIdentitiesDump | ||
import org.lfdecentralizedtrust.splice.util.StandaloneCanton | ||
|
||
import java.nio.file.{Path, Paths} | ||
|
||
class ParticipantPlaintextIdentitiesIntegrationTest | ||
extends ParticipantIdentitiesImportTestBase | ||
with StandaloneCanton { | ||
|
||
override def dbsSuffix = "plaintext" | ||
|
||
override def aliceParticipantDumpFilename = | ||
ParticipantPlaintextIdentitiesIntegrationTest.alicePlaintextIdentitiesDumpFilePath | ||
|
||
"We can import and export Canton participant identities dumps with plaintext keys in them" in { | ||
implicit env => | ||
startAllSync(sv1Backend, sv1ScanBackend, sv1ValidatorBackend) | ||
|
||
val svParticipantDump = clue("Getting participant identities dump from SV1") { | ||
sv1ValidatorBackend.dumpParticipantIdentities() | ||
} | ||
|
||
clue("Checking exported key names for SV1") { | ||
val keyNames = svParticipantDump.keys.map(_.name.value) | ||
val prefix = "sv1Participant" | ||
keyNames should contain(s"$prefix-namespace") | ||
keyNames should contain(s"$prefix-signing") | ||
keyNames should contain(s"$prefix-encryption") | ||
} | ||
|
||
withCanton( | ||
Seq( | ||
testResourcesPath / "standalone-participant-extra.conf", | ||
testResourcesPath / "standalone-participant-extra-no-auth.conf", | ||
), | ||
Seq(), | ||
"alice-plaintext-participant", | ||
"EXTRA_PARTICIPANT_ADMIN_USER" -> aliceValidatorLocalBackend.config.ledgerApiUser, | ||
"EXTRA_PARTICIPANT_DB" -> "participant_extra_plaintext", | ||
) { | ||
val predefinedDump = NodeIdentitiesDump | ||
.fromJsonFile( | ||
ParticipantPlaintextIdentitiesIntegrationTest.alicePlaintextIdentitiesDumpFilePath, | ||
ParticipantId.tryFromProtoPrimitive, | ||
) | ||
.value | ||
|
||
clue("start validator with predefined dump") { | ||
aliceValidatorLocalBackend.startSync() | ||
} | ||
|
||
val validatorParticipantDump = | ||
clue("Getting participant identities dump from Alice's validator") { | ||
aliceValidatorLocalBackend.dumpParticipantIdentities() | ||
} | ||
|
||
clue("Checking exported keys for Alice's validator") { | ||
validatorParticipantDump.keys.toSet shouldBe predefinedDump.keys.toSet | ||
} | ||
} | ||
} | ||
} | ||
|
||
object ParticipantPlaintextIdentitiesIntegrationTest { | ||
val testDumpDir: Path = Paths.get("apps/app/src/test/resources/dumps") | ||
val alicePlaintextIdentitiesDumpFilePath = | ||
testDumpDir.resolve("alice-plaintext-id-identity-dump.json") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.