Shared test cases¶
Shared test cases are not atomic test cases. A test case invokes a complete family of them in one scenario step, for example "Perform all Shared_JSON test cases on the decrypted Authorization Response", and their results form the result of that step. See Test Case ID for the convention.
Shared_JSON_01¶
Objective¶
Verify the syntactic structure of a JSON structure is valid.
References¶
- [RFC8259] section 9
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JSON structure is available.
Test Scenario¶
- Parse the complete JSON structure, using a generic JSON decoder.
Expected results¶
- Parsing is successful and the JSON structure is valid according to RFC 8259.
Comments¶
Some decoders allow for incremental parsing. This mode should not be used.
Shared_JSON_02¶
Objective¶
Verify that any object in the JSON structure does not contain multiple name/value pairs with the same name.
References¶
- [RFC8259] section 4
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A syntactically correct JSON structure is available.
Test Scenario¶
- For all JSON objects within the JSON structure, verify whether the object contains multiple name/value pairs with the same name.
Expected results¶
- No object with multiple members with the same name are present in the JSON structure.
Shared_JSON_03¶
Objective¶
Verify that the JSON structure is encoded using UTF-8 and does not contain a byte order mark.
References¶
- [RFC8259] section 8.1
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A syntactically correct JSON structure is available.
Test Scenario¶
- Verify that the JSON structure is encoded using UTF-8.
- Verify that the JSON structure does not contain a byte order mark.
Expected results¶
- The JSON structure is encoded using byte sequence valid for UTF-8 and only encodes code points specified in Unicode.
- The JSON structure does not contain a byte order mark (U+FEFF) at the beginning.
Shared_JWT_JWE_01¶
Objective¶
Verify the syntactic structure of a JSON Web Encryption using the JWE Compact Serialization is correct.
References¶
- [RFC7516] section 7.1
- [RFC4648] section 5
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWE structure using JWE Compact Serialization is available.
Test Scenario¶
- Verify the number of single period characters (".") in the JWE.
- Verify that the five parts of the JWE (as separated by the period characters) are base64url-encoded values as specified in RFC 4648 section 5.
Expected results¶
- The number is equal to 4.
- This is the case. The five parts do not contain line breaks, whitespace, or other additional characters.
Shared_JWT_JWE_02¶
Objective¶
Verify the syntactic structure of the protected header of a JSON Web Encryption using the JWE Compact Serialization is correct.
References¶
- [RFC7516] section 5.2
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWE structure using JWE Compact Serialization is available.
- The syntactic structure of that JWE structure is correct.
Test Scenario¶
- Take the first part of the JWE and Base64url-decode it to obtain the JWE Protected Header.
- For the JWE Protected Header, perform all Shared_JSON test cases.
Expected results¶
- Decoding is successful.
- All test cases pass.
Shared_JWT_JWE_03¶
Objective¶
Verify that a JOSE Header is a valid JWE Protected Header.
References¶
- [RFC7516] section 4.1
- [RFC8259] section 4
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWE structure using JWE Compact Serialization is available.
- The syntactic structure of that JWE structure is correct.
- The syntactic structure of the protected header of that JWE structure is correct.
Test Scenario¶
- Verify that the JOSE Header is a JSON object as specified in RFC 8259 section 4.
- Verify the number of members of the JOSE Header.
- Verify the members of the JOSE Header.
Expected results¶
- This is the case.
- The JOSE header has at least two members.
- All members of the JOSE Header have one of the following names:
- Mandatorily:
alg, - Mandatorily:
enc, - Optionally: a Registered Header Parameter name according to RFC 7516 section 4.1, or a Public Header Parameter name registered in the IANA "JSON Web Signature and Encryption Header Parameters" registry (for JWE).
- Optionally: any Private Header Parameter.
Shared_JWT_JWS_01¶
Objective¶
Verify the syntactic structure of a JSON Web Signature using the JWS Compact Serialization is correct.
References¶
- [RFC7515] section 7.1
- [RFC4648] section 5
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWS structure using JWS Compact Serialization is available.
Test Scenario¶
- Verify the number of single period characters (".") in the JWS.
- Verify that the three parts of the JWS (as separated by the period characters) are base64url-encoded values as specified in RFC 4648 section 5.
Expected results¶
- The number is equal to 2.
- This is the case. The three parts do not contain line breaks, whitespace, or other additional characters.
Shared_JWT_JWS_02¶
Objective¶
Verify that the syntactic structure of the protected header of a JSON Web Signature using the JWS Compact Serialization is correct.
References¶
- [RFC7515] section 5.2
- [RFC4648] section 5
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWS structure using JWS Compact Serialization is available.
- The JWS structure is syntactically correct.
Test Scenario¶
- Take the first part of the JWS and Base64url-decode it to obtain the JOSE Header.
- For the JOSE Header, perform all Shared_JSON test cases.
Expected results¶
- Decoding is successful.
- All test cases pass.
Shared_JWT_JWS_03¶
Objective¶
Verify that a JOSE Header is a valid JWS Protected Header.
References¶
- [RFC7515] section 4
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWS structure using JWS Compact Serialization is available.
- The JWS structure is syntactically correct.
- The JOSE Header has the correct syntactic structure of a JWS protected header.
Test Scenario¶
- Verify that the JOSE Header is a JSON object as specified in RFC 8259 section 4.
- Verify the number of members of the JOSE Header.
- Verify the members of the JOSE Header.
Expected results¶
- The JOSE Header is a JSON object.
- The JOSE header has at least one member.
- All members of the JOSE Header have one of the following names (and presence):
- alg (mandatory)
- (optionally) any registered Header Parameter name according to RFC 7515 section 4.1, or a Public Header Parameter name registered in the IANA "JSON Web Signature and Encryption Header Parameters" registry (for JWS).
- (optionally) any Private Header Parameter.
Shared_JWT_JWS_04¶
Objective¶
Verify that the syntactic structure of the JWT Payload of a JSON Web Token with JSON Web Signature using the JWS Compact Serialization is correct.
References¶
- [RFC7519] section 4
- [RFC7515] section 7.1
- [RFC4648] section 5
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWS structure using JWS Compact Serialization is available.
- The JWS structure is syntactically correct.
Test Scenario¶
- Take the second part of the JWS and Base64url-decode it to obtain the JWS Payload.
- For the JWS Payload, perform all Shared_JSON test cases.
Expected results¶
- Decoding is successful.
- All test cases pass.
Shared_JWT_JWS_05¶
Objective¶
Verify that a JWT Payload is a valid JSON Web Token.
References¶
- [RFC7519] section 4
Profile applicability¶
None
EUDI-wallet relevancy¶
EUDI_generic | EUDI_required
Preconditions¶
- A JWS structure using JWS Compact Serialization is available.
- The JWS structure is syntactically correct.
- The JWS Payload has the correct syntactic structure of a JSON Web Token.
Test Scenario¶
- Verify the members of the JWS Payload.
Expected results¶
- All members of the JWS Payload (i.e. the JWT Claims Set) have one of the following names:
- A Registered Claim name according to RFC 7519 section 4.1, i.e.
iss,sub,aud,exp,nbf,iatorjti. - A Public Claim name registered in the IANA "JSON Web Token Claims" registry.
- One of the claims specified for EUDI-wallet, e.g. in a relevant ETSI specification, such as
issuing_authorityorcategory. - (optionally) any other Private Claim.
- A Registered Claim name according to RFC 7519 section 4.1, i.e.