Skip to content

fix: bind VCDM 2.0 JOSE credentials to their issuer's key - #6141

Merged
paullatzelsperger merged 1 commit into
eclipse-edc:mainfrom
paullatzelsperger:fix/6140_vcdm20_issuer_key_binding
Oct 21, 2026
Merged

paullatzelsperger merged 1 commit into
eclipse-edc:mainfrom
paullatzelsperger:fix/6140_vcdm20_issuer_key_binding

Conversation

@paullatzelsperger

Copy link
Copy Markdown
Member

What this PR changes/adds

  • Vcdm20JosePresentationVerifier validates every enveloped VCDM 2.0 credential with a new CredentialIssuerKeyIdValidationRule: the kid must start with <issuer>#, where the issuer is the credential's issuer property (a string, or the id of an object), and an iss claim, if present, must equal that issuer. Before, only the signature was checked against whatever key the kid named.
  • Enveloped VCDM 1.1 credentials (JWTs with a vc claim) are validated with the dcp-vc rules and IssuerKeyIdValidationRule, like in a VCDM 1.1 JWT presentation.
  • IssuerKeyIdValidationRule compares the kid with <iss># literally instead of with a regular expression built from the unescaped iss, and fails if either is missing.

Why it does that

A credential in a VCDM 2.0 presentation that named a trusted issuer but was signed with a key of any other resolvable DID was accepted, because nothing tied the signing key to the issuer that HasValidIssuer later checks. In IssuerKeyIdValidationRule, the dots of a did:web host name matched any character, so e.g. did:web:issuer-example.com#key-1 was accepted for the issuer did:web:issuer.example.com. That rule also binds self-issued ID tokens to their issuer.

Linked Issue(s)

Closes #6140

🤖 Generated with Claude Code

Vcdm20JosePresentationVerifier now validates every enveloped credential
with a rule that requires its kid to start with "<issuer>#", where the
issuer is the credential's issuer property (a string or the id of an
object), and its iss claim, if present, to equal that issuer. Enveloped
VCDM 1.1 credentials are validated with the dcp-vc rules and
IssuerKeyIdValidationRule, as in a VCDM 1.1 presentation.

IssuerKeyIdValidationRule compares the kid with the iss literally instead
of with an unescaped regular expression, in which the dots of a did:web
host name matched any character.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@paullatzelsperger
paullatzelsperger requested a review from a team as a code owner October 21, 2026 12:32
@paullatzelsperger paullatzelsperger added the bug Something isn't working label Oct 21, 2026
@paullatzelsperger paullatzelsperger self-assigned this Oct 21, 2026
@paullatzelsperger
paullatzelsperger merged commit 2454f68 into eclipse-edc:main Oct 21, 2026
47 of 52 checks passed
@paullatzelsperger
paullatzelsperger deleted the fix/6140_vcdm20_issuer_key_binding branch October 21, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VCDM 2.0 credentials in JOSE presentations are not bound to their issuer's key

3 participants