Schema Verification Policy Reference
This reference documents the schema verification policy for the verifier service. The schema policy validates that credential content conforms to defined schemas, ensuring data integrity and structural correctness.
Policy Overview
Section titled “Policy Overview”The schema verification policy validates the content of verifiable credentials against defined schemas to ensure the credential data adheres to expected structure and data types. This validation ensures credentials contain properly formatted data and helps maintain interoperability between different systems.
Supported Standards
Section titled “Supported Standards”The schema verification policy supports credential schema validation across multiple standards:
Standard | Organization | Specification | Schema Format | Validation Aspect |
---|---|---|---|---|
JSON Schema | IETF | JSON Schema | JSON Schema | Provides underlying schema validation technology for credential data |
JSON-LD Context Validation | W3C | JSON-LD 1.1 | JSON-LD Context | Validates against semantic data models defined in JSON-LD contexts |
SD-JWT Verifiable Credential | IETF | SD-JWT Draft | JWT Claims | Validates JWT and SD-JWT claims against defined schemas |
Verifiable Credentials JSON Schema | W3C | VC JSON Schema | JSON Schema | Validates credential claims against standard JSON Schema |
Supported Schema Formats
Section titled “Supported Schema Formats”The verifier supports the following credential schema validation implementations:
Schema Format | Description | Specification | Best For |
---|---|---|---|
W3C Verifiable Credential Schema | Schema validation for W3C VCs | W3C Recommendation | W3C VC validation using JSON Schema or JSON-LD Context |
IETF Digital Credential Schema | Schema validation for IETF credentials | IETF Draft | SD-JWT and JWT credential validation |
Schema Verification Process
Section titled “Schema Verification Process”flowchart TD subgraph "Schema Verification" Input[Credential] --> ExtractType[Extract Credential Type] ExtractType --> ResolveSchema[Resolve Schema] ResolveSchema --> ValidateContent[Validate Credential Content] ValidateContent --> Decision{Schema Valid?} Decision -->|Yes| Valid[Valid] Decision -->|No| Invalid[Invalid Schema] end SchemaRegistry[Schema Registry] -.-> |"Schema Retrieval"| ResolveSchema style Input fill:#f9f9f9,stroke:#333,stroke-width:1px style ExtractType fill:#e1f5fe,stroke:#333,stroke-width:1px style ResolveSchema fill:#e1f5fe,stroke:#333,stroke-width:1px style ValidateContent fill:#e1f5fe,stroke:#333,stroke-width:1px style Decision fill:#e1f5fe,stroke:#333,stroke-width:1px style Valid fill:#dcedc8,stroke:#333,stroke-width:1px style Invalid fill:#ffcdd2,stroke:#333,stroke-width:1px style SchemaRegistry fill:#fff9c4,stroke:#333,stroke-width:1px
When verifying against schemas, the policy follows these steps:
- Type extraction - Identifies the credential type and associated schema
- Schema resolution - Retrieves the schema from a schema registry or URI
- Content validation - Validates the credential data against the schema
- Result determination - Returns the validation result with any schema violations
Integration with Schema Registry
Section titled “Integration with Schema Registry”The schema policy integrates with schema registry services to:
- Discover schemas based on credential types
- Fetch schema definitions from URIs
- Cache frequently used schemas for improved performance
- Support versioned schemas for credential evolution
Error Handling
Section titled “Error Handling”The schema policy returns specific errors for various validation failures:
Error Type | Description | Typical Cause |
---|---|---|
Schema Not Found | Cannot locate schema for validation | Missing or invalid schema reference |
Schema Resolution Error | Error retrieving schema from URI | Network issues or invalid schema URI |
Validation Error | Credential fails to validate against schema | Malformed credential data |
Invalid Schema | Schema definition is invalid | Poorly structured schema |
Unsupported Schema Type | Schema format not supported | Schema uses unsupported validation mechanism |
Configuration
Section titled “Configuration”The schema verification policy offers various configuration options that control its behavior, including:
- Enabling or disabling schema validation
- Configuring schema resolution mechanisms
- Setting validation behavior for missing schemas
- Controlling error handling for validation failures
- Schema caching settings
For detailed configuration options, parameters, and default values, see the Verifier Configuration Reference.