Skip to content

Conversation

@martijnharing
Copy link
Contributor

Resolves #347

@c2bo
Copy link
Member

c2bo commented May 13, 2025

We would need to add IANA registration requests for both parameters in their respective registries I assume?

@awoie
Copy link
Contributor

awoie commented May 13, 2025

We would need to add IANA registration requests for both parameters in their respective registries I assume?

This needs registration in two IANA registries:

I suggest adding the corresponding registrations to the IANA section.

Copy link
Collaborator

@Sakurann Sakurann left a comment

Choose a reason for hiding this comment

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

(see #response_encryption for details of how to include it in the JWE in the response)

i think text on the response is missing in #response_encryption section?

martijnharing and others added 2 commits May 22, 2025 14:16
Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
Copy link
Contributor

@awoie awoie left a comment

Choose a reason for hiding this comment

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

The following two statements allow for a gap in implementations that lead to broken flows, right?

the Verifier MUST verify that one of the referenced profiles is included in the response

AND

the selected profile MAY be included in the JWE protected header using the encryption_details header

Why would the latter be a MAY/SHOULD, if it would break the verifier?

Copy link
Member

@selfissued selfissued left a comment

Choose a reason for hiding this comment

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

This is not specified in sufficient detail to enable interoperable implementations.

What are the parameters intended to be passed with this parameter and what are the processing rules for them?

@awoie
Copy link
Contributor

awoie commented May 27, 2025

@martijnharing Generally fine with this PR but just had a question/suggestion above.

@c2bo
Copy link
Member

c2bo commented May 27, 2025

Would it make sense to define a "profile" name for the current/default behaviour?

Change MAY to SHOULD for encryption_details header parameter

Co-authored-by: Oliver Terbu <o.terbu@gmail.com>
@martijnharing
Copy link
Contributor Author

The following two statements allow for a gap in implementations that lead to broken flows, right?

the Verifier MUST verify that one of the referenced profiles is included in the response

AND

the selected profile MAY be included in the JWE protected header using the encryption_details header

Why would the latter be a MAY/SHOULD, if it would break the verifier?

How about:
"The selected profile MUST be included in the JWE protected header using the encryption_details header unless the profile defines differently."

@awoie
Copy link
Contributor

awoie commented May 28, 2025

The following two statements allow for a gap in implementations that lead to broken flows, right?

the Verifier MUST verify that one of the referenced profiles is included in the response

AND

the selected profile MAY be included in the JWE protected header using the encryption_details header

Why would the latter be a MAY/SHOULD, if it would break the verifier?

How about: "The selected profile MUST be included in the JWE protected header using the encryption_details header unless the profile defines differently."

That works for me

* `jwks`: OPTIONAL. A JSON Web Key Set, as defined in [@!RFC7591], that contains one or more public keys, such as those used by the Wallet as an input to a key agreement that may be used for encryption of the Authorization Response (see (#response_encryption)), or where the Wallet will require the public key of the Verifier to generate a Verifiable Presentation. This allows the Verifier to pass ephemeral keys specific to this Authorization Request. Public keys included in this parameter MUST NOT be used to verify the signature of signed Authorization Requests. Each JWK in the set MUST have a `kid` (Key ID) parameter that uniquely identifies the key within the context of the request.
* `encrypted_response_enc_values_supported`: OPTIONAL. Non-empty array of strings, where each string is a JWE [@!RFC7516] `enc` algorithm that can be used as the content encryption algorithm for encrypting the Response. When a `response_mode` requiring encryption of the Response (such as `dc_api.jwt` or `direct_post.jwt`) is specified, this MUST be present for anything other than the default single value of `A128GCM`. Otherwise, this SHOULD be absent.
* `vp_formats_supported`: REQUIRED when not available to the Wallet via another mechanism. As defined in (#client_metadata_parameters).
* `encryption_details_supported`: OPTIONAL. A non-empty array of strings, where each string references a profile of encryption details that the Verifier supports. The meaning and expected behavior of the Verifier and Wallet is profile-specific and out of scope of this specification. When the Verifier includes this parameter in a request, the Wallet MUST either reject the request or include one of the referenced profiles in the response and implement all of the requirements defined by the referenced profile (see (#response_encryption) for details of how to include it in the JWE in the response). When the Verifier includes this parameter in a request, the Verifier MUST verify that one of the referenced profiles is included in the response and MUST implement all of the requirements required by the profile included in the response.
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:

  • define a behavior of not explicitly specifying apu/apv values aka a string that can be included in encruption_details_supported array
  • @c2bo to make a suggestion for an exact wording on how we describe "default behavior"
  • some people questioning if this needs to be added at all, and whether it adds an unnecessary complication for wallets and the verifiers (@leecam @bc-pi @ve7jtb etc)

Copy link
Member

Choose a reason for hiding this comment

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

I would very much like to understand what value is actually added by introducing an under-defined but interoperability hampering extension point?

Copy link
Member

Choose a reason for hiding this comment

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

  • @c2bo to make a suggestion for an exact wording on how we describe "default behavior"

I'd furthermore argue that there has to be a way to indicate that the "default behavior" is also an acceptable referenced profile. Otherwise there's going to be a rather sharp interoperability edge.

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.

As others have noted, precedent and consistency would require that these new things have IANA registration requests for both in their respective registries. Writing those IANA requests and taking them to the designated experts and IANA might underscore the rather tenuous nature of the problem and solution here.

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.

As others have noted, precedent and consistency would require that these new things have IANA registration requests for both in their respective registries. Writing those IANA requests and taking them to the designated experts and IANA might underscore the rather tenuous nature of the problem and solution here.

@bc-pi
Copy link
Member

bc-pi commented May 29, 2025

As others have noted, precedent and consistency would require that these new things have IANA registration requests for both in their respective registries. Writing those IANA requests and taking them to the designated experts and IANA might underscore the rather tenuous nature of the problem and solution here.

As others have noted, precedent and consistency would require that these new things have IANA registration requests for both in their respective registries. Writing those IANA requests and taking them to the designated experts and IANA might underscore the rather tenuous nature of the problem and solution here.

Sorry for the double double comment. Undoubtedly user error on my part. The same user that can't seem to find how to delete a comment. Sorry.

If the selected public key contains a `kid` parameter, the JWE MUST include the same value in the `kid` JWE Header Parameter (as defined in [@!RFC7516, Section 4.1.6]) of the encrypted response. This enables the Verifier to easily identify the specific public key that was used to encrypt the response.
The JWE `enc` content encryption algorithm used is obtained from the `encrypted_response_enc_values_supported` parameter of client metadata, such as the `client_metadata` request parameter, allowing for the default value of `A128GCM` when not explicitly set.

When the `encryption_details_supported` parameter is present in the `client_metadata` parameter of the request (see #new_parameters) and requires the Wallet to include a referenced profile in the response, the selected profile SHOULD be included in the JWE protected header using the `encryption_details` header. When present, the `encryption_details` header MUST contain a string of the selected profile.
Copy link
Member

Choose a reason for hiding this comment

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

why wouldn't indicating the profile used be required? what value is there in allowing for that ambiguity? that complicates following the "MUST implement all of the requirements required by the profile included in the response" above

Suggested change
When the `encryption_details_supported` parameter is present in the `client_metadata` parameter of the request (see #new_parameters) and requires the Wallet to include a referenced profile in the response, the selected profile SHOULD be included in the JWE protected header using the `encryption_details` header. When present, the `encryption_details` header MUST contain a string of the selected profile.
When the `encryption_details_supported` parameter is present in the `client_metadata` parameter of the request (see #new_parameters) and requires the Wallet to include a referenced profile in the response, the selected profile MUST be included in the JWT header using the `encryption_details` header parameter.

@Sakurann
Copy link
Collaborator

Sakurann commented Jun 2, 2025

suggestion:

  • define apu and apv values for ECDH-ES JWE in OpenID4VP 1.0
    • the benefit of this approach is much simpler and less optionality than encryption_details_supported parameter
    • wallet MUST set apu and apv values as defined in the spec; verifier MUST validate those
    • apu and apv values are: apu - do not define it; apv is hash of a base64url encoded array of the following [ "nonce", "origin/client_id", "jwkthumbprint", "response_uri"] (with white spaces clearly defined.............)
  • later on, when JOSE-HPKE is available for JWE, define the content of the necessary parameter for that in OpenID4VP 1.1
    • ideally, they would not deviate from apu/apv for ECDH-ES

@Sakurann
Copy link
Collaborator

Sakurann commented Jun 3, 2025

WG discussion:

  • we cannot define apu apv values in the profiles of openid4vp spec because then we need a parameter in openid4vp that indicates encryption parameter, which adds somewhat unnecessary complexity/optionality + less encryption profiles the better.
  • apu - do not define it; apv - base64urlencoded hash string of following string: nonceorigin OR client_idjwkthumbprintresponse_uri in that order
    • JWE already says apv and apu is base64url-encoded string, so need to make sure it's not double encoded
  • noting concerns of @bc-pi regarding the value of doing this + error proneness of multiple value as apv

@Sakurann
Copy link
Collaborator

Sakurann commented Jun 5, 2025

WG discussion about defining apu/apv values for ECDH-ES JWE..

  • on one hand...
    • adds marginal security benefit (majority agrees with @selfissued and @bc-pi disagreeing)
    • would not be the most complex part of the OpenID4VP implementation and can be implemented using existing JOSE libraries
    • there is implementation experience of similar mechanisms in 18013-7 annex B
  • on the other hand...
    • there are strong concerns that adding this mechanism last minute would result in it being underspecified leading to interoperability problems
    • if very much needed, extension mechanism to define apu/apv values could be added in 1.1 (verifiers that support only that extension will potentially reject responses from wallets that do not support it)
    • wg seems to agree to define the content of a detached payload for JOSE-HPKE in OpenID4VP 1.1 or HAIP

wg agreed to discuss and tackle #347 during wglc/review period and as an outcome this PR and PR #628 will be closed for the above reasons since there is no wg rough consensus to proceed with either of them.

@Sakurann Sakurann closed this Jun 5, 2025
@Sakurann Sakurann added this to the Final 1.0 milestone Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

define a mechanism for the verifier and verifier to communicate profiles supported

8 participants