Skip to content
Snippets Groups Projects
Commit 8ea93bc3 authored by Georgi Michev's avatar Georgi Michev
Browse files

Merge branch '16-bug-with-proof-verification' into 'main'

update credential schema

See merge request !30
parents 1a07b6c8 97e9a96d
No related branches found
No related tags found
1 merge request!30update credential schema
Pipeline #53182 failed
Showing
with 840 additions and 177 deletions
{ {
"@context": [ "for_proof":{
"https://www.w3.org/2018/credentials/v1", "@context": [
"https://w3id.org/security/suites/jws-2020/v1", "https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1" "https://w3id.org/security/suites/jws-2020/v1"
], ],
"credentialSubject": { "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"allow": true, "type": "VerifiablePresentation",
"hello": "world", "verifiableCredential": [
"id": "example/examplePolicy/1.0" {
"@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/examplePolicy/1.0"
},
"issuanceDate": "2022-07-01T11:07:57.975459274Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential"
}
]
}, },
"issuanceDate": "2022-07-01T13:29:47.578628068Z", "incorrect_id":{
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "@context": [
"type": "VerifiableCredential" "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"
}
]
}
} }
\ No newline at end of file
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
"successful_import": { "successful_import": {
"@context": [ "@context": [
"https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/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", "id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"proof": { "proof": {
"created": "2022-07-08T09:23:43.073435032Z", "created": "2022-08-02T13:37:23.968398678Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEYCIQCSmaYCbM8RweOXO1Vauz7F5taH9xnRKtcmkTkrhxw9DQIhAMhLuFBqk5JvYstemhdBGc81Ie3zOl00m_5CmfUd7OtO", "jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIH5tUuKsOX8mvAqvUSHdImQquWt9DbgG-_5EUk9CEchgAiEAwLZIXGsjTPF5NmQl_ABQqFe98jojkgx1vOT7yc5O6ms",
"proofPurpose": "assertionMethod", "proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020", "type": "JsonWebSignature2020",
"verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1" "verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
...@@ -19,13 +18,14 @@ ...@@ -19,13 +18,14 @@
"@context": [ "@context": [
"https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1", "https://w3id.org/security/suites/jws-2020/v1",
"https://www.w3.org/2018/credentials/examples/v1" "https://schema.org"
], ],
"credentialSubject": { "credentialSubject": {
"allow": true, "allow": true,
"id": "example/examplePolicy/1.0" "name": "pass",
"num": 123
}, },
"issuanceDate": "2022-07-08T09:23:43.006994232Z", "issuanceDate": "2022-07-21T10:24:36.203848291Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential" "type": "VerifiableCredential"
}, },
...@@ -33,13 +33,157 @@ ...@@ -33,13 +33,157 @@
"@context": [ "@context": [
"https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1", "https://w3id.org/security/suites/jws-2020/v1",
"https://www.w3.org/2018/credentials/examples/v1" "https://schema.org"
], ],
"credentialSubject": { "credentialSubject": {
"allow": true, "allow": true,
"id": "example/ProofRequestResponse/1.0" "array": [
{
"num1": 1,
"num2": 2
},
{
"txt1": "1",
"txt2": "2"
}
]
}, },
"issuanceDate": "2022-07-08T09:23:43.006998385Z", "issuanceDate": "2022-07-21T10:24:36.203861194Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential"
}
]
},
"successful_import_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-08-02T13:20:07.281542082Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIHdx3Womv8y4GRzYiso1iKCJnjqNsRZ-dGi545SEYcWNAiAdWqUo0CPqqMLjWBfRsdpSZngnysOBUIOTdlMbPLm5mw",
"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": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"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": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"issuanceDate": "2022-07-21T10:24:36.203861194Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential"
}
]
},
"modified_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-08-02T13:20:07.281542082Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIHdx3Womv8y4GRzYiso1iKCJnjqNsRZ-dGi545SEYcWNAiAdWqUo0CPqqMLjWBfRsdpSZngnysOBUIOTdlMbPLm5mw",
"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": "did:web::gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"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": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"issuanceDate": "2022-07-21T10:24:36.203861194Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential"
}
]
},
"modified_allow": {
"@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-08-02T13:20:07.281542082Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEQCIHdx3Womv8y4GRzYiso1iKCJnjqNsRZ-dGi545SEYcWNAiAdWqUo0CPqqMLjWBfRsdpSZngnysOBUIOTdlMbPLm5mw",
"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": false,
"id": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"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": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation"
},
"issuanceDate": "2022-07-21T10:24:36.203861194Z",
"issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation", "issuer": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation",
"type": "VerifiableCredential" "type": "VerifiableCredential"
} }
......
This diff is collapsed.
...@@ -74,14 +74,10 @@ ...@@ -74,14 +74,10 @@
"properties": { "properties": {
"allow": { "allow": {
"type": "boolean" "type": "boolean"
},
"id": {
"type": "string"
} }
}, },
"required": [ "required": [
"allow", "allow"
"id"
] ]
}, },
"issuanceDate": { "issuanceDate": {
...@@ -124,14 +120,10 @@ ...@@ -124,14 +120,10 @@
"properties": { "properties": {
"allow": { "allow": {
"type": "boolean" "type": "boolean"
},
"id": {
"type": "string"
} }
}, },
"required": [ "required": [
"allow", "allow"
"id"
] ]
}, },
"issuanceDate": { "issuanceDate": {
......
...@@ -8,34 +8,15 @@ ...@@ -8,34 +8,15 @@
{ {
"type": "string" "type": "string"
}, },
{
"type": "string"
},
{ {
"type": "string" "type": "string"
} }
] ]
}, },
"credentialSubject": { "credentialSubject": {
"type": "object", "type": "null"
"properties": {
"allow": {
"type": "boolean"
},
"hello": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"allow",
"hello",
"id"
]
}, },
"issuanceDate": { "id": {
"type": "string" "type": "string"
}, },
"issuer": { "issuer": {
...@@ -70,14 +51,70 @@ ...@@ -70,14 +51,70 @@
}, },
"type": { "type": {
"type": "string" "type": "string"
},
"verifiableCredential": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"@context": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
},
{
"type": "string"
}
]
},
"credentialSubject": {
"type": "object",
"properties": {
"allow": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"allow",
"id"
]
},
"issuanceDate": {
"type": "string"
},
"issuer": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"@context",
"credentialSubject",
"issuanceDate",
"issuer",
"type"
]
}
]
} }
}, },
"required": [ "required": [
"@context", "@context",
"credentialSubject", "credentialSubject",
"issuanceDate", "id",
"issuer", "issuer",
"proof", "proof",
"type" "type",
"verifiableCredential"
] ]
} }
\ No newline at end of file
...@@ -74,14 +74,10 @@ ...@@ -74,14 +74,10 @@
"properties": { "properties": {
"allow": { "allow": {
"type": "boolean" "type": "boolean"
},
"id": {
"type": "string"
} }
}, },
"required": [ "required": [
"allow", "allow"
"id"
] ]
}, },
"issuanceDate": { "issuanceDate": {
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"@context": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"proof": {
"type": "object",
"properties": {
"created": {
"type": "string"
},
"jws": {
"type": "string"
},
"proofPurpose": {
"type": "string"
},
"type": {
"type": "string"
},
"verificationMethod": {
"type": "string"
}
},
"required": [
"created",
"jws",
"proofPurpose",
"type",
"verificationMethod"
]
},
"type": {
"type": "string"
},
"verifiableCredential": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"@context": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
},
"credentialSubject": {
"type": "object",
"properties": {
"alumniOf": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"lang",
"value"
]
},
{
"type": "object",
"properties": {
"lang": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"lang",
"value"
]
}
]
}
},
"required": [
"id",
"name"
]
},
"id": {
"type": "string"
}
},
"required": [
"alumniOf",
"id"
]
},
"id": {
"type": "string"
},
"issuanceDate": {
"type": "string"
},
"issuer": {
"type": "string"
},
"type": {
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "string"
}
]
}
},
"required": [
"@context",
"credentialSubject",
"id",
"issuanceDate",
"issuer",
"type"
]
}
]
}
},
"required": [
"@context",
"proof",
"type",
"verifiableCredential"
]
}
\ No newline at end of file
...@@ -71,7 +71,7 @@ Feature: API -TSA - Cache - v1/cache GET ...@@ -71,7 +71,7 @@ Feature: API -TSA - Cache - v1/cache GET
Scenario: TSA - Check the Cache after importing data to Infohub - Positive Scenario: TSA - Check the Cache after importing data to Infohub - Positive
Given we are testing the TSA Infohub Api Given we are testing the TSA Infohub Api
When I load the REST request {Infohub.json} with profile {successful_import} When I load the REST request {Infohub.json} with profile {successful_import_ID}
And I import data via TSA Infohub API And I import data via TSA Infohub API
Then the status code should be {200} Then the status code should be {200}
## Checking the cache service with Import IDs ## Checking the cache service with Import IDs
...@@ -79,8 +79,8 @@ Feature: API -TSA - Cache - v1/cache GET ...@@ -79,8 +79,8 @@ Feature: API -TSA - Cache - v1/cache GET
Then I load element {0} from Info SessionContainer into currentRequest HEADER {x-cache-key} Then I load element {0} from Info SessionContainer into currentRequest HEADER {x-cache-key}
When I send the Cache GET request via TSA Cache API When I send the Cache GET request via TSA Cache API
And the field {allow} has the value {true} And the field {allow} has the value {true}
And the field {id} has the value {example/examplePolicy/1.0} And the field {id} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation}
Then I load element {1} from Info SessionContainer into currentRequest HEADER {x-cache-key} Then I load element {1} from Info SessionContainer into currentRequest HEADER {x-cache-key}
When I send the Cache GET request via TSA Cache API When I send the Cache GET request via TSA Cache API
And the field {allow} has the value {true} And the field {allow} has the value {true}
And the field {id} has the value {example/ProofRequestResponse/1.0} And the field {id} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation}
...@@ -31,9 +31,26 @@ Feature: API - TSA - Infohub - v1/export POST ...@@ -31,9 +31,26 @@ Feature: API - TSA - Infohub - v1/export POST
Then the status code should be {200} Then the status code should be {200}
And the response is valid according to the {Infohub_Import_schema.json} REST schema And the response is valid according to the {Infohub_Import_schema.json} REST schema
@wip @bug-signer-#13 @negative Scenario: TSA - Import data with ID to Infohub - Positive
When I load the REST request {Infohub.json} with profile {successful_import_ID}
And I import data via TSA Infohub API
Then the status code should be {200}
And the response is valid according to the {Infohub_Import_schema.json} REST schema
@negative
Scenario: TSA - Import data with modified ID to Infohub - Negative
When I load the REST request {Infohub.json} with profile {modified_ID}
And I import data via TSA Infohub API
Then the status code should be {400}
@negative
Scenario: TSA - Import data with modified ID to Infohub - Negative
When I load the REST request {Infohub.json} with profile {modified_allow}
And I import data via TSA Infohub API
Then the status code should be {400}
@negative
Scenario: TSA - Import empty data to Infohub - Negative Scenario: TSA - Import empty data to Infohub - Negative
When I set the following request body {{}} When I set the following request body {{}}
And I import data via TSA Infohub API And I import data via TSA Infohub API
And the status code should be {400} And the status code should be {400}
And the field {message} has the value {missing required payload} \ No newline at end of file
...@@ -26,7 +26,7 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST ...@@ -26,7 +26,7 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST
Given we are testing the TSA Signer Api Given we are testing the TSA Signer Api
Scenario: TSA - create credential proof - Positive Scenario: TSA - create credential proof - Positive
When I load the request from json {/REST/json/Credential.json} When I load the REST request {Credential.json} with profile {for_proof}
When I create credential proof via TSA Signer API When I create credential proof via TSA Signer API
And the status code should be {200} And the status code should be {200}
And the response is valid according to the {Signer_CredentialProof_schema.json} REST schema And the response is valid according to the {Signer_CredentialProof_schema.json} REST schema
...@@ -36,4 +36,5 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST ...@@ -36,4 +36,5 @@ Feature: API - TSA - Signer credential proof - v1/credential/proof POST
Scenario: TSA - validate credential proof with empty body - Negative Scenario: TSA - validate credential proof with empty body - Negative
When I set the following request body {{}} When I set the following request body {{}}
When I create credential proof via TSA Signer API When I create credential proof via TSA Signer API
And the status code should be {400} And the status code should be {400}
\ No newline at end of file And the field {message} has the value {build new credential: fill credential types from raw: credential type of unknown structure}
...@@ -32,8 +32,35 @@ Feature: API - TSA - Signer presentation proof - v1/presentation/proof POST ...@@ -32,8 +32,35 @@ Feature: API - TSA - Signer presentation proof - v1/presentation/proof POST
And the response is valid according to the {Signer_PresentationProof_schema.json} REST schema And the response is valid according to the {Signer_PresentationProof_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.verificationMethod} has the value {did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1}
Scenario: TSA - create presentation proof - Positive
When I load the REST request {Presentation.json} with profile {for_proof_alumni}
When I create presentation proof via TSA Signer API
And the status code should be {200}
And the response is valid according to the {Signer_PresentationProof_schema_alumni.json} REST schema
Scenario: TSA - create presentation proof missing ID - Positive
When I load the REST request {Presentation.json} with profile {for_proof_missing_ID}
When I create presentation proof via TSA Signer API
And the status code should be {200}
And the response is valid according to the {Signer_PresentationProof_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}
@negative @negative
Scenario: TSA - validate presentation proof with empty body - Negative Scenario: TSA - validate presentation proof with empty body - Negative
When I set the following request body {{}} When I set the following request body {{}}
When I create presentation proof via TSA Signer API When I create presentation proof via TSA Signer API
And the status code should be {400} And the status code should be {400}
\ No newline at end of file
@negative
Scenario: TSA - create presentation proof with incorrect ID (space) - Negative
When I load the REST request {Presentation.json} with profile {for_proof_incorrect_ID_space}
When I create presentation proof via TSA Signer API
And the status code should be {400}
And the field {message} has the value {invalid format of subject id}
@negative
Scenario: TSA - create presentation proof with incorrect ID (symbols) - Negative
When I load the REST request {Presentation.json} with profile {for_proof_incorrect_ID_symbols}
When I create presentation proof via TSA Signer API
And the status code should be {400}
And the field {message} has the value {invalid format of subject id}
...@@ -36,14 +36,15 @@ Feature: API - TSA - Signer presentation verify - v1/presentation/verify POST ...@@ -36,14 +36,15 @@ Feature: API - TSA - Signer presentation verify - v1/presentation/verify POST
And the status code should be {200} And the status code should be {200}
And the field {valid} has the value {true} And the field {valid} has the value {true}
@negative
Scenario: TSA - verify presentation proof with missing proof - Negative
When I load the REST request {Presentation.json} with profile {missing_proof}
And I verify presentation proof via TSA Signer API
And the status code should be {400}
And the field {message} has the value {verifiable presentation must have proof section}
@negative @negative
Scenario: TSA - verify presentation proof with modified ID field - Negative Scenario: TSA - verify presentation proof with modified ID field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_ID} When I load the REST request {Presentation.json} with profile {modified_ID}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
And the status code should be {400} And the status code should be {400}
...@@ -51,65 +52,35 @@ Feature: API - TSA - Signer presentation verify - v1/presentation/verify POST ...@@ -51,65 +52,35 @@ Feature: API - TSA - Signer presentation verify - v1/presentation/verify POST
@negative @negative
Scenario: TSA - verify presentation proof with modified issuanceDate field - Negative Scenario: TSA - verify presentation proof with modified issuanceDate field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_issuanceDate} When I load the REST request {Presentation.json} with profile {modified_issuanceDate}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
And the status code should be {400} And the status code should be {400}
And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature} And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature}
@wip @bug-issue-signer#16 @negative @negative
Scenario: TSA - verify presentation proof with modified credentialSubject.allow field - Negative Scenario: TSA - verify presentation proof with modified first credentialSubject.allow field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_credentialSubject_1_allow} When I load the REST request {Presentation.json} with profile {modified_credentialSubject_1_allow}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
# And the status code should be {400} And the status code should be {400}
# And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature} And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature}
@wip @bug-issue-signer#16 @negative @negative
Scenario: TSA - verify presentation proof with modified credentialSubject.allow field - Negative Scenario: TSA - verify presentation proof with modified second credentialSubject.allow field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_credentialSubject_2_allow} When I load the REST request {Presentation.json} with profile {modified_credentialSubject_2_allow}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
# And the status code should be {400} And the status code should be {400}
# And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature} And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature}
@wip @bug-issue-signer#16 @negative @negative
Scenario: TSA - verify presentation proof with modified credentialSubject.ID field - Negative Scenario: TSA - verify presentation proof with modified first credentialSubject.ID field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_credentialSubject_1_ID} When I load the REST request {Presentation.json} with profile {modified_credentialSubject_1_ID}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
# And the status code should be {400} And the status code should be {400}
# And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature} And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature}
@wip @bug-issue-signer#16 @negative @negative
Scenario: TSA - verify presentation proof with modified credentialSubject.ID field - Negative Scenario: TSA - verify presentation proof with modified second credentialSubject.ID field - Negative
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}
And the response is valid according to the {Signer_PresentationProof_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}
Then I get the last response body and load it to the current request body
When I load the REST request {Presentation.json} with profile {modified_credentialSubject_2_ID} When I load the REST request {Presentation.json} with profile {modified_credentialSubject_2_ID}
And I verify presentation proof via TSA Signer API And I verify presentation proof via TSA Signer API
# And the status code should be {400} And the status code should be {400}
# And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature} And the field {message} has the value {check embedded proof: check linked data proof: ecdsa: invalid signature}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment