Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
247 changes: 121 additions & 126 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.21.2</version>
<version>2.21.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
protected DidLogMeta didLogMeta;

protected static JsonObject buildVerificationMethodWithPublicKeyJwk(String did, String fragmentId, String publicKeyJwk) {

var verificationMethodObj = new JsonObject();
verificationMethodObj.addProperty("id", did + "#" + fragmentId);
// According to swiss profile (https://confluence.bit.admin.ch/x/VL8VTQ)
// controller must be the did itself
verificationMethodObj.addProperty("controller", did);
// CAUTION The "controller" property must not be present w.r.t.:
// - https://confluence.bit.admin.ch/x/3e0EMw
verificationMethodObj.addProperty("type", "JsonWebKey2020");
Expand Down Expand Up @@ -104,7 +106,7 @@
* @return a JSON object representing DID method parameters
* @throws DidLogCreatorStrategyException if parsing any of supplied PEM files (via {@code updateKeys}/{@code nextKeys} param) fails
*/
@SuppressWarnings({"PMD.AvoidInstantiatingObjectsInLoops", "PMD.CyclomaticComplexity", "PMD.CognitiveComplexity"})

Check warning on line 109 in src/main/java/ch/admin/bj/swiyu/didtoolbox/AbstractDidLogEntryBuilder.java

View workflow job for this annotation

GitHub Actions / code-quality-check

Unnecessary suppression "PMD.CognitiveComplexity" in @SuppressWarnings annotation

This rule reports suppression comments and annotations that did not suppress any PMD violation. Note that violations of this rule cannot be suppressed. Please note: - The rule will report those suppressions comments/annotations that did not suppress a violation _during the current run_. That means you cannot run this rule separately from other rules, it must always be run with all the rules that could produce a warning. This is most likely not a problem, as you can just include this rule in your regular ruleset. - The rule for now only reports annotations specific to PMD, like `@SuppressWarnings("PMD")`. For instance `@SuppressWarnings("all")` is never reported as we cannot know if another tool is producing a warning there that must be suppressed. In the future we might be able to check for other common ones like `@SuppressWarnings("unchecked")` or `"fallthrough"`. UnnecessaryWarningSuppression (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#unnecessarywarningsuppression

Check warning on line 109 in src/main/java/ch/admin/bj/swiyu/didtoolbox/AbstractDidLogEntryBuilder.java

View workflow job for this annotation

GitHub Actions / code-quality-check

Unnecessary suppression "PMD.CyclomaticComplexity" in @SuppressWarnings annotation

This rule reports suppression comments and annotations that did not suppress any PMD violation. Note that violations of this rule cannot be suppressed. Please note: - The rule will report those suppressions comments/annotations that did not suppress a violation _during the current run_. That means you cannot run this rule separately from other rules, it must always be run with all the rules that could produce a warning. This is most likely not a problem, as you can just include this rule in your regular ruleset. - The rule for now only reports annotations specific to PMD, like `@SuppressWarnings("PMD")`. For instance `@SuppressWarnings("all")` is never reported as we cannot know if another tool is producing a warning there that must be suppressed. In the future we might be able to check for other common ones like `@SuppressWarnings("unchecked")` or `"fallthrough"`. UnnecessaryWarningSuppression (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/snapshot/pmd_rules_java_bestpractices.html#unnecessarywarningsuppression
protected JsonObject createDidParams(VerificationMethodKeyProvider verificationMethodKeyProvider,
Set<UpdateKeysDidMethodParameter> updateKeysParameter,
Set<NextKeyHashesDidMethodParameter> nextKeyHashesDidMethodParameters) throws DidLogCreatorStrategyException {
Expand Down Expand Up @@ -231,15 +233,8 @@

var did = buildDid(identifierRegistryUrl);

var context = new JsonArray();
// See "Swiss e-ID and trust infrastructure: Interoperability profile" available at:
// https://github.com/e-id-admin/open-source-community/blob/main/tech-roadmap/swiss-profile.md#did-document-format
context.add("https://www.w3.org/ns/did/v1");
context.add("https://w3id.org/security/jwk/v1");

// Create initial did doc with placeholder
var didDoc = new JsonObject();
didDoc.add("@context", context);
didDoc.addProperty("id", did);
// CAUTION The "controller" property must not be present w.r.t.:
// - https://jira.bit.admin.ch/browse/EIDSYS-352
Expand Down
12 changes: 1 addition & 11 deletions src/main/java/ch/admin/bj/swiyu/didtoolbox/TdwDeactivator.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,6 @@ public String deactivateDidLog(String didLog, ZonedDateTime zdt) throws DidLogDe

// Create initial did doc with placeholder
var didDoc = new JsonObject();

// take over context
var context = new JsonArray();
for (var ctx : didLogMeta.getDidDoc().getContext()) {
context.add(ctx);
}
didDoc.add("@context", context);

didDoc.addProperty("id", didLogMeta.getDidDoc().getId());
// CAUTION "controller" property is omitted w.r.t.:
// - https://jira.bit.admin.ch/browse/EIDSYS-352
Expand All @@ -208,7 +200,6 @@ public String deactivateDidLog(String didLog, ZonedDateTime zdt) throws DidLogDe

// The DID log entry is an input JSON array that when completed contains the following items:
// [ versionId, versionTime, parameters, DIDDoc State, Data Integrity Proof ].

var didLogEntryWithoutProofAndSignature = new JsonArray();

// https://identity.foundation/didwebvh/v0.3/#entry-hash-generation-and-verification:
Expand All @@ -227,14 +218,13 @@ public String deactivateDidLog(String didLog, ZonedDateTime zdt) throws DidLogDe
// The parameters are used to configure the DID generation and verification processes.
// All parameters MUST be valid and all required values in the first version of the DID MUST be present.
// Define the parameters (https://identity.foundation/didwebvh/v0.3/#didtdw-did-method-parameters)

var didMethodParameters = new JsonObject();
didMethodParameters.addProperty("deactivated", true);

// https://identity.foundation/didwebvh/v0.3/#deactivate-revoke:
// A DID MAY update the DIDDoc further to indicate the deactivation of the DID, such as including an empty updateKeys list
// ("updateKeys": []) in the parameters, preventing further versions of the DID.
didMethodParameters.add(NamedDidMethodParameters.UPDATE_KEYS, new JsonArray());

didLogEntryWithoutProofAndSignature.add(didMethodParameters);

// The fourth item in the input JSON array MUST be the JSON object {"value": <diddoc> }, where <diddoc> is the initial DIDDoc as described in the previous step 3.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ public String deactivateDidLog(String didLog, ZonedDateTime zdt) throws DidLogDe

// Create initial did doc with placeholder
var didDoc = new JsonObject();

// take over context
var context = new JsonArray();
for (var ctx : didLogMeta.getDidDoc().getContext()) {
context.add(ctx);
}
didDoc.add("@context", context);

didDoc.addProperty("id", didLogMeta.getDidDoc().getId());
// CAUTION "controller" property is omitted w.r.t.:
// - https://jira.bit.admin.ch/browse/EIDSYS-352
Expand Down Expand Up @@ -192,14 +184,13 @@ public String deactivateDidLog(String didLog, ZonedDateTime zdt) throws DidLogDe
// The parameters are used to configure the DID generation and verification processes.
// All parameters MUST be valid and all required values in the first version of the DID MUST be present.
// Define the parameters (https://identity.foundation/didwebvh/v1.0/#didwebvh-did-method-parameters)

var didMethodParameters = new JsonObject();
didMethodParameters.addProperty("deactivated", true);

// https://identity.foundation/didwebvh/v1.0/#deactivate-revoke:
// A DID MAY update the DIDDoc further to indicate the deactivation of the DID, such as including an empty updateKeys list
// ("updateKeys": []) in the parameters, preventing further versions of the DID.
didMethodParameters.add(NamedDidMethodParameters.UPDATE_KEYS, new JsonArray());

didLogEntryWithoutProofAndSignature.add(DID_LOG_ENTRY_JSON_PROPERTY_PARAMETERS, didMethodParameters);

// The JSON object "state" contains the DIDDoc for this version of the DID.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public void testBuildUsingJksWithExternalVerificationMethodKeys(URL identifierRe
//System.out.println(didLogEntry);

assertTrue("""
["1-QmatgtdB7F3p81X4W3MGGs5EWHZATJkjbA2tji7tbjDpB2","2012-12-12T12:12:12Z",{"method":"did:tdw:0.3","scid":"QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh","updateKeys":["z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP"],"portable":false},{"value":{"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/jwk/v1"],"id":"did:tdw:QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","authentication":["did:tdw:QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01"],"assertionMethod":["did:tdw:QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01"],"verificationMethod":[{"id":"did:tdw:QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-auth-key-01","x":"-MUDoZjNImUbo0vNmdAqhAOPdJoptUC0tlK9xvLrqDg","y":"Djlu_TF69xQF5_L3px2FmCDQksM_fIp6kKbHRQLVIb0"}},{"id":"did:tdw:QmYD2gdyU1opYus5bJSoJr4c78mgctJnGHRsgqPv9NoLBh:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-assert-key-01","x":"wdET0dp6vq59s1yyVh_XXyIPPU9Co7PlcTPMRRXx85Y","y":"eThC9-NetN-oXA5WU0Dn0eed7fgHtsXs2E3mU82pA9k"}}]}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:12Z","verificationMethod":"did:key:z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP#z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP","proofPurpose":"authentication","challenge":"1-QmatgtdB7F3p81X4W3MGGs5EWHZATJkjbA2tji7tbjDpB2","proofValue":"z3ab9n5EmT3NTCHZis6Bfr3FbMoYGumYHUs29TsDg4548bSazcpekSpxNjTSYY9on9nPdUsbC8tuzCuuX17UTMT6Q"}]]
["1-QmZQuq3BYUToPVcCizjs1XWUG9LGRnyMmXLSos5fB7nRnd","2012-12-12T12:12:12Z",{"method":"did:tdw:0.3","scid":"QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW","updateKeys":["z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP"],"portable":false},{"value":{"id":"did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","authentication":["did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01"],"assertionMethod":["did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01"],"verificationMethod":[{"id":"did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01","controller":"did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-auth-key-01","x":"-MUDoZjNImUbo0vNmdAqhAOPdJoptUC0tlK9xvLrqDg","y":"Djlu_TF69xQF5_L3px2FmCDQksM_fIp6kKbHRQLVIb0"}},{"id":"did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01","controller":"did:tdw:QmcqDmAkySR3eCUriL8Rgs35hS8CK7PZr8krVPbrbN62TW:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-assert-key-01","x":"wdET0dp6vq59s1yyVh_XXyIPPU9Co7PlcTPMRRXx85Y","y":"eThC9-NetN-oXA5WU0Dn0eed7fgHtsXs2E3mU82pA9k"}}]}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:12Z","verificationMethod":"did:key:z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP#z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP","proofPurpose":"authentication","challenge":"1-QmZQuq3BYUToPVcCizjs1XWUG9LGRnyMmXLSos5fB7nRnd","proofValue":"z2H7zsAqfwPMk5f5nprbe7WBSkAEzUfuwV3YT9gYFWwSf8wuF4mFHJ1cqmNM2g1mTcCY2wJCz5nVz4DBsnoG5xBwi"}]]
""".contains(didLogEntry.get()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ private static void assertDeactivatedDidLogEntry(String didLogEntry) {
assertTrue(jsonArray.get(3).isJsonObject());
assertTrue(jsonArray.get(3).getAsJsonObject().has("value"));
var didDoc = jsonArray.get(3).getAsJsonObject().get("value").getAsJsonObject();
assertEquals(2, didDoc.size()); // no other than "id" and "context"
assertEquals(1, didDoc.size()); // only "id" should be in the didDoc
assertTrue(didDoc.has("id"));
assertTrue(didDoc.has("@context"));

var proofs = jsonArray.get(4);
assertTrue(proofs.isJsonArray());
Expand Down Expand Up @@ -132,8 +131,8 @@ void testDeactivateWithKeyChangeUsingExistingUpdateKey() {
//System.out.println(finalUpdatedDidLog); // checkpoint

assertTrue("""
["1-QmQqae3Qu8aaeTSCTvErgGz8du3XvuZMrTwPiQfBkjZHuZ","2012-12-12T12:12:12Z",{"method":"did:tdw:0.3","scid":"QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K","updateKeys":["z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2","z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP"],"portable":false},{"value":{"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/jwk/v1"],"id":"did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","authentication":["did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01"],"assertionMethod":["did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01"],"verificationMethod":[{"id":"did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-auth-key-01","x":"-MUDoZjNImUbo0vNmdAqhAOPdJoptUC0tlK9xvLrqDg","y":"Djlu_TF69xQF5_L3px2FmCDQksM_fIp6kKbHRQLVIb0"}},{"id":"did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-assert-key-01","x":"wdET0dp6vq59s1yyVh_XXyIPPU9Co7PlcTPMRRXx85Y","y":"eThC9-NetN-oXA5WU0Dn0eed7fgHtsXs2E3mU82pA9k"}}]}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:12Z","verificationMethod":"did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2","proofPurpose":"authentication","challenge":"1-QmQqae3Qu8aaeTSCTvErgGz8du3XvuZMrTwPiQfBkjZHuZ","proofValue":"z5XZ7aHfrX4mCT8Epze7hVQAFaDDVWMwvbjz3LLq1c4QiPb7hVpveosoVyL7oD7EE1JsAkdvyjsXYc3kuChJf6UXm"}]]
["2-QmXLH8ripBZxLnmhr4tBjSw1yKVmmU4r4gmU96rGoXzytN","2012-12-12T12:12:13Z",{"deactivated":true,"updateKeys":[]},{"value":{"@context":["https://www.w3.org/ns/did/v1","https://w3id.org/security/jwk/v1"],"id":"did:tdw:QmSWR3nK8TG6bcymMqtHGihkvtisEz4nMh7qcNEwWp4b8K:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085"}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:13Z","verificationMethod":"did:key:z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP#z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP","proofPurpose":"authentication","challenge":"2-QmXLH8ripBZxLnmhr4tBjSw1yKVmmU4r4gmU96rGoXzytN","proofValue":"zNqkHY1YKuAo6Mb6EfZVo8wGipVaTZD7ShWLJL6uZ6GQknaEE6iixNC167KyC26Kuu1Z6fcwkitqAqo45EF42Hij"}]]
["1-QmNUGbKzhqUyuCRmt537qxpQEU5LAGm7udreBhH9QxPxYJ","2012-12-12T12:12:12Z",{"method":"did:tdw:0.3","scid":"QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci","updateKeys":["z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2","z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP"],"portable":false},{"value":{"id":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","authentication":["did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01"],"assertionMethod":["did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01"],"verificationMethod":[{"id":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-auth-key-01","controller":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-auth-key-01","x":"-MUDoZjNImUbo0vNmdAqhAOPdJoptUC0tlK9xvLrqDg","y":"Djlu_TF69xQF5_L3px2FmCDQksM_fIp6kKbHRQLVIb0"}},{"id":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085#my-assert-key-01","controller":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085","type":"JsonWebKey2020","publicKeyJwk":{"kty":"EC","crv":"P-256","kid":"my-assert-key-01","x":"wdET0dp6vq59s1yyVh_XXyIPPU9Co7PlcTPMRRXx85Y","y":"eThC9-NetN-oXA5WU0Dn0eed7fgHtsXs2E3mU82pA9k"}}]}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:12Z","verificationMethod":"did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2","proofPurpose":"authentication","challenge":"1-QmNUGbKzhqUyuCRmt537qxpQEU5LAGm7udreBhH9QxPxYJ","proofValue":"zEYSn9V5casGJH9wUCJDJLHqzTjTQDL11iP3MTzii8RoWdZpbhdYdV9jPTHW8gy9BGS7PweqUVDkaSpGtxUETFmL"}]]
["2-Qmci5evTbELsi7nQzp2mM6e7G7DUyobYGVmRAmR59SGijZ","2012-12-12T12:12:13Z",{"deactivated":true,"updateKeys":[]},{"value":{"id":"did:tdw:QmYY7o6wRFPBYfeKK4N7U4TGpXUbgwppG1zKVELxYSuDci:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:18fa7c77-9dd1-4e20-a147-fb1bec146085"}},[{"type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","created":"2012-12-12T12:12:13Z","verificationMethod":"did:key:z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP#z6MkvdAjfVZ2CWa38V2VgZvZVjSkENZpiuiV5gyRKsXDA8UP","proofPurpose":"authentication","challenge":"2-Qmci5evTbELsi7nQzp2mM6e7G7DUyobYGVmRAmR59SGijZ","proofValue":"z2zNDbYy1421CToqk5WAXsdAWBL2hHf1xPAm9TvrDA5dsHSgdpz4SBV29UnhanEhbc1RmpUwTYBHFRxC58YrXVCs1"}]]
""".contains(finalUpdatedDidLog));

assertDoesNotThrow(() -> {
Expand Down
Loading
Loading