Skip to content

Conversation

@GarethCOliver
Copy link
Contributor

@GarethCOliver GarethCOliver commented Mar 26, 2025

Removes the JARM option for response signing, referencing JWT encryption directly

This continues to use the JARM client_metadata parameters, for compatibility and because we can not simply re-define them. How they are used for response encryption is updated and the option for signing removed.

This closes #463, closes #438

GarethCOliver and others added 3 commits March 31, 2025 14:38
Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>

`response_mode`:
: REQUIRED. Defined in [@!OAuth.Responses]. This parameter is used (through the new Response Mode `direct_post`) to ask the Wallet to send the response to the Verifier via an HTTPS connection (see (#response_mode_post) for more details). It is also used to request signing and encrypting (see (#jarm) for more details).
: REQUIRED. Defined in [@!OAuth.Responses]. This parameter is used (through the new Response Mode `direct_post`) to ask the Wallet to send the response to the Verifier via an HTTPS connection (see (#response_mode_post) for more details). It is also used to request encrypting (see (#response_encryption) for more details).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This paragraph currently says "is used" and "is also used". This should be changed to "can be used".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but those are two uses that are both required. so i think it is also used is beter. "to request encrypting" is not an optional use of this parameter, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have a strong opinion here, I think 'can be used' is a bit better (as it can also be used for dc_api for instance). If we get consensus can make the change, but given it is existing text unrelated to the change I'd otherwise punt to a follow-up.

This specification also defines a new Response Mode `direct_post.jwt`, which allows for encryption to be used with Response Mode `direct_post` defined in (#response_mode_post).

The Response Mode `direct_post.jwt` causes the Wallet to send the Authorization Response using an HTTP POST request instead of redirecting back to the Verifier as defined in (#response_mode_post). The Wallet adds the `response` parameter containing the JWT as defined in Section 4.1. of [@!JARM] and (#jarm) in the body of an HTTP POST request using the `application/x-www-form-urlencoded` content type. The names and values in the body MUST be encoded using UTF-8.
The Response Mode `direct_post.jwt` causes the Wallet to send the Authorization Response using an HTTP POST request instead of redirecting back to the Verifier as defined in (#response_mode_post). The Wallet adds the `response` parameter containing the JWT as defined in (#response_encryption) in the body of an HTTP POST request using the `application/x-www-form-urlencoded` content type. The names and values in the body MUST be encoded using UTF-8.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also define the "response" parameter in the context of the DC API? If not, where should be add that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this section https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-wg-draft.html#appendix-A.4, right?
(this comment is probably out of scope of this PR)

* clarify that `dcql_query` and `presentation_definition` are passed as JSON objects (not strings) in request objects
* support returning multiple presentations for a single dcql credential query when requested using `multiple`
* Added support for multiple Client Identifiers and corresponding Request Signature to the DC API profile
* remove JARM and response signing, using JWT directly for unsigned, encrypted responses.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can move this to -26 in #497 or you can do it here

Copy link
Member

@bc-pi bc-pi Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and moved it with 6335eb8. Apologies for jumping into your fork/branch @GarethCOliver, I'm gonna try and do the updates coming out of the meeting yesterday.

GarethCOliver and others added 3 commits April 6, 2025 22:46
Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
Copy link
Member

@bc-pi bc-pi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @GarethCOliver for addressing my prior comments, LGTM now.

@Sakurann Sakurann requested a review from martijnharing April 7, 2025 16:17

- `iss`, `exp` and `aud` MUST be omitted in the JWT Claims Set of the JWE, and the processing rules as per [@!JARM] Section 2.4 related to these claims do not apply.
- The processing rules as per [@!JARM] Section 2.4 related to JWS processing MUST be ignored.
The Verifier's public key for input into the key agreement SHOULD be obtained from the `jwks` claim within the `client_metadata` request parameter, within the metadata defined in the Entity Configuration when [@!OpenID.Federation] is used, or other mechanisms. The Wallet MAY select any key for which encryption is a valid operation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WG discussion. enhance The Wallet MAY select any key for which encryption is a valid operation. to address #483 and close #438 .

clarify

This section defines how an Authorization Response containing a VP Token can be encrypted at the application level when the Response Type value is `vp_token` or `vp_token id_token`. Encrypting the Authorization Response can, for example, prevent personal data in the Authorization Response from leaking. For security considerations see (#encrypting_unsigned_response).

If the JWT is only a JWE, the following processing rules MUST be followed:
To encrypt the Authorization Response, implementations MUST use an unsigned, encrypted JWT as described in [@!RFC7519]. The `enc` algorithm used MUST be obtained from `authorization_encrypted_response_enc` claim within the `client_metadata`. The `alg` algorithm used MUST be the `alg` value of the chosen `jwk`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last sentence is not clear enough, we mean a key from the jwks claim within client_metadata as written in the next section?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the chosen jwk" is not easy to understand, as it has not been mentioned before I believe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, fair. Maybe remove it from this section and place it after the key-selection text (so it's a more clear)?

Copy link
Member

@bc-pi bc-pi Apr 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all touches on clarifications I (was) volunteered to make yesterday kinda per #477 (comment) but I'll definitely try to address this kind of point. Hopefully a bit later today. Probably as suggestions on this PR.

GarethCOliver and others added 2 commits April 8, 2025 09:12
If a Wallet is unable to generate a JARM response, it MAY send an error response without using JARM as per (#response_mode_post).
If a Wallet is unable to generate an encrypted response, it MAY send an error response as per (#response_mode_post).

The following is a non-normative example of a response using the `presentation_submission` and `vp_token` values from (#jwt_vc). (line breaks for display purposes only):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a "direct_post.jwt" example of a response using the presentation_submission and vp_token values... with PE having gone away and this having been a JWS rather than JWE... and merge conflicts but not here. I'm not sure I have the skills to make the mostly agreed on changes in the context of this PR. Might have to start a new one borrowing from Gareth's work as reference.

Co-authored-by: Brian Campbell <71398439+bc-pi@users.noreply.github.com>
@bc-pi bc-pi self-requested a review April 11, 2025 09:34
Sakurann pushed a commit that referenced this pull request Apr 11, 2025
3 approvals carried over from #477. request for changes to #477 has been addressed in this PR. WG consensus to merge it during the WG meeting. people are encouraged to re-read and file issues on this topic during WGLC/public review period.
there will be a follow up PR adding examples. few issues might follow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing JARM references to JWT directly Clarify key selection for client_metadata jwks

8 participants