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

request_uri extension #59

Merged
merged 100 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
0ef69f7
create sequence diagram
tlodderstedt Nov 2, 2023
b402aa7
added POST to indicate HTTP method
tlodderstedt Nov 2, 2023
673fcf7
added create_presentation_uri parameter
tlodderstedt Nov 2, 2023
9dff282
added create request endpoint
tlodderstedt Nov 2, 2023
f945d54
fixed iss
tlodderstedt Nov 2, 2023
0a42d0f
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Nov 8, 2023
37fbccf
added iat and exp
tlodderstedt Nov 8, 2023
b7c2570
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Nov 8, 2023
350391d
added trustworthiness check to sequence diagram
tlodderstedt Nov 8, 2023
7822756
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Nov 8, 2023
8056fc1
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Nov 17, 2023
9061d50
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Nov 17, 2023
ba585be
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Nov 17, 2023
b1ee70e
reworked based on feedback from Paul and Giuseppe
tlodderstedt Dec 20, 2023
d29107b
some fixes
tlodderstedt Dec 20, 2023
d198019
fixed intendation
tlodderstedt Dec 20, 2023
30d59a8
changed parameter name according to Oliver's suggestion
tlodderstedt Dec 20, 2023
63a86f7
fixed request mode in diagram
tlodderstedt Jan 6, 2024
70ac39b
renamed w_nonce to issuer_nonce
tlodderstedt Jan 6, 2024
e35ab32
signed request is sent as request parameter
tlodderstedt Jan 6, 2024
8cb645f
note on nonce binding of vp_token content
tlodderstedt Jan 6, 2024
0ced90a
Update diagrams/request_uri_mode_create.md
tlodderstedt Jan 6, 2024
42f6866
Update diagrams/request_uri_mode_create.md
tlodderstedt Jan 6, 2024
4f335fc
added explanation why the first request should be signed
tlodderstedt Jan 6, 2024
18fd478
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Jan 6, 2024
bfc2bdc
Apply editorial suggestions from Giuseppe
paulbastian Jan 14, 2024
acd0c13
added text on preceedence of request object claims over request claim…
tlodderstedt Jan 18, 2024
1101fda
adjusted diagram name to parameter name
tlodderstedt Jan 18, 2024
c1ee35a
added internal processing at the verifier's response endpoint
tlodderstedt Jan 18, 2024
357222c
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Jan 18, 2024
0844acb
fixed description of request_uri_method based on Giuseppe's feedback
tlodderstedt Jan 18, 2024
f0fa298
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Jan 18, 2024
cfb2d36
changed text re signed authz request
tlodderstedt Jan 18, 2024
2c49b9b
fixed endpoint naming
tlodderstedt Jan 18, 2024
21696fd
Update diagrams/request_uri_mode_post.md
tlodderstedt Feb 8, 2024
a8f4917
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 9, 2024
2f08615
reworked the PR to reflect recent WG discussions
tlodderstedt Mar 9, 2024
9a021bb
Apply suggestions from code review
tlodderstedt Mar 11, 2024
8719239
Apply suggestions from code review
tlodderstedt Mar 11, 2024
e7b8871
reverted 3rd paragraph in Authz Request section
tlodderstedt Mar 11, 2024
9d78904
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
0e58e39
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
af6c572
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
02a58d0
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
76098d7
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
8666529
simplified diagram
tlodderstedt Mar 11, 2024
396f007
added processing requirements
tlodderstedt Mar 11, 2024
b1e94aa
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 11, 2024
d9a49d9
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
63d1f7f
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
6edd8d1
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
e8a6cde
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 11, 2024
e1276ec
fixed media types
tlodderstedt Mar 11, 2024
6d5601b
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 11, 2024
c4d175b
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
3b0a9fb
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
df5d0f1
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
f4e4236
removed "new"
tlodderstedt Mar 12, 2024
ac1ffc0
fixed wallet_metadata
tlodderstedt Mar 12, 2024
803cbe6
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
95ac037
added request_uri POST example
tlodderstedt Mar 12, 2024
6890440
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 12, 2024
148e1bd
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
ae65453
Apply suggestions from code review
tlodderstedt Mar 12, 2024
e3df8ac
moved requirement for request object up and fixed grammar nit
tlodderstedt Mar 12, 2024
0c9413d
Apply suggestions from code review
tlodderstedt Mar 12, 2024
91f811f
Apply suggestions from code review
tlodderstedt Mar 12, 2024
56ef646
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 12, 2024
a21eba3
changed text on client_metadata and added case-sensitive to error text
tlodderstedt Mar 14, 2024
efd0722
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
4ea299d
fixed history
tlodderstedt Mar 14, 2024
3208b16
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
55a4faf
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
5a0b1af
extended privacy considerations
tlodderstedt Mar 14, 2024
bee5ed9
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 14, 2024
286bf67
Update diagrams/request_uri_mode_post.md
tlodderstedt Mar 14, 2024
3c298b7
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
4540cca
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
e5add86
formatted Oliver's contribution
tlodderstedt Mar 14, 2024
06aef10
Apply suggestions from code review
tlodderstedt Mar 14, 2024
e437b50
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 14, 2024
4140e35
Apply suggestions from code review
tlodderstedt Mar 14, 2024
1e033f7
made request_uri_method case-sensitive
tlodderstedt Mar 14, 2024
d167829
Merge branch 'request_uri2' of https://github.com/openid/OpenID4VP in…
tlodderstedt Mar 14, 2024
fb39140
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
674d0aa
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
fe8ae63
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
1088682
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
c6057d9
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
e937d3a
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
f36cfe6
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
cdfea43
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
1737a30
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
d2ba099
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
a478244
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
c6db7d5
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
d3e6894
Update openid-4-verifiable-presentations-1_0.md
tlodderstedt Mar 21, 2024
17a60fc
added privacy considerations
tlodderstedt Mar 21, 2024
ada0a45
Update diagrams/request_uri_mode_post.md
tlodderstedt Mar 25, 2024
6f9c661
changed additional message and note suggested by David to PlantUML fo…
tlodderstedt Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions diagrams/create_request_uri.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
```plantuml
@startuml

autonumber

box "Wallet"
participant "Metadata" as wm
participant "Authorization Endpoint" as w
end box

participant "User Agent" as u

box "Verifier"
participant "Frontend" as r
awoie marked this conversation as resolved.
Show resolved Hide resolved
participant "Request Endpoint" as rp
participant "Response Endpoint" as rb
end box

u --> r : use
activate r

r --> u: **signed authorization request**\n(client_id, create_request_uri, state)
deactivate r
u --> w: **signed authorization request**\n(client_id, create_request_uri, state)
activate w
w --> w: check authorization request signature
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
w --> rp: POST **create request request** (\nstate,\n[OPTIONAL]issuer, \n[OPTIONAL]wallet_metadata, \n[OPTIONAL]w_nonce, \n[OPTIONAL]w_ephm_key, \n[OPTIONAL]wallet attestation, wallet attestation pop(v_nonce))
note over u, w: HTTP status code 401 signals need to authenticate
rp --> wm: [OPTIONAL] get wallet metadata
wm --> rp: [OPTIONAL] wallet metadata
rp -> rp: create and sign presentation request object (client_id, w_nonce, nonce, response_uri, \npresentation_definition, state)
rp --> w: **signed request object** (client_id, w_nonce, nonce, response_uri, \npresentation_definition, state)
note over u, w: do we want to allow unsigned presentation request objects, too?
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we had a signed authz request and presumably a secure channel then signing the presentation request object should be optional

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you are right, we already have authenticated the verifier at that stage.

What do others think? Should we make the signature of the presentation request optional?

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 in the meeting last week, we agreed that having unsigned requests is a viable approach but we should create a new issue for that, after we merged this PR.

w -> w: authenticate and\n authorize Verifier

note over u, w: user authentication and credential selection/confirmation

w -> w: create verifiable\npresentation (credential)
w --> rb: POST response \n(vp_token, presentation_submission, state)
rb --> w: redirect_url
w --> u: response (response_code)
u --> r: response (response_code)
activate r
r --> rb: get presentation response\n (transaction_id, response_code)
rb --> r: presentation response
r -> r: validate presentation \n(incl. nonce binding)
r -> r: use presented credential
@enduml
```
54 changes: 53 additions & 1 deletion openid-4-verifiable-presentations-1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Presentation of Verifiable Credentials using OpenID for Verifiable Presentations

