Skip to content
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

mdoc_oid4vp: Response object JWE claims apu and apv are not base64 encoded #4

Open
nicklaswj opened this issue Mar 8, 2024 · 2 comments

Comments

@nicklaswj
Copy link

nicklaswj commented Mar 8, 2024

Edit: I confused myself and it seems that the apv is indeed base64 encoded (sorry about that). However the rest is still valid.

Hi.
The two claims apu and apv in the JWE containing the response object for a mdoc oid4vp request, are currently encoded as raw strings. However both ISO 18013-7 and RFC 7518 (section 4.6.1.2 and 4.6.1.3) specifies that both claims should be base64-url-encoded-no-padding.

Strictly speaking the bug doesn't live in this repository but in https://github.com/spruceid/isomdl-18013-7. However since I stumbled upon it here and this repository doesn't use the main branch of https://github.com/spruceid/isomdl-18013-7, I thought it would be more relevant to post the issue here. The specific lines that sets the claims are here

@nicklaswj
Copy link
Author

I also just realized that the value of apv is not following the newest version of 18013-7. Currently the value is SKReader. However the newest version of 18013-7 specifies:
"The mdoc shall set the apv JWT (JWE) header parameter to the base64url-encoded-with-no-padding
value of the nonce Authorization Request parameter from the Authorization Request Object."

@nicklaswj nicklaswj changed the title mdoc_oid4vp: Response object JWE claims apu and apv are not base64 encoded mdoc_oid4vp: Response object JWE claims apu ~~and apv~~ are not base64 encoded Mar 11, 2024
@nicklaswj nicklaswj changed the title mdoc_oid4vp: Response object JWE claims apu ~~and apv~~ are not base64 encoded mdoc_oid4vp: Response object JWE claims apu and apv are not base64 encoded Mar 11, 2024
@cobward
Copy link
Collaborator

cobward commented Mar 13, 2024

Hi @nicklaswj, thanks for opening the issue. We haven't yet implemented support for the latest version of ISO 18013-7, so there may be other small issues too. I can't guarantee we will be able to resolve this immediately, so if you are able to submit a fix yourself I would highly encourage it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants