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 all 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
44 changes: 44 additions & 0 deletions diagrams/request_uri_mode_post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
```plantuml
@startuml

autonumber

participant "Wallet" as w

participant "User Agent" as u

participant "Verifier" as r

u --> r : use
activate r

r --> u: authorization request\n(client_id, request_uri, request_uri_method=post, [client_id_scheme])
deactivate r
u --> w: authorization request\n(client_id, request_uri, request_uri_method=post, [client_id_scheme])
activate w
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
w --> w: [optional. Check client_id with trust framework]
note over r,w
Note that the client_id is self asserted by the verifier. If the client_id is not trusted, then the user should be informed that an untrusted
verifier is requesting information and asked if he/she wants to proceed. If the client_id identifies a trusted verifier, then the request_uri
that is responded to should be the one that actually belongs to the trusted client_id, as verified by the trust framework.
end note
w --> r: POST **request_uri** ([wallet_metadata][, wallet_nonce])
r -> r: create and sign (and optionally encrypt) request object
awoie marked this conversation as resolved.
Show resolved Hide resolved
r --> w: **signed (optionally encrypted) request object** (client_id, client_id_scheme, wallet_nonce, nonce, \nresponse_uri, presentation_definition, state)
w -> w: authenticate and\n authorize Verifier

note over u, w: User authentication and Credential selection/confirmation

w -> w: create credential presentation(s) associated with nonce
w --> r: POST response \n(vp_token(credential presentation(s)), presentation_submission, state)
r -> r: check state, store vp_token\n & create redirect_uri with response_code
r --> w: redirect_uri
w --> u: redirect (redirect_uri)
u --> r: redirect (redirect_uri)
activate r
r --> r: presentation response
r -> r: validate response \n(incl. response_code)
r -> r: validate presentation \n(incl. nonce binding)
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
r -> r: use presented credential
@enduml
```
108 changes: 107 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,14 @@ 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 a Request Object either by value or by reference, as defined in the JWT-Secured Authorization Request (JAR) [@RFC9101].

This specification defines a new mechanism for the cases when the Wallet wants to provide to the Verifier details about its technical capabilities to
allow the Verifier to generate a request that matches the technical capabilities of that Wallet.
To enable this, the Authorization Request can contain a `request_uri_method` parameter with the value `post`
that signals to the Wallet that it can make an HTTP POST request to the Verifier's `request_uri`
endpoint with information about its capabilities as defined in {#request_uri_method_post}. The Wallet MAY continue with JAR
when it receives `request_uri_method` parameter with the value `post` but does not support this feature.

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 +268,12 @@ 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

`request_uri_method`:
: OPTIONAL. A string determining the HTTP method to be used when the `request_uri` parameter is included in the same request. Two case-sensitive valid values are defined in this specification: `get` and `post`. If `request_uri_method` value is `get`, the Wallet MUST send the request to retrieve the Request Object using the HTTP GET method, i.e., as defined in [@RFC9101]. If `request_uri_method` value is `post`, a supporting Wallet MUST send the request using the HTTP POST method as detailed in (#request_uri_method_post). If the `request_uri_method` parameter is not present, the Wallet MUST process the `request_uri` parameter as defined in [@RFC9101]. Wallets not supporting the `post` method will send a GET request to the request URI (default behavior as defined in [@RFC9101]). `request_uri_method` parameter MUST NOT be present if a `request_uri` parameter is not present.

If the Verifier set the `request_uri_method` parameter value to `post` and there is no other means to convey its capabilities to the Wallet, it SHOULD add the `client_metadata` parameter to the Authorization Request.
This enables the Wallet to assess the Verifier's capabilities, allowing it to transmit only the relevant capabilities through the `wallet_metadata` parameter in the Request URI POST request. If the Verifier uses the `client_id_scheme` parameter in the Request Object, it MUST also add the same `client_id_scheme` value in the Authorization 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 +296,17 @@ 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 an Authorization Request with a `request_uri_method` parameter (including the additional `client_id_scheme` and `client_metadata` parameters):

```
GET /authorize?
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
client_id=client.example.org
&client_id_scheme=x509_san_dns
&client_metadata=...
&request_uri=https%3A%2F%2Fclient.example.org%2Frequest%2Fvapof4ql2i7m41m68uep
&request_uri_method=post HTTP/1.1
```
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 +484,67 @@ 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
## Request URI Method `post` {#request_uri_method_post}

This request is handled by the Request URI endpoint of the Verifier.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

The request MUST use the HTTP POST method with the `https` scheme, and the content type `application/x-www-form-urlencoded` and the accept header set to `application/oauth-authz-req+jwt`.

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

`wallet_metadata`:
: OPTIONAL. A String containing a JSON object containing metadata parameters as defined in (#as_metadata_parameters).

`wallet_nonce`:
: OPTIONAL. A String value used to mitigate replay attacks of the Authorization Request. When received, the Verifier MUST use it as the `wallet_nonce` value in the signed authorization request object. Value can be a base64url encoded, fresh, cryptographically random number with sufficient entropy.

If the Wallet requires the Verifier to encrypt the Request Object, it SHOULD use the `jwks` or `jwks_uri` parameter within the `wallet_metadata` parameter to pass the public key for the input to the key agreement. Other mechanisms to pass the encryption key can be used as well. If the Wallet requires an encrypted Authorization Response, it SHOULD specify supported encryption algorithms using the `authorization_encryption_alg_values_supported` and `authorization_encryption_enc_values_supported` parameters.

Additionally, if the `client_id_scheme` value permits signed Request Objects, the Wallet SHOULD list supported cryptographic algorithms for securing the Request Object through the `request_object_signing_alg_values_supported` parameter. Conversely, the Wallet MUST NOT include this parameter if the `client_id_scheme` precludes signed Request Objects.

The following is a non-normative example of a request:

```
POST /request HTTP/1.1
Host: client.example.org
Content-Type: application/x-www-form-urlencoded

wallet_metadata=%7B%22vp_formats_supported%22%3A%7B%22jwt_vc_json%22%3A%7B%22alg_values_supported
%22%3A%5B%22ES256K%22%2C%22ES384%22%5D%7D%2C%22jwt_vp_json%22%3A%7B%22alg_values_supported%22%3A%
5B%22ES256K%22%2C%22EdDSA%22%5D%7D%7D%7D&
wallet_nonce=qPmxiNFCR3QTm19POc8u
```

tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
### Request URI Response

The Request URI response MUST be an HTTP response with the content type "application/oauth-authz-req+jwt" and the body being a signed, optionally encrypted, request object as defined in [@RFC9101]. The request object MUST fulfill the requirements as defined in (#vp_token_request).
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

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

```json
{
"client_id": "client.example.org",
"client_id_scheme": "x509_san_dns",
"response_uri": "https://client.example.org/post",
"response_type": "vp_token",
"response_mode": "direct_post",
"presentation_definition": {...},
"nonce": "n-0S6_WzA2Mj",
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
"wallet_nonce": "qPmxiNFCR3QTm19POc8u",
"state" : "eyJhb...6-sVA"
}
```

The Wallet MUST process the request as defined in [@RFC9101]. Additionally, if the Wallet passed a `wallet_nonce` in the POST request, the Wallet MUST validate whether the request object contains the respective nonce value in a `wallet_nonce` claim. If it does not, the Wallet MUST terminate request processing.

The Wallet MUST extract the set of Authorization Request parameters from the Request Object. The Wallet MUST only use the parameters in this Request Object, even if the same parameter was provided in an Authorization Request query parameter. The Client Identifier value in the `client_id` Authorization Request parameter and the Request Object `client_id` claim value MUST be identical. If the Authorization Request contains a `client_id_scheme` parameter, the `client_id_scheme` Authorization Request parameter and the Request Object `client_id_scheme` claim value MUST be identical. If any of these conditions are not met, the Wallet MUST terminate request processing.

The Wallet then validates the request as specified in OAuth 2.0 [@RFC6749].

### Request URI Error Response

If the Verifier responds with any HTTP error response, the Wallet MUST terminate the process.

# 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 Expand Up @@ -687,6 +772,11 @@ This document also defines the following additional error codes and error descri

- The Presentation Definition URL can be reached, but the specified `presentation_definition` cannot be found at the URL.

`invalid_request_uri_method`:

- The value of the `request_uri_method` request parameter is neither `get` nor `post` (case-sensitive).
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved


## VP Token Validation

Verifiers MUST validate the VP Token in the following manner:
Expand Down Expand Up @@ -1088,6 +1178,18 @@ Implementations MUST follow [@!BCP195].

Whenever TLS is used, a TLS server certificate check MUST be performed, per [@!RFC6125].

# Privacy Considerations

## Authorization Requests with Request URI

If the Wallet is acting within a trust framework that allows the Wallet to determine whether a 'request_uri' belongs to a certain 'client_id', the Wallet is RECOMMENDED to validate the Verifier's authenticity and authorization given by 'client_id' and that the 'request_uri' corresponds to this Verifier. If the link cannot be established in those cases, the Wallet SHOULD refuse the request or ask the End-User for advise.

If no user interaction is required before sending the request, it is easy to request on a large scale and in an automated fashion the wallet capabilities from all visitors of a website. Even without personally identifiable information (PII) this can reveal some information about users, like their nationality (e.g., a Wallet with special capabilities only used in one EU member state).

Mandatory user interaction before sending the request, like clicking a button, unlocking the wallet or even just showing a screen of the app, can make this less attractive/likely to being exploited.

Requests from the Wallet to the Verifier SHOULD be sent with the minimal amount of information possible, and in particular, without any HTTP headers identifying the software used for the request (e.g., HTTP libraries or their versions). The Wallet MUST NOT send PII or any other data that could be used for fingerprinting to the Request URI in order to prevent user tracking.
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved
tlodderstedt marked this conversation as resolved.
Show resolved Hide resolved

{backmatter}

<reference anchor="VC_DATA" target="https://www.w3.org/TR/2022/REC-vc-data-model-20220303/">
Expand Down Expand Up @@ -1675,6 +1777,10 @@ The technology described in this specification was made available from contribut

[[ To be removed from the final specification ]]

-21

* added `post` request method for Request URI

-20

* added "verifier_attestation" client id scheme value
Expand Down
Loading