Skip to content

Instantly share code, notes, and snippets.

@ricardas-buc
Last active May 13, 2024 08:29
Show Gist options
  • Save ricardas-buc/d54d475eafb869d9427f15a3e5d70965 to your computer and use it in GitHub Desktop.
Save ricardas-buc/d54d475eafb869d9427f15a3e5d70965 to your computer and use it in GitHub Desktop.
EDC 0.6.3+ DataIntegrityKeyPair implements wrong interface.
Index: extensions/common/crypto/ldp-verifiable-credentials/build.gradle.kts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/extensions/common/crypto/ldp-verifiable-credentials/build.gradle.kts b/extensions/common/crypto/ldp-verifiable-credentials/build.gradle.kts
--- a/extensions/common/crypto/ldp-verifiable-credentials/build.gradle.kts (revision 4b5c1037438562b5560d0118e18890058023da79)
+++ b/extensions/common/crypto/ldp-verifiable-credentials/build.gradle.kts (date 1715588431015)
@@ -33,13 +33,14 @@
testImplementation(testFixtures(project(":core:common:junit")))
testImplementation(project(":extensions:common:crypto:lib:jws2020-lib"))
testImplementation(project(":core:common:lib:json-ld-lib"))
-
+ testImplementation(project(":extensions:common:iam:decentralized-identity:identity-did-core"))
+ testImplementation(project(":extensions:common:iam:decentralized-identity:identity-did-web"))
// deps for test fixtures
testFixturesImplementation(project(":spi:common:json-ld-spi"))
testFixturesImplementation(project(":core:common:lib:json-ld-lib"))
testFixturesImplementation(project(":extensions:common:crypto:lib:jws2020-lib"))
testFixturesApi(libs.nimbus.jwt)
testFixturesApi(testFixtures(project(":extensions:common:crypto:lib:jws2020-lib")))
-
+ testImplementation(testFixtures(project(":core:common:lib:http-lib")))
}
Index: extensions/common/crypto/lib/jws2020-lib/src/testFixtures/java/org/eclipse/edc/security/signature/jws2020/TestFunctions.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/extensions/common/crypto/lib/jws2020-lib/src/testFixtures/java/org/eclipse/edc/security/signature/jws2020/TestFunctions.java b/extensions/common/crypto/lib/jws2020-lib/src/testFixtures/java/org/eclipse/edc/security/signature/jws2020/TestFunctions.java
--- a/extensions/common/crypto/lib/jws2020-lib/src/testFixtures/java/org/eclipse/edc/security/signature/jws2020/TestFunctions.java (revision 4b5c1037438562b5560d0118e18890058023da79)
+++ b/extensions/common/crypto/lib/jws2020-lib/src/testFixtures/java/org/eclipse/edc/security/signature/jws2020/TestFunctions.java (date 1715588431043)
@@ -46,7 +46,7 @@
}
}
- public static VerificationMethod createKeyPair(ECKey jwk, String id) {
+ public static VerificationMethod createKeyPair(JWK jwk, String id) {
var type = URI.create("https://w3id.org/security#JsonWebKey2020");
return new JsonWebKeyPair(URI.create(id), type, null, jwk);
}
Index: extensions/common/crypto/ldp-verifiable-credentials/src/test/java/org/eclipse/edc/verifiablecredentials/linkeddata/LdpVerifierVPTest.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/extensions/common/crypto/ldp-verifiable-credentials/src/test/java/org/eclipse/edc/verifiablecredentials/linkeddata/LdpVerifierVPTest.java b/extensions/common/crypto/ldp-verifiable-credentials/src/test/java/org/eclipse/edc/verifiablecredentials/linkeddata/LdpVerifierVPTest.java
new file mode 100644
--- /dev/null (date 1715588431022)
+++ b/extensions/common/crypto/ldp-verifiable-credentials/src/test/java/org/eclipse/edc/verifiablecredentials/linkeddata/LdpVerifierVPTest.java (date 1715588431022)
@@ -0,0 +1,80 @@
+package org.eclipse.edc.verifiablecredentials.linkeddata;
+
+import com.apicatalog.jsonld.loader.SchemeRouter;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.nimbusds.jose.JOSEException;
+import org.eclipse.edc.http.client.testfixtures.HttpTestUtils;
+import org.eclipse.edc.iam.did.resolution.DidResolverRegistryImpl;
+import org.eclipse.edc.iam.did.web.resolution.WebDidResolver;
+import org.eclipse.edc.iam.identitytrust.spi.verification.SignatureSuiteRegistry;
+import org.eclipse.edc.iam.identitytrust.spi.verification.VerifierContext;
+import org.eclipse.edc.jsonld.TitaniumJsonLd;
+import org.eclipse.edc.security.signature.jws2020.Jws2020SignatureSuite;
+import org.eclipse.edc.security.signature.jws2020.TestDocumentLoader;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Test;
+
+import java.net.URISyntaxException;
+import java.util.List;
+
+import static org.eclipse.edc.jsonld.util.JacksonJsonLd.createObjectMapper;
+import static org.eclipse.edc.junit.assertions.AbstractResultAssert.assertThat;
+import static org.eclipse.edc.security.signature.jws2020.TestFunctions.readResourceAsJson;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+class LdpVerifierVPTest {
+ private final ObjectMapper mapper = createObjectMapper();
+ private final TestDocumentLoader testDocLoader = new TestDocumentLoader("https://org.eclipse.edc/", "", SchemeRouter.defaultInstance());
+
+ private final SignatureSuiteRegistry suiteRegistry = mock();
+ private VerifierContext context = null;
+ private LdpVerifier ldpVerifier;
+ private TitaniumJsonLd jsonLd;
+
+ @Nested
+ class JsonWebSignature2020 {
+
+ private final Jws2020SignatureSuite jwsSignatureSuite = new Jws2020SignatureSuite(mapper);
+
+ @BeforeEach
+ void setUp() throws URISyntaxException {
+ jsonLd = new TitaniumJsonLd(mock());
+ jsonLd.registerCachedDocument("https://www.w3.org/ns/odrl.jsonld", Thread.currentThread().getContextClassLoader().getResource("odrl.jsonld").toURI());
+ jsonLd.registerCachedDocument("https://www.w3.org/ns/did/v1", Thread.currentThread().getContextClassLoader().getResource("jws2020.json").toURI());
+ jsonLd.registerCachedDocument("https://w3id.org/security/suites/jws-2020/v1", Thread.currentThread().getContextClassLoader().getResource("jws2020.json").toURI());
+ jsonLd.registerCachedDocument("https://www.w3.org/2018/credentials/v1", Thread.currentThread().getContextClassLoader().getResource("credentials.v1.json").toURI());
+ jsonLd.registerCachedDocument("https://www.w3.org/2018/credentials/examples/v1", Thread.currentThread().getContextClassLoader().getResource("examples.v1.json").toURI());
+
+ var httpClient = HttpTestUtils.testHttpClient();
+
+ var resolver = new WebDidResolver(httpClient, true, mapper, mock());
+
+ var resolverRegistry = new DidResolverRegistryImpl();
+ resolverRegistry.register(resolver);
+ ldpVerifier = LdpVerifier.Builder.newInstance()
+ .signatureSuites(suiteRegistry)
+ .jsonLd(jsonLd)
+ .objectMapper(mapper)
+ .methodResolver(new DidMethodResolver(resolverRegistry))
+ .loader(testDocLoader)
+ .build();
+ context = VerifierContext.Builder.newInstance().verifier(ldpVerifier).build();
+
+ when(suiteRegistry.getAllSuites()).thenReturn(List.of(jwsSignatureSuite));
+ }
+
+
+ @Test
+ void verify_singleValidCredentialsWithRSA_success() throws JOSEException {
+ var rawVp = readResourceAsJson("failing_vp.json");
+
+ var res = ldpVerifier.verify(rawVp.toString(), context);
+
+ assertThat(res).isSucceeded();
+ }
+
+
+ }
+}
\ No newline at end of file
Index: extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/failing_vp.json
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/failing_vp.json b/extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/failing_vp.json
new file mode 100644
--- /dev/null (date 1715588431037)
+++ b/extensions/common/crypto/ldp-verifiable-credentials/src/test/resources/failing_vp.json (date 1715588431037)
@@ -0,0 +1,345 @@
+{
+ "@id": "https://w3id.org/tractusx-trust/v0.8/id/b7325878-9def-407f-a18c-839712426456",
+ "@type": [
+ "https://www.w3.org/2018/credentials#VerifiablePresentation"
+ ],
+ "https://www.w3.org/2018/credentials#holder": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#verifiableCredential": [
+ {
+ "@graph": [
+ {
+ "@type": [
+ "https://www.w3.org/2018/credentials#VerifiableCredential"
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json",
+ "https://www.w3.org/2018/credentials#issuer": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#issuanceDate": [
+ {
+ "@value": "2024-05-08T10:17:32.492Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#credentialSubject": [
+ {
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json#cs",
+ "@type": [
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#LegalParticipant"
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalName": [
+ {
+ "@value": "Nortal"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalRegistrationNumber": [
+ {
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/lrn.json#cs"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#headquarterAddress": [
+ {
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#countrySubdivisionCode": [
+ {
+ "@value": "FR-HDF"
+ }
+ ]
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalAddress": [
+ {
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#countrySubdivisionCode": [
+ {
+ "@value": "FR-HDF"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "https://w3id.org/security#proof": [
+ {
+ "@graph": [
+ {
+ "http://purl.org/dc/terms/created": [
+ {
+ "@value": "2024-05-08T10:17:33.800Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "@type": [
+ "https://w3id.org/security#JsonWebSignature2020"
+ ],
+ "https://w3id.org/security#proofPurpose": [
+ {
+ "@id": "https://w3id.org/security#assertionMethod"
+ }
+ ],
+ "https://w3id.org/security#verificationMethod": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA"
+ }
+ ],
+ "https://w3id.org/security#jws": [
+ {
+ "@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MV_kbUCkx5K7bWXcv5cSqKn8R4O_dAXJgi90HBALPBTrpZdVml-nHurB3FE0IyOYde0UDv-YhoxZr9TrMn0cFDSp_uNENQ_QACuyp4Qpz00yT_al1mQ-dgJ_qMykAW-n7noQn0xuwDMbsKjsyAmSwWoVQZa70bmBV0_Ad0eRUx3CNK1Fc75eaOCKNnm9R0KsxxbbuT22XEP7rl4AaOAaP-ePiyrMUQWZ8m2gc0PdwxdpwEsfFHm45i2MgN19HPomK2JK2I2QmOu7v4n9C52p6EqsPImqUFA0-lFsKfcw0d_88g0VdhRKffTS22FRvkz1a1bl8vX81pixyjG5c4jSQQ"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@graph": [
+ {
+ "@type": [
+ "https://www.w3.org/2018/credentials#VerifiableCredential"
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/compliance.json",
+ "https://www.w3.org/2018/credentials#issuer": [
+ {
+ "@id": "did:web:gx-compliance.i.x-road.rocks:main"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#issuanceDate": [
+ {
+ "@value": "2024-05-08T10:17:41.104Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#expirationDate": [
+ {
+ "@value": "2024-08-06T10:17:41.104Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#credentialSubject": [
+ {
+ "@type": [
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/lrn.json",
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
+ {
+ "@value": "sha256-726549ae250107c5522afc07099796b1af87c6354a223fb4ca4cbf0731bb7835"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
+ {
+ "@value": "RFC8785:JCS"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
+ {
+ "@value": "22.10"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
+ {
+ "@value": "gx:legalRegistrationNumber"
+ }
+ ]
+ },
+ {
+ "@type": [
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json",
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
+ {
+ "@value": "sha256-2c9192aa2c907e9ea1bba80bfb817b012f4a31117d1dfcb731e9c68a89d8af15"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
+ {
+ "@value": "RFC8785:JCS"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
+ {
+ "@value": "22.10"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
+ {
+ "@value": "gx:GaiaXTermsAndConditions"
+ }
+ ]
+ },
+ {
+ "@type": [
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json",
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
+ {
+ "@value": "sha256-a0032dcf2e0cd5149ace360144379f32e76f15d628253d550b7126787ac4faa2"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
+ {
+ "@value": "RFC8785:JCS"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
+ {
+ "@value": "22.10"
+ }
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
+ {
+ "@value": "gx:LegalParticipant"
+ }
+ ]
+ }
+ ],
+ "https://w3id.org/security#proof": [
+ {
+ "@graph": [
+ {
+ "@type": [
+ "https://w3id.org/security#JsonWebSignature2020"
+ ],
+ "http://purl.org/dc/terms/created": [
+ {
+ "@value": "2024-05-08T10:17:41.879Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "https://w3id.org/security#proofPurpose": [
+ {
+ "@id": "https://w3id.org/security#assertionMethod"
+ }
+ ],
+ "https://w3id.org/security#verificationMethod": [
+ {
+ "@id": "did:web:gx-compliance.i.x-road.rocks:main#X509-JWK2020"
+ }
+ ],
+ "https://w3id.org/security#jws": [
+ {
+ "@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Wn5nEttrT3eD7ElrERkMzafycpS5inVk-gjHN2vJ84Ois5Ys5_ncWusTAZ2q3P0-i1gD_5PZ09DSr7LJhGt9eVcx028Yh8ICpazO4iytPdfZd_spvDQz2y9d6oETjpheBVDlRk-rnPaUx4-pgQEbz9N4lPUeAI6At_6nZF44-LNT6Yk47q2tbKGm0kl5zjQk5fEpE-J_bhHlpg5Ps9pnFA-4lFPog9K_YQMyhZ8vofKyPFtjJWGHlJTy07SCMhzDjGgmuGIuxCeulLS0gn2ho1jN6nTB3p0DvcsiljP2zTjwyZmuJnPZHsWYHzssptP4X3cikOuyQBYld5kNfJRXlw"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "@graph": [
+ {
+ "@type": [
+ "https://www.w3.org/2018/credentials#VerifiableCredential"
+ ],
+ "https://www.w3.org/2018/credentials#issuanceDate": [
+ {
+ "@value": "2024-05-08T10:17:28.597Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#credentialSubject": [
+ {
+ "@type": [
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#GaiaXTermsAndConditions"
+ ],
+ "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#termsAndConditions": [
+ {
+ "@value": "The PARTICIPANT signing the Self-Description agrees as follows:\n- to update its descriptions about any changes, be it technical, organizational, or legal - especially but not limited to contractual in regards to the indicated attributes present in the descriptions.\n\nThe keypair used to sign Verifiable Credentials will be revoked where Gaia-X Association becomes aware of any inaccurate statements in regards to the claims which result in a non-compliance with the Trust Framework and policy rules defined in the Policy Rules and Labelling Document (PRLD)."
+ }
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json#subject"
+ }
+ ],
+ "https://www.w3.org/2018/credentials#issuer": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
+ }
+ ],
+ "@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json",
+ "https://w3id.org/security#proof": [
+ {
+ "@graph": [
+ {
+ "http://purl.org/dc/terms/created": [
+ {
+ "@value": "2024-05-08T10:17:30.260Z",
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
+ }
+ ],
+ "@type": [
+ "https://w3id.org/security#JsonWebSignature2020"
+ ],
+ "https://w3id.org/security#proofPurpose": [
+ {
+ "@id": "https://w3id.org/security#assertionMethod"
+ }
+ ],
+ "https://w3id.org/security#verificationMethod": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA"
+ }
+ ],
+ "https://w3id.org/security#jws": [
+ {
+ "@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..jVtetDQI17CuQh_F7uxEoMYX6-wyUl_75Pi_L8JOC-0jT1BMoOIcT9S6z3ojctob2q2X3JtFlbohAF45a2JHItg2G_yxZwJw08lDQFAgDZcDP40xt7hkL0Nyr2FPMH3x-ErRhxeJOqoATpMvBBD0Z0xhG7usBbyZhzabodRb59ES0Fgn6w25sTkFv1hVILBp_ITfAoPhoSMEzRwFv4K7YAqa8LFXq32y3z8I4ze0h-YFvZXeNB63EAdUirtfFNWrxcSeGeFSzAeAvZq51RmMyRDHTVS0jXfZ3XUWyCahTXAn0ryoK8Zt0yfcw2LFCcvK8Hu6zNjZMgHvirB65kGwYA"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "https://w3id.org/security#proof": [
+ {
+ "@graph": [
+ {
+ "https://w3id.org/security#verificationMethod": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA",
+ "https://w3id.org/security#controller": [
+ {
+ "@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
+ }
+ ],
+ "@type": [
+ "JsonWebSignature2020"
+ ]
+ }
+ ],
+ "@type": [
+ "https://w3id.org/security#JsonWebSignature2020"
+ ],
+ "https://w3id.org/security#proofPurpose": [
+ {
+ "@id": "https://w3id.org/security#assertionMethod"
+ }
+ ],
+ "http://purl.org/dc/terms/created": [
+ {
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime",
+ "@value": "2024-05-10T16:03:16.511953811Z"
+ }
+ ],
+ "https://w3id.org/security#jws": [
+ "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJSUzI1NiJ9..g2ksaHt3Mv2Doy73sVOOgIgVLexmd-Lw6zW5J5EqKGL9XVd23KcTEYZCMxik0WyfmsbXpPHdng0B84pFIGxQHUoWgTHIWR83hrSikKU9s0XZDiaLldcq6p0IKFFZuTKZmP2Z5rS6RCxvkxsRQf-huoJrTihI1cwxfdyBqnOC9u3VtfD5OlNCkv4keXq0x__CZC2N_WCWac5s46LiL7iZvE7xsDkEerd7HWjMswOxL45uZjEM4G4HvQi1tv8ML-BHWiaMDjOYqUYjLZBAhMfLb_BgzcOSPOx9Lws4AwYVxcdfVvOPeHCOJ3DVFE-Xlx0-XDzeuSphDR55k0YQhUEN7A"
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
{
"@id": "https://w3id.org/tractusx-trust/v0.8/id/b7325878-9def-407f-a18c-839712426456",
"@type": [
"https://www.w3.org/2018/credentials#VerifiablePresentation"
],
"https://www.w3.org/2018/credentials#holder": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
}
],
"https://www.w3.org/2018/credentials#verifiableCredential": [
{
"@graph": [
{
"@type": [
"https://www.w3.org/2018/credentials#VerifiableCredential"
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json",
"https://www.w3.org/2018/credentials#issuer": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
}
],
"https://www.w3.org/2018/credentials#issuanceDate": [
{
"@value": "2024-05-08T10:17:32.492Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"https://www.w3.org/2018/credentials#credentialSubject": [
{
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json#cs",
"@type": [
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#LegalParticipant"
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalName": [
{
"@value": "Nortal"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalRegistrationNumber": [
{
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/lrn.json#cs"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#headquarterAddress": [
{
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#countrySubdivisionCode": [
{
"@value": "FR-HDF"
}
]
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#legalAddress": [
{
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#countrySubdivisionCode": [
{
"@value": "FR-HDF"
}
]
}
]
}
],
"https://w3id.org/security#proof": [
{
"@graph": [
{
"http://purl.org/dc/terms/created": [
{
"@value": "2024-05-08T10:17:33.800Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"@type": [
"https://w3id.org/security#JsonWebSignature2020"
],
"https://w3id.org/security#proofPurpose": [
{
"@id": "https://w3id.org/security#assertionMethod"
}
],
"https://w3id.org/security#verificationMethod": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA"
}
],
"https://w3id.org/security#jws": [
{
"@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MV_kbUCkx5K7bWXcv5cSqKn8R4O_dAXJgi90HBALPBTrpZdVml-nHurB3FE0IyOYde0UDv-YhoxZr9TrMn0cFDSp_uNENQ_QACuyp4Qpz00yT_al1mQ-dgJ_qMykAW-n7noQn0xuwDMbsKjsyAmSwWoVQZa70bmBV0_Ad0eRUx3CNK1Fc75eaOCKNnm9R0KsxxbbuT22XEP7rl4AaOAaP-ePiyrMUQWZ8m2gc0PdwxdpwEsfFHm45i2MgN19HPomK2JK2I2QmOu7v4n9C52p6EqsPImqUFA0-lFsKfcw0d_88g0VdhRKffTS22FRvkz1a1bl8vX81pixyjG5c4jSQQ"
}
]
}
]
}
]
}
]
},
{
"@graph": [
{
"@type": [
"https://www.w3.org/2018/credentials#VerifiableCredential"
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/compliance.json",
"https://www.w3.org/2018/credentials#issuer": [
{
"@id": "did:web:gx-compliance.i.x-road.rocks:main"
}
],
"https://www.w3.org/2018/credentials#issuanceDate": [
{
"@value": "2024-05-08T10:17:41.104Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"https://www.w3.org/2018/credentials#expirationDate": [
{
"@value": "2024-08-06T10:17:41.104Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"https://www.w3.org/2018/credentials#credentialSubject": [
{
"@type": [
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/lrn.json",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
{
"@value": "sha256-726549ae250107c5522afc07099796b1af87c6354a223fb4ca4cbf0731bb7835"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
{
"@value": "RFC8785:JCS"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
{
"@value": "22.10"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
{
"@value": "gx:legalRegistrationNumber"
}
]
},
{
"@type": [
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
{
"@value": "sha256-2c9192aa2c907e9ea1bba80bfb817b012f4a31117d1dfcb731e9c68a89d8af15"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
{
"@value": "RFC8785:JCS"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
{
"@value": "22.10"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
{
"@value": "gx:GaiaXTermsAndConditions"
}
]
},
{
"@type": [
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#compliance"
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/participant.json",
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrity": [
{
"@value": "sha256-a0032dcf2e0cd5149ace360144379f32e76f15d628253d550b7126787ac4faa2"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#integrityNormalization": [
{
"@value": "RFC8785:JCS"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#version": [
{
"@value": "22.10"
}
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#type": [
{
"@value": "gx:LegalParticipant"
}
]
}
],
"https://w3id.org/security#proof": [
{
"@graph": [
{
"@type": [
"https://w3id.org/security#JsonWebSignature2020"
],
"http://purl.org/dc/terms/created": [
{
"@value": "2024-05-08T10:17:41.879Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"https://w3id.org/security#proofPurpose": [
{
"@id": "https://w3id.org/security#assertionMethod"
}
],
"https://w3id.org/security#verificationMethod": [
{
"@id": "did:web:gx-compliance.i.x-road.rocks:main#X509-JWK2020"
}
],
"https://w3id.org/security#jws": [
{
"@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..Wn5nEttrT3eD7ElrERkMzafycpS5inVk-gjHN2vJ84Ois5Ys5_ncWusTAZ2q3P0-i1gD_5PZ09DSr7LJhGt9eVcx028Yh8ICpazO4iytPdfZd_spvDQz2y9d6oETjpheBVDlRk-rnPaUx4-pgQEbz9N4lPUeAI6At_6nZF44-LNT6Yk47q2tbKGm0kl5zjQk5fEpE-J_bhHlpg5Ps9pnFA-4lFPog9K_YQMyhZ8vofKyPFtjJWGHlJTy07SCMhzDjGgmuGIuxCeulLS0gn2ho1jN6nTB3p0DvcsiljP2zTjwyZmuJnPZHsWYHzssptP4X3cikOuyQBYld5kNfJRXlw"
}
]
}
]
}
]
}
]
},
{
"@graph": [
{
"@type": [
"https://www.w3.org/2018/credentials#VerifiableCredential"
],
"https://www.w3.org/2018/credentials#issuanceDate": [
{
"@value": "2024-05-08T10:17:28.597Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"https://www.w3.org/2018/credentials#credentialSubject": [
{
"@type": [
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#GaiaXTermsAndConditions"
],
"https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#termsAndConditions": [
{
"@value": "The PARTICIPANT signing the Self-Description agrees as follows:\n- to update its descriptions about any changes, be it technical, organizational, or legal - especially but not limited to contractual in regards to the indicated attributes present in the descriptions.\n\nThe keypair used to sign Verifiable Credentials will be revoked where Gaia-X Association becomes aware of any inaccurate statements in regards to the claims which result in a non-compliance with the Trust Framework and policy rules defined in the Policy Rules and Labelling Document (PRLD)."
}
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json#subject"
}
],
"https://www.w3.org/2018/credentials#issuer": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
}
],
"@id": "https://xroad-8-ss0.s3.eu-west-1.amazonaws.com/tsandcs.json",
"https://w3id.org/security#proof": [
{
"@graph": [
{
"http://purl.org/dc/terms/created": [
{
"@value": "2024-05-08T10:17:30.260Z",
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
}
],
"@type": [
"https://w3id.org/security#JsonWebSignature2020"
],
"https://w3id.org/security#proofPurpose": [
{
"@id": "https://w3id.org/security#assertionMethod"
}
],
"https://w3id.org/security#verificationMethod": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA"
}
],
"https://w3id.org/security#jws": [
{
"@value": "eyJhbGciOiJQUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..jVtetDQI17CuQh_F7uxEoMYX6-wyUl_75Pi_L8JOC-0jT1BMoOIcT9S6z3ojctob2q2X3JtFlbohAF45a2JHItg2G_yxZwJw08lDQFAgDZcDP40xt7hkL0Nyr2FPMH3x-ErRhxeJOqoATpMvBBD0Z0xhG7usBbyZhzabodRb59ES0Fgn6w25sTkFv1hVILBp_ITfAoPhoSMEzRwFv4K7YAqa8LFXq32y3z8I4ze0h-YFvZXeNB63EAdUirtfFNWrxcSeGeFSzAeAvZq51RmMyRDHTVS0jXfZ3XUWyCahTXAn0ryoK8Zt0yfcw2LFCcvK8Hu6zNjZMgHvirB65kGwYA"
}
]
}
]
}
]
}
]
}
],
"https://w3id.org/security#proof": [
{
"@graph": [
{
"https://w3id.org/security#verificationMethod": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com#JWK2020-RSA",
"https://w3id.org/security#controller": [
{
"@id": "did:web:xroad-8-ss0.s3.eu-west-1.amazonaws.com"
}
],
"@type": [
"JsonWebSignature2020"
]
}
],
"@type": [
"https://w3id.org/security#JsonWebSignature2020"
],
"https://w3id.org/security#proofPurpose": [
{
"@id": "https://w3id.org/security#assertionMethod"
}
],
"http://purl.org/dc/terms/created": [
{
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2024-05-10T16:03:16.511953811Z"
}
],
"https://w3id.org/security#jws": [
"eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJSUzI1NiJ9..g2ksaHt3Mv2Doy73sVOOgIgVLexmd-Lw6zW5J5EqKGL9XVd23KcTEYZCMxik0WyfmsbXpPHdng0B84pFIGxQHUoWgTHIWR83hrSikKU9s0XZDiaLldcq6p0IKFFZuTKZmP2Z5rS6RCxvkxsRQf-huoJrTihI1cwxfdyBqnOC9u3VtfD5OlNCkv4keXq0x__CZC2N_WCWac5s46LiL7iZvE7xsDkEerd7HWjMswOxL45uZjEM4G4HvQi1tv8ML-BHWiaMDjOYqUYjLZBAhMfLb_BgzcOSPOx9Lws4AwYVxcdfVvOPeHCOJ3DVFE-Xlx0-XDzeuSphDR55k0YQhUEN7A"
]
}
]
}
]
}
@ricardas-buc
Copy link
Author

LdpVerifierVPTest as it is will fail on

 if (!(verificationMethod instanceof VerificationKey)) {
                    return failure("Proof did not contain a valid VerificationMethod, expected VerificationKey, got: %s".formatted(verificationMethod.getClass()));
                }```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment