-
Notifications
You must be signed in to change notification settings - Fork 39
Use expected URL instead of expected origins for IAE flow #695
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
Open
awoie
wants to merge
7
commits into
main
Choose a base branch
from
awoie/fix-672
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11
−5
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1a99310
fix: uses expected URL instead of expected origins for iae flow
awoie 540ab79
Merge branch 'main' into awoie/fix-672
awoie abe5965
Apply suggestion from @awoie
awoie 621d96a
fix: removed redudant history entry; fixed SD-JWT VC IAE binding sect…
awoie ea9c1d1
Applied Timo's suggestion
awoie 4f06c02
Applied Timo's suggestion
awoie 86c56c6
Merge branch 'main' into awoie/fix-672
Sakurann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -824,7 +824,8 @@ Additional keys are defined based on the type of interaction, as shown next. | |||||
| If `type` is set to `urn:openid:dcp:iae:openid4vp_presentation`, as shown in the following example, the response MUST further include an `openid4vp_request` parameter containing an OpenID4VP Authorization Request. The contents of the request is the same as for requests passed to the Digital Credentials API (see Appendix A.2 and Appendix A.3 of [@!OpenID4VP]), except as follows: | ||||||
|
|
||||||
| * The `response_mode` MUST be either `iae_post` for unencrypted responses or `iae_post.jwt` for encrypted responses. These modes are used to indicate to the Wallet to return the response back to the same Interactive Authorization Endpoint. | ||||||
| * If `expected_origins` is present, it MUST contain only the derived Origin of the Interactive Authorization Endpoint as defined in Section 4 in [@RFC6454]. For example, the derived Origin from `https://example.com/iae` is `https://example.com`. | ||||||
| * The `expected_origins` parameter MUST NOT be present. | ||||||
| * When signed requests defined in A.3.2 of [@!OpenID4VP] are used, an addtional `expected_url` parameter MUST be present. The `expected_url` parameter is a non-empty string that contains the endpoint of the Verifier that is returning the request. In the `openid4vp_presentation` interaction type, `expected_url` MUST be set to the Interactive Authorization Endpoint. | ||||||
|
|
||||||
| The following is a non-normative example of an unsigned Authorization Request: | ||||||
|
|
||||||
|
|
@@ -884,7 +885,7 @@ The exact architecture and the deployment of the Issuer's OpenID4VP Verifier is | |||||
|
|
||||||
| When processing the request the following logic applies: | ||||||
|
|
||||||
| 1. If `expected_origins` is present, the Wallet MUST ensure that `expected_origins` contains the derived Origin as defined above. | ||||||
| 1. If `expected_url` is present, the Wallet MUST compare the value in this parameter to the URL of the follow-up request to detect replay of the request from a malicious Verifier. If the URL does not match the value of the `expected_url`, the Wallet MUST return an error. This error SHOULD be an `invalid_request` error. This parameter is not for use in unsigned requests and therefore a Wallet MUST ignore this parameter if it is present in an unsigned request. | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @c2bo is this better?
Suggested change
|
||||||
| 2. If the response contains Verifiable Presentations that include Holder Binding, the audience of each of those MUST be properly bound to the Interactive Authorization Endpoint, following the rules defined by their Credential Format. Details on how to do this for each format can be found in the "Interactive Authorization Endpoint Binding" sections under (#format-profiles). Note that the Credential Format here refers to the format of the Verifiable Presentation requested in the OpenID4VP Authorization Request, which may be different from the format used for issuing the Credentials themselves. If any Verifiable Presentation with Holder Binding is not correctly bound to the Interactive Authorization Endpoint, the response MUST be rejected. | ||||||
|
|
||||||
| The Interactive Authorization Request, which is used to submit the OpenID4VP Authorization Response MUST satisfy the requirements set out in (#follow-up-request). In addition to these requirements, the request MUST also contain the `openid4vp_response` parameter. The value of the `openid4vp_response` parameter is a JSON-encoded object that encodes the OpenID4VP Authorization Response parameters. In the case of an error it instead encodes the Authorization Error Response parameters. When the `response_mode` is `iae_post.jwt` the OpenID4VP Authorization Response MUST be encrypted according to Section 8.3 of [@!OpenID4VP]. | ||||||
|
|
@@ -1006,7 +1007,7 @@ This may lead to the malicious Authorization Server gaining access to Credential | |||||
|
|
||||||
| Custom extensions ((#iae-custom-extensions)) MUST ensure that this attack is prevented by ensuring one or both of the following: | ||||||
|
|
||||||
| 1. The Wallet is able to detect that a request is not presented by the party that initiated the Interactive Authorization Request. In the case of the (#iae-require-presentation) interaction with a signed Presentation request, this is achieved by the Wallet verifying the `expected_origins` parameter in the request, which contains the derived Origin of the Interactive Authorization Endpoint that initiated the request. | ||||||
| 1. The Wallet is able to detect that a request is not presented by the party that initiated the Interactive Authorization Request. In the case of the (#iae-require-presentation) interaction with a signed Presentation request, this is achieved by the Wallet verifying the `expected_url` parameter in the request, which contains the Interactive Authorization Endpoint that initiated the request. | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @c2bo is this better?
Suggested change
|
||||||
| 2. The Authorization Server is able to detect that the request was forwarded to a different endpoint. In the case of the (#iae-require-presentation) interaction, this is achieved for both signed and unsigned requests by the binding the Interactive Authorization Endpoint to the Verifiable Presentation (see "Interactive Authorization Endpoint Binding" sections under (#format-profiles)), which is then verified by the Authorization Server. | ||||||
|
|
||||||
| ### Authorization Code Response {#iae-authorization-code-response} | ||||||
|
|
@@ -2864,7 +2865,7 @@ The following is a non-normative example of a Credential Response containing a C | |||||
|
|
||||||
| ### Interactive Authorization Endpoint Binding {#iae-binding-sd-jwt-vc} | ||||||
|
|
||||||
| To bind the Interactive Authorization Endpoint to a Verifiable Presentation using the Credential Format defined in this section, the `aud` claim in the Key Binding JWT MUST be set to the derived Origin (as defined in (#iae-require-presentation)) of the Interactive Authorization Endpoint, prefixed with `iae:` (e.g., `iae:https://example.com`). | ||||||
| To bind the Interactive Authorization Endpoint to a Verifiable Presentation using the Credential Format defined in this section, the `aud` claim in the Key Binding JWT MUST be set to the Interactive Authorization Endpoint, prefixed with `iae:` (e.g., `iae:https://example.com`). | ||||||
|
|
||||||
| # Claims Description | ||||||
|
|
||||||
|
|
@@ -3413,6 +3414,11 @@ established by [@!RFC6749]. | |||||
| * Change Controller: OpenID Foundation Digital Credentials Protocols Working Group - openid-specs-digital-credentials-protocols@lists.openid.net | ||||||
| * Reference: (#token-request) of this specification | ||||||
|
|
||||||
| * Name: `expected_url` | ||||||
| * Parameter Usage Location: authorization request | ||||||
| * Change Controller: OpenID Foundation Digital Credentials Protocols Working Group - openid-specs-digital-credentials-protocols@lists.openid.net | ||||||
| * Reference: (#interactive-authorization-endpoint) this specification | ||||||
|
|
||||||
| ## OAuth Authorization Server Metadata Registry | ||||||
|
|
||||||
| This specification registers the following authorization server metadata parameter | ||||||
|
|
@@ -3682,9 +3688,9 @@ The technology described in this specification was made available from contribut | |||||
| * move IAE binding to dedicated format-specific sections | ||||||
| * rename `iar:` prefix in `iae:` in IAE flow | ||||||
| * rename `iar-post` response mode in `iae_post` in IAE flow | ||||||
| * use derived origin for `expected_origins` in IAE flow | ||||||
| * add require_interactive_authorization_request to AS metadata | ||||||
| * add interactive_authorization_endpoint to AS metadata section | ||||||
| * use `expected_url` instead of `expected_origins` for IAE flow | ||||||
| * add invalid_tx_code to Pre-Authz Code Flow | ||||||
| * add URNs for IAE type identifiers | ||||||
| * add iana registration for an openid foundation urn | ||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c2bo is this better?