-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JwtPresentationGenerator.generatePresentation adds incorrect public key id to VP #407
Comments
I don't think that is the case: Line 98 in c444f67
which in turn delegates to a Lines 72 to 77 in c444f67
in addition, the Lines 103 to 105 in c444f67
|
Yes, but Lines 82 to 84 in c444f67
|
ah I see, yes, that seems incorrect. I guess a good way to solve this, would be to add the something along those lines: https://gist.github.com/paullatzelsperger/4f58ce0a39a98360462cd9459ef8b630 |
That is pretty much exactly my local workaround indeed, seems like the best way to fix it. Would it be alright if I submit a pull request with the changes? |
sure go ahead :) |
Bug Report
Describe the Bug
It seems that in
JwtPresentationGenerator.generatePresentation
. The public key id is incorrectly set. This is because theadditionalData[CONTROLLER_ADDITIONAL_DATA]
that is set inVerifiablePresentationServiceImpl.createPresentation
is set to theparticipantContextId
, instead of the participants' DID.JwtPresentationGenerator.generatePresentation
uses the controllerId to check if the publicKey id is correctly formatted,but since this is not the DID it will not yield the desired result.This for me is resulting in incorrectly formatted public key ids. eg when my public key id is
did:web:example#example-key
it gets formatted as example#did:web:example#example-key`.in the
JwtPresentationGeneratorTest
the controller is correctly set to a did and not a participantContextId.I haven't tested, but
LdpPresentationGenerator
might have the same problem.Expected Behavior
I expect the keyId to be correctly formatted.
Observed Behavior
Incorrectly formatted public keyId, verifier cannot verify the VP.
Steps to Reproduce
Context Information
Add any other context about the problem here.
version: 0.8.1-SNAPSHOT
Detailed Description
Possible Implementation
Possible solutions:
publicKeyId
as is and assume it is already encoded as the DID fragment.PresentationCreatorRegistryImpl.createPresentation
, after the DID has been resolved.CONTROLLER_ADDITIONAL_DATA
instead of the participantContextId. Then pass both the DID and participantContextId toPresentationCreatorRegistryImpl.createPresentation
, so it does not have the be resololved twice.The text was updated successfully, but these errors were encountered: