Skip to content
Snippets Groups Projects
Unverified Commit 6bb667dc authored by Georgi Michev's avatar Georgi Michev
Browse files

update failing scenarios

After changes in Signer and Infohub due to bug fix this revistion was applied.
Changes:
https://code.vereign.com/gaiax/tsa/signer/-/tags/v1.0.4
https://code.vereign.com/gaiax/tsa/infohub/-/tags/v1.1.1



Signed-off-by: default avatargeorgi.michev <georgi.michev@vereign.com>
parent f425a3a3
No related branches found
No related tags found
1 merge request!30update credential schema
Pipeline #53144 passed with stage
in 3 minutes and 31 seconds
......@@ -2,13 +2,12 @@
"successful_import": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://www.w3.org/2018/credentials/examples/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-08T09:23:43.073435032Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEYCIQCSmaYCbM8RweOXO1Vauz7F5taH9xnRKtcmkTkrhxw9DQIhAMhLuFBqk5JvYstemhdBGc81Ie3zOl00m_5CmfUd7OtO",
"created": "2022-08-02T13:37:23.968398678Z",
"jws": "eyJhbGciOiJKc29uV2ViU2lnbmF0dXJlMjAyMCIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..MEUCIH5tUuKsOX8mvAqvUSHdImQquWt9DbgG-_5EUk9CEchgAiEAwLZIXGsjTPF5NmQl_ABQqFe98jojkgx1vOT7yc5O6ms",
"proofPurpose": "assertionMethod",
"type": "JsonWebSignature2020",
"verificationMethod": "did:web:gaiax.vereign.com:tsa:policy:policy:example:returnDID:1.0:evaluation#key1"
......@@ -19,13 +18,14 @@
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://www.w3.org/2018/credentials/examples/v1"
"https://schema.org"
],
"credentialSubject": {
"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",
"type": "VerifiableCredential"
},
......@@ -33,13 +33,157 @@
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1",
"https://www.w3.org/2018/credentials/examples/v1"
"https://schema.org"
],
"credentialSubject": {
"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",
"type": "VerifiableCredential"
}
......
{
"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"
],
"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"
],
"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_missing_ID": {
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/suites/jws-2020/v1"
......@@ -15,7 +53,8 @@
],
"credentialSubject": {
"allow": true,
"id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0"
"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",
......@@ -29,7 +68,16 @@
],
"credentialSubject": {
"allow": true,
"id": "https://gaiax.vereign.com/tsa/policy/example/ProofRequestResponse/1.0"
"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",
......@@ -475,5 +523,119 @@
"type": "VerifiableCredential"
}
]
},
"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"
},
{
"@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"
],
"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"
],
"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"
],
"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"
],
"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
......@@ -74,14 +74,10 @@
"properties": {
"allow": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"allow",
"id"
"allow"
]
},
"issuanceDate": {
......@@ -124,14 +120,10 @@
"properties": {
"allow": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"allow",
"id"
"allow"
]
},
"issuanceDate": {
......
......@@ -74,14 +74,10 @@
"properties": {
"allow": {
"type": "boolean"
},
"id": {
"type": "string"
}
},
"required": [
"allow",
"id"
"allow"
]
},
"issuanceDate": {
......
......@@ -71,7 +71,7 @@ Feature: API -TSA - Cache - v1/cache GET
Scenario: TSA - Check the Cache after importing data to Infohub - Positive
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
Then the status code should be {200}
## Checking the cache service with Import IDs
......@@ -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}
When I send the Cache GET request via TSA Cache API
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}
When I send the Cache GET request via TSA Cache API
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
Then the status code should be {200}
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
When I set the following request body {{}}
And I import data via TSA Infohub API
And the status code should be {400}
And the field {message} has the value {missing required payload}
And the status code should be {400}
\ No newline at end of file
......@@ -32,8 +32,29 @@ 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 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 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
Scenario: TSA - validate presentation proof with empty body - Negative
When I set the following request body {{}}
When I create presentation proof via TSA Signer API
And the status code should be {400}
\ No newline at end of file
And the status code should be {400}
@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}
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