Skip to content

Conversation

@awoie
Copy link
Contributor

@awoie awoie commented Aug 5, 2025

This PR fixes #590 and #620 by adding credential format specific sections for IAR endpoint binding in VPs.

@awoie awoie marked this pull request as draft August 5, 2025 14:11
@awoie awoie marked this pull request as ready for review August 6, 2025 15:28
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.

i think we need extra line before examples for compilng

OpenID4VCIIAEHandoverBytes = bstr .cbor OpenID4VCIIAEHandoverInfo
OpenID4VCIIAEHandoverInfo = [
iaeUrl,
Copy link
Contributor

Choose a reason for hiding this comment

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

Inconsistent that this is iaeUrl, but we prefix with iar elsewhere. We should be consistent (don't care which).

Copy link
Contributor Author

@awoie awoie Aug 12, 2025

Choose a reason for hiding this comment

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

We didn't prefix with origin: in DC API either. My thought was that the handover type (i.e. OpenID4VCIIAEHandover) in the SessionTranscript would replace the prefixing and this is the way we provide the context on the flow for session transcripts across flows.

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed on today's WG call: consensus to rename "iar:" prefix to "iae:"

1. The URL of the Interactive Authorization Request endpoint becomes the Origin for the request; i.e., the Wallet MUST ensure that `expected_origins` contains the Interactive Authorization Request endpoint URL.
2. The audience in the response (for example, the `aud` value in a Key Binding JWT) MUST be the Interactive Authorization Request, prefixed with `iar:`, for example `iar:https://example.com/iar`. A response containing a different audience value MUST NOT be accepted.
3. If a `SessionTranscript` is needed, it is generated according Appendix B.2.6.2 of [@!OpenID4VP]. As above, the value for origin is the Interactive Authorization Request endpoint URL.
1. The URL of the Interactive Authorization Endpoint becomes the Origin for the request; i.e., the Wallet MUST ensure that `expected_origins` contains the Interactive Authorization Endpoint URL.

Choose a reason for hiding this comment

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

Two comments:

  1. since expected_origins is optional (or conditional), should we add "if present"?
  2. expected_origins can only contain origins, not URLs. While they can match, they don't always match. Is the idea that the expected_origins is converted by the wallet before matching?

Copy link
Contributor Author

@awoie awoie Aug 12, 2025

Choose a reason for hiding this comment

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

I agree that the current definition of Origin and expected_origins in OID4VP clashes with this normative statement. expected_origins contains origin values and is conditional based on if the request was signed. If somebody wants to write a parser for requests, this would be prone to errors since with the current text both, URLs and origins, are allowed.

I also agree that it would be cleaner to say "if present" although I don't know whether this was intentional and part of the original threat mitigation model specifically for IAE requests. I believe it wasn't, so I'm fine with adding "if present".

What we could do (non-breaking):

  1. Keep using expected_origins and use the origin part of the URL only. Probably has some security implications but perhaps this is sufficient. For OID4VP it was sufficient to check the origin and not the full URL.
  2. same as 1. (since required for signed requests) but additionally define a new optional parameter for the request for signed requests with similar logic to expected_origins, i.e., expected_urls.

Copy link
Contributor

Choose a reason for hiding this comment

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

discussed on today's WG call - seem to have a consensus for option 1

@awoie
Copy link
Contributor Author

awoie commented Aug 13, 2025

I updated the PR:

  • to harmonize IAE vs IAR terminology
  • to use the derived Origin for expected_origins
  • to make it clear that deriving the Origin is only required if expected_origins is present (note that OID4VP is not entirely clear if this can be used for unsigned requests too)
  • editorial changes

I kept using the IAE (URL) for audience and SessionTranscript binding. However, OID4VP has this for DC API:

The audience for the response (for example, the aud value in a Key Binding JWT) MUST be the Origin, prefixed with origin:, for example origin:https://verifier.example.com/. This is the case even for signed requests. Therefore, when using OpenID4VP over the DC API, the Client Identifier is not used as the audience for the response.

I'm not sure if the current language in this PR would clash with this definition, thoughts? @GarethCOliver @jogu @martijnharing @danielfett. If it does, I can update this PR to use the derived Origin also for the audience and session transcript binding.

@awoie
Copy link
Contributor Author

awoie commented Aug 13, 2025

I updated the PR:

  • to harmonize IAE vs IAR terminology
  • to use the derived Origin for expected_origins
  • to make it clear that deriving the Origin is only required if expected_origins is present (note that OID4VP is not entirely clear if this can be used for unsigned requests too)
  • editorial changes

I kept using the IAE (URL) for audience and SessionTranscript binding. However, OID4VP has this for DC API:

The audience for the response (for example, the aud value in a Key Binding JWT) MUST be the Origin, prefixed with origin:, for example origin:https://verifier.example.com/. This is the case even for signed requests. Therefore, when using OpenID4VP over the DC API, the Client Identifier is not used as the audience for the response.

I'm not sure if the current language in this PR would clash with this definition, thoughts? @GarethCOliver @jogu @martijnharing @danielfett. If it does, I can update this PR to use the derived Origin also for the audience and session transcript binding.

For a proposal on how to use the derived origin instead of the endpoint for the binding, see this PR: #629

@jogu jogu added the iae Items related to Interactive Authorization Endpoint label Aug 14, 2025
@Sakurann Sakurann modified the milestones: Final 1.0, 1.1 Aug 21, 2025
@Sakurann
Copy link
Collaborator

Sakurann commented Oct 24, 2025

WG discussion:

@jogu jogu force-pushed the awoie/fix-590-iar branch from 0ee5a46 to 08b7bc8 Compare October 25, 2025 20:41
Is it clear enough that Credential Formats correspond to the requested Credential in the IAR, and not to the requested Credential in the VCI request?

I did not update the audience in the VP, but propose a fix in £629
al here fix: just do derived origin binding #629

fixes #590
fixes #620

(changes by Oliver, moved from the 1.0 to 1.1 spec by Joseph)
@jogu jogu force-pushed the awoie/fix-590-iar branch from 08b7bc8 to 11451b5 Compare October 25, 2025 20:43
@jogu
Copy link
Contributor

jogu commented Oct 25, 2025

I've updated this PR to target the 1.1 spec - please review.

As per @Sakurann's comment above, we'll discuss whether to move some of this to the VP spec and will separately handled the discussion about origin vs url in #629, so please ignore those two aspects when reviewing this so we can get the rest of this PR merged (as we have further IAE PRs to create and want to reduce the potential for conflicts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discuss iae Items related to Interactive Authorization Endpoint reviews-needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

origin value to use for IAR requests is unclear for mdoc presentation / for w3c vc

7 participants