Skip to content

fix: publish DID document keys only under the relationships of their usages - #1246

Merged
paullatzelsperger merged 2 commits into
eclipse-edc:mainfrom
paullatzelsperger:fix/did_key_relationships
Oct 23, 2026
Merged

paullatzelsperger merged 2 commits into
eclipse-edc:mainfrom
paullatzelsperger:fix/did_key_relationships

Conversation

@paullatzelsperger

Copy link
Copy Markdown
Member

What this PR changes/adds

  • DidDocumentServiceImpl adds an activated key pair only to the verification relationships of its usages: sign_credentials to assertionMethod, sign_presentation to authentication and sign_token to capabilityInvocation. A key pair with several usages, such as the default one with all usages, is added to several relationships.
  • Activating a key pair again first removes it from all relationships, so they follow its current usages. Revoking a key pair removes it from assertionMethod as well.
  • DidDocumentServiceImplTest covers each usage, a key pair with all usages, re-activation and revocation.

Why it does that

Every key pair was added to authentication and capabilityInvocation, whatever its usage, and none to assertionMethod. Verifiers that follow VC Data Integrity or the Controlled Identifiers spec look for credential signing keys under assertionMethod, so they rejected IssuerService credentials. The usages of a key pair were also not reflected in the DID document: a credential signing key was offered for authentication and token signing.

Existing DID documents get assertionMethod when their key pairs are activated again. Requires eclipse-edc/Connector#6153, which adds assertionMethod to DidDocument.

Linked Issue(s)

none

🤖 Generated with Claude Code

@paullatzelsperger
paullatzelsperger requested a review from a team as a code owner October 23, 2026 07:31
@paullatzelsperger paullatzelsperger added bug Something isn't working security Security-relevant change labels Oct 23, 2026
@paullatzelsperger paullatzelsperger self-assigned this Oct 23, 2026
@paullatzelsperger
paullatzelsperger force-pushed the fix/did_key_relationships branch from bc5baf9 to aa22f79 Compare October 23, 2026 11:35
paullatzelsperger and others added 2 commits October 23, 2026 13:41
…usages

A key pair is added to the verification relationships of its usages only:
credential signing keys to assertionMethod, presentation signing keys to
authentication and token signing keys to capabilityInvocation. Activating
a key pair again replaces its earlier relationships, and revoking it removes
it from all of them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@paullatzelsperger
paullatzelsperger force-pushed the fix/did_key_relationships branch from aa22f79 to 73c7e33 Compare October 23, 2026 11:41
@paullatzelsperger
paullatzelsperger merged commit 263e02a into eclipse-edc:main Oct 23, 2026
21 checks passed
@paullatzelsperger
paullatzelsperger deleted the fix/did_key_relationships branch October 23, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai bug Something isn't working security Security-relevant change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants