Skip to content
Snippets Groups Projects

Add tests for VP proofs

Merged Georgi Michev requested to merge 3-check-vc-proofs-when-making-vp-proof into main
3 files
+ 588
5
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -79,6 +79,80 @@
}]
}
},
"for_proof_with_proofs": {
"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://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": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:13:03.38201499Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIFEQ_8NbyAyZGsq9wou6lBF9qBz8001ViR48Igtwsa6VAiEApUcE9AVMT-n18JQ4xBsHcFgmdzOX9PIXgqSmpdC98b8",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.schema.org"
],
"credentialSubject": {
"age_over": 18,
"allow": true,
"citizenship": "France",
"id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:16:51.645723638Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIGxdwsdZ9DGRfUQS1S61baeEIlr6IVehGiaX1oIfFldKAiBUGJEA0ArOR7tVd6MIY4hTJLs4VEnWzJExIvNnt_0qPg",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
]
}
},
"for_proof_without_ID": {
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"key": "key1",
@@ -687,5 +761,230 @@
}
]
}
},
"credential_tampered_verification_method":
{
"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://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": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:13:03.38201499Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIFEQ_8NbyAyZGsq9wou6lBF9qBz8001ViR48Igtwsa6VAiEApUcE9AVMT-n18JQ4xBsHcFgmdzOX9PIXgqSmpdC98b8",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.schema.org"
],
"credentialSubject": {
"age_over": 18,
"allow": true,
"citizenship": "France",
"id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:16:51.645723638Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIGxdwsdZ9DGRfUQS1S61baeEIlr6IVehGiaX1oIfFldKAiBUGJEA0ArOR7tVd6MIY4hTJLs4VEnWzJExIvNnt_0qPg",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
]
}
},
"credential_tampered_created":
{
"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://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": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2022-04-11T08:13:03.38201499Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIFEQ_8NbyAyZGsq9wou6lBF9qBz8001ViR48Igtwsa6VAiEApUcE9AVMT-n18JQ4xBsHcFgmdzOX9PIXgqSmpdC98b8",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.schema.org"
],
"credentialSubject": {
"age_over": 18,
"allow": true,
"citizenship": "France",
"id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:16:51.645723638Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIGxdwsdZ9DGRfUQS1S61baeEIlr6IVehGiaX1oIfFldKAiBUGJEA0ArOR7tVd6MIY4hTJLs4VEnWzJExIvNnt_0qPg",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
]
}
},
"credential_tampered_credentialSubject":
{
"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://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": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:13:03.38201499Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIFEQ_8NbyAyZGsq9wou6lBF9qBz8001ViR48Igtwsa6VAiEApUcE9AVMT-n18JQ4xBsHcFgmdzOX9PIXgqSmpdC98b8",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://www.schema.org"
],
"credentialSubject": {
"age_over": 48,
"allow": true,
"citizenship": "France",
"id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": {
"created": "2023-04-11T08:16:51.645723638Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIGxdwsdZ9DGRfUQS1S61baeEIlr6IVehGiaX1oIfFldKAiBUGJEA0ArOR7tVd6MIY4hTJLs4VEnWzJExIvNnt_0qPg",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:ssi-dev.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
},
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
]
}
}
}
\ No newline at end of file
Loading