You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Credential verification fails when the credential issuer uses did:web with multiple verification methods (verificationMethods). According to the [DID Core Specification](https://www.w3.org/TR/did-core/), did:web supports multiple keys, but walt.id verification currently breaks when resolving such DIDs.
To Reproduce
Steps to reproduce the behavior:
Create a did:web with multiple keys in the DID Document, it is not possible actually with current version of WaltID (but still possible with other providers)
Issue a Verifiable Credential where the issuer is the did:web DID.
Use walt.id (version 0.11) to verify the credential.
Verification fails with an error related to key resolution.
Expected behavior
Verification should work with did:web issuers that have multiple keys, correctly identifying the correct key either from the kid field (if present) or by iterating through the available keys until a valid one is found.
Actual behavior
Verification eventually fails when did:web issuer has multiple keys, because is taken the first one from the set. The current implementation expects only one key in the DID Document and does not handle multi-key resolution.
Additional context
Suggested fix: Update resolveToKey to handle kid directly (resolving to did:web#key-id when provided) and fallback to iterating over all verification methods if kid is absent.
This is important for compatibility with W3C DID Core Specification, particularly for ecosystems with key rotation or multi-key issuers.
Credential verification fails when the credential issuer uses
did:web
with multiple verification methods (verificationMethods
). According to the [DID Core Specification](https://www.w3.org/TR/did-core/),did:web
supports multiple keys, butwalt.id
verification currently breaks when resolving such DIDs.To Reproduce
Steps to reproduce the behavior:
did:web
with multiple keys in the DID Document, it is not possible actually with current version of WaltID (but still possible with other providers)issuer
is thedid:web
DID.walt.id
(version 0.11) to verify the credential.Expected behavior
Verification should work with
did:web
issuers that have multiple keys, correctly identifying the correct key either from thekid
field (if present) or by iterating through the available keys until a valid one is found.Actual behavior
Verification eventually fails when
did:web
issuer has multiple keys, because is taken the first one from the set. The current implementation expects only one key in the DID Document and does not handle multi-key resolution.Additional context
resolveToKey
to handlekid
directly (resolving todid:web#key-id
when provided) and fallback to iterating over all verification methods ifkid
is absent.The text was updated successfully, but these errors were encountered: