idnits 2.17.1 draft-sakimura-oauth-requrl-05.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 is 1 instance of too long lines in the document, the longest one being 5 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 4, 2014) is 3555 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'FIPS180-2' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWA' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWE' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWS' -- Possible downref: Non-RFC (?) normative reference: ref. 'JWT' ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 6819 Summary: 4 errors (**), 0 flaws (~~), 1 warning (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force N. Sakimura, Ed. 3 Internet-Draft Nomura Research Institute 4 Intended status: Standards Track J. Bradley 5 Expires: January 5, 2015 Ping Identity 6 July 4, 2014 8 Request by JWS ver.1.0 for OAuth 2.0 9 draft-sakimura-oauth-requrl-05 11 Abstract 13 The authorization request in OAuth 2.0 utilizes query parameter 14 serizalization. This specification defines the authorization request 15 using JWT serialization. The request is sent thorugh "request" 16 parameter or by reference through "request_uri" parameter that points 17 to the JWT, allowing the request to be optionally signed and 18 encrypted. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on January 5, 2015. 37 Copyright Notice 39 Copyright (c) 2014 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 56 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2.1. Request Object . . . . . . . . . . . . . . . . . . . . . 3 58 2.2. Request Object URI . . . . . . . . . . . . . . . . . . . 3 59 3. Request Object . . . . . . . . . . . . . . . . . . . . . . . 4 60 4. Request Object URI . . . . . . . . . . . . . . . . . . . . . 5 61 5. Authorization Request . . . . . . . . . . . . . . . . . . . . 6 62 6. Authorization Server Response . . . . . . . . . . . . . . . . 7 63 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . 7 64 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 65 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 66 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 67 10.1. Normative References . . . . . . . . . . . . . . . . . . 8 68 10.2. Informative References . . . . . . . . . . . . . . . . . 9 69 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 71 1. Introduction 73 The parameters "request" and "request_uri" are introduced as 74 additional authorization request parameters for the OAuth 2.0 75 [RFC6749] flows. The "request" parameter is a JSON Web Token (JWT) 76 [JWT] whose body holds the JSON encoded OAuth 2.0 authorization 77 request parameters. The [JWT] can be passed to the authorization 78 endpoint by reference, in which case the parameter "request_uri" is 79 used instead of the "request". 81 Using [JWT] as the request encoding instead of query parameters has 82 several advantages: 84 1. The request may be signed so that integrity check may be 85 implemented. If a suitable algorithm is used for the signing, 86 then non-repudiation property may be obtained in addition. 88 2. The request may be encrypted so that end-to-end confidentiality 89 may be obtained even if in the case TLS connection is terminated 90 at a gateway or a similar device. 92 There are a few cases that request by reference is useful such as: 94 1. When it is detected that the User Agent does not suport long 95 URLs: It is entirely possible that some extensions may extend the 96 URL. For example, the client might want to send a public key 97 with the request. 99 2. Static signature: The client may make a signed Request Object and 100 put it on the client. This may just be done by a client utility 101 or other process, so that the private key does not have to reside 102 on the client, simplifying programming. 104 3. When the server wants the requests to be cacheable: The 105 request_uri may include a sha256 hash of the file, as defined in 106 FIPS180-2 [FIPS180-2], the server knows if the file has changed 107 without fetching it, so it does not have to re-fetch a same file, 108 which is a win as well. 110 4. When the client wants to simplify the implementation without 111 compromising the security. If the request parameters go through 112 the Browser, they may be tampered in the browser even if TLS was 113 used. This implies we need to have signature on the request as 114 well. However, if HTTPS "request_uri" was used, it is not going 115 to be tampered, thus we now do not have to sign the request. 116 This simplifies the implementation. 118 This capability is in use by OpenID Connect. 120 1.1. Requirements Language 122 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 123 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 124 document are to be interpreted as described in RFC 2119 [RFC2119]. 126 2. Terminology 128 For the purposes of this specification, the following terms and 129 definitions apply. 131 2.1. Request Object 133 JWT [JWT] that holds OAuth 2.0 authorization requests as JSON object 134 in its body 136 2.2. Request Object URI 138 absolute URI from which the Request Object (Section 2.1) can be 139 obtained 141 3. Request Object 143 A Request Object (Section 2.1) is used to provide authorization 144 request parameters for OAuth 2.0 authorization request. It contains 145 OAuth 2.0 [RFC6749] authorization request parameters including 146 extension parameters. It is a JSON Web Signature (JWS) [JWS] signed 147 JWT [JWT] . The parameters are included as the top level members of 148 JSON [RFC4627]. Parameter names and string values MUST be included 149 as JSON strings. Numerical values MUST be included as JSON numbers. 150 It MAY include any extension parameters. This JSON [RFC4627] 151 constitues the body of the [JWT]. 153 The Request Object MAY be signed or unsigned (plaintext). When it is 154 plaintext, this is indicated by use of the "none" algorithm [JWA] in 155 the JWS header. If signed, the Authorization Request Object SHOULD 156 contain the Claims "iss" (issuer) and "aud" (audience) as members, 157 with their semantics being the same as defined in the JWT [JWT] 158 specification. 160 The Request Object MAY also be encrypted using JWE [JWE] after 161 signing, with nesting performed in the same manner as specified for 162 JWTs [JWT]. The Authorization Request Object MAY alternatively be 163 sent by reference using "request_uri" parameter. 165 REQUIRED OAuth 2.0 Authorization Request parameters that are not 166 included in the Request Object MUST be sent as a query parameter. If 167 a required parameter is not present in neither the query parameter or 168 the Request Object, it forms a malformed request. 170 If the parameter exists both in the query string and the 171 Authorization Request Object, they MUST exactly match. 173 Following is the example of the JSON which consitutes the body of the 174 [JWT]. 176 { 177 "redirect_url":"https://example.com/rp/endpoint_url", 178 "cliend_id":"http://example.com/rp/" 179 } 181 The following is a non-normative example of a [JWT] encoded 182 authorization request object. It includes extension variables such 183 as "nonce", "userinfo", and "id_token". Note that the line wraps 184 within the values are for display purpose only: 186 JWT algorithm = HS256 187 HMAC HASH Key = 'aaa' 189 JSON Encoded Header = "{"alg":"HS256","typ":"JWT"}" 190 JSON Encoded Payload = "{"response_type":"code id_token", 191 "client_id":"s6BhdRkqt3", 192 "redirect_uri":"https://client.example.com/cb", 193 "scope":"openid profile", 194 "state":"af0ifjsldkj", 195 "nonce":"n-0S6_WzA2Mj", 196 "userinfo":{"claims":{"name":null,"nickname":{"optional":true}, 197 "email":null,"verified":null, 198 "picture":{"optional":true}},"format":"signed"}, 199 "id_token":{"max_age":86400,"iso29115":"2"}}" 201 JWT = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyZXNwb25zZV90eXBlIjoiY29kZ 202 SBpZF90b2tlbiIsImNsaWVudF9pZCI6InM2QmhkUmtxdDMiLCJyZWRpcmVjdF91cmkiO 203 iJodHRwczpcL1wvY2xpZW50LmV4YW1wbGUuY29tXC9jYiIsInNjb3BlIjoib3BlbmlkI 204 HByb2ZpbGUiLCJzdGF0ZSI6ImFmMGlmanNsZGtqIiwidXNlcmluZm8iOnsiY2xhaW1zI 205 jp7Im5hbWUiOm51bGwsIm5pY2tuYW1lIjp7Im9wdGlvbmFsIjp0cnVlfSwiZW1haWwiO 206 m51bGwsInZlcmlmaWVkIjpudWxsLCJwaWN0dXJlIjp7Im9wdGlvbmFsIjp0cnVlfX0sI 207 mZvcm1hdCI6InNpZ25lZCJ9LCJpZF90b2tlbiI6eyJtYXhfYWdlIjo4NjQwMCwiaXNvM 208 jkxMTUiOiIyIn19.2OiqRgrbrHkA1FZ5p_7bc_RSdTbH-wo_Agk-ZRpD3wY 210 4. Request Object URI 212 Instead of sending the Request Object in a OAuth 2.0 authorization 213 request directly, this specification allows it to be obtained from 214 the Request Object URI. Using this method has an advantage of 215 reducing the request size, enabling the caching of the Request 216 Object, and generally not requiring integrity protection through a 217 cryptographic operation on the Request Object if the channel itself 218 is protected. 220 The Request Object URI is sent as a part of the OAuth Authorization 221 Request as the value for the parameter called "request_uri". How the 222 Request Object is registered at Request Object URI is out of scope of 223 this specification, but it MUST be done in a protected channel. 225 NOTE: the Request Object MAY be registered at the Authorization 226 Server at the client registration time. 228 When the Authorization Server obtains the Request Object from Request 229 Object URI, it MUST do so over a protected channel. If it is 230 obtained from a remote server, it SHOULD use either HTTP over TLS 1.2 231 as defined in RFC5246 [RFC5246] AND/OR [JWS] with the algorithm 232 considered appropriate at the time. 234 When sending the request by "request_uri", the client MAY provide the 235 sha256 hash as defined in FIPS180-2 [FIPS180-2]of the Request Object 236 as the fragment to it to assist the cache utilization decision of the 237 Authorization Server. 239 5. Authorization Request 241 The client constructs the authorization request URI by adding the 242 following parameters to the query component of the authorization 243 endpoint URI using the "application/x-www-form-urlencoded" format: 245 request REQUIRED unless "request_uri" is specified. The Request 246 Object (Section 3) that holds authorization request parameters 247 stated in the section 4 of OAuth 2.0 [RFC6749]. 249 request_uri REQUIRED unless "request" is specified. The absolute 250 URL that points to the Request Object (Section 3) that holds 251 authorization request parameters stated in the section 4 of OAuth 252 2.0 [RFC6749]. 254 state RECOMMENDED. OAuth 2.0 [RFC6749] state. 256 The client directs the resource owner to the constructed URI using an 257 HTTP redirection response, or by other means available to it via the 258 user-agent. 260 For example, the client directs the end-user's user-agent to make the 261 following HTTPS request (line breaks are for display purposes only): 263 GET /authorize?request_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 264 Host: server.example.com 266 The autorization request object MAY be signed AND/OR encrypted. 268 Upon receipt of "request_uri" in the request, the authorization 269 server MUST send a GET request to the "request_uri" to retrieve the 270 authorization request object unless it is already cached at the 271 Authorization Server. 273 If the response was signed AND/OR encrypted, it has to be decoded 274 accordingly before being processed. 276 Then, the Authorization Server MUST reconstruct the complete client 277 request from the original HTTP request and the content of the request 278 object. Then, the process continues as described in Section 3 of 279 OAuth 2.0 [RFC6749] . 281 6. Authorization Server Response 283 Authorization Server Response is created and sent to the client as in 284 Section 4 of OAuth 2.0 [RFC6749] . 286 In addition, this document defines additional 'error' values as 287 follows: 289 invalid_request_uri The provided request_uri was not available. 291 invalid_request_format The Request Object format was invalid. 293 invalid_request_params The parameter set provided in the Request 294 Object was invalid. 296 7. IANA Considerations 298 This document registers following error strings to the OAuth Error 299 Registry. 301 invalid_request_uri The provided request_uri was not available. 303 invalid_request_format The Request Object format was invalid. 305 invalid_request_params The parameter set provided in the Request 306 Object was invalid. 308 8. Security Considerations 310 In addition to the all the security considerations discussed in OAuth 311 2.0 [RFC6819], the following security considerations SHOULD be taken 312 into account. 314 When sending the authorization request object through "request" 315 parameter, it SHOULD be signed with then considered appropriate 316 algorithm using[JWS]. The "alg=none" SHOULD NOT be used in such a 317 case. 319 If the request object contains personally identifiable or sensitive 320 information, the "request_uri" MUST be of one-time use and MUST have 321 large enough entropy deemed necessary with applicable security 322 policy. For higher security requirement, using [JWE] is strongly 323 recommended. 325 9. Acknowledgements 327 Following people contributed to creating this document through the 328 OpenID Connect 1.0 [openid_ab] . 330 Breno de Medeiros (Google), Hideki Nara (TACT), John Bradley (Ping 331 Identity) , Nat Sakimura (NRI) , Ryo Itou 332 (Yahoo! Japan), George Fletcher (AOL), Justin Richer (Mitre), Edmund 333 Jay (MGI1), (add yourself). 335 In addition following people contributed to this and previous 336 versions through The OAuth Working Group. 338 David Recordon (Facebook), Luke Shepard (Facebook), James H. Manger 339 (Telstra), Marius Scurtescu (Google), John Panzer (Google), Dirk 340 Balfanz (Google), (add yourself). 342 10. References 344 10.1. Normative References 346 [FIPS180-2] 347 U.S. Department of Commerce and National Institute of 348 Standards and Technology, "Secure Hash Signature 349 Standard", FIPS 180-2, August 2002. 351 Defines Secure Hash Algorithm 256 (SHA256) 353 [JWA] Jones, M., "JSON Web Algorithms (JWA)", March 2011. 355 [JWE] Jones, M., "JSON Web Encryption (JWE)", March 2011. 357 [JWS] Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, 358 J., Sakimura, N., and P. Tarjan, "JSON Web Signature 359 (JWS)", April 2011. 361 [JWT] Jones, M., Balfanz, D., Bradley, J., Goland, Y., Panzer, 362 J., Sakimura, N., and P. Tarjan, "JSON Web Token", July 363 2011. 365 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 366 Requirement Levels", BCP 14, RFC 2119, March 1997. 368 [RFC4627] Crockford, D., "The application/json Media Type for 369 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 371 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 372 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 374 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 375 6749, October 2012. 377 [RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0 378 Threat Model and Security Considerations", RFC 6819, 379 January 2013. 381 10.2. Informative References 383 [openid_ab] 384 openid-specs-ab@openid.net, , "OpenID Connect Core 1.0", 385 November 2013. 387 Authors' Addresses 389 Nat Sakimura (editor) 390 Nomura Research Institute 391 1-6-5 Marunouchi, Marunouchi Kitaguchi Bldg. 392 Chiyoda-ku, Tokyo 100-0005 393 Japan 395 Phone: +81-3-5533-2111 396 Email: n-sakimura@nri.co.jp 398 John Bradley 399 Ping Identity 401 Email: ve7jtb@ve7jtb.com