Skip to content

Commit 46f6965

Browse files
authored
Merge pull request #753 from openid/680-http-redirects
add clarification on http redirect
2 parents a4313b1 + 25a6073 commit 46f6965

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

1.0/openid-4-verifiable-presentations-1_0.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ The following is a non-normative example of a payload for a request object:
677677
}
678678
```
679679

680-
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.
680+
The Wallet MUST process the request as defined in [@RFC9101]. The Wallet SHOULD NOT follow HTTP redirects and SHOULD treat them as an error response (see (#http_redirects)). 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.
681681

682682
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, including the Client Identifier Prefix. If any of these conditions are not met, the Wallet MUST terminate request processing.
683683

@@ -1276,7 +1276,7 @@ Content-Type: application/x-www-form-urlencoded
12761276
state=eyJhb...6-sVA
12771277
```
12781278

1279-
If the Response URI has successfully processed the Authorization Response or Authorization Error Response, it MUST respond with an HTTP status code of 200 with `Content-Type` of `application/json` and a JSON object in the response body.
1279+
If the Response URI has successfully processed the Authorization Response or Authorization Error Response, it MUST respond with an HTTP status code of 200 with `Content-Type` of `application/json` and a JSON object in the response body. The Wallet SHOULD NOT follow HTTP redirects returned by the Response URI and SHOULD treat them as an error response (see (#http_redirects)).
12801280

12811281
The following new parameter is defined for use in the JSON object returned from the Response Endpoint to the Wallet:
12821282

@@ -1900,6 +1900,20 @@ Implementations MUST follow [@!BCP195].
19001900

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

1903+
## HTTP Redirects {#http_redirects}
1904+
1905+
This specification does not use HTTP redirects (HTTP status codes 3xx) for the HTTP requests defined in this specification that the Wallet sends directly to the Verifier, i.e.:
1906+
1907+
- the request to retrieve the Request Object from the Request URI (whether using the `get` method as defined in [@RFC9101] or the `post` method defined in (#request_uri_method_post))
1908+
- the request transmitting the Authorization Response to the Response URI (see (#response_mode_post))
1909+
1910+
If the Wallet receives an HTTP redirect in response to one of these requests, it SHOULD NOT follow the redirect and SHOULD treat the response as an error. Extensions and profiles of this specification MAY define the use of HTTP redirects for specific requests.
1911+
1912+
Following redirects for the request to the Response URI would allow an Authorization Response containing personally identifiable information to be re-sent (e.g., in the case of an HTTP 307 or 308 redirect) to a URL that was not validated according to the rules for the Response URI (see (#security_considerations_direct_post)). Similarly, following redirects when retrieving the Request Object could disclose request parameters, such as `wallet_metadata` and `wallet_nonce`, to a host that was not validated. In both cases, following redirects could expose the Wallet to redirect loops.
1913+
1914+
Note: This requirement applies only to HTTP-level redirects. It does not affect redirection of the user agent as part of the protocol, e.g., when the Authorization Response is returned via the Redirect URI or when the Wallet redirects the user agent to the `redirect_uri` returned from the Response URI (see (#response_mode_post)); that `redirect_uri` is conveyed as a response parameter in an HTTP 200 response, not as an HTTP-level redirect.
1915+
1916+
19031917
## Incomplete or Incorrect Implementations of the Specifications and Conformance Testing
19041918

19051919
To achieve the full security benefits, it is important that the implementation of this specification, and the underlying specifications, are both complete and correct.
@@ -3602,6 +3616,7 @@ The technology described in this specification was made available from contribut
36023616

36033617
-31
36043618

3619+
* Clarify that the Wallet does not follow HTTP redirects
36053620
* Clarify jwks use parameter
36063621
* Clarify nonce entropy requirements
36073622
* Clarify that state is recommended to match text from Section 14.3.2. Protection of the Response URI

1.1/openid-4-verifiable-presentations-1_1.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ The following is a non-normative example of a payload for a request object:
673673
}
674674
```
675675

676-
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.
676+
The Wallet MUST process the request as defined in [@RFC9101]. The Wallet SHOULD NOT follow HTTP redirects and SHOULD treat them as an error response (see (#http_redirects)). 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.
677677

678678
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, including the Client Identifier Prefix. If any of these conditions are not met, the Wallet MUST terminate request processing.
679679

@@ -1272,7 +1272,7 @@ Content-Type: application/x-www-form-urlencoded
12721272
state=eyJhb...6-sVA
12731273
```
12741274

1275-
If the Response URI has successfully processed the Authorization Response or Authorization Error Response, it MUST respond with an HTTP status code of 200 with `Content-Type` of `application/json` and a JSON object in the response body.
1275+
If the Response URI has successfully processed the Authorization Response or Authorization Error Response, it MUST respond with an HTTP status code of 200 with `Content-Type` of `application/json` and a JSON object in the response body. The Wallet SHOULD NOT follow HTTP redirects returned by the Response URI and SHOULD treat them as an error response (see (#http_redirects)).
12761276

12771277
The following new parameter is defined for use in the JSON object returned from the Response Endpoint to the Wallet:
12781278

@@ -1964,6 +1964,19 @@ Implementations MUST follow [@!BCP195].
19641964

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

1967+
## HTTP Redirects {#http_redirects}
1968+
1969+
This specification does not use HTTP redirects (HTTP status codes 3xx) for the HTTP requests defined in this specification that the Wallet sends directly to the Verifier, i.e.:
1970+
1971+
- the request to retrieve the Request Object from the Request URI (whether using the `get` method as defined in [@RFC9101] or the `post` method defined in (#request_uri_method_post))
1972+
- the request transmitting the Authorization Response to the Response URI (see (#response_mode_post))
1973+
1974+
If the Wallet receives an HTTP redirect in response to one of these requests, it SHOULD NOT follow the redirect and SHOULD treat the response as an error. Extensions and profiles of this specification MAY define the use of HTTP redirects for specific requests.
1975+
1976+
Following redirects for the request to the Response URI would allow an Authorization Response containing personally identifiable information to be re-sent (e.g., in the case of an HTTP 307 or 308 redirect) to a URL that was not validated according to the rules for the Response URI (see (#security_considerations_direct_post)). Similarly, following redirects when retrieving the Request Object could disclose request parameters, such as `wallet_metadata` and `wallet_nonce`, to a host that was not validated. In both cases, following redirects could expose the Wallet to redirect loops.
1977+
1978+
Note: This requirement applies only to HTTP-level redirects. It does not affect redirection of the user agent as part of the protocol, e.g., when the Authorization Response is returned via the Redirect URI or when the Wallet redirects the user agent to the `redirect_uri` returned from the Response URI (see (#response_mode_post)); that `redirect_uri` is conveyed as a response parameter in an HTTP 200 response, not as an HTTP-level redirect.
1979+
19671980
## Incomplete or Incorrect Implementations of the Specifications and Conformance Testing
19681981

19691982
To achieve the full security benefits, it is important that the implementation of this specification, and the underlying specifications, are both complete and correct.
@@ -3676,6 +3689,7 @@ The technology described in this specification was made available from contribut
36763689

36773690
-01
36783691

3692+
* Clarify that the Wallet does not follow HTTP redirects
36793693
* Clarify jwks use parameter
36803694
* Clarify nonce entropy requirements
36813695
* Add usage of HPKE for the `info` parameter.

0 commit comments

Comments
 (0)