idnits 2.17.1 draft-ietf-oauth-jwsreq-33.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 7, 2021) is 1115 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 9, 2021 Yubico 6 M. Jones 7 Microsoft 8 April 7, 2021 10 The OAuth 2.0 Authorization Framework: JWT Secured Authorization Request 11 (JAR) 12 draft-ietf-oauth-jwsreq-33 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 9, 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 signature validation fails, the Authorization Server MUST return 600 an "invalid_request_object" error to the client in response to the 601 authorization request. 603 6.3. Request Parameter Assembly and Validation 605 The Authorization Server MUST extract the set of Authorization 606 Request parameters from the Request Object value. The Authorization 607 Server MUST only use the parameters in the Request Object even if the 608 same parameter is provided in the query parameter. The Client ID 609 values in the "client_id" request parameter and in the Request Object 610 "client_id" claim MUST be identical. The Authorization Server then 611 validates the request as specified in OAuth 2.0 [RFC6749]. 613 If the validation fails, then the Authorization Server MUST return an 614 error to the client in response to the authorization request, as 615 specified in Section 5.2 of OAuth 2.0 [RFC6749]. 617 7. Authorization Server Response 619 Authorization Server Response is created and sent to the client as in 620 Section 4 of OAuth 2.0 [RFC6749]. 622 In addition, this document uses these additional error values: 624 invalid_request_uri 625 The "request_uri" in the Authorization Request returns an error or 626 contains invalid data. 628 invalid_request_object 629 The request parameter contains an invalid Request Object. 631 request_not_supported 632 The Authorization Server does not support the use of the "request" 633 parameter. 635 request_uri_not_supported 636 The Authorization Server does not support the use of the 637 "request_uri" parameter. 639 8. TLS Requirements 641 Client implementations supporting the Request Object URI method MUST 642 support TLS following Recommendations for Secure Use of Transport 643 Layer Security (TLS) and Datagram Transport Layer Security (DTLS) 644 [BCP195]. 646 To protect against information disclosure and tampering, 647 confidentiality protection MUST be applied using TLS with a cipher 648 suite that provides confidentiality and integrity protection. 650 HTTP clients MUST also verify the TLS server certificate, using DNS- 651 ID [RFC6125], to avoid man-in-the-middle attacks. The rules and 652 guidelines defined in [RFC6125] apply here, with the following 653 considerations: 655 o Support for DNS-ID identifier type (that is, the dNSName identity 656 in the subjectAltName extension) is REQUIRED. Certification 657 authorities which issue server certificates MUST support the DNS- 658 ID identifier type, and the DNS-ID identifier type MUST be present 659 in server certificates. 661 o DNS names in server certificates MAY contain the wildcard 662 character "*". 664 o Clients MUST NOT use CN-ID identifiers; a CN field may be present 665 in the server certificate's subject name, but MUST NOT be used for 666 authentication within the rules described in [BCP195]. 668 o SRV-ID and URI-ID as described in Section 6.5 of [RFC6125] MUST 669 NOT be used for comparison. 671 9. IANA Considerations 673 9.1. OAuth Parameters Registration 675 Since the request object is a JWT, the core JWT claims cannot be used 676 for any purpose in the request object other than for what JWT 677 dictates. Thus, they need to be registered as OAuth Authorization 678 Request parameters to avoid future OAuth extensions using them with 679 different meanings. 681 This specification adds the following values to the "OAuth 682 Parameters" registry [IANA.OAuth.Parameters] established by 683 [RFC6749]. 685 o Name: "iss" 686 o Parameter Usage Location: authorization request 687 o Change Controller: IETF 688 o Specification Document(s): Section 4.1.1 of [RFC7519] and this 689 document. 691 o Name: "sub" 692 o Parameter Usage Location: authorization request 693 o Change Controller: IETF 694 o Specification Document(s): Section 4.1.2 of [RFC7519] and this 695 document. 697 o Name: "aud" 698 o Parameter Usage Location: authorization request 699 o Change Controller: IETF 700 o Specification Document(s): Section 4.1.3 of [RFC7519] and this 701 document. 703 o Name: "exp" 704 o Parameter Usage Location: authorization request 705 o Change Controller: IETF 706 o Specification Document(s): Section 4.1.4 of [RFC7519] and this 707 document. 709 o Name: "nbf" 710 o Parameter Usage Location: authorization request 711 o Change Controller: IETF 712 o Specification Document(s): Section 4.1.5 of [RFC7519] and this 713 document. 715 o Name: "iat" 716 o Parameter Usage Location: authorization request 717 o Change Controller: IETF 718 o Specification Document(s): Section 4.1.6 of [RFC7519] and this 719 document. 721 o Name: "jti" 722 o Parameter Usage Location: authorization request 723 o Change Controller: IETF 724 o Specification Document(s): Section 4.1.7 of [RFC7519] and this 725 document. 727 9.2. OAuth Authorization Server Metadata Registry 729 This specification adds the following values to the "OAuth 730 Authorization Server Metadata" registry [IANA.OAuth.Parameters] 731 established by [RFC8414]. 733 o Metadata Name: "require_signed_request_object" 734 o Metadata Description: Indicates where authorization request needs 735 to be protected as Request Object and provided through either 736 "request" or "request_uri parameter". 737 o Change Controller: IETF 738 o Specification Document(s): Section 10.5 of this document. 740 9.3. OAuth Dynamic Client Registration Metadata Registry 742 This specification adds the following values to the "OAuth Dynamic 743 Client Registration Metadata" registry [IANA.OAuth.Parameters] 744 established by [RFC7591]. 746 o Metadata Name: "require_signed_request_object" 747 o Metadata Description: Indicates where authorization request needs 748 to be protected as Request Object and provided through either 749 "request" or "request_uri parameter". 750 o Change Controller: IETF 751 o Specification Document(s): Section 10.5 of this document. 753 9.4. Media Type Registration 755 9.4.1. Registry Contents 757 This section registers the "application/oauth-authz-req+jwt" media 758 type [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the 759 manner described in [RFC6838], which can be used to indicate that the 760 content is a JWT containing Request Object claims. 762 o Type name: application 763 o Subtype name: oauth-authz-req+jwt 764 o Required parameters: n/a 765 o Optional parameters: n/a 766 o Encoding considerations: binary; A Request Object is a JWT; JWT 767 values are encoded as a series of base64url-encoded values (some 768 of which may be the empty string) separated by period ('.') 769 characters. 770 o Security considerations: See Section 10 of [[ this specification 771 ]] 772 o Interoperability considerations: n/a 773 o Published specification: Section 4 of [[ this specification ]] 774 o Applications that use this media type: Applications that use 775 Request Objects to make an OAuth 2.0 Authorization Request 776 o Fragment identifier considerations: n/a 777 o Additional information: 779 Magic number(s): n/a 780 File extension(s): n/a 781 Macintosh file type code(s): n/a 783 o Person & email address to contact for further information: 784 Nat Sakimura, nat@nat.consulting 785 o Intended usage: COMMON 786 o Restrictions on usage: none 787 o Author: Nat Sakimura, nat@nat.consulting 788 o Change controller: IETF 789 o Provisional registration? No 791 10. Security Considerations 793 In addition to the all the security considerations discussed in OAuth 794 2.0 [RFC6819], the security considerations in [RFC7515], [RFC7516], 795 [RFC7518], and [RFC8725] need to be considered. Also, there are 796 several academic papers such as [BASIN] that provide useful insight 797 into the security properties of protocols like OAuth. 799 In consideration of the above, this document advises taking the 800 following security considerations into account. 802 10.1. Choice of Algorithms 804 When sending the authorization request object through "request" 805 parameter, it MUST either be signed using JWS [RFC7515] or signed 806 then encrypted using JWS [RFC7515] and JWE [RFC7516] respectively, 807 with then considered appropriate algorithms. 809 10.2. Request Source Authentication 811 The source of the Authorization Request MUST always be verified. 812 There are several ways to do it: 814 (a) Verifying the JWS Signature of the Request Object. 816 (b) Verifying that the symmetric key for the JWE encryption is the 817 correct one if the JWE is using symmetric encryption. Note 818 however, that if public key encryption is used, no source 819 authentication is enabled by the encryption, as any party can 820 encrypt content to the public key. 822 (c) Verifying the TLS Server Identity of the Request Object URI. In 823 this case, the Authorization Server MUST know out-of-band that 824 the Client uses Request Object URI and only the Client is 825 covered by the TLS certificate. In general, it is not a 826 reliable method. 828 (d) When an Authorization Server implements a service that returns a 829 Request Object URI in exchange for a Request Object, the 830 Authorization Server MUST perform Client Authentication to 831 accept the Request Object and bind the Client Identifier to the 832 Request Object URI it is providing. It MUST validate the 833 signature, per (a). Since Request Object URI can be replayed, 834 the lifetime of the Request Object URI MUST be short and 835 preferably one-time use. The entropy of the Request Object URI 836 MUST be sufficiently large. The adequate shortness of the 837 validity and the entropy of the Request Object URI depends on 838 the risk calculation based on the value of the resource being 839 protected. A general guidance for the validity time would be 840 less than a minute and the Request Object URI is to include a 841 cryptographic random value of 128bit or more at the time of the 842 writing of this specification. 844 (e) When a trusted third-party service returns a Request Object URI 845 in exchange for a Request Object, it MUST validate the 846 signature, per (a). In addition, the Authorization Server MUST 847 be trusted by the third-party service and MUST know out-of-band 848 that the client is also trusted by it. 850 10.3. Explicit Endpoints 852 Although this specification does not require them, research such as 853 [BASIN] points out that it is a good practice to explicitly state the 854 intended interaction endpoints and the message position in the 855 sequence in a tamper evident manner so that the intent of the 856 initiator is unambiguous. The following endpoints defined in 857 [RFC6749], [RFC6750], and [RFC8414] are RECOMMENDED by this 858 specification to use this practice : 860 (a) Protected Resources ("protected_resources") 862 (b) Authorization Endpoint ("authorization_endpoint") 864 (c) Redirection URI ("redirect_uri") 866 (d) Token Endpoint ("token_endpoint") 868 Further, if dynamic discovery is used, then this practice also 869 applies to the discovery related endpoints. 871 In [RFC6749], while Redirection URI is included in the Authorization 872 Request, others are not. As a result, the same applies to 873 Authorization Request Object. 875 10.4. Risks Associated with request_uri 877 The introduction of "request_uri" introduces several attack 878 possibilities. Consult the security considerations in Section 7 of 879 RFC3986 [RFC3986] for more information regarding risks associated 880 with URIs. 882 10.4.1. DDoS Attack on the Authorization Server 884 A set of malicious client can launch a DoS attack to the 885 authorization server by pointing the "request_uri" to a URI that 886 returns extremely large content or extremely slow to respond. Under 887 such an attack, the server may use up its resource and start failing. 889 Similarly, a malicious client can specify the "request_uri" value 890 that itself points to an authorization request URI that uses 891 "request_uri" to cause the recursive lookup. 893 To prevent such attack to succeed, the server should (a) check that 894 the value of "request_uri" parameter does not point to an unexpected 895 location, (b) check the media type of the response is "application/ 896 oauth-authz-req+jwt", (c) implement a time-out for obtaining the 897 content of "request_uri", and (d) not perform recursive GET on the 898 "request_uri". 900 10.4.2. Request URI Rewrite 902 The value of "request_uri" is not signed thus it can be tampered by 903 Man-in-the-browser attacker. Several attack possibilities rise 904 because of this, e.g., (a) attacker may create another file that the 905 rewritten URI points to making it possible to request extra scope (b) 906 attacker launches a DoS attack to a victim site by setting the value 907 of "request_uri" to be that of the victim. 909 To prevent such attack to succeed, the server should (a) check that 910 the value of "request_uri" parameter does not point to an unexpected 911 location, (b) check the media type of the response is "application/ 912 oauth-authz-req+jwt", and (c) implement a time-out for obtaining the 913 content of "request_uri". 915 10.5. Downgrade Attack 917 Unless the protocol used by client and the server is locked down to 918 use OAuth JAR, it is possible for an attacker to use RFC6749 requests 919 to bypass all the protection provided by this specification. 921 To prevent it, this specification defines a new client metadata and 922 server metadata "require_signed_request_object" whose value is a 923 boolean. 925 When the value of it as a client metadata is "true", then the server 926 MUST reject the authorization request from the client that does not 927 conform to this specification. It MUST also reject the request if 928 the request object uses "alg":"none" when this client metadata value 929 is "true". If omitted, the default value is "false". 931 When the value of it as a server metadata is "true", then the server 932 MUST reject the authorization request from any client that does not 933 conform to this specification. It MUST also reject the request if 934 the request object uses "alg":"none" when this server metadata value 935 is "true". If omitted, the default value is "false". 937 Note that even if "require_signed_request_object" metadata values are 938 not present, the client MAY use signed request objects, provided that 939 there are signing algorithms mutually supported by the client and the 940 server. Use of signing algorithm metadata is described in Section 4. 942 10.6. TLS Security Considerations 944 Current security considerations can be found in Recommendations for 945 Secure Use of TLS and DTLS [BCP195]. This supersedes the TLS version 946 recommendations in OAuth 2.0 [RFC6749]. 948 10.7. Parameter Mismatches 950 Given that OAuth parameter values are being sent in two different 951 places, as normal OAuth parameters and as Request Object claims, 952 implementations must guard against attacks that could use mismatching 953 parameter values to obtain unintended outcomes. That is the reason 954 that the two Client ID values MUST match, the reason that only the 955 parameter values from the Request Object are to be used, and the 956 reason that neither "request" nor "request_uri" can appear in a 957 Request Object. 959 10.8. Cross-JWT Confusion 961 As described in Section 2.8 of [RFC8725], attackers may attempt to 962 use a JWT issued for one purpose in a context that it was not 963 intended for. The mitigations described for these attacks can be 964 applied to Request Objects. 966 One way that an attacker might attempt to repurpose a Request Object 967 is to try to use it as a client authentication JWT, as described in 968 Section 2.2 of [RFC7523]. A simple way to prevent this is to never 969 use the Client ID as the "sub" value in a Request Object. 971 Another way to prevent cross-JWT confusion is to use explicit typing, 972 as described in Section 3.11 of [RFC8725]. One would explicitly type 973 a Request Object by including a "typ" Header Parameter with the value 974 "oauth-authz-req+jwt" (which is registered in Section 9.4.1. Note 975 however, that requiring explicitly typed Requests Objects at existing 976 authorization servers will break most existing deployments, as 977 existing clients are already commonly using untyped Request Objects, 978 especially with OpenID Connect [OpenID.Core]. However, requiring 979 explicit typing would be a good idea for new OAuth deployment 980 profiles where compatibility with existing deployments is not a 981 consideration. 983 Finally, yet another way to prevent cross-JWT confusion is to use a 984 key management regime in which keys used to sign Request Objects are 985 identifiably distinct from those used for other purposes. Then, if 986 an adversary attempts to repurpose the Request Object in another 987 context, a key mismatch will occur, thwarting the attack. 989 11. Privacy Considerations 991 When the Client is being granted access to a protected resource 992 containing personal data, both the Client and the Authorization 993 Server need to adhere to Privacy Principles. RFC 6973 Privacy 994 Considerations for Internet Protocols [RFC6973] gives excellent 995 guidance on the enhancement of protocol design and implementation. 996 The provision listed in it should be followed. 998 Most of the provision would apply to The OAuth 2.0 Authorization 999 Framework [RFC6749] and The OAuth 2.0 Authorization Framework: Bearer 1000 Token Usage [RFC6750] and are not specific to this specification. In 1001 what follows, only the specific provisions to this specification are 1002 noted. 1004 11.1. Collection limitation 1006 When the Client is being granted access to a protected resource 1007 containing personal data, the Client SHOULD limit the collection of 1008 personal data to that which is within the bounds of applicable law 1009 and strictly necessary for the specified purpose(s). 1011 It is often hard for the user to find out if the personal data asked 1012 for is strictly necessary. A trusted third-party service can help 1013 the user by examining the Client request and comparing to the 1014 proposed processing by the Client and certifying the request. After 1015 the certification, the Client, when making an Authorization Request, 1016 can submit Authorization Request to the trusted third-party service 1017 to obtain the Request Object URI. This process is two steps: 1019 (1) (Certification Process) The trusted third-party service examines 1020 the business process of the client and determines what claims 1021 they need: This is the certification process. Once the client 1022 is certified, then they are issued a client credential to 1023 authenticate against to push request objects to the trusted 1024 third-party service to get the "request_uri". 1026 (2) (Translation Process) The client uses the client credential that 1027 it got to push the request object to the trusted third-party 1028 service to get the "request_uri". The trusted third-party 1029 service also verifies that the Request Object is consistent with 1030 the claims that the client is eligible for, per prior step. 1032 Upon receiving such Request Object URI in the Authorization Request, 1033 the Authorization Server first verifies that the authority portion of 1034 the Request Object URI is a legitimate one for the trusted third- 1035 party service. Then, the Authorization Server issues HTTP GET 1036 request to the Request Object URI. Upon connecting, the 1037 Authorization Server MUST verify the server identity represented in 1038 the TLS certificate is legitimate for the Request Object URI. Then, 1039 the Authorization Server can obtain the Request Object, which 1040 includes the "client_id" representing the Client. 1042 The Consent screen MUST indicate the Client and SHOULD indicate that 1043 the request has been vetted by the trusted third-party service for 1044 adherence to the Collection Limitation principle. 1046 11.2. Disclosure Limitation 1048 11.2.1. Request Disclosure 1050 This specification allows extension parameters. These may include 1051 potentially sensitive information. Since URI query parameter may 1052 leak through various means but most notably through referrer and 1053 browser history, if the authorization request contains a potentially 1054 sensitive parameter, the Client SHOULD JWE [RFC7516] encrypt the 1055 request object. 1057 Where Request Object URI method is being used, if the request object 1058 contains personally identifiable or sensitive information, the 1059 "request_uri" SHOULD be used only once, have a short validity period, 1060 and MUST have large enough entropy deemed necessary with applicable 1061 security policy unless the Request Object itself is JWE [RFC7516] 1062 Encrypted. The adequate shortness of the validity and the entropy of 1063 the Request Object URI depends on the risk calculation based on the 1064 value of the resource being protected. A general guidance for the 1065 validity time would be less than a minute and the Request Object URI 1066 is to include a cryptographic random value of 128bit or more at the 1067 time of the writing of this specification. 1069 11.2.2. Tracking using Request Object URI 1071 Even if the protected resource does not include a personally 1072 identifiable information, it is sometimes possible to identify the 1073 user through the Request Object URI if persistent static per-user 1074 Request Object URIs are used. A third party may observe it through 1075 browser history etc. and start correlating the user's activity using 1076 it. In a way, it is a data disclosure as well and should be avoided. 1078 Therefore, per-user persistent Request Object URIs should be avoided. 1079 Single-use Request Object URIs are one alternative. 1081 12. Acknowledgements 1083 The following people contributed to the creation of this document in 1084 the OAuth working group and other IETF roles. (Affiliations at the 1085 time of the contribution are used.) 1087 Annabelle Backman (Amazon), Dirk Balfanz (Google), Sergey Beryozkin, 1088 Ben Campbell (as AD), Brian Campbell (Ping Identity), Roman Danyliw 1089 (as AD), Martin Duke (as AD), Vladimir Dzhuvinov (Connect2id), Lars 1090 Eggert (as AD), Joel Halpern (as GENART), Benjamin Kaduk (as AD), 1091 Stephen Kent (as SECDIR), Murray Kucherawy (as AD), Warren Kumari (as 1092 OPSDIR), Watson Ladd (as SECDIR), Torsten Lodderstedt (yes.com), Jim 1093 Manico, Axel Nennker (Deutsche Telecom), Hannes Tschofenig (ARM), 1094 James H. Manger (Telstra), Kathleen Moriarty (as AD), John Panzer 1095 (Google), Francesca Palombini (as AD), David Recordon (Facebook), 1096 Marius Scurtescu (Google), Luke Shepard (Facebook), Filip Skokan 1097 (Auth0), Eric Vyncke (as AD), and Robert Wilton (as AD). 1099 The following people contributed to creating this document through 1100 the OpenID Connect Core 1.0 [OpenID.Core]. 1102 Brian Campbell (Ping Identity), George Fletcher (AOL), Ryo Itou 1103 (Mixi), Edmund Jay (Illumila), Breno de Medeiros (Google), Hideki 1104 Nara (TACT), Justin Richer (MITRE). 1106 13. Revision History 1108 Note to the RFC Editor: Please remove this section from the final 1109 RFC. 1111 -33 1113 o Addressed IESG comments prior to 8-Apr-21 telechat. Thanks to 1114 Martin Duke, Lars Eggert, Benjamin Kaduk, Francesca Palombini, and 1115 Eric Vyncke for their reviews. 1117 -32 1119 o Removed outdated JSON reference. 1121 -31 1122 o Addressed SecDir review comments by Watson Ladd. 1124 -30 1126 o Changed the MIME Type from "oauth.authz.req+jwt" to "oauth-authz- 1127 req+jwt", per advice from the designated experts. 1129 -29 1131 o Uniformly use the Change Controller "IETF". 1133 -28 1135 o Removed unused references, as suggested by Roman Danyliw. 1137 -27 1139 o Edits by Mike Jones to address IESG and working group review 1140 comments, including: 1142 o Added Security Considerations text saying not to use the Client ID 1143 as the "sub" value to prevent Cross-JWT Confusion. 1145 o Added Security Considerations text about using explicit typing to 1146 prevent Cross-JWT Confusion. 1148 o Addressed Eric Vyncke's review comments. 1150 o Addressed Robert Wilton's review comments. 1152 o Addressed Murray Kucherawy's review comments. 1154 o Addressed Benjamin Kaduk's review comments. 1156 o Applied spelling and grammar corrections. 1158 -20 1160 o BK comments 1162 o Section 3 Removed WAP 1164 o Section 4. Clarified authorization request object parameters, 1165 removed extension parameters from examples 1167 o Section 4. Specifies application/oauth.authz.req+jwt as mime-type 1168 fore request objects 1170 o Section 5.2.1 Added reference to Capability URLs 1172 o Section 5.2.3. Added entropy fragment to example request 1174 o Section 8. Replaced "subjectAltName dnsName" with "DNS-ID" 1176 o Section 9. Registers authorization request parameters in JWT 1177 Claims Registry. 1179 o Section 9. Registers application/oauth.authz.req in IANA mime- 1180 types registry 1182 o Section 10.1. Clarified encrypted request objects are "signed 1183 then encrypted" to maintain consistency 1185 o Section 10.2. Clarifies trust between AS and TFP 1187 o Section 10.3. Clarified endpoints subject to the practice 1189 o Section 10.4 Replaced "redirect_uri" to "request_uri" 1191 o Section 10.4. Added reference to RFC 3986 for risks 1193 o Section 10.4.1.d Deleted "do" to maintain grammar flow 1195 o Section 10.4.1, 10.4.2 Replaced "application/jose" to 1196 "application/jwt" 1198 o Section 12.1. Extended description for submitting authorization 1199 request to TFP to obtain request object 1201 o Section 12.2.2. Replaced per-user Request Object URI with static 1202 per-user Request URIs 1204 o Section 13. Combined OAuth WG contributors together 1206 o Section Whole doc Replaced application/jwt with application/ 1207 oauth.authz.req+jwt 1209 -19 1211 o AD comments 1213 o Section 5.2.1. s/Requiest URI/Request URI/ 1215 o Section 8 s/[BCP195] ./[BCP195]./ 1217 o Section 10.3. s/sited/cited/ 1218 o Section 11. Typo. s/Curent/Current/ 1220 -17 1222 o #78 Typos in content-type 1224 -16 1226 o Treated remaining Ben Campbell comments. 1228 -15 1230 o Removed further duplication 1232 -14 1234 o #71 Reiterate dynamic params are included. 1236 o #70 Made clear that AS must return error. 1238 o #69 Inconsistency of the need to sign. 1240 o Fixed Mimetype. 1242 o #67 Inconsistence in requiring HTTPS in request URI. 1244 o #66 Dropped ISO 29100 reference. 1246 o #25 Removed Encrypt only option. 1248 o #59 Same with #25. 1250 -13 1252 o add TLS Security Consideration section 1254 o replace RFC7525 reference with BCP195 1256 o moved front tag in FETT reference to fix XML structure 1258 o changes reference from SoK to FETT 1260 -12 1262 o fixes #62 - Alexey Melnikov Discuss 1264 o fixes #48 - OPSDIR Review : General - delete semicolons after list 1265 items 1267 o fixes #58 - DP Comments for the Last Call 1269 o fixes #57 - GENART - Remove "non-normative ... " from examples. 1271 o fixes #45 - OPSDIR Review : Introduction - are attacks discovered 1272 or already opened 1274 o fixes #49 - OPSDIR Review : Introduction - Inconsistent colons 1275 after initial sentence of list items. 1277 o fixes #53 - OPSDIR Review : 6.2 JWS Signed Request Object - 1278 Clarify JOSE Header 1280 o fixes #42 - OPSDIR Review : Introduction - readability of 'and' is 1281 confusing 1283 o fixes #50 - OPSDIR Review : Section 4 Request Object - Clarify 1284 'signed, encrypted, or signed and encrypted' 1286 o fixes #39 - OPSDIR Review : Abstract - Explain/Clarify JWS and JWE 1288 o fixed #50 - OPSDIR Review : Section 4 Request Object - Clarify 1289 'signed, encrypted, or signed and encrypted' 1291 o fixes #43 - OPSDIR Review : Introduction - 'properties' sounds 1292 awkward and are not exactly 'properties' 1294 o fixes #56 - OPSDIR Review : 12 Acknowledgements - 'contribution 1295 is' => 'contribution are' 1297 o fixes #55 - OPSDIR Review : 11.2.2 Privacy Considerations - ' It 1298 is in a way' => 'In a way, it is' 1300 o fixes #54 - OPSDIR Review : 11 Privacy Considerations - 'and not 1301 specific' => 'and are not specific' 1303 o fixes #51 - OPSDIR Review : Section 4 Request Object - 'It is 1304 fine' => 'It is recommended' 1306 o fixes #47 - OPSDIR Review : Introduction - 'over- the- wire' => 1307 'over-the-wire' 1309 o fixes #46 - OPSDIR Review : Introduction - 'It allows' => 'The use 1310 of application security' for 1312 o fixes #44 - OPSDIR Review : Introduction - 'has' => 'have' 1313 o fixes #41 - OPSDIR Review : Introduction - missing 'is' before 1314 'typically sent' 1316 o fixes #38 - OPSDIR Review : Section 11 - Delete 'freely 1317 accessible' regarding ISO 29100 1319 -11 1321 o s/bing/being/ 1323 o Added history for -10 1325 -10 1327 o #20: KM1 -- some wording that is awkward in the TLS section. 1329 o #21: KM2 - the additional attacks against OAuth 2.0 should also 1330 have a pointer 1332 o #22: KM3 -- Nit: in the first line of 10.4: 1334 o #23: KM4 -- Mention RFC6973 in Section 11 in addition to ISO 29100 1336 o #24: SECDIR review: Section 4 -- Confusing requirements for 1337 sign+encrypt 1339 o #25: SECDIR review: Section 6 -- authentication and integrity need 1340 not be provided if the requestor encrypts the token? 1342 o #26: SECDIR Review: Section 10 -- why no reference for JWS 1343 algorithms? 1345 o #27: SECDIR Review: Section 10.2 - how to do the agreement between 1346 client and server "a priori"? 1348 o #28: SECDIR Review: Section 10.3 - Indication on "large entropy" 1349 and "short lifetime" should be indicated 1351 o #29: SECDIR Review: Section 10.3 - Typo 1353 o #30: SECDIR Review: Section 10.4 - typos and missing articles 1355 o #31: SECDIR Review: Section 10.4 - Clearer statement on the lack 1356 of endpoint identifiers needed 1358 o #32: SECDIR Review: Section 11 - ISO29100 needs to be moved to 1359 normative reference 1361 o #33: SECDIR Review: Section 11 - Better English and Entropy 1362 language needed 1364 o #34: Section 4: Typo 1366 o #35: More Acknowledgment 1368 o #36: DP - More precise qualification on Encryption needed. 1370 -09 1372 o Minor Editorial Nits. 1374 o Section 10.4 added. 1376 o Explicit reference to Security consideration (10.2) added in 1377 section 5 and section 5.2. 1379 o , (add yourself) removed from the acknowledgment. 1381 -08 1383 o Applied changes proposed by Hannes on 2016-06-29 on IETF OAuth 1384 list recorded as https://bitbucket.org/Nat/oauth-jwsreq/ 1385 issues/12/. 1387 o TLS requirements added. 1389 o Security Consideration reinforced. 1391 o Privacy Consideration added. 1393 o Introduction improved. 1395 -07 1397 o Changed the abbrev to OAuth JAR from oauth-jar. 1399 o Clarified sig and enc methods. 1401 o Better English. 1403 o Removed claims from one of the example. 1405 o Re-worded the URI construction. 1407 o Changed the example to use request instead of request_uri. 1409 o Clarified that Request Object parameters take precedence 1410 regardless of request or request_uri parameters were used. 1412 o Generalized the language in 4.2.1 to convey the intent more 1413 clearly. 1415 o Changed "Server" to "Authorization Server" as a clarification. 1417 o Stopped talking about request_object_signing_alg. 1419 o IANA considerations now reflect the current status. 1421 o Added Brian Campbell to the contributors list. Made the lists 1422 alphabetic order based on the last names. Clarified that the 1423 affiliation is at the time of the contribution. 1425 o Added "older versions of " to the reference to IE URI length 1426 limitations. 1428 o Stopped talking about signed or unsigned JWS etc. 1430 o 1.Introduction improved. 1432 -06 1434 o Added explanation on the 512 chars URL restriction. 1436 o Updated Acknowledgements. 1438 -05 1440 o More alignment with OpenID Connect. 1442 -04 1444 o Fixed typos in examples. (request_url -> request_uri, cliend_id -> 1445 client_id) 1447 o Aligned the error messages with the OAuth IANA registry. 1449 o Added another rationale for having request object. 1451 -03 1453 o Fixed the non-normative description about the advantage of static 1454 signature. 1456 o Changed the requirement for the parameter values in the request 1457 itself and the request object from 'MUST MATCH" to 'Req Obj takes 1458 precedence. 1460 -02 1462 o Now that they are RFCs, replaced JWS, JWE, etc. with RFC numbers. 1464 -01 1466 o Copy Edits. 1468 14. References 1470 14.1. Normative References 1472 [BCP195] Sheffer, Y., Holz, R., and P. Saint-Andre, 1473 "Recommendations for Secure Use of Transport Layer 1474 Security (TLS) and Datagram Transport Layer Security 1475 (DTLS)", BCP 195, RFC 7525, May 2015. 1477 [IANA.MediaTypes] 1478 IANA, "Media Types", 1479 . 1481 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1482 Requirement Levels", BCP 14, RFC 2119, 1483 DOI 10.17487/RFC2119, March 1997, 1484 . 1486 [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 1487 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 1488 2003, . 1490 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1491 Resource Identifier (URI): Generic Syntax", STD 66, 1492 RFC 3986, DOI 10.17487/RFC3986, January 2005, 1493 . 1495 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 1496 Verification of Domain-Based Application Service Identity 1497 within Internet Public Key Infrastructure Using X.509 1498 (PKIX) Certificates in the Context of Transport Layer 1499 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 1500 2011, . 1502 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 1503 RFC 6749, DOI 10.17487/RFC6749, October 2012, 1504 . 1506 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 1507 Framework: Bearer Token Usage", RFC 6750, 1508 DOI 10.17487/RFC6750, October 2012, 1509 . 1511 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 1512 Protocol (HTTP/1.1): Message Syntax and Routing", 1513 RFC 7230, DOI 10.17487/RFC7230, June 2014, 1514 . 1516 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 1517 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 1518 2015, . 1520 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 1521 RFC 7516, DOI 10.17487/RFC7516, May 2015, 1522 . 1524 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 1525 DOI 10.17487/RFC7518, May 2015, 1526 . 1528 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 1529 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 1530 . 1532 [RFC8141] Saint-Andre, P. and J. Klensin, "Uniform Resource Names 1533 (URNs)", RFC 8141, DOI 10.17487/RFC8141, April 2017, 1534 . 1536 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1537 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1538 May 2017, . 1540 [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data 1541 Interchange Format", STD 90, RFC 8259, 1542 DOI 10.17487/RFC8259, December 2017, 1543 . 1545 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 1546 Authorization Server Metadata", RFC 8414, 1547 DOI 10.17487/RFC8414, June 2018, 1548 . 1550 14.2. Informative References 1552 [BASIN] Basin, D., Cremers, C., and S. Meier, "Provably Repairing 1553 the ISO/IEC 9798 Standard for Entity Authentication", 1554 Journal of Computer Security - Security and Trust 1555 Principles Volume 21 Issue 6, Pages 817-846, November 1556 2013, 1557 . 1560 [CapURLs] Tennison, J., "Good Practices for Capability URLs", 1561 W3C Working Draft, February 2014, 1562 . 1564 [IANA.JWT.Claims] 1565 IANA, "JSON Web Token Claims", 1566 . 1568 [IANA.OAuth.Parameters] 1569 IANA, "OAuth Parameters", 1570 . 1572 [OpenID.Core] 1573 Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and 1574 C. Mortimore, "OpenID Connect Core 1.0", OpenID 1575 Foundation Standards, February 2014, 1576 . 1578 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 1579 Extensions (MIME) Part Two: Media Types", RFC 2046, 1580 DOI 10.17487/RFC2046, November 1996, 1581 . 1583 [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0 1584 Threat Model and Security Considerations", RFC 6819, 1585 DOI 10.17487/RFC6819, January 2013, 1586 . 1588 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 1589 Specifications and Registration Procedures", BCP 13, 1590 RFC 6838, DOI 10.17487/RFC6838, January 2013, 1591 . 1593 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1594 Morris, J., Hansen, M., and R. Smith, "Privacy 1595 Considerations for Internet Protocols", RFC 6973, 1596 DOI 10.17487/RFC6973, July 2013, 1597 . 1599 [RFC7523] Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token 1600 (JWT) Profile for OAuth 2.0 Client Authentication and 1601 Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, May 1602 2015, . 1604 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 1605 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 1606 RFC 7591, DOI 10.17487/RFC7591, July 2015, 1607 . 1609 [RFC8725] Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 1610 Current Practices", BCP 225, RFC 8725, 1611 DOI 10.17487/RFC8725, February 2020, 1612 . 1614 Authors' Addresses 1616 Nat Sakimura 1617 NAT.Consulting 1618 2-22-17 Naka 1619 Kunitachi, Tokyo 186-0004 1620 Japan 1622 Phone: +81-42-580-7401 1623 Email: nat@nat.consulting 1624 URI: http://nat.sakimura.org/ 1626 John Bradley 1627 Yubico 1628 Casilla 177, Sucursal Talagante 1629 Talagante, RM 1630 Chile 1632 Phone: +1.202.630.5272 1633 Email: ve7jtb@ve7jtb.com 1634 URI: http://www.thread-safe.com/ 1636 Michael B. Jones 1637 Microsoft 1638 One Microsoft Way 1639 Redmond, Washington 98052 1640 United States of America 1642 Email: mbj@microsoft.com 1643 URI: https://self-issued.info/