idnits 2.17.1 draft-ietf-oauth-par-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (2 February 2021) is 1176 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-34) exists of draft-ietf-oauth-jwsreq-30 -- Possible downref: Non-RFC (?) normative reference: ref. 'OIDC' == Outdated reference: A later version (-26) exists of draft-ietf-oauth-security-topics-16 == Outdated reference: A later version (-10) exists of draft-ietf-oauth-v2-1-00 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Web Authorization Protocol T. Lodderstedt 3 Internet-Draft yes.com 4 Intended status: Standards Track B. Campbell 5 Expires: 6 August 2021 Ping Identity 6 N. Sakimura 7 NAT.Consulting 8 D. Tonge 9 Moneyhub Financial Technology 10 F. Skokan 11 Auth0 12 2 February 2021 14 OAuth 2.0 Pushed Authorization Requests 15 draft-ietf-oauth-par-06 17 Abstract 19 This document defines the pushed authorization request endpoint, 20 which allows clients to push the payload of an OAuth 2.0 21 authorization request to the authorization server via a direct 22 request and provides them with a request URI that is used as 23 reference to the data in a subsequent call to the authorization 24 endpoint. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at https://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on 6 August 2021. 43 Copyright Notice 45 Copyright (c) 2021 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 50 license-info) in effect on the date of publication of this document. 51 Please review these documents carefully, as they describe your rights 52 and restrictions with respect to this document. Code Components 53 extracted from this document must include Simplified BSD License text 54 as described in Section 4.e of the Trust Legal Provisions and are 55 provided without warranty as described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 60 1.1. Introductory Example . . . . . . . . . . . . . . . . . . 4 61 1.2. Conventions and Terminology . . . . . . . . . . . . . . . 5 62 2. Pushed Authorization Request Endpoint . . . . . . . . . . . . 5 63 2.1. Request . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 2.2. Successful Response . . . . . . . . . . . . . . . . . . . 8 65 2.3. Error Response . . . . . . . . . . . . . . . . . . . . . 9 66 2.4. Management of Client Redirect URIs . . . . . . . . . . . 10 67 3. The "request" Request Parameter . . . . . . . . . . . . . . . 11 68 4. Authorization Request . . . . . . . . . . . . . . . . . . . . 13 69 5. Authorization Server Metadata . . . . . . . . . . . . . . . . 14 70 6. Client Metadata . . . . . . . . . . . . . . . . . . . . . . . 15 71 7. Security Considerations . . . . . . . . . . . . . . . . . . . 15 72 7.1. Request URI Guessing . . . . . . . . . . . . . . . . . . 15 73 7.2. Open Redirection . . . . . . . . . . . . . . . . . . . . 15 74 7.3. Request Object Replay . . . . . . . . . . . . . . . . . . 16 75 7.4. Client Policy Change . . . . . . . . . . . . . . . . . . 16 76 7.5. Request URI Swapping . . . . . . . . . . . . . . . . . . 16 77 8. Privacy Considerations . . . . . . . . . . . . . . . . . . . 16 78 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 16 79 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 80 10.1. OAuth Authorization Server Metadata . . . . . . . . . . 17 81 10.2. OAuth Dynamic Client Registration Metadata . . . . . . . 17 82 10.3. OAuth URI Registration . . . . . . . . . . . . . . . . . 17 83 11. Normative References . . . . . . . . . . . . . . . . . . . . 18 84 12. Informative References . . . . . . . . . . . . . . . . . . . 18 85 Appendix A. Document History . . . . . . . . . . . . . . . . . . 20 86 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 88 1. Introduction 90 Pushed authorization requests (PAR), defined by this document, enable 91 OAuth [RFC6749] clients to push the payload of an authorization 92 request directly to the authorization server in exchange for a 93 request URI value, which is used as reference to the authorization 94 request payload data in a subsequent call to the authorization 95 endpoint via the user-agent. 97 In OAuth [RFC6749] authorization request parameters are typically 98 sent as URI query parameters via redirection in the user-agent. This 99 is simple but also yields challenges: 101 * There is no cryptographic integrity and authenticity protection. 102 An attacker could, for example, modify the scope of access 103 requested or swap the context of a payment transaction by changing 104 scope values. Although protocol facilities exist to enable 105 clients or users to detect some such changes, preventing 106 modifications early in the process is a more robust solution. 108 * There is no mechanism to ensure confidentiality of the request 109 parameters. Although HTTPS is required for the authorization 110 endpoint, the request data passes through the user-agent in the 111 clear and query string data can inadvertently leak to web server 112 logs and to other sites via referer. The impact of which can be 113 significant, if personal identifiable information or other 114 regulated data is sent in the authorization request (which might 115 well be the case in identity, open banking, and similar 116 scenarios). 118 * Authorization request URLs can become quite large, especially in 119 scenarios requiring fine-grained authorization data, which might 120 cause errors in request processing. 122 JWT Secured Authorization Request (JAR) [I-D.ietf-oauth-jwsreq] 123 provides solutions for the security challenges by allowing OAuth 124 clients to wrap authorization request parameters in a request object, 125 which is a signed and optionally encrypted JSON Web Token (JWT) 126 [RFC7519]. In order to cope with the size restrictions, JAR 127 introduces the "request_uri" parameter that allows clients to send a 128 reference to a request object instead of the request object itself. 130 This document complements JAR by providing an interoperable way to 131 push the payload of an authorization request directly to the 132 authorization server in exchange for a "request_uri" value usable at 133 the authorization server in a subsequent authorization request. 135 PAR fosters OAuth security by providing clients a simple means for a 136 confidential and integrity protected authorization request. Clients 137 requiring an even higher security level, especially cryptographically 138 confirmed non-repudiation, are able to use JWT-based request objects 139 as defined by [I-D.ietf-oauth-jwsreq] in conduction with a pushed 140 authorization request. 142 PAR allows the authorization server to authenticate the client before 143 any user interaction happens. The increased confidence in the 144 identity of the client during the authorization process allows the 145 authorization server to refuse illegitimate requests much earlier in 146 the process, which can prevent attempts to spoof clients or otherwise 147 tamper with or misuse an authorization request. 149 Note that HTTP "POST" requests to the authorization endpoint via the 150 user-agent, as described in Section 3.1 of [RFC6749] and 151 Section 3.1.2.1 of [OIDC], could also be used to cope with the 152 request size limitations described above. However, it's only 153 optional per [RFC6749] and, even when supported, it is a viable 154 option for traditional web applications but is prohibitively 155 difficult to use with mobile apps. Those apps typically invoke a 156 custom tab with an URL that is translated into a GET request. Using 157 "POST" would require the app to first open a web page under its 158 control in the custom tab that in turn would initiate the form "POST" 159 towards the authorization server. PAR is simpler to use and has 160 additional security benefits as described above. 162 1.1. Introductory Example 164 A client typically initiates an authorization request by directing 165 the user-agent to make an HTTP request like the following to the 166 authorization server's authorization endpoint (extra line breaks and 167 indentation for display purposes only): 169 GET /authorize?response_type=code 170 &client_id=s6BhdRkqt3&state=af0ifjsldkj 171 &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb HTTP/1.1 172 Host: as.example.com 174 Such a request could instead be pushed directly to the authorization 175 server by the client as follows with a "POST" request to the pushed 176 authorization request endpoint (extra line breaks for display 177 purposes only): 179 POST /as/par HTTP/1.1 180 Host: as.example.com 181 Content-Type: application/x-www-form-urlencoded 182 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 184 response_type=code 185 &client_id=s6BhdRkqt3&state=af0ifjsldkj 186 &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb 188 The authorization server responds with a request URI: 190 HTTP/1.1 201 Created 191 Cache-Control: no-cache, no-store 192 Content-Type: application/json 194 { 195 "request_uri": "urn:example:bwc4JK-ESC0w8acc191e-Y1LTC2", 196 "expires_in": 90 197 } 199 The client uses the request URI value to create the subsequent 200 authorization request by directing the user-agent to make an HTTP 201 request to the authorization server's authorization endpoint like the 202 following (extra line breaks and indentation for display purposes 203 only): 205 GET /authorize?client_id=s6BhdRkqt3 206 &request_uri=urn%3Aexample%3Abwc4JK-ESC0w8acc191e-Y1LTC2 HTTP/1.1 207 Host: as.example.com 209 1.2. Conventions and Terminology 211 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 212 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 213 "OPTIONAL" in this document are to be interpreted as described in BCP 214 14 [RFC2119] [RFC8174] when, and only when, they appear in all 215 capitals, as shown here. 217 This specification uses the terms "access token", "authorization 218 server", "authorization endpoint", "authorization request", "token 219 endpoint", and "client" defined by The OAuth 2.0 Authorization 220 Framework [RFC6749]. 222 2. Pushed Authorization Request Endpoint 224 The pushed authorization request endpoint is an HTTP API at the 225 authorization server that accepts HTTP "POST" requests with 226 parameters in the HTTP request entity-body using the "application/x- 227 www-form-urlencoded" format with a character encoding of UTF-8 as 228 described in Appendix B of [RFC6749]. The pushed authorization 229 request endpoint URL MUST use the "https" scheme. 231 Authorization servers supporting pushed authorization requests SHOULD 232 include the URL of their pushed authorization request endpoint in 233 their authorization server metadata document [RFC8414] using the 234 "pushed_authorization_request_endpoint" parameter as defined in 235 Section 5. 237 The endpoint accepts the authorization request parameters defined in 238 [RFC6749] for the authorization endpoint as well as all applicable 239 extensions defined for the authorization endpoint. Some examples of 240 such extensions include PKCE [RFC7636], Resource Indicators 241 [RFC8707], and OpenID Connect [OIDC]. The endpoint MAY also support 242 sending the set of authorization request parameters as a request 243 object according to [I-D.ietf-oauth-jwsreq] and Section 3. 245 The rules for client authentication as defined in [RFC6749] for token 246 endpoint requests, including the applicable authentication methods, 247 apply for the pushed authorization request endpoint as well. If 248 applicable, the "token_endpoint_auth_method" client metadata 249 [RFC7591] parameter indicates the registered authentication method 250 for the client to use when making direct requests to the 251 authorization server, including requests to the pushed authorization 252 request endpoint. Similarly, the 253 "token_endpoint_auth_methods_supported" authorization server metadata 254 [RFC8414] parameter lists client authentication methods supported by 255 the authorization server when accepting direct requests from clients, 256 including requests to the pushed authorization request endpoint. 258 Due to historical reasons there is potential ambiguity regarding the 259 appropriate audience value to use when employing JWT client assertion 260 based authentication (defined in Section 2.2 of [RFC7523] with 261 "private_key_jwt" or "client_secret_jwt" authentication method names 262 per Section 9 of [OIDC]). To address that ambiguity the issuer 263 identifier URL of the authorization server according to [RFC8414] 264 SHOULD be used as the value of the audience. In order to facilitate 265 interoperability the authorization server MUST accept its issuer 266 identifier, token endpoint URL, or pushed authorization request 267 endpoint URL as values that identify it as an intended audience. 269 2.1. Request 271 A client sends the parameters that comprise an authorization request 272 directly to the pushed authorization request endpoint. A typical 273 parameter set might include: "client_id", "response_type", 274 "redirect_uri", "scope", "state", "code_challenge", and 275 "code_challenge_method" as shown in the example below. However, the 276 pushed authorization request can be composed of any of the parameters 277 applicable for use at authorization endpoint including those defined 278 in [RFC6749] as well as all applicable extensions. The "request_uri" 279 authorization request parameter is one exception, which MUST NOT be 280 provided. 282 The request also includes, as appropriate for the given client, any 283 additional parameters necessary for client authentication (e.g., 284 "client_secret", or "client_assertion" and "client_assertion_type"). 286 Such parameters are defined and registered for use at the token 287 endpoint but are applicable only for client authentication. When 288 present in a pushed authorization request, they are relied upon only 289 for client authentication and are not germane to the authorization 290 request itself. Any token endpoint parameters that are not related 291 to client authentication have no defined meaning for a pushed 292 authorization request. The "client_id" parameter is defined with the 293 same semantics for both authorization requests and requests to the 294 token endpoint; as a required authorization request parameter, it is 295 similarly required in a pushed authorization request. 297 The client adds the parameters in "x-www-form-urlencoded" format with 298 a character encoding of UTF-8 as described in Appendix B of [RFC6749] 299 to the body of an HTTP "POST" request. If applicable, the client 300 also adds its authentication credentials to the request header or the 301 request body using the same rules as for token endpoint requests. 303 This is illustrated by the following example (extra line breaks in 304 the message-body for display purposes only): 306 POST /as/par HTTP/1.1 307 Host: as.example.com 308 Content-Type: application/x-www-form-urlencoded 309 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 311 response_type=code&state=af0ifjsldkj&client_id=s6BhdRkqt3 312 &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb 313 &code_challenge=K2-ltc83acc4h0c9w6ESC_rEMTJ3bww-uCHaoeK1t8U 314 &code_challenge_method=S256&scope=account-information 316 The authorization server MUST process the request as follows: 318 1. Authenticate the client in the same way as at the token endpoint. 320 2. Reject the request if the "request_uri" authorization request 321 parameter is provided. 323 3. Validate the pushed request as it would an authorization request 324 sent to the authorization endpoint. For example, the 325 authorization server checks whether the redirect URI matches one 326 of the redirect URIs configured for the client and also checks 327 whether the client is authorized for the scope for which it is 328 requesting access. This validation allows the authorization 329 server to refuse unauthorized or fraudulent requests early. The 330 authorization server MAY omit validation steps that it is unable 331 to perform when processing the pushed request, however such 332 checks MUST then be performed at the authorization endpoint. 334 The authorization server MAY allow clients with authentication 335 credentials to establish per-authorization request redirect URIs with 336 every pushed authorization request. Described in more detail in 337 Section 2.4, this is possible since, in contrast to [RFC6749], this 338 specification gives the authorization server the the ability to 339 authenticate clients and validate client requests before the actual 340 authorization request is performed. 342 2.2. Successful Response 344 If the verification is successful, the server MUST generate a request 345 URI and return a JSON response with the following members at the top 346 level with "201 Created" HTTP response code. 348 * "request_uri" : The request URI corresponding to the authorization 349 request posted. This URI is used as reference to the respective 350 request data in the subsequent authorization request only. The 351 way the authorization process obtains the authorization request 352 data is at the discretion of the authorization server and out of 353 scope of this specification. There is no need to make the 354 authorization request data available to other parties via this 355 URI. 357 * "expires_in" : A JSON number that represents the lifetime of the 358 request URI in seconds as a positive integer. The request URI 359 lifetime is at the discretion of the authorization server but will 360 typically be relatively short (e.g., between 5 and 600 seconds). 362 The format of the "request_uri" value is at the discretion of the 363 authorization server but it MUST contain some part generated using a 364 cryptographically strong pseudorandom algorithm such that it is 365 computationally infeasible to predict or guess a valid value. The 366 authorization server MAY construct the "request_uri" value using the 367 form "urn:ietf:params:oauth:request_uri:" with 368 "" as the random part of the URI that references the 369 respective authorization request data. The string representation of 370 a UUID as a URN per [RFC4122] is also an option for authorization 371 servers to construct "request_uri" values. 373 The "request_uri" value MUST be bound to the client that posted the 374 authorization request. 376 The following is an example of such a response: 378 HTTP/1.1 201 Created 379 Content-Type: application/json 380 Cache-Control: no-cache, no-store 382 { 383 "request_uri": 384 "urn:ietf:params:oauth:request_uri:bwc4JK-ESC0w8acc191e-Y1LTC2", 385 "expires_in": 60 386 } 388 2.3. Error Response 390 The authorization server returns an error response with the same 391 format as is specified for error responses from the token endpoint in 392 Section 5.2 of [RFC6749] using the appropriate error code from 393 therein or from Section 4.1.2.1 of [RFC6749]. In those cases where 394 Section 4.1.2.1 of [RFC6749] prohibits automatic redirection with an 395 error back to the requesting client and hence doesn't define an error 396 code, for example when the request fails due to a missing, invalid, 397 or mismatching redirection URI, the "invalid_request" error code can 398 be used as the default error code. Error codes defined by OAuth 399 extension can also be used when such an extension is involved in the 400 initial processing of authorization request that was pushed. Since 401 initial processing of the pushed authorization request does not 402 involve resource owner interaction, error codes related to user 403 interaction, such as "consent_required" defined by [OIDC], are never 404 returned. 406 If the client is required to use signed request objects, either by 407 authorization server or client policy (see [I-D.ietf-oauth-jwsreq], 408 section 10.5), the authorization server MUST only accept requests 409 complying with the definition given in Section 3 and MUST refuse any 410 other request with HTTP status code 400 and error code 411 "invalid_request". 413 In addition to the above, the pushed authorization request endpoint 414 can also make use of the following HTTP status codes: 416 * 405: If the request did not use the "POST" method, the 417 authorization server responds with an HTTP 405 (Method Not 418 Allowed) status code. 420 * 413: If the request size was beyond the upper bound that the 421 authorization server allows, the authorization server responds 422 with an HTTP 413 (Payload Too Large) status code. 424 * 429: If the number of requests from a client during a particular 425 time period exceeds the number the authorization server allows, 426 the authorization server responds with an HTTP 429 (Too Many 427 Requests) status code. 429 The following is an example of an error response from the pushed 430 authorization request endpoint: 432 HTTP/1.1 400 Bad Request 433 Content-Type: application/json 434 Cache-Control: no-cache, no-store 436 { 437 "error": "invalid_request", 438 "error_description": 439 "The redirect_uri is not valid for the given client" 440 } 442 2.4. Management of Client Redirect URIs 444 While OAuth 2.0 [RFC6749] allows clients to use unregistered 445 "redirect_uri" values in certain circumstances, or for the 446 authorization server to apply its own matching semantics to the 447 "redirect_uri" value presented by the client at the authorization 448 endpoint, the OAuth Security BCP [I-D.ietf-oauth-security-topics] as 449 well as OAuth 2.1 [I-D.ietf-oauth-v2-1] require an authorization 450 server exactly match the "redirect_uri" parameter against the set of 451 redirect URIs previously established for a particular client. This 452 is a means for early detection of client impersonation attempts and 453 prevents token leakage and open redirection. As a downside, this can 454 make client management more cumbersome since the redirect URI is 455 typically the most volatile part of a client policy. 457 The exact matching requirement MAY be relaxed when using pushed 458 authorization requests for clients that have established 459 authentication credentials with the authorization server. This is 460 possible since, in contrast to a traditional authorization request, 461 the authorization server authenticates the client before the 462 authorization process starts and thus ensures it is interacting with 463 the legitimate client. The authorization server MAY allow such 464 clients to specify "redirect_uri" values that were not previously 465 registered with the authorization server. This will give the client 466 more flexibility (e.g. to mint distinct redirect URI values per 467 authorization server at runtime) and can simplify client management. 468 It is at the discretion of the authorization server to apply 469 restrictions on supplied "redirect_uri" values, e.g. the 470 authorization server MAY require a certain URI prefix or allow only a 471 query parameter to vary at runtime. 473 Note: The ability to set up transaction specific redirect URIs is 474 also useful in situations where client ids and corresponding 475 credentials and policies are managed by a trusted 3rd party, e.g. via 476 client certificates containing client permissions. Such an 477 externally managed client could interact with an authorization server 478 trusting the respective 3rd party without the need for an additional 479 registration step. 481 3. The "request" Request Parameter 483 Clients MAY use the "request" parameter as defined in JAR 484 [I-D.ietf-oauth-jwsreq] to push a request object JWT to the 485 authorization server. The rules for processing, signing, and 486 encryption of the request object as defined in JAR 487 [I-D.ietf-oauth-jwsreq] apply. When the "application/x-www-form- 488 urlencoded" HTTP entity-body "request" parameter is used, the request 489 object MUST contain all the authorization request parameters as 490 claims of the JWT. Additional request parameters as required by the 491 given client authentication method are to be included as 492 'application/x-www-form-urlencoded' parameters in the HTTP request 493 entity-body (e.g. Mutual TLS client authentication [RFC8705] uses 494 the "client_id" HTTP request parameter while JWT assertion based 495 client authentication [RFC7523] uses "client_assertion" and 496 "client_assertion_type"). 498 The following is an example of a pushed authorization request using a 499 signed request object. The client is authenticated by its client 500 secret using the HTTP Basic Authentication scheme specified in 501 Section 2.3.1 of [RFC6749] (extra line breaks for display purposes 502 only): 504 POST /as/par HTTP/1.1 505 Host: as.example.com 506 Content-Type: application/x-www-form-urlencoded 507 Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 509 request=eyJraWQiOiJrMmJkYyIsImFsZyI6IlJTMjU2In0.eyJpc3MiOiJzNkJoZ 510 FJrcXQzIiwiYXVkIjoiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLCJyZXNwb2 511 5zZV90eXBlIjoiY29kZSIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmV 512 jdF91cmkiOiJodHRwczovL2NsaWVudC5leGFtcGxlLm9yZy9jYiIsInNjb3BlIjoi 513 YWlzIiwic3RhdGUiOiJhZjBpZmpzbGRraiIsImNvZGVfY2hhbGxlbmdlIjoiSzItb 514 HRjODNhY2M0aDBjOXc2RVNDX3JFTVRKM2J3dy11Q0hhb2VLMXQ4VSIsImNvZGVfY2 515 hhbGxlbmdlX21ldGhvZCI6IlMyNTYifQ.O49ffUxRPdNkN3TRYDvbEYVr1CeAL64u 516 W4FenV3n9WlaFIRHeFblzv-wlEtMm8-tusGxeE9z3ek6FxkhvvLEqEpjthXnyXqqy 517 Jfq3k9GSf5ay74ml_0D6lHE1hy-kVWg7SgoPQ-GB1xQ9NRhF3EKS7UZIrUHbFUCF0 518 MsRLbmtIvaLYbQH_Ef3UkDLOGiU7exhVFTPeyQUTM9FF-u3K-zX-FO05_brYxNGLh 519 VkO1G8MjqQnn2HpAzlBd5179WTzTYhKmhTiwzH-qlBBI_9GLJmE3KOipko9TfSpa2 520 6H4JOlMyfZFl0PCJwkByS0xZFJ2sTo3Gkk488RQohhgt1I0onw 521 &client_id=s6BhdRkqt3 523 The authorization server MUST take the following steps beyond the 524 processing rules defined in Section 2.1: 526 1. If applicable, decrypt the request object as specified in JAR 527 [I-D.ietf-oauth-jwsreq], section 6.1. 529 2. Validate the request object signature as specified in JAR 530 [I-D.ietf-oauth-jwsreq], section 6.2. 532 3. If the client has authentication credentials established with the 533 authorization server, reject the request if the authenticated 534 "client_id" does not match the "client_id" claim in the request 535 object. Additionally requiring the "iss" claim to match the 536 "client_id" is at the discretion of authorization server. 538 The following RSA key pair, represented in JWK [RFC7517] format, can 539 be used to validate or recreate the request object signature in the 540 above example (extra line breaks and indentation within values for 541 display purposes only): 543 { 544 "kty": "RSA", 545 "kid":"k2bdc", 546 "n": "y9Lqv4fCp6Ei-u2-ZCKq83YvbFEk6JMs_pSj76eMkddWRuWX2aBKGHAtKlE 547 5P7_vn__PCKZWePt3vGkB6ePgzAFu08NmKemwE5bQI0e6kIChtt_6KzT5Oa 548 aXDFI6qCLJmk51Cc4VYFaxgqevMncYrzaW_50mZ1yGSFIQzLYP8bijAHGVj 549 dEFgZaZEN9lsn_GdWLaJpHrB3ROlS50E45wxrlg9xMncVb8qDPuXZarvghL 550 L0HzOuYRadBJVoWZowDNTpKpk2RklZ7QaBO7XDv3uR7s_sf2g-bAjSYxYUG 551 sqkNA9b3xVW53am_UZZ3tZbFTIh557JICWKHlWj5uzeJXaw", 552 "e": "AQAB", 553 "d": "LNwG_pCKrwowALpCpRdcOKlSVqylSurZhE6CpkRiE9cpDgGKIkO9CxPlXOL 554 zjqxXuQc8MdMqRQZTnAwgd7HH0B6gncrruV3NewI-XQV0ckldTjqNfOTz1V 555 Rs-jE-57KAXI3YBIhu-_0YpIDzdk_wBuAk661Svn0GsPQe7m9DoxdzenQu9 556 O_soewUhlPzRrTH0EeIqYI715rwI3TYaSzoWBmEPD2fICyj18FF0MPy_SQz 557 k3noVUUIzfzLnnJiWy_p63QBCMqjRoSHHdMnI4z9iVpIwJWQ3jO5n_2lC2- 558 cSgwjmKsFzDBbQNJc7qMG1N6EssJUwgGJxz1eAUFf0w4YAQ", 559 "qi": "J-mG0swR4FTy3atrcQ7dd0hhYn1E9QndN- 560 -sDG4EQO0RnFj6wIefCvwIc4 561 7hCtVeFnCTPYJNc_JyV-mU-9vlzS5GSNuyR5qdpsMZXUMpEvQcwKt23ffPZ 562 YGaqfKyEesmf_Wi8fFcE68H9REQjnniKrXm7w2-IuG_IrVJA9Ox-uU", 563 "q": "4hlMYAGa0dvogdK1jnxQ7J_Lqpqi99e-AeoFvoYpMPhthChTzwFZO9lQmUo 564 BpMqVQTws_s7vWGmt7ZAB3ywkurf0pV7BD0fweJiUzrWk4KJjxtmP_auuxr 565 jvm3s2FUGn6f0wRY9Z8Hj9A7C72DnYCjuZiJQMYCWDsZ8-d-L1a-s", 566 "p": "5sd9Er3I2FFT9R-gy84_oakEyCmgw036B_nfYEEOCwpSvi2z7UcIVK3bSEL 567 5WCW6BNgB3HDWhq8aYPirwQnqm0K9mX1E-4xM10WWZ-rP3XjYpQeS0Snru5 568 LFVWsAzi-FX7BOqBibSAXLdEGXcXa44l08iec_bPD3xduq5V_1YoE", 569 "dq": "Nz2PF3XM6bEc4XsluKZO70ErdYdKgdtIJReUR7Rno_tOZpejwlPGBYVW19 570 zpAeYtCT82jxroB2XqhLxGeMxEPQpsz2qTKLSe4BgHY2ml2uxSDGdjcsrbb 571 NoKUKaN1CuyZszhWl1n0AT_bENl4bJgQj_Fh0UEsQj5YBBUJt5gr_k", 572 "dp": "Zc877jirkkLOtyTs2vxyNe9KnMNAmOidlUc2tE_-0gAL4Lpo1hSwKCtKwe 573 ZJ-gkqt1hT-dwNx_0Xtg_-NXsadMRMwJnzBMYwYAfjApUkfqABc0yUCJJl3 574 KozRCugf1WXkU9GZAH2_x8PUopdNUEa70ISowPRh04HANKX4fkjWAE" 575 } 577 4. Authorization Request 579 The client uses the "request_uri" value returned by the authorization 580 server to build an authorization request as defined in 581 [I-D.ietf-oauth-jwsreq]. This is shown in the following example 582 where the client directs the user-agent to make the following HTTP 583 request (extra line breaks and indentation for display purposes 584 only): 586 GET /authorize?client_id=s6BhdRkqt3&request_uri=urn%3Aietf%3Aparams 587 %3Aoauth%3Arequest_uri%3Abwc4JK-ESC0w8acc191e-Y1LTC2 HTTP/1.1 588 Host: as.example.com 590 Since parts of the authorization request content, e.g. the 591 "code_challenge" parameter value, are unique to a particular 592 authorization request, the client MUST only use a "request_uri" value 593 once. Authorization servers SHOULD treat "request_uri" values as 594 one-time use but MAY allow for duplicate requests due to a user 595 reloading/refreshing their user-agent. 597 The authorization server MUST validate authorization requests arising 598 from a pushed request as it would any other authorization request. 599 The authorization server MAY omit validation steps that it performed 600 when the request was pushed, provided that it can validate that the 601 request was a pushed request, and that the request or the 602 authorization server's policy has not been modified in a way that 603 would affect the outcome of the omitted steps. 605 Authorization server policy MAY dictate, either globally or on a per- 606 client basis, that pushed authorization requests are the only means 607 for a client to pass authorization request data. In this case, the 608 authorization server will refuse, using the "invalid_request" error 609 code, to process any request to the authorization endpoint that does 610 not have a "request_uri" parameter with a value obtained from the 611 pushed authorization request endpoint. 613 Note: authorization server and clients MAY use metadata as defined in 614 Section 5 and Section 6 to signal the desired behavior. 616 5. Authorization Server Metadata 618 The following authorization server metadata [RFC8414] parameters are 619 introduced to signal the server's capability and policy with respect 620 to pushed authorization requests. 622 "pushed_authorization_request_endpoint" The URL of the pushed 623 authorization request endpoint at which a client can post an 624 authorization request in exchange for a "request_uri" value usable 625 at the authorization server. 627 "require_pushed_authorization_requests" Boolean parameter indicating 628 whether the authorization server accepts authorization request 629 data only via the pushed authorization request method. If 630 omitted, the default value is "false". 632 Note that the presence of "pushed_authorization_request_endpoint" is 633 sufficient for a client to determine that it may use the pushed 634 authorization request flow. A "request_uri" value obtained from the 635 PAR endpoint is usable at the authorization endpoint regardless of 636 other authorization server metadata such as 637 "request_uri_parameter_supported" or 638 "require_request_uri_registration". 640 6. Client Metadata 642 The Dynamic Client Registration Protocol [RFC7591] defines an API for 643 dynamically registering OAuth 2.0 client metadata with authorization 644 servers. The metadata defined by [RFC7591], and registered 645 extensions to it, also imply a general data model for clients that is 646 useful for authorization server implementations even when the Dynamic 647 Client Registration Protocol isn't in play. Such implementations 648 will typically have some sort of user interface available for 649 managing client configuration. The following client metadata 650 parameter is introduced by this document to indicate whether pushed 651 authorization requests are reqired for the given client. 653 "require_pushed_authorization_requests" Boolean parameter indicating 654 whether the only means of initiating an authorization request the 655 client is allowed to use is a pushed authorization request. If 656 omitted, the default value is "false". 658 7. Security Considerations 660 7.1. Request URI Guessing 662 An attacker could attempt to guess and replay a valid request URI 663 value and try to impersonate the respective client. The 664 authorization server MUST consider the considerations given in JAR 665 [I-D.ietf-oauth-jwsreq], section 10.2, clause (d) on request URI 666 entropy. 668 7.2. Open Redirection 670 An attacker could try register a redirect URI pointing to a site 671 under his control in order to obtain authorization codes or launch 672 other attacks towards the user. The authorization server MUST only 673 accept new redirect URIs in the pushed authorization request from 674 authenticated clients. 676 7.3. Request Object Replay 678 An attacker could replay a request URI captured from a legitimate 679 authorization request. In order to cope with such attacks, the 680 authorization server SHOULD make the request URIs one-time use. 682 7.4. Client Policy Change 684 The client policy might change between the lodging of the request 685 object and the authorization request using a particular request 686 object. It is therefore recommended that the authorization server 687 check the request parameter against the client policy when processing 688 the authorization request. 690 7.5. Request URI Swapping 692 An attacker could capture the request URI from one request and then 693 substitute it into a different authorization request. For example, 694 in the context of OpenID Connect, an attacker could replace a request 695 URI asking for a high level of authentication assurance with one that 696 requires a lower level of assurance. Clients SHOULD make use of 697 PKCE, a unique "state" parameter, or the OIDC "nonce" parameter in 698 the pushed request object to prevent this attack. 700 8. Privacy Considerations 702 OAuth 2.0 is a complex and flexible framework with broad ranging 703 privacy implications due to the very nature of it having one entity 704 intermediate user authorization to data access between two other 705 entities. The privacy considerations of all of OAuth are beyond the 706 scope of this document, which only defines an alternative way of 707 initiating one message sequence in the larger framework. Using 708 pushed authorization requests, however, may improve privacy by 709 reducing the potential for inadvertent information disclosure due to 710 passing authorization request data directly between client and 711 authorization server over a secure connection in the message-body of 712 an HTTP request rather than in the query component of a URL that 713 passes through the user-agent in the clear. 715 9. Acknowledgements 717 This specification is based on the work towards Pushed Request Object 718 (https://bitbucket.org/openid/fapi/src/master/ 719 Financial_API_Pushed_Request_Object.md) conducted at the Financial- 720 grade API working group at the OpenID Foundation. We would like to 721 thank the members of the WG for their valuable contributions. 723 We would like to thank Vladimir Dzhuvinov, Aaron Parecki, Justin 724 Richer, Sascha Preibisch, Daniel Fett, Michael B. Jones, Annabelle 725 Backman, Joseph Heenan, Sean Glencross, Maggie Hung, Neil Madden, 726 Karsten Meyer zu Selhausen, and Takahiko Kawasaki for their valuable 727 feedback on this draft. 729 10. IANA Considerations 731 10.1. OAuth Authorization Server Metadata 733 This specification requests registration of the following values in 734 the IANA "OAuth Authorization Server Metadata" registry of 735 [IANA.OAuth.Parameters] established by [RFC8414]. 737 Metadata Name: "pushed_authorization_request_endpoint" 738 Metadata Description: URL of the authorization server's pushed 739 authorization request endpoint 740 Change Controller: IESG 741 Specification Document(s): Section 5 of [[ this document ]] 743 Metadata Name: "require_pushed_authorization_requests" 744 Metadata Description: Indicates whether the authorization server 745 accepts authorization request only via the pushed authorization 746 request method. 747 Change Controller: IESG 748 Specification Document(s): Section 5 of [[ this document ]] 750 10.2. OAuth Dynamic Client Registration Metadata 752 This specification requests registration of the following value in 753 the IANA "OAuth Dynamic Client Registration Metadata" registry of 754 [IANA.OAuth.Parameters] established by [RFC7591]. 756 Metadata Name: "require_pushed_authorization_requests" 757 Metadata Description: Indicates whether the client is required to 758 use the pushed authorization request method to initiate 759 authorization requests. 760 Change Controller: IESG 761 Specification Document(s): Section 6 of [[ this document ]] 763 10.3. OAuth URI Registration 765 This specification requests registration of the following value in 766 the "OAuth URI" registry of [IANA.OAuth.Parameters] established by 767 [RFC6755]. 769 URN: "urn:ietf:params:oauth:request_uri:" 770 Common Name: A URN Sub-Namespace for OAuth Request URIs. 772 Change Controller: IESG 773 Specification Document(s): Section 2.2 of [[ this document ]] 775 11. Normative References 777 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 778 RFC 6749, DOI 10.17487/RFC6749, October 2012, 779 . 781 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 782 Requirement Levels", BCP 14, RFC 2119, 783 DOI 10.17487/RFC2119, March 1997, 784 . 786 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 787 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 788 May 2017, . 790 [I-D.ietf-oauth-jwsreq] 791 Sakimura, N., Bradley, J., and M. Jones, "The OAuth 2.0 792 Authorization Framework: JWT Secured Authorization Request 793 (JAR)", Work in Progress, Internet-Draft, draft-ietf- 794 oauth-jwsreq-30, 10 September 2020, 795 . 797 [OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 798 C. Mortimore, "OpenID Connect Core 1.0 incorporating 799 errata set 1", 8 November 2014, 800 . 802 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 803 Authorization Server Metadata", RFC 8414, 804 DOI 10.17487/RFC8414, June 2018, 805 . 807 12. Informative References 809 [RFC7523] Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token 810 (JWT) Profile for OAuth 2.0 Client Authentication and 811 Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, May 812 2015, . 814 [RFC6755] Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace 815 for OAuth", RFC 6755, DOI 10.17487/RFC6755, October 2012, 816 . 818 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 819 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 820 . 822 [RFC7636] Sakimura, N., Ed., Bradley, J., and N. Agarwal, "Proof Key 823 for Code Exchange by OAuth Public Clients", RFC 7636, 824 DOI 10.17487/RFC7636, September 2015, 825 . 827 [RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource 828 Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707, 829 February 2020, . 831 [I-D.ietf-oauth-security-topics] 832 Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, 833 "OAuth 2.0 Security Best Current Practice", Work in 834 Progress, Internet-Draft, draft-ietf-oauth-security- 835 topics-16, 5 October 2020, . 838 [I-D.ietf-oauth-v2-1] 839 Hardt, D., Parecki, A., and T. Lodderstedt, "The OAuth 2.1 840 Authorization Framework", Work in Progress, Internet- 841 Draft, draft-ietf-oauth-v2-1-00, 30 July 2020, 842 . 844 [IANA.OAuth.Parameters] 845 IANA, "OAuth Parameters", 846 . 848 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 849 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 850 RFC 7591, DOI 10.17487/RFC7591, July 2015, 851 . 853 [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally 854 Unique IDentifier (UUID) URN Namespace", RFC 4122, 855 DOI 10.17487/RFC4122, July 2005, 856 . 858 [RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T. 859 Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication 860 and Certificate-Bound Access Tokens", RFC 8705, 861 DOI 10.17487/RFC8705, February 2020, 862 . 864 [RFC7517] Jones, M., "JSON Web Key (JWK)", RFC 7517, 865 DOI 10.17487/RFC7517, May 2015, 866 . 868 Appendix A. Document History 870 [[ To be removed from the final specification ]] 872 -06 874 * Add a note clarifying that the presence of 875 "pushed_authorization_request_endpoint" is sufficient for a client 876 to know that it can use the PAR flow 878 -05 880 * Mention use of "invalid_request" error code for cases, like a bad 881 "redirect_uri", that don't have a more specific one 883 -04 885 * Edits to address WGLC comments 887 * Replace I-D.ietf-oauth-mtls reference with now published RFC8705 889 * Moved text about redirect URI management from introduction into 890 separate section 892 -03 894 * Editorial updates 896 * Mention that https is required for the PAR endpoint 898 * Add some discussion of browser form posting an authz request vs. 899 the benefits of PAR for any application 901 * Added text about motivations behind PAR - integrity, 902 confidentiality and early client auth 904 * Better explain one-time use recommendation of the request_uri 906 * Drop the section on special error responses for request objects 908 * Clarify authorization request examples to say that the client 909 directs the user-agent to make the HTTP GET request (vs. making 910 the request itself) 912 -02 914 * Update Resource Indicators reference to the somewhat recently 915 published RFC 8707 917 * Added metadata in support of pushed authorization requests only 918 feature 920 * Update to comply with draft-ietf-oauth-jwsreq-21, which requires 921 "client_id" in the authorization request in addition to the 922 "request_uri" 924 * Clarified timing of request validation 926 * Add some guidance/options on the request URI structure 928 * Add the key used in the request object example so that a reader 929 could validate or recreate the request object signature 931 * Update to draft-ietf-oauth-jwsreq-25 and added note regarding 932 "require_signed_request_object" 934 -01 936 * Use the newish RFC v3 XML and HTML format 937 * Added IANA registration request for 938 "pushed_authorization_request_endpoint" 939 * Changed abbrev to "OAuth PAR" 941 -00 (WG draft) 943 * Reference RFC6749 sec 2.3.1 for client secret basic rather than 944 RFC7617 945 * further clarify that a request object JWT contains all the 946 authorization request parameters while client authentication 947 params, if applicable, are outside that JWT as regular form 948 encoded params in HTTP body 950 -01 952 * List "client_id" as one of the basic parameters 953 * Explicitly forbid "request_uri" in the processing rules 954 * Clarification regarding client authentication and that public 955 clients are allowed 956 * Added option to let clients register per-authorization request 957 redirect URIs 958 * General clean up and wording improvements 959 -00 961 * first draft 963 Authors' Addresses 965 Torsten Lodderstedt 966 yes.com 968 Email: torsten@lodderstedt.net 970 Brian Campbell 971 Ping Identity 973 Email: bcampbell@pingidentity.com 975 Nat Sakimura 976 NAT.Consulting 978 Email: nat@sakimura.org 980 Dave Tonge 981 Moneyhub Financial Technology 983 Email: dave@tonge.org 985 Filip Skokan 986 Auth0 988 Email: panva.ip@gmail.com