KeyPairResourcePublicKeyResolver.resolveKey
does not properly parse fully qualified key id
#399
Labels
triage
all new issues awaiting classification
Bug Report
Describe the Bug
KeyPairResourcePublicKeyResolver.resolveKey
should parse the fully qualified key id, as is documented in the method description.Expected Behavior
when a fully qualified key as DID URL fragment is passed (e.g.
did:web:someparticipant#key-123
) as the argument toKeyPairResourcePublicKeyResolver.resolveKey
, it should correctly parse the key.Observed Behavior
The key is not correctly parsed, it takes the key id as is.
Steps to Reproduce
In my case, running the identityhub with STS and control plane with remote STS client triggered the issue, as it is unable to find the local public key associated with the access token.
Context Information
EDC 0.8.1-SNAPSHOT
Detailed Description
If applicable, add screenshots and logs to help explain your problem.
Possible Implementation
The logic to parse the key (did url fragment) actually already exists in
DidPublicKeyResolverImpl
. But this code cannot be easily used in this context. I think it would be wise to have a generic method for parsing DIDs that can be re-used.I see 2 solutions:
com.apicatalog:iron-verifiable-credentials:1.4.0
. This can be used to parse the did and then simply retrieve the fragment. After inspection, it turns out this version (0.3.0
) suffers from some issues. For instance it does not recognize Did url paths, among some other things (e.g. Did.from cannot handle more than 2 colons in method specific id. filip26/carbon-decentralized-identifiers#75). If this is the desired approach, then it should be considered to bump to 0.6.0.I think solution 1 should should be preferred as the
com.apicatalog:carbon-did
dependency has already been approved, but bumping the version should be considered.The tests should also be updated.
Once the solution direction has been selected, I would like to have the opportunity to contribute a solution, if possible. Thanks.
The text was updated successfully, but these errors were encountered: