Overview
When a wallet presents a Verifiable Credential, VCVerifier can verify that:- The credential contains a holder claim
- The holder claim matches the presentation holder (the wallet DID)
- The claim is located at the expected path in the credential
verifier/holder.go
Configuration
Holder verification is configured per credential type within the scope configuration:Configuration Parameters
Whether to perform holder verification for this credential type.
Path to the holder claim within
credentialSubject. Use dot notation for nested paths (e.g., subject, participant.id).How It Works
Step 1: Extract Presentation Holder
The verifier extracts the holder DID from the Verifiable Presentation:Step 2: Locate Holder Claim in Credential
The verifier navigates to the configured claim path in the credential’scredentialSubject:
Step 3: Compare Values
The verifier compares the holder claim value with the presentation holder. They must match exactly.The comparison is case-sensitive and requires exact string matching.
Examples
Basic Holder Verification
Simple holder claim at the root ofcredentialSubject:
Nested Claim Path
Holder identifier nested within an object:Multiple Credentials
Different holder claims for different credential types:Disabled Verification
Some credentials may not require holder verification:Error Handling
Missing Holder Claim
If the credential doesn’t contain the configured claim:Holder Mismatch
If the holder claim doesn’t match the presentation holder:Implementation Details
TheHolderValidationService performs holder verification:
Source reference: verifier/holder.go:15-42
Security Considerations
Binding Strength
Holder verification only checks that the credential contains a matching identifier. It doesn’t verify that the presenter controls that identifier—that’s done through proof verification.
- Holder verification: Credential contains correct holder claim
- Proof verification: Presentation is signed by the holder
- Issuer trust: Credential is issued by a trusted authority
Bearer vs. Holder-Bound Credentials
| Type | Holder Verification | Use Case |
|---|---|---|
| Bearer | Disabled | Public credentials, anyone can present |
| Holder-bound | Enabled | Personal credentials, must be presented by holder |
Claim Path Security
Ensure the claim path points to a verified field set by the issuer, not user-supplied data:Best Practices
- Enable for personal credentials: Always enable holder verification for credentials bound to specific individuals or organizations
- Use consistent claim paths: Standardize holder claim locations across your credential schemas
- Document requirements: Clearly document the required credential structure for issuers
- Test claim paths: Verify that your configured claim paths match actual credential structure
- Monitor failures: Track holder verification failures to detect potential security issues