The Authorization Request follows the definition given in [@!RFC6749] taking into account the recommendations given in [@!I-D.ietf-oauth-security-topics].

The Verifier may send an Authorization Request as Request Object by value or by reference as defined in JWT-Secured Authorization Request (JAR) [@RFC9101].
The Verifier may send an Authorization Request as Request Object by value or by reference as defined in JWT-Secured Authorization Request (JAR) [@RFC9101]. Additionally, the request can be sent as an object containing only a subset of parameters needed to in a subseqent step request the creation of a request object from the verifier through a HTTPS POST request via a newly introduced `create request endpoint`.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

The Verifier articulates requirements of the Credential(s) that are requested using `presentation_definition` and `presentation_definition_uri` parameters that contain a Presentation Definition JSON object as defined in Section 5 of [@!DIF.PresentationExchange]. Wallet implementations MUST process Presentation Definition JSON object and select candidate Verifiable Credential(s) using the evaluation process described in Section 8 of [@!DIF.PresentationExchange].
paulbastian marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -261,6 +261,9 @@ This specification defines the following new parameters:

A public key to be used by the Wallet as an input to the key agreement to encrypt Authorization Response (see (#jarm)). It MAY be passed by the Verifier using the `jwks` or the `jwks_uri` claim within the `client_metadata` or `client_metadata_uri` request parameter.
Sakurann marked this conversation as resolved.
Show resolved Hide resolved

`create_request_uri`:
: OPTIONAL. A string containing an HTTPS URL pointing to a resource where the Wallet MUST request the creation of a request object as defined in [@RFC9101]. The details of this endpoint are defined in (#create_request_uri). This parameter MUST only be combined with `client_id`, `state`, `client_id_scheme`, and any client id scheme specific parameter. It SHOULD be sent in a signed authorization request.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

It SHOULD be sent in a signed authorization request.

Why is this a SHOULD? If there is a security reason for not using signed authorization requests, then I would like to see a MUST. If this can be used with client_id_schemes that do not require signed authorization requests, then I would prefer to remove this sentence.

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 if the RP is registered in some trust framework (aka client_id_scheme), which the wallet can access using its own configured information, then a signed request is not needed if the wallet can determine that the asserted client_id is trustworthy and the wallet is not relying on any other unsigned information sent by the RP in the authz request i.e. the trust framework can provide the wallet with all the necessary metadata in a trustworthy manner.

i.e. it does not help a fake RP to pretend to be a trustworthy one, if the wallet sends the VP to the trustworthy RP's endpoint (except perhaps as a complex DOS attack on the trustworthy RP?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes this was my understanding too. If there is nothing more to it than this then I think we should remove this sentence, since it isn't helpful to say the request "SHOULD" be signed without any further context. If we haven't already we should probably add text to the effect of what you just described David, i.e. how a wallet can trust signed requests and when it can trust unsigned requests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added some context - the primary purpose of the signature is to authenticate the verifier early in the process to prevent abuse of the request URI callback for tracking.

Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth adding some text along the lines of

It MUST not be sent in response to a Create Request request.


The following additional considerations are given for pre-existing Authorization Request parameters:

`nonce`:
awoie marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -283,6 +286,18 @@ The following is a non-normative example of an Authorization Request:
&nonce=n-0S6_WzA2Mj HTTP/1.1
```

The following is a non-normative example of a request object with a `create_request_uri``:

```
{
"iss": "https://client.example.org",
"aud": "https://server.example.com",
peppelinux marked this conversation as resolved.
Show resolved Hide resolved
"state": "af0ifjsldkj",
"nonce": "n-0S6_WzA2Mj",
awoie marked this conversation as resolved.
Show resolved Hide resolved
"create_request_uri": "https://client.example.org/create_request"
}
```
peppelinux marked this conversation as resolved.
Show resolved Hide resolved

tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
## `presentation_definition` Parameter {#request_presentation_definition}

This parameter contains a Presentation Definition JSON object conforming to the syntax defined in Section 5 of [@!DIF.PresentationExchange].
Expand Down Expand Up @@ -460,6 +475,43 @@ To use `client_id_scheme` values `entity_id`, `did`, `verifier_attestation`, `x5

Other specifications can define further values for the `client_id_scheme` parameter. It is RECOMMENDED to use collision-resistant names for such values.

awoie marked this conversation as resolved.
Show resolved Hide resolved
# Create Request Endpoint {#create_response_uri}
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

This endpoint is offered by the Verifier. The Wallet sends a request to this endpoint if the Verifier requests so by passing the `create_request_uri` authorization request parameter. In case of success, the response is a request object that the Wallet MUST process in the same way as a request object as defined in [@RFC9101].
awoie marked this conversation as resolved.
Show resolved Hide resolved

Create Request requests MUST be HTTPS POST requests with the "application/json" media type.
peppelinux marked this conversation as resolved.
Show resolved Hide resolved

The following parameters are defined:
awoie marked this conversation as resolved.
Show resolved Hide resolved

`state`:
: A JSON String containing the value of the corresponding authorization Request's `state` parameter, if present.

`issuer`:
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems duplicate to wallet_metadata and may add more difficulty for the wallet if it has to merge the metadata from two possiblities. I'm in favor of only transmitting the ata with wallet_metadata

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those are two options to pass metadata.
wallet_metadata allows to send dynamically created data, issuer has the advantage of giving some binding between the issuer URL and the actual metadata. I think both are valid options (until we have substantial implementation experience).

: A JSON containing an HTTPS URL designating the Issuer URL of the Wallet (acting as a OAuth Authorization Server). The Verifier MAY obtain the Wallet's metadata by adding the well-know location `oauth-authorization-server` as specified in [@!RFC8414]. Metadata MAY also be provided by other means, for example in the wallet attestation.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

`w_nonce`:
: A JSON String containing as fresh, cryptographically random number with sufficient entropy the Verifier MUST use when creating the signed presentation request object.

tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
`client_assertion`
: A JSON String containing a Wallet attestation along with a proof of possession of the public key as defined in [@!I-D.ietf-oauth-attestation-based-client-auth]. This assertion is used to authenticate the Wallet towards the Verifier.

### Create Request Response

The Create Request Response MUST be HTTPS POST response with the "application/oauth-authz-req+jwt" media type and contain a signed request object as defined in [@RFC9101]. It MUST fulfill the requirements as defined in (#vp_token_request).
peppelinux marked this conversation as resolved.
Show resolved Hide resolved

### Create Request Error Response

The error code `401` signals to the Wallet that it needs to authenticate to the Verifier. In this case, the error response SHOULD contain a `WWW-Authenticate` header for every attestation method the Verifier supports.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

Below a non-normative example for the Wallet attestation method as specified above. The `WWW-Authenticate` contains the nonce value the Wallet MUST use in the calculation of the proof of possession of the wallet attestation.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

```
HTTP/1.1 401 Unauthorized
WWW-Authenticate: wallet-attestation error="use_nonce", \
error_description="Verifier requires wallet attestation"
Nonce: eyJ7S_zG.eyJH0-Z.HX4w-7v
```

# Response {#response}

A VP Token is only returned if the corresponding Authorization Request contained a `presentation_definition` parameter, a `presentation_definition_uri` parameter, or a `scope` parameter representing a Presentation Definition (#vp_token_request).
Expand Down
Loading