idnits 2.17.1 draft-ietf-oauth-jwsreq-34.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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 8, 2021) is 1086 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) ** Obsolete normative reference: RFC 7525 (ref. 'BCP195') (Obsoleted by RFC 9325) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Obsolete normative reference: RFC 7230 (Obsoleted by RFC 9110, RFC 9112) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 OAuth Working Group N. Sakimura 3 Internet-Draft NAT.Consulting 4 Intended status: Standards Track J. Bradley 5 Expires: October 10, 2021 Yubico 6 M. Jones 7 Microsoft 8 April 8, 2021 10 The OAuth 2.0 Authorization Framework: JWT Secured Authorization Request 11 (JAR) 12 draft-ietf-oauth-jwsreq-34 14 Abstract 16 The authorization request in OAuth 2.0 described in RFC 6749 utilizes 17 query parameter serialization, which means that Authorization Request 18 parameters are encoded in the URI of the request and sent through 19 user agents such as web browsers. While it is easy to implement, it 20 means that (a) the communication through the user agents is not 21 integrity protected and thus the parameters can be tainted, (b) the 22 source of the communication is not authenticated, and (c) the 23 communication through the user agents can be monitored. Because of 24 these weaknesses, several attacks to the protocol have now been put 25 forward. 27 This document introduces the ability to send request parameters in a 28 JSON Web Token (JWT) instead, which allows the request to be signed 29 with JSON Web Signature (JWS) and encrypted with JSON Web Encryption 30 (JWE) so that the integrity, source authentication and 31 confidentiality property of the Authorization Request is attained. 32 The request can be sent by value or by reference. 34 Status of This Memo 36 This Internet-Draft is submitted in full conformance with the 37 provisions of BCP 78 and BCP 79. 39 Internet-Drafts are working documents of the Internet Engineering 40 Task Force (IETF). Note that other groups may also distribute 41 working documents as Internet-Drafts. The list of current Internet- 42 Drafts is at https://datatracker.ietf.org/drafts/current/. 44 Internet-Drafts are draft documents valid for a maximum of six months 45 and may be updated, replaced, or obsoleted by other documents at any 46 time. It is inappropriate to use Internet-Drafts as reference 47 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on October 10, 2021. 50 Copyright Notice 52 Copyright (c) 2021 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents 57 (https://trustee.ietf.org/license-info) in effect on the date of 58 publication of this document. Please review these documents 59 carefully, as they describe your rights and restrictions with respect 60 to this document. Code Components extracted from this document must 61 include Simplified BSD License text as described in Section 4.e of 62 the Trust Legal Provisions and are provided without warranty as 63 described in the Simplified BSD License. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 68 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 5 69 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 70 2.1. Request Object . . . . . . . . . . . . . . . . . . . . . 6 71 2.2. Request Object URI . . . . . . . . . . . . . . . . . . . 6 72 3. Symbols and abbreviated terms . . . . . . . . . . . . . . . . 6 73 4. Request Object . . . . . . . . . . . . . . . . . . . . . . . 7 74 5. Authorization Request . . . . . . . . . . . . . . . . . . . . 9 75 5.1. Passing a Request Object by Value . . . . . . . . . . . . 10 76 5.2. Passing a Request Object by Reference . . . . . . . . . . 10 77 5.2.1. URI Referencing the Request Object . . . . . . . . . 11 78 5.2.2. Request using the "request_uri" Request Parameter . . 12 79 5.2.3. Authorization Server Fetches Request Object . . . . . 12 80 6. Validating JWT-Based Requests . . . . . . . . . . . . . . . . 13 81 6.1. JWE Encrypted Request Object . . . . . . . . . . . . . . 13 82 6.2. JWS Signed Request Object . . . . . . . . . . . . . . . . 13 83 6.3. Request Parameter Assembly and Validation . . . . . . . . 14 84 7. Authorization Server Response . . . . . . . . . . . . . . . . 14 85 8. TLS Requirements . . . . . . . . . . . . . . . . . . . . . . 14 86 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . 15 87 9.1. OAuth Parameters Registration . . . . . . . . . . . . . . 15 88 9.2. OAuth Authorization Server Metadata Registry . . . . . . 16 89 9.3. OAuth Dynamic Client Registration Metadata Registry . . . 17 90 9.4. Media Type Registration . . . . . . . . . . . . . . . . . 17 91 9.4.1. Registry Contents . . . . . . . . . . . . . . . . . . 17 92 10. Security Considerations . . . . . . . . . . . . . . . . . . . 18 93 10.1. Choice of Algorithms . . . . . . . . . . . . . . . . . . 18 94 10.2. Request Source Authentication . . . . . . . . . . . . . 18 95 10.3. Explicit Endpoints . . . . . . . . . . . . . . . . . . . 19 96 10.4. Risks Associated with request_uri . . . . . . . . . . . 19 97 10.4.1. DDoS Attack on the Authorization Server . . . . . . 20 98 10.4.2. Request URI Rewrite . . . . . . . . . . . . . . . . 20 99 10.5. Downgrade Attack . . . . . . . . . . . . . . . . . . . . 20 100 10.6. TLS Security Considerations . . . . . . . . . . . . . . 21 101 10.7. Parameter Mismatches . . . . . . . . . . . . . . . . . . 21 102 10.8. Cross-JWT Confusion . . . . . . . . . . . . . . . . . . 21 103 11. Privacy Considerations . . . . . . . . . . . . . . . . . . . 22 104 11.1. Collection limitation . . . . . . . . . . . . . . . . . 22 105 11.2. Disclosure Limitation . . . . . . . . . . . . . . . . . 23 106 11.2.1. Request Disclosure . . . . . . . . . . . . . . . . . 23 107 11.2.2. Tracking using Request Object URI . . . . . . . . . 23 108 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 24 109 13. Revision History . . . . . . . . . . . . . . . . . . . . . . 24 110 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 111 14.1. Normative References . . . . . . . . . . . . . . . . . . 32 112 14.2. Informative References . . . . . . . . . . . . . . . . . 34 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35 115 1. Introduction 117 The Authorization Request in OAuth 2.0 [RFC6749] utilizes query 118 parameter serialization and is typically sent through user agents 119 such as web browsers. 121 For example, the parameters "response_type", "client_id", "state", 122 and "redirect_uri" are encoded in the URI of the request: 124 GET /authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz 125 &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 126 Host: server.example.com 128 While it is easy to implement, the encoding in the URI does not allow 129 application layer security to be used to provide confidentiality and 130 integrity protection. While TLS is used to offer communication 131 security between the Client and the user-agent as well as the user- 132 agent and the Authorization Server, TLS sessions are terminated in 133 the user-agent. In addition, TLS sessions may be terminated 134 prematurely at some middlebox (such as a load balancer). 136 As the result, the Authorization Request of [RFC6749] has 137 shortcomings in that: 139 (a) the communication through the user agents is not integrity 140 protected and thus the parameters can be tainted (integrity 141 protection failure) 143 (b) the source of the communication is not authenticated (source 144 authentication failure) 146 (c) the communication through the user agents can be monitored 147 (containment / confidentiality failure). 149 Due to these inherent weaknesses, several attacks against the 150 protocol, such as Redirection URI rewriting, have been identified. 152 The use of application layer security mitigates these issues. 154 The use of application layer security allows requests to be prepared 155 by a trusted third party so that a client application cannot request 156 more permissions than previously agreed. 158 Furthermore, passing the request by reference allows the reduction of 159 over-the-wire overhead. 161 The JWT [RFC7519] encoding has been chosen because of 163 (1) its close relationship with JSON, which is used as OAuth's 164 response format 166 (2) its developer friendliness due to its textual nature 168 (3) its relative compactness compared to XML 170 (4) its development status as a Proposed Standard, along with the 171 associated signing and encryption methods [RFC7515] [RFC7516] 173 (5) the relative ease of JWS and JWE compared to XML Signature and 174 Encryption. 176 The parameters "request" and "request_uri" are introduced as 177 additional authorization request parameters for the OAuth 2.0 178 [RFC6749] flows. The "request" parameter is a JSON Web Token (JWT) 179 [RFC7519] whose JWT Claims Set holds the JSON encoded OAuth 2.0 180 authorization request parameters. Note that, in contrast to RFC 181 7519, the elements of the Claims Set are encoded OAuth Request 182 Parameters [IANA.OAuth.Parameters], supplemented with only a few of 183 the IANA-managed JSON Web Token Claims [IANA.JWT.Claims] - in 184 particular "iss" and "aud". The JWT in the "request" parameter is 185 integrity protected and source authenticated using JWS. 187 The JWT [RFC7519] can be passed to the authorization endpoint by 188 reference, in which case the parameter "request_uri" is used instead 189 of the "request". 191 Using JWT [RFC7519] as the request encoding instead of query 192 parameters has several advantages: 194 (a) (integrity protection) The request can be signed so that the 195 integrity of the request can be checked. 197 (b) (source authentication) The request can be signed so that the 198 signer can be authenticated. 200 (c) (confidentiality protection) The request can be encrypted so 201 that end-to-end confidentiality can be provided even if the TLS 202 connection is terminated at one point or another (including at 203 and before user-agents). 205 (d) (collection minimization) The request can be signed by a trusted 206 third party attesting that the authorization request is 207 compliant with a certain policy. For example, a request can be 208 pre-examined by a trusted third party that all the personal data 209 requested is strictly necessary to perform the process that the 210 end-user asked for, and signed by that trusted third party. The 211 authorization server then examines the signature and shows the 212 conformance status to the end-user, who would have some 213 assurance as to the legitimacy of the request when authorizing 214 it. In some cases, it may even be desirable to skip the 215 authorization dialogue under such circumstances. 217 There are a few cases that request by reference is useful such as: 219 1. When it is desirable to reduce the size of transmitted request. 220 The use of application layer security increases the size of the 221 request, particularly when public key cryptography is used. 223 2. When the client does not want to do the application level 224 cryptography. The Authorization Server may provide an endpoint 225 to accept the Authorization Request through direct communication 226 with the Client so that the Client is authenticated and the 227 channel is TLS protected. 229 This capability is in use by OpenID Connect [OpenID.Core]. 231 1.1. Requirements Language 233 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 234 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 235 "OPTIONAL" in this document are to be interpreted as described in BCP 236 14 [RFC2119] [RFC8174] when, and only when, they appear in all 237 capitals, as shown here. 239 2. Terminology 241 For the purposes of this specification, the following terms and 242 definitions in addition to what is defined in OAuth 2.0 Framework 243 [RFC6749], JSON Web Signature [RFC7515], and JSON Web Encryption 244 [RFC7519] apply. 246 2.1. Request Object 248 JSON Web Token (JWT) [RFC7519] whose JWT Claims Set holds the JSON 249 encoded OAuth 2.0 authorization request parameters. 251 2.2. Request Object URI 253 Absolute URI that references the set of parameters comprising an 254 OAuth 2.0 authorization request. The contents of the resource 255 referenced by the URI are a Request Object (Section 2.1), unless the 256 URI was provided to the client by the same Authorization Server, in 257 which case the content is an implementation detail at the discretion 258 the Authorization Server. The former is to ensure interoperability 259 in cases where the provider of the request_uri is a separate entity 260 from the consumer, such as when a client provides a URI referencing a 261 Request Object stored on the client's backend service and made 262 accessible via HTTPS. In the latter case where the Authorization 263 Server is both provider and consumer of the URI, such as when it 264 offers an endpoint that provides a URI in exchange for a Request 265 Object, this interoperability concern does not apply. 267 3. Symbols and abbreviated terms 269 The following abbreviations are common to this specification. 271 JSON JavaScript Object Notation 273 JWT JSON Web Token 275 JWS JSON Web Signature 277 JWE JSON Web Encryption 279 URI Uniform Resource Identifier 281 URL Uniform Resource Locator 283 4. Request Object 285 A Request Object (Section 2.1) is used to provide authorization 286 request parameters for an OAuth 2.0 authorization request. It MUST 287 contain all the parameters (including extension parameters) used to 288 process the OAuth 2.0 [RFC6749] authorization request except the 289 "request" and "request_uri" parameters that are defined in this 290 document. The parameters are represented as the JWT claims of the 291 object. Parameter names and string values MUST be included as JSON 292 strings. Since Request Objects are handled across domains and 293 potentially outside of a closed ecosystem, per section 8.1 of 294 [RFC8259], these JSON strings MUST be encoded using UTF-8 [RFC3629]. 295 Numerical values MUST be included as JSON numbers. It MAY include 296 any extension parameters. This JSON [RFC8259] object constitutes the 297 JWT Claims Set defined in JWT [RFC7519]. The JWT Claims Set is then 298 signed or signed and encrypted. 300 To sign, JSON Web Signature (JWS) [RFC7515] is used. The result is a 301 JWS signed JWT [RFC7519]. If signed, the Authorization Request 302 Object SHOULD contain the Claims "iss" (issuer) and "aud" (audience) 303 as members, with their semantics being the same as defined in the JWT 304 [RFC7519] specification. The value of "aud" should be the value of 305 the Authorization Server (AS) "issuer" as defined in RFC8414 306 [RFC8414]. 308 To encrypt, JWE [RFC7516] is used. When both signature and 309 encryption are being applied, the JWT MUST be signed then encrypted 310 as described in Section 11.2 of [RFC7519]. The result is a Nested 311 JWT, as defined in [RFC7519]. 313 The client determines the algorithms used to sign and encrypt Request 314 Objects. The algorithms chosen need to be supported by both the 315 client and the authorization server. The client can inform the 316 authorization server of the algorithms that it supports in its 317 dynamic client registration metadata [RFC7591], specifically, the 318 metadata values "request_object_signing_alg", 319 "request_object_encryption_alg", and "request_object_encryption_enc". 320 Likewise, the authorization server can inform the client of the 321 algorithms that it supports in its authorization server metadata 322 [RFC8414], specifically, the metadata values 323 "request_object_signing_alg_values_supported", 324 "request_object_encryption_alg_values_supported", and 325 "request_object_encryption_enc_values_supported". 327 The Request Object MAY be sent by value as described in Section 5.1 328 or by reference as described in Section 5.2. "request" and 329 "request_uri" parameters MUST NOT be included in Request Objects. 331 A Request Object (Section 2.1) has the media type [RFC2046] 332 "application/oauth-authz-req+jwt". Note that some existing 333 deployments may alternatively be using the type "application/jwt". 335 The following is an example of the Claims in a Request Object before 336 base64url [RFC7515] encoding and signing. Note that it includes the 337 extension parameters "nonce" and "max_age". 339 { 340 "iss": "s6BhdRkqt3", 341 "aud": "https://server.example.com", 342 "response_type": "code id_token", 343 "client_id": "s6BhdRkqt3", 344 "redirect_uri": "https://client.example.org/cb", 345 "scope": "openid", 346 "state": "af0ifjsldkj", 347 "nonce": "n-0S6_WzA2Mj", 348 "max_age": 86400 349 } 351 Signing it with the "RS256" algorithm [RFC7518] results in this 352 Request Object value (with line wraps within values for display 353 purposes only): 355 eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF 356 JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog 357 ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2 358 lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns 359 aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC 360 JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q 361 IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK 362 b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2 363 HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6 364 JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O 365 CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf 366 pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g 368 The following RSA public key, represented in JWK format, can be used 369 to validate the Request Object signature in this and subsequent 370 Request Object examples (with line wraps within values for display 371 purposes only): 373 { 374 "kty":"RSA", 375 "kid":"k2bdc", 376 "n":"x5RbkAZkmpRxia65qRQ1wwSMSxQUnS7gcpVTV_cdHmfmG2ltd2yabEO9XadD8 377 pJNZubINPpmgHh3J1aD9WRwS05ucmFq3CfFsluLt13_7oX5yDRSKX7poXmT_5 378 ko8k4NJZPMAO8fPToDTH7kHYbONSE2FYa5GZ60CUsFhSonI-dcMDJ0Ary9lxI 379 w5k2z4TAdARVWcS7sD07VhlMMshrwsPHBQgTatlkxyIHXbYdtak8fqvNAwr7O 380 lVEvM_Ipf5OfmdB8Sd-wjzaBsyP4VhJKoi_qdgSzpC694XZeYPq45Sw-q51iF 381 UlcOlTCI7z6jltUtnR6ySn6XDGFnzH5Fe5ypw", 382 "e":"AQAB" 383 } 385 5. Authorization Request 387 The client constructs the authorization request URI by adding the 388 following parameters to the query component of the authorization 389 endpoint URI using the "application/x-www-form-urlencoded" format: 391 request 392 REQUIRED unless "request_uri" is specified. The Request Object 393 (Section 2.1) that holds authorization request parameters stated 394 in section 4 of OAuth 2.0 [RFC6749]. If this parameter is present 395 in the authorization request, "request_uri" MUST NOT be present. 397 request_uri 398 REQUIRED unless "request" is specified. The absolute URI as 399 defined by RFC3986 [RFC3986] that is the Request Object URI 400 (Section 2.2) referencing the authorization request parameters 401 stated in section 4 of OAuth 2.0 [RFC6749]. If this parameter is 402 present in the authorization request, "request" MUST NOT be 403 present. 405 client_id 406 REQUIRED. OAuth 2.0 [RFC6749] "client_id". The value MUST match 407 the "request" or "request_uri" Request Object's (Section 2.1) 408 "client_id". 410 The client directs the resource owner to the constructed URI using an 411 HTTP redirection response, or by other means available to it via the 412 user-agent. 414 For example, the client directs the end user's user-agent to make the 415 following HTTPS request: 417 GET /authz?client_id=s6BhdRkqt3&request=eyJhbG..AlMGzw HTTP/1.1 418 Host: server.example.com 420 The value for the request parameter is abbreviated for brevity. 422 The authorization request object MUST be one of the following: 424 (a) JWS signed 426 (b) JWS signed and JWE encrypted 428 The client MAY send the parameters included in the request object 429 duplicated in the query parameters as well for the backward 430 compatibility etc. However, the authorization server supporting this 431 specification MUST only use the parameters included in the request 432 object. 434 5.1. Passing a Request Object by Value 436 The Client sends the Authorization Request as a Request Object to the 437 Authorization Endpoint as the "request" parameter value. 439 The following is an example of an Authorization Request using the 440 "request" parameter (with line wraps within values for display 441 purposes only): 443 https://server.example.com/authorize?client_id=s6BhdRkqt3& 444 request=eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6 445 ICJzNkJoZFJrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBs 446 ZS5jb20iLAogICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAg 447 ICAiY2xpZW50X2lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6 448 ICJodHRwczovL2NsaWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAi 449 b3BlbmlkIiwKICAgICJzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2Ui 450 OiAibi0wUzZfV3pBMk1qIiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VU 451 ElVaPjqW_ToI1yrEJ67BgKb5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC 452 0iQJwXu5YVY-vnW0_PLJb1C2HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKz 453 uKzqSb1wAZALo5f89B_p6QA6j6JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3E 454 YLYaCb4ik4I1zGXE4fvim9FIMs8OCMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W 455 9typPf846lGwA8h9G9oNTIuX8Ft2jfpnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3 456 j1i7tLR_5Nz-g 458 5.2. Passing a Request Object by Reference 460 The "request_uri" Authorization Request parameter enables OAuth 461 authorization requests to be passed by reference, rather than by 462 value. This parameter is used identically to the "request" 463 parameter, other than that the Request Object value is retrieved from 464 the resource identified by the specified URI rather than passed by 465 value. 467 The entire Request URI SHOULD NOT exceed 512 ASCII characters. There 468 are two reasons for this restriction: 470 1. Many phones in the market as of this writing still do not accept 471 large payloads. The restriction is typically either 512 or 1024 472 ASCII characters. 474 2. On a slow connection such as 2G mobile connection, a large URL 475 would cause the slow response and therefore the use of such is 476 not advisable from the user experience point of view. 478 The contents of the resource referenced by the "request_uri" MUST be 479 a Request Object and MUST be reachable by the Authorization Server 480 unless the URI was provided to the client by the Authorization 481 Server. In the first case, the "request_uri" MUST be an "https" URI, 482 as specified in Section 2.7.2 of RFC7230 [RFC7230]. In the second 483 case, it MUST be a URN, as specified in RFC8141 [RFC8141]. 485 The following is an example of the contents of a Request Object 486 resource that can be referenced by a "request_uri" (with line wraps 487 within values for display purposes only): 489 eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF 490 JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog 491 ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2 492 lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns 493 aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC 494 JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q 495 IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK 496 b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2 497 HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6 498 JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O 499 CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf 500 pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g 502 5.2.1. URI Referencing the Request Object 504 The Client stores the Request Object resource either locally or 505 remotely at a URI the Authorization Server can access. Such facility 506 may be provided by the authorization server or a trusted third party. 507 For example, the authorization server may provide a URL to which the 508 client POSTs the request object and obtains the Request URI. This 509 URI is the Request Object URI, "request_uri". 511 It is possible for the Request Object to include values that are to 512 be revealed only to the Authorization Server. As such, the 513 "request_uri" MUST have appropriate entropy for its lifetime so that 514 the URI is not guessable if publicly retrievable. For the guidance, 515 refer to 5.1.4.2.2 of [RFC6819] and Good Practices for Capability 516 URLs [CapURLs]. It is RECOMMENDED that it be removed after a 517 reasonable timeout unless access control measures are taken. 519 The following is an example of a Request Object URI value (with line 520 wraps within values for display purposes only). In this example, a 521 trusted third-party service hosts the Request Object. 523 https://tfp.example.org/request.jwt/ 524 GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM 526 5.2.2. Request using the "request_uri" Request Parameter 528 The Client sends the Authorization Request to the Authorization 529 Endpoint. 531 The following is an example of an Authorization Request using the 532 "request_uri" parameter (with line wraps within values for display 533 purposes only): 535 https://server.example.com/authorize? 536 client_id=s6BhdRkqt3 537 &request_uri=https%3A%2F%2Ftfp.example.org%2Frequest.jwt 538 %2FGkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM 540 5.2.3. Authorization Server Fetches Request Object 542 Upon receipt of the Request, the Authorization Server MUST send an 543 HTTP "GET" request to the "request_uri" to retrieve the referenced 544 Request Object, unless it is stored in a way so that it can retrieve 545 it through other mechanism securely, and parse it to recreate the 546 Authorization Request parameters. 548 The following is an example of this fetch process. In this example, 549 a trusted third-party service hosts the Request Object. 551 GET /request.jwt/GkurKxf5T0Y-mnPFCHqWOMiZi4VS138cQO_V7PZHAdM HTTP/1.1 552 Host: tfp.example.org 553 The following is an example of the fetch response: 555 HTTP/1.1 200 OK 556 Date: Thu, 20 Aug 2020 23:52:39 GMT 557 Server: Apache/2.4.43 (tfp.example.org) 558 Content-type: application/oauth-authz-req+jwt 559 Content-Length: 797 560 Last-Modified: Wed, 19 Aug 2020 23:52:32 GMT 562 eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ewogICAgImlzcyI6ICJzNkJoZF 563 JrcXQzIiwKICAgICJhdWQiOiAiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLAog 564 ICAgInJlc3BvbnNlX3R5cGUiOiAiY29kZSBpZF90b2tlbiIsCiAgICAiY2xpZW50X2 565 lkIjogInM2QmhkUmtxdDMiLAogICAgInJlZGlyZWN0X3VyaSI6ICJodHRwczovL2Ns 566 aWVudC5leGFtcGxlLm9yZy9jYiIsCiAgICAic2NvcGUiOiAib3BlbmlkIiwKICAgIC 567 JzdGF0ZSI6ICJhZjBpZmpzbGRraiIsCiAgICAibm9uY2UiOiAibi0wUzZfV3pBMk1q 568 IiwKICAgICJtYXhfYWdlIjogODY0MDAKfQ.Nsxa_18VUElVaPjqW_ToI1yrEJ67BgK 569 b5xsuZRVqzGkfKrOIX7BCx0biSxYGmjK9KJPctH1OC0iQJwXu5YVY-vnW0_PLJb1C2 570 HG-ztVzcnKZC2gE4i0vgQcpkUOCpW3SEYXnyWnKzuKzqSb1wAZALo5f89B_p6QA6j6 571 JwBSRvdVsDPdulW8lKxGTbH82czCaQ50rLAg3EYLYaCb4ik4I1zGXE4fvim9FIMs8O 572 CMmzwIB5S-ujFfzwFjoyuPEV4hJnoVUmXR_W9typPf846lGwA8h9G9oNTIuX8Ft2jf 573 pnZdFmLg3_wr3Wa5q3a-lfbgF3S9H_8nN3j1i7tLR_5Nz-g 575 6. Validating JWT-Based Requests 577 6.1. JWE Encrypted Request Object 579 If the request object is encrypted, the Authorization Server MUST 580 decrypt the JWT in accordance with the JSON Web Encryption [RFC7516] 581 specification. 583 The result is a signed request object. 585 If decryption fails, the Authorization Server MUST return an 586 "invalid_request_object" error to the client in response to the 587 authorization request. 589 6.2. JWS Signed Request Object 591 The Authorization Server MUST validate the signature of the JSON Web 592 Signature [RFC7515] signed Request Object. If a "kid" Header 593 Parameter is present, the key identified MUST be the key used, and 594 MUST be a key associated with the client. The signature MUST be 595 validated using a key associated with the client and the algorithm 596 specified in the "alg" Header Parameter. Algorithm verification MUST 597 be performed, as specified in Sections 3.1 and 3.2 of [RFC8725]. 599 If the key is not associated with the client or if signature 600 validation fails, the Authorization Server MUST return an 601 "invalid_request_object" error to the client in response to the 602 authorization request. 604 6.3. Request Parameter Assembly and Validation 606 The Authorization Server MUST extract the set of Authorization 607 Request parameters from the Request Object value. The Authorization 608 Server MUST only use the parameters in the Request Object even if the 609 same parameter is provided in the query parameter. The Client ID 610 values in the "client_id" request parameter and in the Request Object 611 "client_id" claim MUST be identical. The Authorization Server then 612 validates the request as specified in OAuth 2.0 [RFC6749]. 614 If the Client ID check or the request validation fails, then the 615 Authorization Server MUST return an error to the client in response 616 to the authorization request, as specified in Section 5.2 of OAuth 617 2.0 [RFC6749]. 619 7. Authorization Server Response 621 Authorization Server Response is created and sent to the client as in 622 Section 4 of OAuth 2.0 [RFC6749]. 624 In addition, this document uses these additional error values: 626 invalid_request_uri 627 The "request_uri" in the Authorization Request returns an error or 628 contains invalid data. 630 invalid_request_object 631 The request parameter contains an invalid Request Object. 633 request_not_supported 634 The Authorization Server does not support the use of the "request" 635 parameter. 637 request_uri_not_supported 638 The Authorization Server does not support the use of the 639 "request_uri" parameter. 641 8. TLS Requirements 643 Client implementations supporting the Request Object URI method MUST 644 support TLS following Recommendations for Secure Use of Transport 645 Layer Security (TLS) and Datagram Transport Layer Security (DTLS) 646 [BCP195]. 648 To protect against information disclosure and tampering, 649 confidentiality protection MUST be applied using TLS with a cipher 650 suite that provides confidentiality and integrity protection. 652 HTTP clients MUST also verify the TLS server certificate, using DNS- 653 ID [RFC6125], to avoid man-in-the-middle attacks. The rules and 654 guidelines defined in [RFC6125] apply here, with the following 655 considerations: 657 o Support for DNS-ID identifier type (that is, the dNSName identity 658 in the subjectAltName extension) is REQUIRED. Certification 659 authorities which issue server certificates MUST support the DNS- 660 ID identifier type, and the DNS-ID identifier type MUST be present 661 in server certificates. 663 o DNS names in server certificates MAY contain the wildcard 664 character "*". 666 o Clients MUST NOT use CN-ID identifiers; a CN field may be present 667 in the server certificate's subject name, but MUST NOT be used for 668 authentication within the rules described in [BCP195]. 670 o SRV-ID and URI-ID as described in Section 6.5 of [RFC6125] MUST 671 NOT be used for comparison. 673 9. IANA Considerations 675 9.1. OAuth Parameters Registration 677 Since the request object is a JWT, the core JWT claims cannot be used 678 for any purpose in the request object other than for what JWT 679 dictates. Thus, they need to be registered as OAuth Authorization 680 Request parameters to avoid future OAuth extensions using them with 681 different meanings. 683 This specification adds the following values to the "OAuth 684 Parameters" registry [IANA.OAuth.Parameters] established by 685 [RFC6749]. 687 o Name: "iss" 688 o Parameter Usage Location: authorization request 689 o Change Controller: IETF 690 o Specification Document(s): Section 4.1.1 of [RFC7519] and this 691 document. 693 o Name: "sub" 694 o Parameter Usage Location: authorization request 695 o Change Controller: IETF 696 o Specification Document(s): Section 4.1.2 of [RFC7519] and this 697 document. 699 o Name: "aud" 700 o Parameter Usage Location: authorization request 701 o Change Controller: IETF 702 o Specification Document(s): Section 4.1.3 of [RFC7519] and this 703 document. 705 o Name: "exp" 706 o Parameter Usage Location: authorization request 707 o Change Controller: IETF 708 o Specification Document(s): Section 4.1.4 of [RFC7519] and this 709 document. 711 o Name: "nbf" 712 o Parameter Usage Location: authorization request 713 o Change Controller: IETF 714 o Specification Document(s): Section 4.1.5 of [RFC7519] and this 715 document. 717 o Name: "iat" 718 o Parameter Usage Location: authorization request 719 o Change Controller: IETF 720 o Specification Document(s): Section 4.1.6 of [RFC7519] and this 721 document. 723 o Name: "jti" 724 o Parameter Usage Location: authorization request 725 o Change Controller: IETF 726 o Specification Document(s): Section 4.1.7 of [RFC7519] and this 727 document. 729 9.2. OAuth Authorization Server Metadata Registry 731 This specification adds the following value to the "OAuth 732 Authorization Server Metadata" registry [IANA.OAuth.Parameters] 733 established by [RFC8414]. 735 o Metadata Name: "require_signed_request_object" 736 o Metadata Description: Indicates where authorization request needs 737 to be protected as Request Object and provided through either 738 "request" or "request_uri parameter". 739 o Change Controller: IETF 740 o Specification Document(s): Section 10.5 of this document. 742 9.3. OAuth Dynamic Client Registration Metadata Registry 744 This specification adds the following value to the "OAuth Dynamic 745 Client Registration Metadata" registry [IANA.OAuth.Parameters] 746 established by [RFC7591]. 748 o Metadata Name: "require_signed_request_object" 749 o Metadata Description: Indicates where authorization request needs 750 to be protected as Request Object and provided through either 751 "request" or "request_uri parameter". 752 o Change Controller: IETF 753 o Specification Document(s): Section 10.5 of this document. 755 9.4. Media Type Registration 757 9.4.1. Registry Contents 759 This section registers the "application/oauth-authz-req+jwt" media 760 type [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the 761 manner described in [RFC6838], which can be used to indicate that the 762 content is a JWT containing Request Object claims. 764 o Type name: application 765 o Subtype name: oauth-authz-req+jwt 766 o Required parameters: n/a 767 o Optional parameters: n/a 768 o Encoding considerations: binary; A Request Object is a JWT; JWT 769 values are encoded as a series of base64url-encoded values (some 770 of which may be the empty string) separated by period ('.') 771 characters. 772 o Security considerations: See Section 10 of [[ this specification 773 ]] 774 o Interoperability considerations: n/a 775 o Published specification: Section 4 of [[ this specification ]] 776 o Applications that use this media type: Applications that use 777 Request Objects to make an OAuth 2.0 Authorization Request 778 o Fragment identifier considerations: n/a 779 o Additional information: 781 Magic number(s): n/a 782 File extension(s): n/a 783 Macintosh file type code(s): n/a 785 o Person & email address to contact for further information: 786 Nat Sakimura, nat@nat.consulting 787 o Intended usage: COMMON 788 o Restrictions on usage: none 789 o Author: Nat Sakimura, nat@nat.consulting 790 o Change controller: IETF 791 o Provisional registration? No 793 10. Security Considerations 795 In addition to the all the security considerations discussed in OAuth 796 2.0 [RFC6819], the security considerations in [RFC7515], [RFC7516], 797 [RFC7518], and [RFC8725] need to be considered. Also, there are 798 several academic papers such as [BASIN] that provide useful insight 799 into the security properties of protocols like OAuth. 801 In consideration of the above, this document advises taking the 802 following security considerations into account. 804 10.1. Choice of Algorithms 806 When sending the authorization request object through "request" 807 parameter, it MUST either be signed using JWS [RFC7515] or signed 808 then encrypted using JWS [RFC7515] and JWE [RFC7516] respectively, 809 with then considered appropriate algorithms. 811 10.2. Request Source Authentication 813 The source of the Authorization Request MUST always be verified. 814 There are several ways to do it: 816 (a) Verifying the JWS Signature of the Request Object. 818 (b) Verifying that the symmetric key for the JWE encryption is the 819 correct one if the JWE is using symmetric encryption. Note 820 however, that if public key encryption is used, no source 821 authentication is enabled by the encryption, as any party can 822 encrypt content to the public key. 824 (c) Verifying the TLS Server Identity of the Request Object URI. In 825 this case, the Authorization Server MUST know out-of-band that 826 the Client uses Request Object URI and only the Client is 827 covered by the TLS certificate. In general, it is not a 828 reliable method. 830 (d) When an Authorization Server implements a service that returns a 831 Request Object URI in exchange for a Request Object, the 832 Authorization Server MUST perform Client Authentication to 833 accept the Request Object and bind the Client Identifier to the 834 Request Object URI it is providing. It MUST validate the 835 signature, per (a). Since Request Object URI can be replayed, 836 the lifetime of the Request Object URI MUST be short and 837 preferably one-time use. The entropy of the Request Object URI 838 MUST be sufficiently large. The adequate shortness of the 839 validity and the entropy of the Request Object URI depends on 840 the risk calculation based on the value of the resource being 841 protected. A general guidance for the validity time would be 842 less than a minute and the Request Object URI is to include a 843 cryptographic random value of 128bit or more at the time of the 844 writing of this specification. 846 (e) When a trusted third-party service returns a Request Object URI 847 in exchange for a Request Object, it MUST validate the 848 signature, per (a). In addition, the Authorization Server MUST 849 be trusted by the third-party service and MUST know out-of-band 850 that the client is also trusted by it. 852 10.3. Explicit Endpoints 854 Although this specification does not require them, research such as 855 [BASIN] points out that it is a good practice to explicitly state the 856 intended interaction endpoints and the message position in the 857 sequence in a tamper evident manner so that the intent of the 858 initiator is unambiguous. The following endpoints defined in 859 [RFC6749], [RFC6750], and [RFC8414] are RECOMMENDED by this 860 specification to use this practice : 862 (a) Protected Resources ("protected_resources") 864 (b) Authorization Endpoint ("authorization_endpoint") 866 (c) Redirection URI ("redirect_uri") 868 (d) Token Endpoint ("token_endpoint") 870 Further, if dynamic discovery is used, then this practice also 871 applies to the discovery related endpoints. 873 In [RFC6749], while Redirection URI is included in the Authorization 874 Request, others are not. As a result, the same applies to 875 Authorization Request Object. 877 10.4. Risks Associated with request_uri 879 The introduction of "request_uri" introduces several attack 880 possibilities. Consult the security considerations in Section 7 of 881 RFC3986 [RFC3986] for more information regarding risks associated 882 with URIs. 884 10.4.1. DDoS Attack on the Authorization Server 886 A set of malicious client can launch a DoS attack to the 887 authorization server by pointing the "request_uri" to a URI that 888 returns extremely large content or extremely slow to respond. Under 889 such an attack, the server may use up its resource and start failing. 891 Similarly, a malicious client can specify the "request_uri" value 892 that itself points to an authorization request URI that uses 893 "request_uri" to cause the recursive lookup. 895 To prevent such attack to succeed, the server should (a) check that 896 the value of "request_uri" parameter does not point to an unexpected 897 location, (b) check the media type of the response is "application/ 898 oauth-authz-req+jwt", (c) implement a time-out for obtaining the 899 content of "request_uri", and (d) not perform recursive GET on the 900 "request_uri". 902 10.4.2. Request URI Rewrite 904 The value of "request_uri" is not signed thus it can be tampered by 905 Man-in-the-browser attacker. Several attack possibilities rise 906 because of this, e.g., (a) attacker may create another file that the 907 rewritten URI points to making it possible to request extra scope (b) 908 attacker launches a DoS attack to a victim site by setting the value 909 of "request_uri" to be that of the victim. 911 To prevent such attack to succeed, the server should (a) check that 912 the value of "request_uri" parameter does not point to an unexpected 913 location, (b) check the media type of the response is "application/ 914 oauth-authz-req+jwt", and (c) implement a time-out for obtaining the 915 content of "request_uri". 917 10.5. Downgrade Attack 919 Unless the protocol used by client and the server is locked down to 920 use OAuth JAR, it is possible for an attacker to use RFC6749 requests 921 to bypass all the protection provided by this specification. 923 To prevent it, this specification defines a new client metadata and 924 server metadata "require_signed_request_object" whose value is a 925 boolean. 927 When the value of it as a client metadata is "true", then the server 928 MUST reject the authorization request from the client that does not 929 conform to this specification. It MUST also reject the request if 930 the request object uses "alg":"none" when this client metadata value 931 is "true". If omitted, the default value is "false". 933 When the value of it as a server metadata is "true", then the server 934 MUST reject the authorization request from any client that does not 935 conform to this specification. It MUST also reject the request if 936 the request object uses "alg":"none" when this server metadata value 937 is "true". If omitted, the default value is "false". 939 Note that even if "require_signed_request_object" metadata values are 940 not present, the client MAY use signed request objects, provided that 941 there are signing algorithms mutually supported by the client and the 942 server. Use of signing algorithm metadata is described in Section 4. 944 10.6. TLS Security Considerations 946 Current security considerations can be found in Recommendations for 947 Secure Use of TLS and DTLS [BCP195]. This supersedes the TLS version 948 recommendations in OAuth 2.0 [RFC6749]. 950 10.7. Parameter Mismatches 952 Given that OAuth parameter values are being sent in two different 953 places, as normal OAuth parameters and as Request Object claims, 954 implementations must guard against attacks that could use mismatching 955 parameter values to obtain unintended outcomes. That is the reason 956 that the two Client ID values MUST match, the reason that only the 957 parameter values from the Request Object are to be used, and the 958 reason that neither "request" nor "request_uri" can appear in a 959 Request Object. 961 10.8. Cross-JWT Confusion 963 As described in Section 2.8 of [RFC8725], attackers may attempt to 964 use a JWT issued for one purpose in a context that it was not 965 intended for. The mitigations described for these attacks can be 966 applied to Request Objects. 968 One way that an attacker might attempt to repurpose a Request Object 969 is to try to use it as a client authentication JWT, as described in 970 Section 2.2 of [RFC7523]. A simple way to prevent this is to never 971 use the Client ID as the "sub" value in a Request Object. 973 Another way to prevent cross-JWT confusion is to use explicit typing, 974 as described in Section 3.11 of [RFC8725]. One would explicitly type 975 a Request Object by including a "typ" Header Parameter with the value 976 "oauth-authz-req+jwt" (which is registered in Section 9.4.1. Note 977 however, that requiring explicitly typed Requests Objects at existing 978 authorization servers will break most existing deployments, as 979 existing clients are already commonly using untyped Request Objects, 980 especially with OpenID Connect [OpenID.Core]. However, requiring 981 explicit typing would be a good idea for new OAuth deployment 982 profiles where compatibility with existing deployments is not a 983 consideration. 985 Finally, yet another way to prevent cross-JWT confusion is to use a 986 key management regime in which keys used to sign Request Objects are 987 identifiably distinct from those used for other purposes. Then, if 988 an adversary attempts to repurpose the Request Object in another 989 context, a key mismatch will occur, thwarting the attack. 991 11. Privacy Considerations 993 When the Client is being granted access to a protected resource 994 containing personal data, both the Client and the Authorization 995 Server need to adhere to Privacy Principles. RFC 6973 Privacy 996 Considerations for Internet Protocols [RFC6973] gives excellent 997 guidance on the enhancement of protocol design and implementation. 998 The provision listed in it should be followed. 1000 Most of the provision would apply to The OAuth 2.0 Authorization 1001 Framework [RFC6749] and The OAuth 2.0 Authorization Framework: Bearer 1002 Token Usage [RFC6750] and are not specific to this specification. In 1003 what follows, only the specific provisions to this specification are 1004 noted. 1006 11.1. Collection limitation 1008 When the Client is being granted access to a protected resource 1009 containing personal data, the Client SHOULD limit the collection of 1010 personal data to that which is within the bounds of applicable law 1011 and strictly necessary for the specified purpose(s). 1013 It is often hard for the user to find out if the personal data asked 1014 for is strictly necessary. A trusted third-party service can help 1015 the user by examining the Client request and comparing to the 1016 proposed processing by the Client and certifying the request. After 1017 the certification, the Client, when making an Authorization Request, 1018 can submit Authorization Request to the trusted third-party service 1019 to obtain the Request Object URI. This process is two steps: 1021 (1) (Certification Process) The trusted third-party service examines 1022 the business process of the client and determines what claims 1023 they need: This is the certification process. Once the client 1024 is certified, then they are issued a client credential to 1025 authenticate against to push request objects to the trusted 1026 third-party service to get the "request_uri". 1028 (2) (Translation Process) The client uses the client credential that 1029 it got to push the request object to the trusted third-party 1030 service to get the "request_uri". The trusted third-party 1031 service also verifies that the Request Object is consistent with 1032 the claims that the client is eligible for, per prior step. 1034 Upon receiving such Request Object URI in the Authorization Request, 1035 the Authorization Server first verifies that the authority portion of 1036 the Request Object URI is a legitimate one for the trusted third- 1037 party service. Then, the Authorization Server issues HTTP GET 1038 request to the Request Object URI. Upon connecting, the 1039 Authorization Server MUST verify the server identity represented in 1040 the TLS certificate is legitimate for the Request Object URI. Then, 1041 the Authorization Server can obtain the Request Object, which 1042 includes the "client_id" representing the Client. 1044 The Consent screen MUST indicate the Client and SHOULD indicate that 1045 the request has been vetted by the trusted third-party service for 1046 adherence to the Collection Limitation principle. 1048 11.2. Disclosure Limitation 1050 11.2.1. Request Disclosure 1052 This specification allows extension parameters. These may include 1053 potentially sensitive information. Since URI query parameter may 1054 leak through various means but most notably through referrer and 1055 browser history, if the authorization request contains a potentially 1056 sensitive parameter, the Client SHOULD JWE [RFC7516] encrypt the 1057 request object. 1059 Where Request Object URI method is being used, if the request object 1060 contains personally identifiable or sensitive information, the 1061 "request_uri" SHOULD be used only once, have a short validity period, 1062 and MUST have large enough entropy deemed necessary with applicable 1063 security policy unless the Request Object itself is JWE [RFC7516] 1064 Encrypted. The adequate shortness of the validity and the entropy of 1065 the Request Object URI depends on the risk calculation based on the 1066 value of the resource being protected. A general guidance for the 1067 validity time would be less than a minute and the Request Object URI 1068 is to include a cryptographic random value of 128bit or more at the 1069 time of the writing of this specification. 1071 11.2.2. Tracking using Request Object URI 1073 Even if the protected resource does not include a personally 1074 identifiable information, it is sometimes possible to identify the 1075 user through the Request Object URI if persistent static per-user 1076 Request Object URIs are used. A third party may observe it through 1077 browser history etc. and start correlating the user's activity using 1078 it. In a way, it is a data disclosure as well and should be avoided. 1080 Therefore, per-user persistent Request Object URIs should be avoided. 1081 Single-use Request Object URIs are one alternative. 1083 12. Acknowledgements 1085 The following people contributed to the creation of this document in 1086 the OAuth working group and other IETF roles. (Affiliations at the 1087 time of the contribution are used.) 1089 Annabelle Backman (Amazon), Dirk Balfanz (Google), Sergey Beryozkin, 1090 Ben Campbell (as AD), Brian Campbell (Ping Identity), Roman Danyliw 1091 (as AD), Martin Duke (as AD), Vladimir Dzhuvinov (Connect2id), Lars 1092 Eggert (as AD), Joel Halpern (as GENART), Benjamin Kaduk (as AD), 1093 Stephen Kent (as SECDIR), Murray Kucherawy (as AD), Warren Kumari (as 1094 OPSDIR), Watson Ladd (as SECDIR), Torsten Lodderstedt (yes.com), Jim 1095 Manico, Axel Nennker (Deutsche Telecom), Hannes Tschofenig (ARM), 1096 James H. Manger (Telstra), Kathleen Moriarty (as AD), John Panzer 1097 (Google), Francesca Palombini (as AD), David Recordon (Facebook), 1098 Marius Scurtescu (Google), Luke Shepard (Facebook), Filip Skokan 1099 (Auth0), Eric Vyncke (as AD), and Robert Wilton (as AD). 1101 The following people contributed to creating this document through 1102 the OpenID Connect Core 1.0 [OpenID.Core]. 1104 Brian Campbell (Ping Identity), George Fletcher (AOL), Ryo Itou 1105 (Mixi), Edmund Jay (Illumila), Breno de Medeiros (Google), Hideki 1106 Nara (TACT), Justin Richer (MITRE). 1108 13. Revision History 1110 Note to the RFC Editor: Please remove this section from the final 1111 RFC. 1113 -34 1115 o Addressed additional IESG comments by Murray Kucherawy and 1116 Francesca Palombini. 1118 -33 1120 o Addressed IESG comments prior to 8-Apr-21 telechat. Thanks to 1121 Martin Duke, Lars Eggert, Benjamin Kaduk, Francesca Palombini, and 1122 Eric Vyncke for their reviews. 1124 -32 1126 o Removed outdated JSON reference. 1128 -31 1130 o Addressed SecDir review comments by Watson Ladd. 1132 -30 1134 o Changed the MIME Type from "oauth.authz.req+jwt" to "oauth-authz- 1135 req+jwt", per advice from the designated experts. 1137 -29 1139 o Uniformly use the Change Controller "IETF". 1141 -28 1143 o Removed unused references, as suggested by Roman Danyliw. 1145 -27 1147 o Edits by Mike Jones to address IESG and working group review 1148 comments, including: 1150 o Added Security Considerations text saying not to use the Client ID 1151 as the "sub" value to prevent Cross-JWT Confusion. 1153 o Added Security Considerations text about using explicit typing to 1154 prevent Cross-JWT Confusion. 1156 o Addressed Eric Vyncke's review comments. 1158 o Addressed Robert Wilton's review comments. 1160 o Addressed Murray Kucherawy's review comments. 1162 o Addressed Benjamin Kaduk's review comments. 1164 o Applied spelling and grammar corrections. 1166 -20 1168 o BK comments 1170 o Section 3 Removed WAP 1171 o Section 4. Clarified authorization request object parameters, 1172 removed extension parameters from examples 1174 o Section 4. Specifies application/oauth.authz.req+jwt as mime-type 1175 fore request objects 1177 o Section 5.2.1 Added reference to Capability URLs 1179 o Section 5.2.3. Added entropy fragment to example request 1181 o Section 8. Replaced "subjectAltName dnsName" with "DNS-ID" 1183 o Section 9. Registers authorization request parameters in JWT 1184 Claims Registry. 1186 o Section 9. Registers application/oauth.authz.req in IANA mime- 1187 types registry 1189 o Section 10.1. Clarified encrypted request objects are "signed 1190 then encrypted" to maintain consistency 1192 o Section 10.2. Clarifies trust between AS and TFP 1194 o Section 10.3. Clarified endpoints subject to the practice 1196 o Section 10.4 Replaced "redirect_uri" to "request_uri" 1198 o Section 10.4. Added reference to RFC 3986 for risks 1200 o Section 10.4.1.d Deleted "do" to maintain grammar flow 1202 o Section 10.4.1, 10.4.2 Replaced "application/jose" to 1203 "application/jwt" 1205 o Section 12.1. Extended description for submitting authorization 1206 request to TFP to obtain request object 1208 o Section 12.2.2. Replaced per-user Request Object URI with static 1209 per-user Request URIs 1211 o Section 13. Combined OAuth WG contributors together 1213 o Section Whole doc Replaced application/jwt with application/ 1214 oauth.authz.req+jwt 1216 -19 1218 o AD comments 1219 o Section 5.2.1. s/Requiest URI/Request URI/ 1221 o Section 8 s/[BCP195] ./[BCP195]./ 1223 o Section 10.3. s/sited/cited/ 1225 o Section 11. Typo. s/Curent/Current/ 1227 -17 1229 o #78 Typos in content-type 1231 -16 1233 o Treated remaining Ben Campbell comments. 1235 -15 1237 o Removed further duplication 1239 -14 1241 o #71 Reiterate dynamic params are included. 1243 o #70 Made clear that AS must return error. 1245 o #69 Inconsistency of the need to sign. 1247 o Fixed Mimetype. 1249 o #67 Inconsistence in requiring HTTPS in request URI. 1251 o #66 Dropped ISO 29100 reference. 1253 o #25 Removed Encrypt only option. 1255 o #59 Same with #25. 1257 -13 1259 o add TLS Security Consideration section 1261 o replace RFC7525 reference with BCP195 1263 o moved front tag in FETT reference to fix XML structure 1265 o changes reference from SoK to FETT 1266 -12 1268 o fixes #62 - Alexey Melnikov Discuss 1270 o fixes #48 - OPSDIR Review : General - delete semicolons after list 1271 items 1273 o fixes #58 - DP Comments for the Last Call 1275 o fixes #57 - GENART - Remove "non-normative ... " from examples. 1277 o fixes #45 - OPSDIR Review : Introduction - are attacks discovered 1278 or already opened 1280 o fixes #49 - OPSDIR Review : Introduction - Inconsistent colons 1281 after initial sentence of list items. 1283 o fixes #53 - OPSDIR Review : 6.2 JWS Signed Request Object - 1284 Clarify JOSE Header 1286 o fixes #42 - OPSDIR Review : Introduction - readability of 'and' is 1287 confusing 1289 o fixes #50 - OPSDIR Review : Section 4 Request Object - Clarify 1290 'signed, encrypted, or signed and encrypted' 1292 o fixes #39 - OPSDIR Review : Abstract - Explain/Clarify JWS and JWE 1294 o fixed #50 - OPSDIR Review : Section 4 Request Object - Clarify 1295 'signed, encrypted, or signed and encrypted' 1297 o fixes #43 - OPSDIR Review : Introduction - 'properties' sounds 1298 awkward and are not exactly 'properties' 1300 o fixes #56 - OPSDIR Review : 12 Acknowledgements - 'contribution 1301 is' => 'contribution are' 1303 o fixes #55 - OPSDIR Review : 11.2.2 Privacy Considerations - ' It 1304 is in a way' => 'In a way, it is' 1306 o fixes #54 - OPSDIR Review : 11 Privacy Considerations - 'and not 1307 specific' => 'and are not specific' 1309 o fixes #51 - OPSDIR Review : Section 4 Request Object - 'It is 1310 fine' => 'It is recommended' 1312 o fixes #47 - OPSDIR Review : Introduction - 'over- the- wire' => 1313 'over-the-wire' 1315 o fixes #46 - OPSDIR Review : Introduction - 'It allows' => 'The use 1316 of application security' for 1318 o fixes #44 - OPSDIR Review : Introduction - 'has' => 'have' 1320 o fixes #41 - OPSDIR Review : Introduction - missing 'is' before 1321 'typically sent' 1323 o fixes #38 - OPSDIR Review : Section 11 - Delete 'freely 1324 accessible' regarding ISO 29100 1326 -11 1328 o s/bing/being/ 1330 o Added history for -10 1332 -10 1334 o #20: KM1 -- some wording that is awkward in the TLS section. 1336 o #21: KM2 - the additional attacks against OAuth 2.0 should also 1337 have a pointer 1339 o #22: KM3 -- Nit: in the first line of 10.4: 1341 o #23: KM4 -- Mention RFC6973 in Section 11 in addition to ISO 29100 1343 o #24: SECDIR review: Section 4 -- Confusing requirements for 1344 sign+encrypt 1346 o #25: SECDIR review: Section 6 -- authentication and integrity need 1347 not be provided if the requestor encrypts the token? 1349 o #26: SECDIR Review: Section 10 -- why no reference for JWS 1350 algorithms? 1352 o #27: SECDIR Review: Section 10.2 - how to do the agreement between 1353 client and server "a priori"? 1355 o #28: SECDIR Review: Section 10.3 - Indication on "large entropy" 1356 and "short lifetime" should be indicated 1358 o #29: SECDIR Review: Section 10.3 - Typo 1360 o #30: SECDIR Review: Section 10.4 - typos and missing articles 1361 o #31: SECDIR Review: Section 10.4 - Clearer statement on the lack 1362 of endpoint identifiers needed 1364 o #32: SECDIR Review: Section 11 - ISO29100 needs to be moved to 1365 normative reference 1367 o #33: SECDIR Review: Section 11 - Better English and Entropy 1368 language needed 1370 o #34: Section 4: Typo 1372 o #35: More Acknowledgment 1374 o #36: DP - More precise qualification on Encryption needed. 1376 -09 1378 o Minor Editorial Nits. 1380 o Section 10.4 added. 1382 o Explicit reference to Security consideration (10.2) added in 1383 section 5 and section 5.2. 1385 o , (add yourself) removed from the acknowledgment. 1387 -08 1389 o Applied changes proposed by Hannes on 2016-06-29 on IETF OAuth 1390 list recorded as https://bitbucket.org/Nat/oauth-jwsreq/ 1391 issues/12/. 1393 o TLS requirements added. 1395 o Security Consideration reinforced. 1397 o Privacy Consideration added. 1399 o Introduction improved. 1401 -07 1403 o Changed the abbrev to OAuth JAR from oauth-jar. 1405 o Clarified sig and enc methods. 1407 o Better English. 1409 o Removed claims from one of the example. 1411 o Re-worded the URI construction. 1413 o Changed the example to use request instead of request_uri. 1415 o Clarified that Request Object parameters take precedence 1416 regardless of request or request_uri parameters were used. 1418 o Generalized the language in 4.2.1 to convey the intent more 1419 clearly. 1421 o Changed "Server" to "Authorization Server" as a clarification. 1423 o Stopped talking about request_object_signing_alg. 1425 o IANA considerations now reflect the current status. 1427 o Added Brian Campbell to the contributors list. Made the lists 1428 alphabetic order based on the last names. Clarified that the 1429 affiliation is at the time of the contribution. 1431 o Added "older versions of " to the reference to IE URI length 1432 limitations. 1434 o Stopped talking about signed or unsigned JWS etc. 1436 o 1.Introduction improved. 1438 -06 1440 o Added explanation on the 512 chars URL restriction. 1442 o Updated Acknowledgements. 1444 -05 1446 o More alignment with OpenID Connect. 1448 -04 1450 o Fixed typos in examples. (request_url -> request_uri, cliend_id -> 1451 client_id) 1453 o Aligned the error messages with the OAuth IANA registry. 1455 o Added another rationale for having request object. 1457 -03 1459 o Fixed the non-normative description about the advantage of static 1460 signature. 1462 o Changed the requirement for the parameter values in the request 1463 itself and the request object from 'MUST MATCH" to 'Req Obj takes 1464 precedence. 1466 -02 1468 o Now that they are RFCs, replaced JWS, JWE, etc. with RFC numbers. 1470 -01 1472 o Copy Edits. 1474 14. References 1476 14.1. Normative References 1478 [BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, 1479 "Recommendations for Secure Use of Transport Layer 1480 Security (TLS) and Datagram Transport Layer Security 1481 (DTLS)", BCP 195, RFC 7525, May 2015. 1483 [IANA.MediaTypes] 1484 IANA, "Media Types", 1485 . 1487 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1488 Requirement Levels", BCP 14, RFC 2119, 1489 DOI 10.17487/RFC2119, March 1997, 1490 . 1492 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 1493 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 1494 2003, . 1496 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1497 Resource Identifier (URI): Generic Syntax", STD 66, 1498 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1499 . 1501 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 1502 Verification of Domain-Based Application Service Identity 1503 within Internet Public Key Infrastructure Using X.509 1504 (PKIX) Certificates in the Context of Transport Layer 1505 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 1506 2011, . 1508 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 1509 RFC 6749, DOI 10.17487/RFC6749, October 2012, 1510 . 1512 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 1513 Framework: Bearer Token Usage", RFC 6750, 1514 DOI 10.17487/RFC6750, October 2012, 1515 . 1517 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1518 Protocol (HTTP/1.1): Message Syntax and Routing", 1519 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1520 . 1522 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 1523 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 1524 2015, . 1526 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 1527 RFC 7516, DOI 10.17487/RFC7516, May 2015, 1528 . 1530 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 1531 DOI 10.17487/RFC7518, May 2015, 1532 . 1534 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 1535 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 1536 . 1538 [RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names 1539 (URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017, 1540 . 1542 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1543 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1544 May 2017, . 1546 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1547 Interchange Format", STD 90, RFC 8259, 1548 DOI 10.17487/RFC8259, December 2017, 1549 . 1551 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 1552 Authorization Server Metadata", RFC 8414, 1553 DOI 10.17487/RFC8414, June 2018, 1554 . 1556 14.2. Informative References 1558 [BASIN] Basin, D., Cremers, C., and S. Meier, "Provably Repairing 1559 the ISO/IEC 9798 Standard for Entity Authentication", 1560 Journal of Computer Security - Security and Trust 1561 Principles Volume 21 Issue 6, Pages 817-846, November 1562 2013, 1563 . 1566 [CapURLs] Tennison, J., "Good Practices for Capability URLs", 1567 W3C Working Draft, February 2014, 1568 . 1570 [IANA.JWT.Claims] 1571 IANA, "JSON Web Token Claims", 1572 . 1574 [IANA.OAuth.Parameters] 1575 IANA, "OAuth Parameters", 1576 . 1578 [OpenID.Core] 1579 Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 1580 C. Mortimore, "OpenID Connect Core 1.0", OpenID 1581 Foundation Standards, February 2014, 1582 . 1584 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1585 Extensions (MIME) Part Two: Media Types", RFC 2046, 1586 DOI 10.17487/RFC2046, November 1996, 1587 . 1589 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 1590 Threat Model and Security Considerations", RFC 6819, 1591 DOI 10.17487/RFC6819, January 2013, 1592 . 1594 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 1595 Specifications and Registration Procedures", BCP 13, 1596 RFC 6838, DOI 10.17487/RFC6838, January 2013, 1597 . 1599 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1600 Morris, J., Hansen, M., and R. Smith, "Privacy 1601 Considerations for Internet Protocols", RFC 6973, 1602 DOI 10.17487/RFC6973, July 2013, 1603 . 1605 [RFC7523] Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token 1606 (JWT) Profile for OAuth 2.0 Client Authentication and 1607 Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, May 1608 2015, . 1610 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 1611 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 1612 RFC 7591, DOI 10.17487/RFC7591, July 2015, 1613 . 1615 [RFC8725] Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 1616 Current Practices", BCP 225, RFC 8725, 1617 DOI 10.17487/RFC8725, February 2020, 1618 . 1620 Authors' Addresses 1622 Nat Sakimura 1623 NAT.Consulting 1624 2-22-17 Naka 1625 Kunitachi, Tokyo 186-0004 1626 Japan 1628 Phone: +81-42-580-7401 1629 Email: nat@nat.consulting 1630 URI: http://nat.sakimura.org/ 1632 John Bradley 1633 Yubico 1634 Casilla 177, Sucursal Talagante 1635 Talagante, RM 1636 Chile 1638 Phone: +1.202.630.5272 1639 Email: ve7jtb@ve7jtb.com 1640 URI: http://www.thread-safe.com/ 1641 Michael B. Jones 1642 Microsoft 1643 One Microsoft Way 1644 Redmond, Washington 98052 1645 United States of America 1647 Email: mbj@microsoft.com 1648 URI: https://self-issued.info/