diff --git a/src/main/resources/REST/json/Credential.json b/src/main/resources/REST/json/Credential.json index 9d1be176e26a3e85270078e167f18ae8e286b4b3..d4989b3bee89d8723c3091eee74a1d5349c8e136 100644 --- a/src/main/resources/REST/json/Credential.json +++ b/src/main/resources/REST/json/Credential.json @@ -1,123 +1,153 @@ { "for_proof":{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "id": "http://example.edu/credentials/3732", - "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T00:00:00Z", - "credentialSubject": { - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "allow": true, - "num": 123, - "array": { - "txt1": "1", - "txt2": "2" + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "allow": true, + "num": 123, + "array": { + "txt1": "1", + "txt2": "2" + } } } }, "for_proof_alumni": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "id": "http://example.edu/credentials/3732", - "type": ["VerifiableCredential", "UniversityDegreeCredential"], - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T00:00:00Z", - "credentialSubject": { - "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", - "degree": { - "type": "BachelorDegree", - "name": "Bachelor of Science and Arts" + "issuer": "http://example.edu/credentials/3732", + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "degree": { + "type": "BachelorDegree", + "name": "Bachelor of Science and Arts" + } } } }, "for_proof_without_ID": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "id": "http://example.edu/credentials/3732", - "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T00:00:00Z", - "credentialSubject": { - "allow": true, - "num": 123, - "array": { - "txt1": "1", - "txt2": "2" + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "allow": true, + "num": 123, + "array": { + "txt1": "1", + "txt2": "2" + } } } }, "for_proof_incorrect_ID_space":{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "id": "http://example.edu/credentials/3732", - "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T00:00:00Z", - "credentialSubject": { - "id": " ", - "allow": true, - "num": 123, - "array": { - "txt1": "1", - "txt2": "2" + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "id": " ", + "allow": true, + "num": 123, + "array": { + "txt1": "1", + "txt2": "2" + } } } }, "for_proof_incorrect_ID_symbols":{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "id": "http://example.edu/credentials/3732", - "type": ["VerifiableCredential", "UniversityDegreeCredential"], "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "issuanceDate": "2010-01-01T00:00:00Z", - "credentialSubject": { - "id": ":", - "allow": true, - "num": 123, - "array": { - "txt1": "1", - "txt2": "2" + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "id": "http://example.edu/credentials/3732", + "type": ["VerifiableCredential", "UniversityDegreeCredential"], + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "issuanceDate": "2010-01-01T00:00:00Z", + "credentialSubject": { + "id": ":", + "allow": true, + "num": 123, + "array": { + "txt1": "1", + "txt2": "2" + } } } }, "incorrect_id":{ - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "id": "ZZZZZZZZZZZZZZZ" - }, - "issuanceDate": "2022-07-01T11:07:57.975459274Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - } - ] + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "credential": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "ZZZZZZZZZZZZZZZ" + }, + "issuanceDate": "2022-07-01T11:07:57.975459274Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] + } }, "missing_proof": { "@context": [ @@ -143,123 +173,123 @@ ] }, "modified_ID": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "credentialSubject": { - "allow": true, - "array": { - "txt1": "1", - "txt2": "2" + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "credentialSubject": { + "allow": true, + "array": { + "txt1": "1", + "txt2": "2" + }, + "id": "did:web:gaiax.XXXX.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "num": 123 }, - "id": "did:web:gaiax.XXXX.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "num": 123 - }, - "id": "http://example.edu/credentials/3732", - "issuanceDate": "2010-01-01T00:00:00Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2022-08-04T15:26:30.176376203Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] + "id": "http://example.edu/credentials/3732", + "issuanceDate": "2010-01-01T00:00:00Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2022-08-04T15:26:30.176376203Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" + }, + "type": [ + "VerifiableCredential", + "UniversityDegreeCredential" + ] }, "modified_issuanceDate": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "credentialSubject": { - "allow": true, - "array": { - "txt1": "1", - "txt2": "2" + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "credentialSubject": { + "allow": true, + "array": { + "txt1": "1", + "txt2": "2" + }, + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "num": 123 }, - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "num": 123 - }, - "id": "http://example.edu/credentials/3732", - "issuanceDate": "2020-01-01T00:00:00Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2022-08-04T15:26:30.176376203Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] + "id": "http://example.edu/credentials/3732", + "issuanceDate": "2020-01-01T00:00:00Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2022-08-04T15:26:30.176376203Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" + }, + "type": [ + "VerifiableCredential", + "UniversityDegreeCredential" + ] }, "modified_credentialSubject_allow": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "credentialSubject": { - "allow": false, - "array": { - "txt1": "1", - "txt2": "2" + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "credentialSubject": { + "allow": false, + "array": { + "txt1": "1", + "txt2": "2" + }, + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "num": 123 }, - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "num": 123 - }, - "id": "http://example.edu/credentials/3732", - "issuanceDate": "2010-01-01T00:00:00Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2022-08-04T15:26:30.176376203Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] + "id": "http://example.edu/credentials/3732", + "issuanceDate": "2010-01-01T00:00:00Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2022-08-04T15:26:30.176376203Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" + }, + "type": [ + "VerifiableCredential", + "UniversityDegreeCredential" + ] }, "modified_credentialSubject_array": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1", - "https://www.schema.org" - ], - "credentialSubject": { - "allow": true, - "array": { - "txt1": "I", - "txt2": "2" + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://www.w3.org/2018/credentials/examples/v1", + "https://www.schema.org" + ], + "credentialSubject": { + "allow": true, + "array": { + "txt1": "I", + "txt2": "2" + }, + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "num": 123 }, - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "num": 123 - }, - "id": "http://example.edu/credentials/3732", - "issuanceDate": "2010-01-01T00:00:00Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2022-08-04T15:26:30.176376203Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": [ - "VerifiableCredential", - "UniversityDegreeCredential" - ] + "id": "http://example.edu/credentials/3732", + "issuanceDate": "2010-01-01T00:00:00Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2022-08-04T15:26:30.176376203Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDq0c_zVTJeQbBLEPENCiJYQ1YTm4qI4mFVNhi_t5c1bAiABJacTO6fYXfNA4N0WqHhyEAl5F3BqwfPoc3R7iX2c9Q", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" + }, + "type": [ + "VerifiableCredential", + "UniversityDegreeCredential" + ] } } \ No newline at end of file diff --git a/src/main/resources/REST/json/Data.json b/src/main/resources/REST/json/Data.json index f41bcad297a7147c6f55318d767d769fd0399ff2..71e8f0efdbbb23a223d44628bba12fd4bafb3b3f 100644 --- a/src/main/resources/REST/json/Data.json +++ b/src/main/resources/REST/json/Data.json @@ -1,5 +1,8 @@ { "single": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "data": [ { "age": 21, @@ -8,6 +11,9 @@ ] }, "multi": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "data": [ { "dataOfBirth": "-0571-01-01T07:53:06.234142119Z", @@ -21,6 +27,9 @@ ] }, "context": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1", @@ -41,6 +50,9 @@ "blank": { }, "missing_data": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "not_data": [ { "age": 21, @@ -52,9 +64,15 @@ "data": [] }, "data_format": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "data": "different format" }, "context_no_at": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", "context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1", diff --git a/src/main/resources/REST/json/Presentation.json b/src/main/resources/REST/json/Presentation.json index a5b7f26cb92e97c30359822d201c9291507e3856..e98f5312de44dae893b06ffdd9f70dc055b8e91a 100644 --- a/src/main/resources/REST/json/Presentation.json +++ b/src/main/resources/REST/json/Presentation.json @@ -1,121 +1,136 @@ { "for_proof": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "citizenship": "France", - "age_over": 18, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "citizenship": "France", + "age_over": 18, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - } - ] + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] + } }, "for_proof_alumni": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "type": "VerifiablePresentation", - "verifiableCredential": [{ + "issuer": "https://example.edu/issuers/565049", + "key": "key1", + "namespace": "transit", + "presentation": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], - "id": "http://example.edu/credentials/1872", - "type": ["VerifiableCredential", "AlumniCredential"], - "issuer": "https://example.edu/issuers/565049", - "issuanceDate": "2010-01-01T19:23:24Z", - "credentialSubject": { - "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", - "alumniOf": { - "id": "did:example:c276e12ec21ebfeb1f712ebc6f1", - "name": [{ - "value": "Example University", - "lang": "en" - }, { - "value": "Exemple d'Université", - "lang": "fr" - }] - } - } - }] - }, - "for_proof_without_ID": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "num": 1234, - "type": "pass" - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { + "type": "VerifiablePresentation", + "verifiableCredential": [{ "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" + "https://www.w3.org/2018/credentials/examples/v1" ], + "id": "http://example.edu/credentials/1872", + "type": ["VerifiableCredential", "AlumniCredential"], + "issuer": "https://example.edu/issuers/565049", + "issuanceDate": "2010-01-01T19:23:24Z", "credentialSubject": { - "allow": true, - "array": [ - { - "num1": 1, - "num2": 2 - }, - { - "txt1": "1", - "txt2": "2" - } - ] + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", + "alumniOf": { + "id": "did:example:c276e12ec21ebfeb1f712ebc6f1", + "name": [{ + "value": "Example University", + "lang": "en" + }, { + "value": "Exemple d'Université", + "lang": "fr" + }] + } + } + }] + } + }, + "for_proof_without_ID": { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "num": 1234, + "type": "pass" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - } - ] + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "array": [ + { + "num1": 1, + "num2": 2 + }, + { + "txt1": "1", + "txt2": "2" + } + ] + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] + } }, "modified_issuanceDate": { "@context": [ @@ -171,8 +186,8 @@ ], "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "proof": { - "created": "2022-08-03T14:26:51.378442416Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDanJ43A79S8p7tGfrHvdLsH6iZWRNv2gQlWtCHboOBaAiBJbZEtYLn2151Q3lv5QnpJcdrPzsyADNbKMmqf-W8CAQ", + "created": "2022-12-01T11:43:21.784841811Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIAGEoCMtt6GbucB21ZB8vqgWkIzQUgguDH4KYdov7QD8AiEA9xfVGkmsx9f4PEgdC-gVMVx73rJp31yfZeB9cSURWAk", "proofPurpose": "assertionMethod", "type": "JsonWebSignature2020", "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" @@ -212,49 +227,54 @@ ] }, "incorrect_ID": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2022-07-29T15:43:25.076882592Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIQD84hJZfHP84SJSL98XvtUlCNVD48GHb0R-lqqeCPw79wIgXUdmzYoDsUj0sPIVICgN66UX2BHGjDTY7Rlw74m6Rwo", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "id": "incorrect_ID" - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2022-07-29T15:43:25.076882592Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIQD84hJZfHP84SJSL98XvtUlCNVD48GHb0R-lqqeCPw79wIgXUdmzYoDsUj0sPIVICgN66UX2BHGjDTY7Rlw74m6Rwo", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" }, - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "incorrect_ID" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - } - ] + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] + } }, "modified_credentialSubject_2_allow": { "@context": [ @@ -263,8 +283,8 @@ ], "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "proof": { - "created": "2022-08-03T14:26:51.378442416Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIDanJ43A79S8p7tGfrHvdLsH6iZWRNv2gQlWtCHboOBaAiBJbZEtYLn2151Q3lv5QnpJcdrPzsyADNbKMmqf-W8CAQ", + "created": "2022-12-01T11:43:21.784841811Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIAGEoCMtt6GbucB21ZB8vqgWkIzQUgguDH4KYdov7QD8AiEA9xfVGkmsx9f4PEgdC-gVMVx73rJp31yfZeB9cSURWAk", "proofPurpose": "assertionMethod", "type": "JsonWebSignature2020", "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" @@ -310,8 +330,8 @@ ], "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "proof": { - "created": "2022-08-03T13:50:51.575345046Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIF7F4sW9tY6bR_Z1bCl4rus_FEDvLbJRKDwmHCkLs5pDAiEAxPkI-TiQh3er_VxR4EdjoG-eYmpp1XpZdKVnvm2xjz8", + "created": "2022-12-01T11:43:21.784841811Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIAGEoCMtt6GbucB21ZB8vqgWkIzQUgguDH4KYdov7QD8AiEA9xfVGkmsx9f4PEgdC-gVMVx73rJp31yfZeB9cSURWAk", "proofPurpose": "assertionMethod", "type": "JsonWebSignature2020", "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" @@ -357,8 +377,8 @@ ], "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "proof": { - "created": "2022-08-03T13:50:51.575345046Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIF7F4sW9tY6bR_Z1bCl4rus_FEDvLbJRKDwmHCkLs5pDAiEAxPkI-TiQh3er_VxR4EdjoG-eYmpp1XpZdKVnvm2xjz8", + "created": "2022-12-01T11:43:21.784841811Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIAGEoCMtt6GbucB21ZB8vqgWkIzQUgguDH4KYdov7QD8AiEA9xfVGkmsx9f4PEgdC-gVMVx73rJp31yfZeB9cSURWAk", "proofPurpose": "assertionMethod", "type": "JsonWebSignature2020", "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" @@ -389,7 +409,7 @@ ], "credentialSubject": { "allow": true, - "id": "https://gaiax.XXX.com/tsa/policy/example/ProofRequestResponse/1.0" + "id": "invalid_ID" }, "issuanceDate": "2022-07-21T10:24:36.203861194Z", "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", @@ -402,10 +422,10 @@ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1" ], - "id": "did:web:gaiax.XXXXX.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "id": "did:web:gaiax.ZZZZZZ.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "proof": { - "created": "2022-08-03T06:11:38.170830056Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEYCIQDJ7gTTZju3fJ-xaCBcWYziuI4J80S19AdxwNl3x4nzIQIhALApZj26dRANZZx5mp6PlChh1TExNc203LFPkHzfCWGk", + "created": "2022-12-01T11:43:21.784841811Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIAGEoCMtt6GbucB21ZB8vqgWkIzQUgguDH4KYdov7QD8AiEA9xfVGkmsx9f4PEgdC-gVMVx73rJp31yfZeB9cSURWAk", "proofPurpose": "assertionMethod", "type": "JsonWebSignature2020", "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" @@ -415,7 +435,8 @@ { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" ], "credentialSubject": { "age_over": 18, @@ -430,7 +451,8 @@ { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" ], "credentialSubject": { "allow": true, @@ -443,50 +465,55 @@ ] }, "modified_proof_created": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "proof": { - "created": "2023-07-21T14:28:09.071187173Z", - "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIFkavr6XpAYbdurBmQXNei-hI8WHAcnEYkZ6J3i4d3FKAiA4BtVCAixsAypaJ5dcBxn96Ju1OGfi7Kw1QRZMlMumhg", - "proofPurpose": "assertionMethod", - "type": "JsonWebSignature2020", - "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" - }, - "type": "VerifiablePresentation", - "verifiableCredential": [ - { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1", "https://www.w3.org/2018/credentials/examples/v1" ], - "credentialSubject": { - "allow": true, - "id": "example/examplePolicy/1.0" + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "proof": { + "created": "2023-07-21T14:28:09.071187173Z", + "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIFkavr6XpAYbdurBmQXNei-hI8WHAcnEYkZ6J3i4d3FKAiA4BtVCAixsAypaJ5dcBxn96Ju1OGfi7Kw1QRZMlMumhg", + "proofPurpose": "assertionMethod", + "type": "JsonWebSignature2020", + "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://www.w3.org/2018/credentials/examples/v1" - ], - "credentialSubject": { - "allow": true, - "id": "example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - } - ] + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://www.w3.org/2018/credentials/examples/v1" + ], + "credentialSubject": { + "allow": true, + "id": "example/examplePolicy/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://www.w3.org/2018/credentials/examples/v1" + ], + "credentialSubject": { + "allow": true, + "id": "example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] + } }, "missing_proof": { "@context": [ @@ -499,10 +526,13 @@ { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" ], "credentialSubject": { + "age_over": 18, "allow": true, + "citizenship": "France", "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" }, "issuanceDate": "2022-07-21T10:24:36.203848291Z", @@ -512,7 +542,8 @@ { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" ], "credentialSubject": { "allow": true, @@ -525,121 +556,136 @@ ] }, "for_proof_incorrect_ID_path": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "credentialSubject": { - "allow": true, - "citizenship": "France", - "age_over": 18, - "id": "/tsa/policy/example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/security/suites/jws-2020/v1" ], - "credentialSubject": { - "allow": true, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "credentialSubject": { + "allow": true, + "citizenship": "France", + "age_over": 18, + "id": "/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] } - ] - }, + }, "for_proof_incorrect_ID_space": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "citizenship": "France", - "age_over": 18, - "id": " " - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" + "https://w3id.org/security/suites/jws-2020/v1" ], - "credentialSubject": { - "allow": true, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "citizenship": "France", + "age_over": 18, + "id": " " + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] } - ] - }, + }, "for_proof_incorrect_ID_symbols": { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1" - ], - "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiablePresentation", - "verifiableCredential": [ - { - "@context": [ - "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" - ], - "credentialSubject": { - "allow": true, - "citizenship": "France", - "age_over": 18, - "id": ":" - }, - "issuanceDate": "2022-07-21T10:24:36.203848291Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" - }, - { + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "key": "key1", + "namespace": "transit", + "presentation": { "@context": [ "https://www.w3.org/2018/credentials/v1", - "https://w3id.org/security/suites/jws-2020/v1", - "https://schema.org" + "https://w3id.org/security/suites/jws-2020/v1" ], - "credentialSubject": { - "allow": true, - "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" - }, - "issuanceDate": "2022-07-21T10:24:36.203861194Z", - "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", - "type": "VerifiableCredential" + "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiablePresentation", + "verifiableCredential": [ + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "citizenship": "France", + "age_over": 18, + "id": ":" + }, + "issuanceDate": "2022-07-21T10:24:36.203848291Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + }, + { + "@context": [ + "https://www.w3.org/2018/credentials/v1", + "https://w3id.org/security/suites/jws-2020/v1", + "https://schema.org" + ], + "credentialSubject": { + "allow": true, + "id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0" + }, + "issuanceDate": "2022-07-21T10:24:36.203861194Z", + "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", + "type": "VerifiableCredential" + } + ] } - ] - } + } } \ No newline at end of file diff --git a/src/main/resources/REST/schemas/Signer_CreatePresentation_negative_schema.json b/src/main/resources/REST/schemas/Signer_CreatePresentation_negative_schema.json new file mode 100644 index 0000000000000000000000000000000000000000..93ff0d60e9995f883a841950685115a5c15a563a --- /dev/null +++ b/src/main/resources/REST/schemas/Signer_CreatePresentation_negative_schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "kind": { + "type": "integer" + } + }, + "required": [ + "id", + "kind" + ] +} \ No newline at end of file diff --git a/src/main/resources/REST/schemas/Signer_GetKey_negative_schema.json b/src/main/resources/REST/schemas/Signer_GetKey_negative_schema.json index 93ff0d60e9995f883a841950685115a5c15a563a..a08928ca9d855b1de37d39c97d8f94efd5113ea8 100644 --- a/src/main/resources/REST/schemas/Signer_GetKey_negative_schema.json +++ b/src/main/resources/REST/schemas/Signer_GetKey_negative_schema.json @@ -2,15 +2,31 @@ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { + "name": { + "type": "string" + }, "id": { "type": "string" }, - "kind": { - "type": "integer" + "message": { + "type": "string" + }, + "temporary": { + "type": "boolean" + }, + "timeout": { + "type": "boolean" + }, + "fault": { + "type": "boolean" } }, "required": [ + "name", "id", - "kind" + "message", + "temporary", + "timeout", + "fault" ] } \ No newline at end of file diff --git a/src/test/java/api/test/rest/tsa/signer/SignerStepDefinitions.java b/src/test/java/api/test/rest/tsa/signer/SignerStepDefinitions.java index 5db6ba49cccdd450f27bd8ed8051d377631a7ff9..510ee40a5754f4db8dbc3070e21f8abb0fca4b5a 100644 --- a/src/test/java/api/test/rest/tsa/signer/SignerStepDefinitions.java +++ b/src/test/java/api/test/rest/tsa/signer/SignerStepDefinitions.java @@ -20,25 +20,25 @@ public class SignerStepDefinitions extends BaseStepDefinitions { this.currentRequest = currentRequest; } - @When("I get all keys via TSA Signer API") - public void iGetAllKeysViaTSASignerAPI() { - currentRequest.setPath("/v1/keys"); + @When("I get all key namespaces via TSA Signer API") + public void iGetAllKeyNamespacesViaTSASignerAPI() { + currentRequest.setPath("/v1/namespaces"); Response response = RestClient.get(currentRequest); addRequest(currentRequest); addResponse(response); } - @When("^I get key \\{(.*)\\} via TSA Signer API$") - public void iGetKeyViaTSASignerAPI(String key) { - currentRequest.setPath("/v1/keys/" + key); + @When("^I get all keys from namespace \\{(.*)\\} via TSA Signer API$") + public void iGetAllKeysFromNamespaceViaTSASignerAPI(String namespace) { + currentRequest.setPath("/v1/namespaces/" + namespace + "/keys"); Response response = RestClient.get(currentRequest); addRequest(currentRequest); addResponse(response); } - @When("I get issuer DID via TSA Signer API") - public void iGetIssuerDIDViaTSASignerAPI() { - currentRequest.setPath("/v1/issuerDID"); + @When("^I get key from namespace \\{(.*)\\} using issuer \\{(.*)\\} via TSA Signer API$") + public void iGetKeyViaTSASignerAPI(String namespace, String did) { + currentRequest.setPath("/v1/verification-method/" + namespace + "/" + did); Response response = RestClient.get(currentRequest); addRequest(currentRequest); addResponse(response); diff --git a/src/test/resources/features/tsa/signer/v1/credential/proof/POST.feature b/src/test/resources/features/tsa/signer/v1/credential/proof/POST.feature index fd29f96ed4364a46b9eec72f8109cebd8946b385..947576b26e38d60f23fb5426028ae5e03bcd5cb9 100644 --- a/src/test/resources/features/tsa/signer/v1/credential/proof/POST.feature +++ b/src/test/resources/features/tsa/signer/v1/credential/proof/POST.feature @@ -43,7 +43,9 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST When I set the following request body {{}} And I create credential proof via TSA Signer API Then the status code should be {400} - And the field {message} contains the value {credential type of unknown structure} + And the field {message} contains the value {"namespace" is missing from body} + And the field {message} contains the value {"key" is missing from body} + And the field {message} contains the value {"credential" is missing from body} @negative Scenario Outline: TSA - create credential proof with incorrect ID (<labelSuffix>)- Negative diff --git a/src/test/resources/features/tsa/signer/v1/credential/verify/POST.feature b/src/test/resources/features/tsa/signer/v1/credential/verify/POST.feature index 06a4288073437eada565a6d36df3135a55637d23..d7ea4adfe1ec5b5d4f041e08fd2cfcb7929030d6 100644 --- a/src/test/resources/features/tsa/signer/v1/credential/verify/POST.feature +++ b/src/test/resources/features/tsa/signer/v1/credential/verify/POST.feature @@ -26,7 +26,7 @@ Feature: API - TSA - Signer credential verify - v1/credential/verify POST Given we are testing the TSA Signer Api Scenario: TSA - verify credential proof - Positive - When I load the REST request {Credential.json} with profile {for_proof} + When I load the REST request {Credential.json} with profile {for_proof} And I create credential proof via TSA Signer API Then the status code should be {200} And the response is valid according to the {Signer_CredentialProof_schema.json} REST schema diff --git a/src/test/resources/features/tsa/signer/v1/issuerDID/GET.feature b/src/test/resources/features/tsa/signer/v1/namespaces/GET.feature similarity index 69% rename from src/test/resources/features/tsa/signer/v1/issuerDID/GET.feature rename to src/test/resources/features/tsa/signer/v1/namespaces/GET.feature index 5e35cf3e2fe852154eda496902871bdddf8f7d1e..9f03a34f0a2e15fa10714c48bb039cb5ed822df8 100644 --- a/src/test/resources/features/tsa/signer/v1/issuerDID/GET.feature +++ b/src/test/resources/features/tsa/signer/v1/namespaces/GET.feature @@ -13,19 +13,19 @@ #You should have received a copy of the GNU Affero General Public License #along with this program. If not, see <http://www.gnu.org/licenses/>. -#https://gaiax.vereign.com/tsa/signer/v1/issuerDID +#https://gaiax.vereign.com/tsa/signer/v1/namespaces #Author: Georgi Michev georgi.michev@vereign.com @rest @all @tsa @signer -Feature: API - TSA - Signer Issuer DID - v1/keys GET +Feature: API - TSA - Signer key namespaces - v1/namespaces GET As user - I want to see who is the issuer of the keys - So I am better informed + I want to see what key namespaces are available + So I am able to use the keys in the namespace in the future Background: Given we are testing the TSA Signer Api - Scenario: TSA - Getting Issuer DID - Positive - When I get issuer DID via TSA Signer API + Scenario: TSA - Getting all key namespaces from Singer - Positive + When I get all key namespaces via TSA Signer API And the status code should be {200} - And the field {did} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation} \ No newline at end of file + And the response body contains {transit} \ No newline at end of file diff --git a/src/test/resources/features/tsa/signer/v1/namespaces/{namespace}/keys/GET.feature b/src/test/resources/features/tsa/signer/v1/namespaces/{namespace}/keys/GET.feature new file mode 100644 index 0000000000000000000000000000000000000000..09402ae6b97182ece124fcb8e4b8e0d9e75f2d41 --- /dev/null +++ b/src/test/resources/features/tsa/signer/v1/namespaces/{namespace}/keys/GET.feature @@ -0,0 +1,38 @@ +#Copyright (c) 2018 Vereign AG [https://www.vereign.com] +# +#This is free software: you can redistribute it and/or modify +#it under the terms of the GNU Affero General Public License as +#published by the Free Software Foundation, either version 3 of the +#License, or (at your option) any later version. +# +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU Affero General Public License for more details. +# +#You should have received a copy of the GNU Affero General Public License +#along with this program. If not, see <http://www.gnu.org/licenses/>. + +#https://gaiax.vereign.com/tsa/signer/v1/namespaces/{namespace}/keys +#Author: Georgi Michev georgi.michev@vereign.com + +@rest @all @tsa @signer +Feature: API - TSA - Signer key namespaces - v1/namespaces/{namespace}/keys GET + As user + I want to see what keys a namespaces have + So I am able to use the keys in them in the future + + Background: + Given we are testing the TSA Signer Api + + Scenario: TSA - Getting all keys from specific namespace Singer - Positive + When I get all keys from namespace {transit} via TSA Signer API + And the status code should be {200} + And the response body contains {key1} + And the response body contains {key2} + + @Negative + Scenario: TSA - Getting keys from non existing namespace Singer - Negative + When I get all keys from namespace {non_existing} via TSA Signer API + And the status code should be {404} + And the field {message} contains the value {no keys found in namespace} \ No newline at end of file diff --git a/src/test/resources/features/tsa/signer/v1/presentation/POST.feature b/src/test/resources/features/tsa/signer/v1/presentation/POST.feature index 46c5a42f119f26bf341f51edaeb8868b9e92518f..251b1dc9d28b1edbcaab7758c9918fac0de279c0 100644 --- a/src/test/resources/features/tsa/signer/v1/presentation/POST.feature +++ b/src/test/resources/features/tsa/signer/v1/presentation/POST.feature @@ -44,14 +44,14 @@ Feature: API - TSA - Signer create presentation from JSON - v1/presentation POST When I load the REST request {Data.json} with profile {<profileOption>} And I create presentation from JSON via TSA Signer API Then the status code should be {400} - And the response is valid according to the {Signer_GetKey_negative_schema.json} REST schema + And the response is valid according to the {Signer_CreatePresentation_negative_schema.json} REST schema And the field {message} contains the value {<errMessage>} Examples: | labelSuffix | profileOption | errMessage | | blank | blank | "data" is missing from body | | missing data field | missing_data | "data" is missing from body | - | blank data | blank_data | invalid or missing credentials data | + | blank data | blank_data | "issuer" is missing from body | | wrong format | data_format | json: cannot unmarshal string into Go struct field | @negative @@ -59,5 +59,5 @@ Feature: API - TSA - Signer create presentation from JSON - v1/presentation POST When I set the following request body {{"data":[{"text": "some text"}}} And I create presentation from JSON via TSA Signer API Then the status code should be {400} - And the response is valid according to the {Signer_GetKey_negative_schema.json} REST schema - And the field {message} contains the value {invalid character} + And the response is valid according to the {Signer_CreatePresentation_negative_schema.json} REST schema + And the field {message} contains the value {invalid character} \ No newline at end of file diff --git a/src/test/resources/features/tsa/signer/v1/presentation/proof/POST.feature b/src/test/resources/features/tsa/signer/v1/presentation/proof/POST.feature index 883bb71309007afc325272f3044623ecb41e2833..bbaeb5cc3bc3b08d2847b521135821a17a8637a8 100644 --- a/src/test/resources/features/tsa/signer/v1/presentation/proof/POST.feature +++ b/src/test/resources/features/tsa/signer/v1/presentation/proof/POST.feature @@ -30,27 +30,30 @@ Feature: API - TSA - Signer presentation proof - v1/presentation/proof POST And I create presentation proof via TSA Signer API Then the status code should be {200} And the response is valid according to the {<schema>} REST schema - And the field {proof.verificationMethod} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1} + And the field {proof.verificationMethod} has the value {<verificationMethod>} Examples: - | labelSuffix | profileOption | schema | - | | for_proof | Signer_PresentationProof_schema.json | - | alumni of | for_proof_alumni | Signer_PresentationProof_schema_alumni.json | - | without ID | for_proof_without_ID | Signer_PresentationProof_schema.json | + | labelSuffix | profileOption | schema | verificationMethod | + | | for_proof | Signer_PresentationProof_schema.json | did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1 | + | alumni of | for_proof_alumni | Signer_PresentationProof_schema_alumni.json | https://example.edu/issuers/565049#key1 | + | without ID | for_proof_without_ID | Signer_PresentationProof_schema.json | did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1 | @negative Scenario: TSA - validate presentation proof with empty body - Negative When I set the following request body {{}} And I create presentation proof via TSA Signer API Then the status code should be {400} - And the field {message} contains the value {verifiable presentation is not valid} + And the field {message} contains the value {"issuer" is missing from body} + And the field {message} contains the value {"namespace" is missing from body} + And the field {message} contains the value {"key" is missing from body} + And the field {message} contains the value {"presentation" is missing from body} @negative Scenario Outline: TSA - create presentation proof with incorrect ID (<labelSuffix>) - Negative When I load the REST request {Presentation.json} with profile {<profileOption>} And I create presentation proof via TSA Signer API Then the status code should be {400} - And the field {message} has the value {invalid format of subject id} + And the field {message} contains the value {invalid format of subject id} Examples: | labelSuffix | profileOption | diff --git a/src/test/resources/features/tsa/signer/v1/presentation/verify/POST.feature b/src/test/resources/features/tsa/signer/v1/presentation/verify/POST.feature index 2f5c0b8c68007161edf6f8c77c018d4a4371d865..d5b2413b490b3366482d873e2909cb257f3c82b2 100644 --- a/src/test/resources/features/tsa/signer/v1/presentation/verify/POST.feature +++ b/src/test/resources/features/tsa/signer/v1/presentation/verify/POST.feature @@ -25,7 +25,7 @@ Feature: API - TSA - Signer presentation verify - v1/presentation/verify POST Background: Given we are testing the TSA Signer Api - Scenario: TSA - verify presentation proof - Positive +Scenario: TSA - verify presentation proof - Positive When I load the REST request {Presentation.json} with profile {for_proof} When I create presentation proof via TSA Signer API And the status code should be {200} diff --git a/src/test/resources/features/tsa/signer/v1/keys/GET.feature b/src/test/resources/features/tsa/signer/v1/verification-method/{namespace}/{did}/GET.feature similarity index 52% rename from src/test/resources/features/tsa/signer/v1/keys/GET.feature rename to src/test/resources/features/tsa/signer/v1/verification-method/{namespace}/{did}/GET.feature index 2ff98c1ac19d76a9c8fa00904693e4fdc6286e39..2a58fbe4b4aa6191815b22de128dd81e33c95eb6 100644 --- a/src/test/resources/features/tsa/signer/v1/keys/GET.feature +++ b/src/test/resources/features/tsa/signer/v1/verification-method/{namespace}/{did}/GET.feature @@ -13,35 +13,28 @@ #You should have received a copy of the GNU Affero General Public License #along with this program. If not, see <http://www.gnu.org/licenses/>. -#https://gaiax.vereign.com/tsa/signer/v1/keys +#https://gaiax.vereign.com/tsa/signer/v1/verification-methods/{namespace}/{did} #Author: Georgi Michev georgi.michev@vereign.com @rest @all @tsa @signer -Feature: API - TSA - Signer keys - v1/keys GET +Feature: API - TSA - Signer keys - v1/verification-methods/{namespace}/{did} GET As user I want to see what keys are available - So I am able to use them the future + So I am able to use them in the future Background: Given we are testing the TSA Signer Api - Scenario: TSA - Getting all keys from Singer - Positive - When I get all keys via TSA Signer API + Scenario: TSA - Getting all key namespaces from Singer - Positive + When I get all key namespaces via TSA Signer API And the status code should be {200} - And the response is valid according to the {Signer_GetAllKeys_schema.json} REST schema - And the field {$..type} has the value {["JsonWebKey2020","JsonWebKey2020"]} - And the field {$..publicKeyJwk.kid} has the value {["key1","key2"]} - And the field {$..publicKeyJwk.crv} has the value {["P-256","Ed25519"]} + And the response body contains {transit} + @wip Scenario: TSA - Getting key1 from Singer - Positive - When I get key {key1} via TSA Signer API + When I get key from namespace {transit} using issuer {key1} via TSA Signer API And the status code should be {200} And the response is valid according to the {Signer_GetKey_schema.json} REST schema - And the field {type} has the value {JsonWebKey2020} - And the field {publicKeyJwk.kid} has the value {key1} - And the field {publicKeyJwk.crv} has the value {P-256} - - Scenario: TSA - Getting non existing key - Negative - When I get key {non_existing} via TSA Signer API - And the response is valid according to the {Signer_GetKey_negative_schema.json} REST schema - And the status code should be {404} + And the field {controller} has the value {did:web:example.com} + And the field {id} has the value {key1} + And the field {type} has the value {JsonWebKey2020} \ No newline at end of file