Skip to content
Snippets Groups Projects
Commit fc0466ca authored by Rosen Georgiev's avatar Rosen Georgiev
Browse files

Merge branch '6-test-proof-chains-in-json-ld' into 'main'

Resolve "[Test] Proof Chains in JSON-LD"

Closes #6

See merge request eclipse/xfsc/tsa/tests!25
parents d3443921 0e40dfad
No related branches found
No related tags found
1 merge request!63Add tests for query policy with named filter
......@@ -390,5 +390,177 @@
"VerifiableCredential",
"UniversityDegreeCredential"
]
},
"for_proof_with_02_proof": {
"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"
],
"credentialSubject": {
"allow": true,
"array": {
"txt1": "1",
"txt2": "2"
},
"id": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"num": 123
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"proof": [
{
"created": "2023-12-22T13:55:18.273836907Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEUCIFMAPo3lCJ4C8MJKcO_LI2P2a9XPCLmowlRASiXaF6axAiEA5VfJMMjo5QrL5EmRrBq2_BnE8HtTsy9-aTmBI99v3kE",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
},
{
"created": "2023-12-22T14:04:15.675936709Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEYCIQCK6qATImHzvXiLuVHbQruC-IM9y-3uBtbGupHm2v8k6gIhAPTtZuBwYW8G6m7xdfgjNgVV4uJTTPeKOWDJJebHPPYV",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
}
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
},
"for_proof_with_modified_second_proof_date": {
"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"
],
"credentialSubject": {
"allow": true,
"array": {
"txt1": "1",
"txt2": "2"
},
"id": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"num": 123
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"proof": [
{
"created": "2023-12-22T13:55:18.273836907Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEUCIFMAPo3lCJ4C8MJKcO_LI2P2a9XPCLmowlRASiXaF6axAiEA5VfJMMjo5QrL5EmRrBq2_BnE8HtTsy9-aTmBI99v3kE",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
},
{
"created": "2033-12-22T14:04:15.675936709Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEYCIQCK6qATImHzvXiLuVHbQruC-IM9y-3uBtbGupHm2v8k6gIhAPTtZuBwYW8G6m7xdfgjNgVV4uJTTPeKOWDJJebHPPYV",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
}
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
},
"for_proof_with_modified_second_proof_cred_subject": {
"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"
],
"credentialSubject": {
"allow": true,
"array": {
"txt1": "11",
"txt2": "2"
},
"id": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"num": 123
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"proof": [
{
"created": "2023-12-22T13:55:18.273836907Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEUCIFMAPo3lCJ4C8MJKcO_LI2P2a9XPCLmowlRASiXaF6axAiEA5VfJMMjo5QrL5EmRrBq2_BnE8HtTsy9-aTmBI99v3kE",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
},
{
"created": "2023-12-22T14:04:15.675936709Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEYCIQCK6qATImHzvXiLuVHbQruC-IM9y-3uBtbGupHm2v8k6gIhAPTtZuBwYW8G6m7xdfgjNgVV4uJTTPeKOWDJJebHPPYV",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
}
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
},
"for_proof_with_modified_second_proof_cred_subject_allow": {
"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"
],
"credentialSubject": {
"allow": false,
"array": {
"txt1": "1",
"txt2": "2"
},
"id": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"num": 123
},
"id": "http://example.edu/credentials/3732",
"issuanceDate": "2010-01-01T00:00:00Z",
"issuer": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation",
"proof": [
{
"created": "2023-12-22T13:55:18.273836907Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEUCIFMAPo3lCJ4C8MJKcO_LI2P2a9XPCLmowlRASiXaF6axAiEA5VfJMMjo5QrL5EmRrBq2_BnE8HtTsy9-aTmBI99v3kE",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
},
{
"created": "2023-12-22T14:04:15.675936709Z",
"jws": "eyJhbGciOiIiLCJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdfQ..MEYCIQCK6qATImHzvXiLuVHbQruC-IM9y-3uBtbGupHm2v8k6gIhAPTtZuBwYW8G6m7xdfgjNgVV4uJTTPeKOWDJJebHPPYV",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1"
}
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
]
}
}
}
\ No newline at end of file
......@@ -22,48 +22,34 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST
| alumni of | for_proof_alumni | Signer_CredentialProof_alumni_schema.json |
| without ID | for_proof_without_ID | Signer_CredentialProof_without_ID_schema.json |
@phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @wip
@phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006
Scenario: TSA - create two consecutive proofs - 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_with_02_proof}
And I create credential proof via TSA Signer API
Then the status code should be {200}
When I load the response from the previous call
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_two_credentialProofs_schema.json} 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[0].verificationMethod} contains the value {did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1}
And the field {proof[1].verificationMethod} contains the value {did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1}
And the field {proof[2].verificationMethod} contains the value {did:web:vault.vereign.com:tsa:policy:policy:policies:example:returnDID:1.0:evaluation#key1}
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @wip
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006
Scenario: TSA - create two consecutive proofs with modified issuance date - Negative
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}
When I load the response from the previous call
And I change the issuance date
When I load the REST request {Credential.json} with profile {for_proof_with_modified_second_proof_date}
And I create credential proof via TSA Signer API
Then the status code should be {400}
Then the status code should be {403}
And the field {message} contains the value {invalid signature}
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @wip
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006
Scenario: TSA - create two consecutive proofs with modified credential subject ID - Negative
When I load the REST request {Credential.json} with profile {for_proof}
When I load the REST request {Credential.json} with profile {for_proof_with_modified_second_proof_cred_subject}
And I create credential proof via TSA Signer API
Then the status code should be {200}
When I load the response from the previous call
And I change the credential subject ID
And I create credential proof via TSA Signer API
Then the status code should be {400}
Then the status code should be {403}
And the field {message} contains the value {invalid signature}
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006 @wip
@negative @phase2 @IDM.TSA.E1.00005 @IDM.TSA.E1.00006
Scenario: TSA - create two consecutive proofs with modified credential subject allow - Negative
When I load the REST request {Credential.json} with profile {for_proof}
When I load the REST request {Credential.json} with profile {for_proof_with_modified_second_proof_cred_subject_allow}
And I create credential proof via TSA Signer API
Then the status code should be {200}
When I load the response from the previous call
And I change the credential subject allow
And I create credential proof via TSA Signer API
Then the status code should be {400}
Then the status code should be {403}
And the field {message} contains the value {invalid signature}
@negative
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment