idnits 2.17.1 draft-ietf-oauth-token-exchange-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (February 23, 2015) is 3348 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 OAuth Working Group M. Jones 3 Internet-Draft A. Nadalin 4 Intended status: Standards Track Microsoft 5 Expires: August 27, 2015 February 23, 2015 7 OAuth 2.0 Token Exchange 8 draft-ietf-oauth-token-exchange-01 10 Abstract 12 This specification defines how to request and obtain Security Tokens 13 from OAuth Authorization Servers, including enabling one party to act 14 on behalf of another or enabling one party to delegate authority to 15 another. 17 Status of this Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at http://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on August 27, 2015. 34 Copyright Notice 36 Copyright (c) 2015 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. Code Components extracted from this document must 45 include Simplified BSD License text as described in Section 4.e of 46 the Trust Legal Provisions and are provided without warranty as 47 described in the Simplified BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 1.1. Requirements Notation and Conventions . . . . . . . . . . 3 53 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 1.3. On-Behalf-Of vs. Impersonation Semantics . . . . . . . . . 3 55 2. Security Token Request . . . . . . . . . . . . . . . . . . . . 4 56 2.1. Act-As Security Token Requests . . . . . . . . . . . . . . 5 57 2.2. On-Behalf-Of Security Token Requests . . . . . . . . . . . 6 58 3. Security Token Response . . . . . . . . . . . . . . . . . . . 6 59 4. Conveying Eligibility to Act As Another Party . . . . . . . . 7 60 5. Implementation Considerations . . . . . . . . . . . . . . . . 8 61 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 62 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 63 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 64 8.1. Normative References . . . . . . . . . . . . . . . . . . . 8 65 8.2. Informative References . . . . . . . . . . . . . . . . . . 8 66 Appendix A. Open Issues . . . . . . . . . . . . . . . . . . . . . 9 67 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 9 68 Appendix C. Document History . . . . . . . . . . . . . . . . . . 9 69 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 10 71 1. Introduction 73 This specification defines how to request and obtain Security Tokens 74 from OAuth Authorization Servers [RFC6749], including enabling one 75 party to act on behalf of another or enabling one party to delegate 76 authority to another. The functionality defined and the terminology 77 used in this specification are intentionally parallel to the 78 functionality and terminology defined by [WS-Trust], including On- 79 Behalf-Of and Act-As. 81 A Security Token is a set of information that facilitates the sharing 82 of identity and security information across security domains. 83 Examples of Security Tokens include JSON Web Tokens (JWTs) [JWT] and 84 SAML Assertions [OASIS.saml-core-2.0-os]. Security Tokens are 85 typically signed to achieve integrity and sometimes also encrypted to 86 achieve confidentiality. Security Tokens are also described as 87 Assertions in [I-D.ietf-oauth-assertions]. 89 This specification defines a new Security Token Request Grant Type 90 used at the Token Endpoint to convey the parameters for a Security 91 Token request and Security Token response parameter used in responses 92 to these requests. The Security Token Request is a JSON Web Token 93 (JWT) [JWT] that is issued by the requesting party that contains 94 parameters of the request as Claims. 96 The Security Tokens obtained could be used in a number of contexts, 97 the specifics of which are beyond the scope of this specification. 98 Examples include using them with the 100 1.1. Requirements Notation and Conventions 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 104 document are to be interpreted as described in RFC 2119 [RFC2119]. 106 1.2. Terminology 108 This specification uses the terms "Authorization Server" "Token 109 Endpoint", "Token Request", and "Token Response" defined by OAuth 2.0 110 [RFC6749], and the terms "Claim" and "JWT Claims Set" defined by JSON 111 Web Token (JWT) [JWT]. 113 1.3. On-Behalf-Of vs. Impersonation Semantics 115 When principal A acts on behalf of principal B, A is given all the 116 rights that B has within some defined rights context. Whereas, with 117 on-behalf-of semantics, principal A still has its own identity 118 separate from B and it is explicitly understood that while B may have 119 delegated its rights to A, any actions taken are being taken by A and 120 not B. In a sense, A is an agent for B. 122 On-behalf-of semantics are therefore different than impersonation 123 semantics, with which it is sometimes confused. When principal A 124 impersonates principal B, then in so far as any entity receiving 125 Claims is concerned, they are actually dealing with B. It is true 126 that some members of the identity system might have awareness that 127 impersonation is going on but it is not a requirement. For all 128 intents and purposes, when A is acting for B, A is B. 130 2. Security Token Request 132 A Security Token Request is sent to the Token Endpoint as a Token 133 Request message using this Grant Type value: 135 urn:ietf:params:oauth:grant-type:security-token-request 136 Grant Type value indicating that this Token Request is a Security 137 Token Request. 139 A Token Request parameter with a related name is used to convey the 140 information contained in Security Token Request as a JWT: 142 security_token_request 143 Token Request parameter whose value is a JWT containing the 144 Security Token Request information. 146 An example Security Token Request (with extra line breaks for display 147 purposes only) follows: 149 POST /token HTTP/1.1 150 Host: server.example.com 151 Content-Type: application/x-www-form-urlencoded 153 grant_type=urn:ietf:params:oauth:grant-type:security-token-request 154 &security_token_request=eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ ... 155 [omitted for brevity] 157 The "security_token_request" parameter value is a JWT with the 158 following members: 160 iss 161 REQUIRED. Issuer of the principal requesting the Security Token. 163 sub 164 REQUIRED. Identifier of the principal requesting the Security 165 Token at the issuer. 167 security_token_type 168 OPTIONAL. Identifier for the type of the requested Security 169 Token. If not present, the default is that a JWT is being 170 requested. A JWT can also be requested with the identifier 171 "urn:ietf:params:oauth:token-type:jwt". 173 scopes 174 OPTIONAL. Array of strings, each of which represents a service 175 context that the requested Security Token is being requested to be 176 used for. The array MUST contain at least one scope value. The 177 definition of these contexts is outside the scope of this 178 specification. (Note: This request element serves the same 179 purpose as the WS-Trust AppliesTo RST element.) 181 The request JWT MUST be signed by the issuer so the identity of the 182 requesting party can be validated unless the identity of the 183 requesting party is known to the Authorization Server by other means; 184 in that case, the JWT can use the "alg" value "none". 186 The following is an example of a JWT Claims Set for a Security Token 187 Request: 189 { 190 "iss": "https://server.example.com", 191 "sub": "24400320", 192 "scopes": ["example"] 193 } 195 2.1. Act-As Security Token Requests 197 This specification defines the ability to request a Security Token 198 for the requesting party to use to act as the specified party. This 199 is accomplished using this Token Request parameter: 201 act_as 202 This OPTIONAL request parameter indicates that the requested 203 Security Token is expected to contain information about the 204 identity represented by the Security Token that is the value of 205 this parameter, enabling the requesting party to use the returned 206 Security Token to act as this identity. 208 The following is an example of a JWT Claims Set for a Security Token 209 Request using an "act_as" Claim: 211 { 212 "iss": "https://server.example.com", 213 "sub": "24400320", 214 "scopes": ["example"], 215 "act_as": "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ ..." 216 } 218 2.2. On-Behalf-Of Security Token Requests 220 This specification defines the ability to request a Security Token on 221 behalf of another party. This is accomplished using this Token 222 Request parameter: 224 on_behalf_of 225 This OPTIONAL request parameter indicates that the Security Token 226 is being requested on behalf of another party. The identity of 227 the party upon whose behalf the request is being made is 228 represented by the Security Token that is the value of this 229 parameter. Proof of eligibility to act on behalf of that identity 230 MAY be conveyed by including an "actor" Claim identifying the 231 requesting party in the Security Token, per Section 4, provided 232 the Security Token is a JWT. 234 The following is an example of a JWT Claims Set for a Security Token 235 Request using an "on_behalf_of" Claim: 237 { 238 "iss": "https://server.example.com", 239 "sub": "24400320", 240 "scopes": ["example"], 241 "on_behalf_of": "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ ..." 242 } 244 3. Security Token Response 246 A Security Token Response is returned from the Token Endpoint as a 247 Token Response message containing these members: 249 security_token 250 Returned Security Token. 252 security_token_type 253 Identifier for the type of the returned Security Token. If the 254 Security Token is a JWT, this identifier is 255 "urn:ietf:params:oauth:token-type:jwt". 257 An example successful response is as follows: 259 HTTP/1.1 200 OK 260 Content-Type: application/json;charset=UTF-8 261 Cache-Control: no-store 262 Pragma: no-cache 264 { 265 "security_token": "eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJ ...", 266 "security_token_type": "urn:ietf:params:oauth:token-type:jwt" 267 } 269 4. Conveying Eligibility to Act As Another Party 271 It is useful to be able to make a statement that one party is 272 authorized to act on behalf of another party. This can be done by 273 having the party being acted for issue a Security Token containing a 274 Claim identifying the party that will act for it as an authorized 275 actor. This statement can also optionally identify scopes in which 276 the actor is eligible to act through another Claim. The following 277 Claims are defined for use in JWTs for these purposes: 279 actor 280 Security Token that identifies a party who is asserted as being 281 eligible to act for the party identified by the JWT containing 282 this Claim. 284 scopes 285 OPTIONAL. Array of strings, each of which represents a service 286 context for which the actor is asserted as being eligible to act 287 for the party identified by the JWT containing this Claim. The 288 array MUST contain at least one scope value. The definition of 289 these contexts is outside the scope of this specification. 291 The JWT issued by the party being acted for MUST be signed so the 292 identity of the party being acted for can be validated unless the 293 identity of the party being acted for is known to the Authorization 294 Server by other means; in that case, the JWT can use the "alg" value 295 "none". 297 5. Implementation Considerations 299 Implementations of the specification MUST implement support for using 300 JWTs as the Security Tokens. Other Security Token types MAY be 301 supported. 303 6. IANA Considerations 305 The "urn:ietf:params:oauth:grant-type:security-token-request" Grant 306 Type is to be registered in the IANA urn:ietf:params:oauth registry 307 established in An IETF URN Sub-Namespace for OAuth [RFC6755]. 309 The "scopes", "act_as", and "on_behalf_of" Claims are to be 310 registered in the JSON Web Token Claims registry. 312 7. Security Considerations 314 All of the normal security issues, especially in relationship to 315 comparing URIs and dealing with unrecognized values, that are 316 discussed in JWT [JWT] also apply here. 318 In addition, on-behalf-of introduces its own unique security issues. 319 Any time one principal is delegated the rights of another principal, 320 the potential for abuse is always a concern. That is why use of the 321 "scopes" member is suggested. The scope values restrict the contexts 322 in which the delegated rights can be exercised. 324 8. References 326 8.1. Normative References 328 [JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 329 (JWT)", draft-ietf-oauth-json-web-token (work in 330 progress), January 2015. 332 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 333 Requirement Levels", BCP 14, RFC 2119, March 1997. 335 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", 336 RFC 6749, October 2012. 338 8.2. Informative References 340 [I-D.ietf-oauth-assertions] 341 Campbell, B., Mortimore, C., Jones, M., and Y. Goland, 342 "Assertion Framework for OAuth 2.0 Client Authentication 343 and Authorization Grants", draft-ietf-oauth-assertions 344 (work in progress), October 2014. 346 [OASIS.saml-core-2.0-os] 347 Cantor, S., Kemp, J., Philpott, R., and E. Maler, 348 "Assertions and Protocol for the OASIS Security Assertion 349 Markup Language (SAML) V2.0", OASIS Standard saml-core- 350 2.0-os, March 2005. 352 [RFC6755] Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace 353 for OAuth", RFC 6755, October 2012. 355 [WS-Trust] 356 Nadalin, A., Goodner, M., Gudgin, M., Barbir, A., and H. 357 Granqvist, "WS-Trust 1.4", February 2012, . 360 Appendix A. Open Issues 362 The following decisions need to be made and updates on this spec 363 performed: 365 o Should we say anything about proof of possession of the target 366 party's key in the On-Behalf-Of case beyond specifying the use of 367 the "actor" Claim? 369 o Revise the text in the On-Behalf-Of vs. Impersonation Semantics 370 section to better align the terminology used with the semantics 371 specified. 373 o Address the sources of potential terminological confusion 374 discussed in John Bradley's review comments. 376 o Add examples illustrating concrete uses of act-as and 377 on-behalf-of. 379 Appendix B. Acknowledgements 381 The authors wish to thank Brian Campbell and John Bradley for reviews 382 of the specification. 384 Appendix C. Document History 386 [[ to be removed by the RFC Editor before publication as an RFC ]] 387 -01 389 o Updated references. 391 -00 393 o Created initial working group draft from 394 draft-jones-oauth-token-exchange-01. 396 Authors' Addresses 398 Michael B. Jones 399 Microsoft 401 Email: mbj@microsoft.com 402 URI: http://self-issued.info/ 404 Anthony Nadalin 405 Microsoft 407 Email: tonynad@microsoft.com