This reference documents the credential format validation policy used by the validator service. The format policy validates that credentials conform to supported formats and can be properly parsed before proceeding with other validation checks.
The credential format validation policy is the foundation of the validator service's validation process. It ensures that credentials are structured correctly according to supported standards and can be parsed into a standardized format for subsequent validation policies. This policy must succeed before other validation policies (credential query and trusted issuer) are executed.
The format validation policy supports credential validation across multiple standards:
Standard | Organization | Specification | Format Identifier | Key Validation Features |
---|---|---|---|---|
W3C Verifiable Credentials v1.1 | W3C | VC Data Model v1.1 | w3:vc-data-model:json-ld | JSON-LD context validation, credential structure |
W3C Verifiable Credentials v2.0 | W3C | VC Data Model v2.0 | w3:vc-data-model:json-ld | Enhanced JSON-LD context, updated credential structure |
W3C Verifiable Presentations v1.1 | W3C | VC Data Model v1.1 | w3:vp-data-model:json-ld | JSON-LD presentation validation, credential wrapping |
W3C Verifiable Presentations v2.0 | W3C | VC Data Model v2.0 | w3:vp-data-model:json-ld | Enhanced presentation structure, improved proof support |
JWT Verifiable Credentials | W3C/IETF | VC Data Model + RFC 7519 | jwt_vc_json | JWT structure validation, credential claims extraction |
JWT Verifiable Presentations | W3C/IETF | VC Data Model + RFC 7519 | jwt_vp_json | JWT presentation validation, nested credential extraction |
IETF SD-JWT Digital Credentials | IETF | SD-JWT VC Draft | ietf.dc-sd-jwt | Selective disclosure validation, JWT structure |
ISO 18013-5:2021 Mobile Driving License | ISO | ISO 18013-5 | org.iso.18013.5 | mDL document validation, CBOR structure |
When validating credential formats, the policy follows these steps:
For W3C VC JSON-LD credentials, the policy:
type
field valuesFor W3C VP JSON-LD presentations, the policy:
For JWT-based credentials and presentations, the policy:
For IETF SD-JWT Digital Credentials, the policy:
For mDL credentials, the policy:
The credential format policy is a shared policy used by both the validator and verifier services:
The format validation policy supports comprehensive configuration:
For detailed configuration options, see the Validator Configuration Reference.
The format validation policy returns specific errors for various validation failures:
Error Type | Description | Typical Cause |
---|---|---|
Unsupported Format Error | Credential format is not supported | Unknown credential format or disabled format type |
Invalid Format Error | Credential format is malformed | Malformed JSON-LD, invalid JWT, corrupted CBOR |
Context Resolution Error | JSON-LD context cannot be resolved | Invalid @context URLs, network issues |
Structure Validation Error | Credential structure is invalid | Missing required fields, invalid field values |
Version Compatibility Error | Credential version is not supported | Unsupported VC version, disabled version support |
Format | Validator Support | Query Support | Trust Support | Notes |
---|---|---|---|---|
W3C VC JSON-LD v1.1 | ✅ | ✅ | ❌ | Full JSON-LD validation with context resolution |
W3C VC JSON-LD v2.0 | ✅ | ✅ | ❌ | Enhanced JSON-LD with updated contexts |
W3C VP JSON-LD v1.1 | ✅ | ✅ | ❌ | Presentation validation with credential extraction |
W3C VP JSON-LD v2.0 | ✅ | ✅ | ❌ | Enhanced presentation structure |
JWT VC | ✅ | ✅ | ❌ | JWT-based credential validation |
JWT VP | ✅ | ✅ | ❌ | JWT presentation with nested credentials |
IETF SD-JWT DC | ✅ | ✅ | ✅ | Selective disclosure with trust validation |
ISO 18013-5 mDL | ✅ | ✅ | ✅ | Mobile driving license with full support |
The format validation policy is essential for ensuring credential compatibility across the validator service. It provides the foundation for all other validation policies and should be configured to support the credential formats required by your specific use case.