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

Update tests based on major changes


Changes made on the TSA services:

Policy - v1.4.0, v1.4.1
Infohub - v1.2.0, v1.2.1
Tasks - v1.1.0, v1.1.1
Cache - v2.0.0, v2.0.1
Signer - v1.3.0, v1.3.1
Policies update

Signed-off-by: default avatarmichev <georgi.michev@vereign.com>
parent 94398442
No related branches found
No related tags found
1 merge request!36Update tests based on major changes
Pipeline #55505 passed with stage
in 6 minutes and 50 seconds
Showing
with 716 additions and 554 deletions
{
"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
{
"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",
......
This diff is collapsed.
{
"$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
......@@ -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
......@@ -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);
......
......@@ -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
......
......@@ -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
......
......@@ -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
#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
......@@ -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
......@@ -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 |
......
......@@ -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}
......
......@@ -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
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