idnits 2.17.1 draft-ietf-oauth-access-token-jwt-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 3 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 14, 2020) is 1472 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) == Unused Reference: 'RFC3986' is defined on line 612, but no explicit reference was found in the text == Unused Reference: 'RFC7644' is defined on line 669, but no explicit reference was found in the text Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 OAuth Working Group V. Bertocci 3 Internet-Draft Auth0 4 Intended status: Standards Track April 14, 2020 5 Expires: October 16, 2020 7 JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens 8 draft-ietf-oauth-access-token-jwt-06 10 Abstract 12 This specification defines a profile for issuing OAuth 2.0 access 13 tokens in JSON web token (JWT) format. Authorization servers and 14 resource servers from different vendors can leverage this profile to 15 issue and consume access tokens in interoperable manner. 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 https://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 October 16, 2020. 34 Copyright Notice 36 Copyright (c) 2020 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 (https://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 . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1. Requirements Notation and Conventions . . . . . . . . . . 3 53 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 54 2. JWT Access Token Header and Data Structure . . . . . . . . . 4 55 2.1. Header . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 2.2. Data Structure . . . . . . . . . . . . . . . . . . . . . 4 57 2.2.1. Authentication Information Claims . . . . . . . . . . 5 58 2.2.2. Identity Claims . . . . . . . . . . . . . . . . . . . 5 59 2.2.3. Authorization Claims . . . . . . . . . . . . . . . . 6 60 2.2.3.1. Claims for Authorization Outside of Delegation 61 Scenarios . . . . . . . . . . . . . . . . . . . . 6 62 3. Requesting a JWT Access Token . . . . . . . . . . . . . . . . 6 63 4. Validating JWT Access Tokens . . . . . . . . . . . . . . . . 7 64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 65 6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 10 66 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 67 7.1. Media Type Registration . . . . . . . . . . . . . . . . . 11 68 7.1.1. Registry Content . . . . . . . . . . . . . . . . . . 11 69 7.2. Claims Registration . . . . . . . . . . . . . . . . . . . 12 70 7.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 12 71 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 72 8.1. Normative References . . . . . . . . . . . . . . . . . . 13 73 8.2. Informative References . . . . . . . . . . . . . . . . . 14 74 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 15 75 Appendix B. Document History . . . . . . . . . . . . . . . . . . 15 76 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 19 78 1. Introduction 80 The original OAuth 2.0 Authorization Framework [RFC6749] 81 specification does not mandate any specific format for access tokens. 82 While that remains perfectly appropriate for many important 83 scenarios, in-market use has shown that many commercial OAuth 2.0 84 implementations elected to issue access tokens using a format that 85 can be parsed and validated by resource servers directly, without 86 further authorization server involvement. The approach is 87 particularly common in topologies where the authorization server and 88 resource server are not co-located, are not run by the same entity, 89 or are otherwise separated by some boundary. At the time of writing, 90 many commercial implementations leverage the JSON Web Tokens(JWT) 91 [RFC7519] format. 93 Many vendor specific JWT access tokens share the same functional 94 layout, using JWT claims to convey the information needed to support 95 a common set of use cases: token validation, transporting 96 authorization information in forms of scopes and entitlements, 97 carrying identity information about the subject, and so on. The 98 differences are mostly confined to the claim names and syntax used to 99 represent the same entities, suggesting that interoperability could 100 be easily achieved by standardizing on a common set of claims and 101 validation rules. 103 The assumption that access tokens are associated to specific 104 information doesn't appear only in commercial implementations. 105 Various specifications in the OAuth 2.0 family (such as resource 106 indicators [RFC8707], OAuth 2.0 bearer token usage [RFC6750] and 107 others) postulate the presence in access tokens of scoping 108 mechanisms, such as an audience. The family of specifications 109 associated to introspection also indirectly suggest a fundamental set 110 of information access tokens are expected to carry or at least be 111 associated with. 113 This specification aims to provide a standardized and interoperable 114 profile as an alternative to the proprietary JWT access token layouts 115 going forward. Besides defining a common set of mandatory and 116 optional claims, the profile provides clear indications on how 117 authorization request parameters determine the content of the issued 118 JWT access token, how an authorization server can publish metadata 119 relevant to the JWT access tokens it issues, and how a resource 120 server should validate incoming JWT access tokens. 122 Finally, this specification provides security and privacy 123 considerations meant to prevent common mistakes and anti patterns 124 that are likely to occur in naive use of the JWT format to represent 125 access tokens. 127 1.1. Requirements Notation and Conventions 129 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 130 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 131 "OPTIONAL" in this document are to be interpreted as described in BCP 132 14 [RFC2119] [RFC8174] when, and only when, they appear in all 133 capitals, as shown here. 135 1.2. Terminology 137 JWT access token An OAuth 2.0 access token encoded in JWT format and 138 complying with the requirements described in this specification. 140 This specification uses the terms "access token", "refresh token", 141 "authorization server", "resource server", "authorization endpoint", 142 "authorization request", "authorization response", "token endpoint", 143 "grant type", "access token request", "access token response", and 144 "client" defined by The OAuth 2.0 Authorization Framework [RFC6749]. 146 2. JWT Access Token Header and Data Structure 148 JWT access tokens are regular JWTs complying with the requirements 149 described in this section. 151 2.1. Header 153 Although JWT access tokens can use any signing algorithm, use of 154 asymmetric algorithms is RECOMMENDED as it simplifies the process of 155 acquiring validation information for resource servers (see 156 Section 4). 158 This specification registers the "application/at+jwt" media type, 159 which can be used to indicate that the content is an access token. 160 JWT access tokens MUST include this media type in the "typ" header 161 parameter to explicitly declare that the JWT represents an access 162 token complying with this profile. Per the definition of "typ" in 163 Section 4.1.9 of [RFC7515], it is RECOMMENDED that the "application/" 164 prefix be omitted. Therefore,the "typ" value used SHOULD be 165 "at+jwt". See the security considerations section for details on the 166 importance of preventing OpenID Connect ID Tokens from being accepted 167 as access tokens by resource servers implementing this profile. 169 2.2. Data Structure 171 The following claims are used in the JWT access token data structure. 173 iss REQUIRED - as defined in section 4.1.1 of [RFC7519]. 175 exp REQUIRED - as defined in section 4.1.4 of [RFC7519]. 177 aud REQUIRED - as defined in section 4.1.3 of [RFC7519]. See 178 Section 3 for indications on how an authorization server should 179 determine the value of aud depending on the request. 181 sub REQUIRED - as defined in section 4.1.2 of [RFC7519]. In case of 182 access tokens obtained through grants where no resource owner is 183 involved, such as the client credentials grant, the value of sub 184 SHOULD correspond to an identifier the authorization server uses 185 to indicate the client application. Please see Section 5 for more 186 details on this scenario. Also, please see Section 6 for a 187 discussion about how different choices in assigning sub values can 188 impact privacy. 190 client_id REQUIRED - as defined in section 4.3 of [RFC8693]. 192 iat REQUIRED - as defined in section 4.1.6 of [RFC7519]. This claim 193 identifies the time at which the JWT access token was issued. 195 jti REQUIRED - as defined in section 4.1.7 of [RFC7519]. 197 2.2.1. Authentication Information Claims 199 The claims listed in this section reflect in the access token the 200 types and strength of authentication that the authentication server 201 enforced prior to returning the authorization response to the client. 202 Their values are fixed, and remain the same across all access tokens 203 that derive from a given authorization response, whether the access 204 token was obtained directly in the response (e.g., via the implicit 205 flow) or after one or more token exchanges (e.g., obtaining a fresh 206 access token using a refresh token, or exchanging one access token 207 for another via [RFC8693]). 209 auth_time OPTIONAL - as defined in section 2 of [OpenID.Core]. 211 acr, amr OPTIONAL - as defined in section 2 of [OpenID.Core]. 213 2.2.2. Identity Claims 215 Commercial authorization servers will often include resource owner 216 attributes directly in access tokens, so that resource servers can 217 consume them directly for authorization or other purposes without any 218 further round trips to introspection ( [RFC7662]) or userinfo ( 219 [OpenID.Core]) endpoints. This is particularly common in scenarios 220 where the client and the resource server belong to the same entity 221 and are part of the same solution, as is the case for first party 222 clients invoking their own backend API. 224 This profile does not introduce any mechanism for a client to 225 directly request the presence of specific claims in JWT access 226 tokens, as the authorization server can determine what additional 227 claims are required by a particular resource server by taking in 228 consideration the client_id of the client, the scope and the resource 229 parameters included in the request. 231 Any additional attributes whose semantics are well described by the 232 attribute's description found in section 5.1 of [OpenID.Core] SHOULD 233 be codified in JWT access tokens via the corresponding claim names in 234 that section of the OpenID Connect specification. The same holds for 235 attributes defined in [RFC7662] and other identity related 236 specifications registering claims in the JSON Web Token (JWT) IANA 237 registry introduced in [RFC7519]. 239 Authorization servers MAY return arbitrary attributes not defined in 240 any existing specification, as long as the corresponding claim names 241 are collision resistant or the access tokens are meant to be used 242 only within a private subsystem. Please refer to sections 4.2 and 243 4.3 of [RFC7519] for details. 245 Authorization servers including resource owner attributes in JWT 246 access tokens should exercise care and verify that all privacy 247 requirements are met, as discussed in Section 6. 249 2.2.3. Authorization Claims 251 If an authorization request includes a scope parameter, the 252 corresponding issued JWT access token SHOULD include a scope claim as 253 defined in section 4.2 of [RFC8693]. 255 All the individual scope strings in the scope claim MUST have meaning 256 for the resources indicated in the aud claim. Please see Section 5 257 for more considerations about the relationship between scope strings 258 and resources indicated by the aud claim. 260 2.2.3.1. Claims for Authorization Outside of Delegation Scenarios 262 Many authorization servers embed in the access tokens they issue 263 authorization attributes that go beyond the delegated scenarios 264 described by [RFC7519]. Typical examples include resource owner 265 memberships in roles and groups that are relevant to the resource 266 being accessed, entitlements assigned to the resource owner for the 267 targeted resource that the authorization server knows about, and so 268 on. 270 An authorization server wanting to include such attributes in a JWT 271 access token SHOULD use as claim types the attributes described by 272 section 4.1.2 of SCIM Core ([RFC7643]) and in particular roles, 273 groups and entitlements. As in their original definition in 274 [RFC7643] , this profile does not provide a specific vocabulary for 275 those entities. Section 7 of this document does provide entries for 276 registering the roles, groups and entitlements attributes from 277 [RFC7643] as claim types to be used in this profile. 279 3. Requesting a JWT Access Token 281 An authorization server can issue a JWT access token in response to 282 any authorization grant defined by [RFC6749] and subsequent 283 extensions meant to result in an access token. 285 If the request includes a resource parameter (as defined in 286 [RFC8707]), the resulting JWT access token aud claim SHOULD have the 287 same value as the resource parameter in the request. 289 Example request below: 291 GET /as/authorization.oauth2?response_type=code 292 &client_id=s6BhdRkqt3&state=laeb 293 &scope=openid%20profile%20reademail 294 &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 295 &resource=https%3A%2F%2Frs.example.com%2F HTTP/1.1 296 Host: authorization-server.example.com 298 Figure 1: Authorization Request with Resource and Scope Parameters 300 Once redeemed, the code obtained from the request above will result 301 in a JWT access token in the form shown below: 303 {"typ":"at+JWT","alg":"RS256","kid":"RjEwOwOA"} 304 { 305 "iss": "https://authorization-server.example.com/", 306 "sub": " 5ba552d67", 307 "aud": "https://rs.example.com/", 308 "exp": 1544645174, 309 "client_id": "s6BhdRkqt3_", 310 "scope": "openid profile reademail" 311 } 313 Figure 2: A JWT Access Token 315 The authorization server MUST NOT issue a JWT access token if the 316 authorization granted by the token would be ambiguous. See Section 5 317 for more details about common cases that might lead to ambiguity and 318 strategies an authorization server can enact to prevent them. 320 If the request does not include a resource parameter, the 321 authorization server MUST use in the aud claim a default resource 322 indicator. If a scope parameter is present in the request, the 323 authorization server SHOULD use it to infer the value of the default 324 resource indicator to be used in the aud claim. The mechanism 325 through which scopes are associated to default resource indicator 326 values is outside the scope of this specification. If the values in 327 the scope parameter refer to different default resource indicator 328 values, the authorization server SHOULD reject the request with 329 invalid_scope as described in section 4.1.2.1 of [RFC6749]. 331 4. Validating JWT Access Tokens 333 For the purpose of facilitating validation data retrieval, it is 334 RECOMMENDED that authorization servers sign JWT access tokens with an 335 asymmetric algorithm. 337 Authorization servers SHOULD implement OAuth 2.0 Authorization Server 338 Metadata [RFC8414] to advertise to resource servers its signing keys 339 via jwks_uri and what iss claim value to expect via the issuer 340 metadata value. Alternatively, authorization servers implementing 341 OpenID Connect MAY use the OpenID Connect discovery document for the 342 same purpose. If an authorization server supports both AS metadata 343 and OpenID Connect discovery, the values provided MUST be consistent 344 across the two publication methods. 346 An authorization server MAY elect to use different keys to sign 347 OpenID Connect ID Tokens and JWT access tokens. This specification 348 does not provide a mechanism for identifying a specific key as the 349 one used to sign JWT access tokens. An authorization server can sign 350 JWT access tokens with any of the keys advertised via AS metadata or 351 OpenID Connect discovery. Please see section Section 5 for further 352 guidance on security implications. 354 When invoked as described in OAuth 2.0 Bearer Token Usage [RFC6750], 355 resource servers receiving a JWT access token MUST validate it in the 356 following manner. 358 o The resource server MUST verify that the typ header value is 359 at+jwt and reject tokens carrying any other value. 361 o If the JWT access token is encrypted, decrypt it using the keys 362 and algorithms that the resource server specified during 363 registration. If encryption was negotiated with the authorization 364 server at registration time and the incoming JWT access token is 365 not encrypted, the resource server SHOULD reject it. 367 o The Issuer Identifier for the authorization server (which is 368 typically obtained during discovery) MUST exactly match the value 369 of the iss claim. 371 o The resource server MUST validate that the aud claim contains the 372 resource indicator value corresponding to the identifier the 373 resource server expects for itself. The JWT access token MUST be 374 rejected if aud does not contain the resource indicator of the 375 current resource server as a valid audience. 377 o The resource server MUST validate the signature of all incoming 378 JWT access tokens according to [RFC7515] using the algorithm 379 specified in the JWT alg Header Parameter. The resource server 380 MUST reject any JWT in which the value of "alg" is "none". The 381 resource server MUST use the keys provided by the authorization 382 server. 384 o The current time MUST be before the time represented by the exp 385 claim. 387 The resource server MUST handle errors as described in section 3.1 of 388 [RFC6750]. In particular, in case of any failure in the validation 389 checks listed above the authorization server response MUST include 390 the error code "invalid_token". 392 If the JWT access token includes authorization claims as described in 393 the authorization claims section, the resource server SHOULD use them 394 in combination with any other contextual information available to 395 determine whether the current call should be authorized or rejected. 396 Details about how a resource server performs those checks is beyond 397 the scope of this profile specification. 399 5. Security Considerations 401 The JWT access token data layout described here is very similar to 402 the one of the id_token as defined by [OpenID.Core]. The explicit 403 typing required in this profile, in line with the recommendations in 404 [RFC8725] helps the resource server to distinguish between JWT access 405 tokens and OpenID Connect ID Tokens. 407 Authorization servers should prevent scenarios where clients can 408 affect the value of the sub claim in ways that could confuse resource 409 servers. For example: if the authorization server elects to use the 410 client_id as the sub value for access tokens issued client 411 credentials grant, the authorization server should prevent clients to 412 register an arbitrary client_id value, as this would allow malicious 413 clients to select the sub of a high privilege resource owner and 414 confuse any authorization logic on the resource server relying on the 415 sub value. For more details please refer to section 4.13 of 416 [OAuth2.Security.BestPractices]. 418 To preventing cross-JWT confusion, authorization servers MUST use a 419 distinct identifier as "aud" claim value to uniquely identify access 420 tokens issued by the same issuer for distinct resources. 422 Authorization servers should use particular care when handling 423 requests that might lead to ambiguous authorization grants. For 424 example: if a request includes multiple resource indicators, the 425 authorization server should ensure that each scope string included in 426 the resulting JWT access token, if any, can be unambiguously 427 correlated to a specific resource among the ones listed in the aud 428 claim. The details on how to recognize and mitigate this and other 429 ambiguous situations is highly scenario-dependent, hence out of scope 430 for this profile. 432 Authorization servers should not rely on the use of different keys 433 for signing OpenID Connect ID Tokens and JWT tokens as a method to 434 safeguard against the consequences of leaking specific keys. Given 435 that resource servers have no way of knowing what key should be used 436 to validate JWT access tokens in particular, they have to accept 437 signatures performed with any of the keys published in AS metadata or 438 OpennID Connect discovery: consequently, an attacker just needs to 439 compromise any key among the ones published to be able to generate 440 and sign JWTs that will be accepted as valid by the resource server. 442 6. Privacy Considerations 444 As JWT access tokens carry information by value, it now becomes 445 possible for requestors and receivers to directly peek inside the 446 token claims collection. The client MUST NOT inspect the content of 447 the access token: the authorization server and the resource server 448 might decide to change token format at any time (for example by 449 switching from this profile to opaque tokens) hence any logic in the 450 client relying on the ability to read the access token content would 451 break without recourse. Nonetheless, authorization servers should 452 not assume that clients will comply with the above. Whenever client 453 access to the access token content presents privacy issues for a 454 given scenario, the authorization server should take explicit steps 455 to prevent it as described below. 457 In scenarios in which JWT access tokens are accessible to the end 458 user, it should be evaluated whether the information can be accessed 459 without privacy violations (for example, if an end user would simply 460 access his or her own personal information) or if steps must be taken 461 to enforce confidentiality. Possible measures include: encrypting 462 the access token, encrypting the sensitive claims, omitting the 463 sensitive claims or not using this profile, falling back on opaque 464 access tokens. 466 In every scenario, the content of the JWT access token will 467 eventually be accessible to the resource server. It's important to 468 evaluate whether the resource server gained the proper entitlement to 469 have access to any content received in form of claims, for example 470 through user consent in some form, policies and agreements with the 471 organization running the authorization servers, and so on. 473 This profile mandates the presence of the sub claim in every JWT 474 access token, making it possible for resource servers to rely on that 475 information for performing tasks such as correlating incoming 476 requests with data stored locally for the authenticated principal. 477 Although the ability to correlate requests might be required by 478 design in many scenarios, there are scenarios where the authorization 479 server might want to prevent correlation to preserve the desired 480 level of privacy. Authorization servers should choose how to assign 481 sub values according to the level of privacy required by each 482 situation. For instance: if a solution requires preventing tracking 483 principal activities across multiple resource servers, the 484 authorization server should ensure that JWT access tokens meant for 485 different resource servers have distinct sub values tht cannot be 486 correlated in the event of resource servers collusion. Similarly: if 487 a solution requires preventing a resource server from correlating the 488 principal's activity within the resource itself, the authorization 489 server should assign different sub values for every JWT access token 490 issued. In turn, the client should obtain a new JWT access token for 491 every call to the resource server, to ensure that the resource server 492 receives different sub and jti values at every call, thus preventing 493 correlation between distinct requests. 495 7. IANA Considerations 497 7.1. Media Type Registration 499 7.1.1. Registry Content 501 This section registers the "application/at+jwt" media type [RFC2046] 502 in the "Media Types" registry [IANA.MediaTypes] in the manner 503 described in [RFC6838], which can be used to indicate that the 504 content is an access token encoded in JWT format. 506 o Type name: application 508 o Subtype name: at+jwt 510 o Required parameters: N/A 512 o Optional parameters: N/A 514 o Encoding considerations: binary; JWT values are encoded as a 515 series of base64url-encoded values (with trailing '=' characters 516 removed), some of which may be the empty string, separated by 517 period ('.') characters. 519 o Security considerations: See the Security Considerations 520 Section of [[TODO: update once there's a RFC number for the JWT AT 521 profile]] 523 o Interoperability considerations: N/A 525 o Published specification: [[TODO: update once there's a RFC number 526 for the JWT AT profile]] 528 o Applications that use this media type: Applications that access 529 resource servers using OAuth 2.0 access tokens encoded in JTW 530 format 532 o Fragment identifier considerations: N/ 534 o Additional information: Magic number(s): N/A File extension(s): N/ 535 A Macintosh file type code(s): N/A 537 o Person and email address to contact for further information: 538 Vittorio Bertocci, vittorio@auth0.com 540 o Intended usage: COMMON 542 o Restrictions on usage: none 544 o Author: Vittorio Bertocci, vittorio@auth0.com 546 o Change controller: IESG 548 o Provisional registration? No 550 7.2. Claims Registration 552 Section Section 2.2.3.1 of this specification refers to the 553 attributes "roles","groups", "entitlements" defined in [RFC7643] to 554 express authorization information in JWT access tokens. This section 555 registers those attributes as claims in the JSON Web Token (JWT) IANA 556 registry introduced in [RFC7519]. 558 7.2.1. Registry Contents 560 o Claim Name: "roles" 562 o Claim Description: Roles 564 o Change Controller: IESG 566 o Specification Document(s): section 4.1.2 of [RFC7643] and section 567 2.2.2.1 of [[this specification]] 569 o Claim Name: "groups" 571 o Claim Description: Groups 573 o Change Controller: IESG 574 o Specification Document(s): section 4.1.2 of [RFC7643] and section 575 2.2.2.1 of [[this specification]] 577 o Claim Name: "entitlements" 579 o Claim Description: Entitlements 581 o Change Controller: IESG 583 o Specification Document(s): section 4.1.2 of [RFC7643] and section 584 2.2.2.1 of [[this specification]] 586 8. References 588 8.1. Normative References 590 [IANA.OAuth.Parameters] 591 IANA, "OAuth Parameters", 592 . 594 [OAuth2.Security.BestPractices] 595 Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, 596 "OAuth 2.0 Security Best Current Practice", July 2019. 598 [OpenID.Core] 599 Sakimura, N., Bradley, J., Jones, M., Medeiros, B., and C. 600 Mortimore, "OpenID Connect Core 1.0", November 2014. 602 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 603 Extensions (MIME) Part Two: Media Types", RFC 2046, 604 DOI 10.17487/RFC2046, November 1996, 605 . 607 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 608 Requirement Levels", BCP 14, RFC 2119, 609 DOI 10.17487/RFC2119, March 1997, 610 . 612 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 613 Resource Identifier (URI): Generic Syntax", STD 66, 614 RFC 3986, DOI 10.17487/RFC3986, January 2005, 615 . 617 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 618 RFC 6749, DOI 10.17487/RFC6749, October 2012, 619 . 621 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 622 Specifications and Registration Procedures", BCP 13, 623 RFC 6838, DOI 10.17487/RFC6838, January 2013, 624 . 626 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 627 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 628 2015, . 630 [RFC7643] Hunt, P., Ed., Grizzle, K., Wahlstroem, E., and C. 631 Mortimore, "System for Cross-domain Identity Management: 632 Core Schema", RFC 7643, DOI 10.17487/RFC7643, September 633 2015, . 635 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 636 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 637 May 2017, . 639 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 640 Authorization Server Metadata", RFC 8414, 641 DOI 10.17487/RFC8414, June 2018, 642 . 644 [RFC8693] Jones, M., Nadalin, A., Campbell, B., Ed., Bradley, J., 645 and C. Mortimore, "OAuth 2.0 Token Exchange", RFC 8693, 646 DOI 10.17487/RFC8693, January 2020, 647 . 649 [RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource 650 Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707, 651 February 2020, . 653 [RFC8725] Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 654 Current Practices", BCP 225, RFC 8725, 655 DOI 10.17487/RFC8725, February 2020, 656 . 658 8.2. Informative References 660 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 661 Framework: Bearer Token Usage", RFC 6750, 662 DOI 10.17487/RFC6750, October 2012, 663 . 665 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 666 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 667 . 669 [RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E., 670 and C. Mortimore, "System for Cross-domain Identity 671 Management: Protocol", RFC 7644, DOI 10.17487/RFC7644, 672 September 2015, . 674 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 675 RFC 7662, DOI 10.17487/RFC7662, October 2015, 676 . 678 Appendix A. Acknowledgements 680 The initial set of requirements informing this specification was 681 extracted by numerous examples of access tokens issued in JWT format 682 by production systems. Thanks to Dominick Bauer (IdentityServer), 683 Brian Campbell (Ping Identity), Daniel Dobalian (Microsoft), Karl 684 Guinness (Okta) for providing sample tokens issued by their products 685 and services. Brian Campbell and Filip Skokan provided early 686 feedback that shaped the direction of the specification. This 687 profile was discussed at lenght during the OAuth Security Workshop 688 2019, with several individuals contributing ideas and feedback. The 689 author would like to acknowledge the contributions of: 691 John Bradley, Brian Campbell, Vladimir Dzhuvinov, Torsten 692 Lodderstedt, Nat Sakimura, Hannes Tschofenig and everyone who 693 actively participated in the unconference discussions. 695 The following individuals contributed useful feedback and insights on 696 the drafts, both on the IETF OAuth 2.0 WG DL and during the IIW28 697 conference: 699 Dale Olds, George Fletcher, David Waite, Michael Engan, Mike Jones, 700 Hans Zandbelt, Vladimir Dzhuvinov, Martin Schanzenbach , Aaron 701 Parecki, Annabelle Richard Backman, Dick Hardt, Denis Pinkas, 702 Benjamin Kaduk and everyone who actively participated in the IIW28 703 unconference discussions and the IETF OAuth 2.0 WG DL discussions. 705 Appendix B. Document History 707 [[ to be removed by the RFC Editor before publication as an RFC ]] 709 draft-ietf-oauth-access-token-jwt-06 711 o In Section 2.2 and Section 6 added a discussion about how 712 different sub values affect the privacy properties of a solution. 713 o In Section 2.2.3 and Section 3 eliminated language prohibiting JWT 714 AT requests featuring multiple resources, substituting it with the 715 prohibition for the AS to emit JWT ATs expressing ambiguous 716 authorization grants. In Section 5, added language warning 717 against scope confusion and mentioned the existence of other 718 ambiguous authorization grant. 719 o In Section 2.2 promoted claims iat and jti from RECOMMENDED to 720 REQUIRED. 721 o In Section 2.1 eliminated temporary note on the lack of 722 authenticated encryption methods specifications. 723 o Updated acknowledgements. 725 draft-ietf-oauth-access-token-jwt-05 727 o Varios typos, grammar issues and improper abbreviations fixed. 728 o Reworded the definition of at+jwt in Section 2.1. 729 o In Section 2.2, clarified that iat refers to the issuance time of 730 the JWT itself. 731 o In Section 2.2.2, added a reference to public/private claims 732 definitions (sections 4.2, 4.3) of [RFC7519]. 733 o In Section 3, removed the paragrah stating that every JWT AT MUST 734 have an aud, as it is already defined in Section 2.2. 735 o Reworded description of the JWT AT adoption landscape in 736 Section 1. 737 o Simplified the individual descriptions of the claims list in 738 Section 2.2.1. 739 o Updated Section 4 and Section 5 to clarify that the AS can use any 740 of the published keys to sign JWT access tokens, and that the AS 741 should not rely on use of different signing keys per token type as 742 a security mechanism. 743 o In Section 2.2 promoted claims iat and jti from OPTIONAL to 744 RECOMMENDED 745 o In Section 4, switched the validation steps list type from numbers 746 to bullets. 747 o In Section 4, eliminated the auth_time instructions from the 748 validation steps list. 749 o In Section 2.2.2, added a reference to the JWT claims registry as 750 source of claims for JWT ATs 751 o In Section 4, clarified that failures in JWT AT validation checks 752 will result in invalid_token. 754 draft-ietf-oauth-access-token-jwt-04 756 o Eliminated reference to resource aliases list from the aud claim 757 description in Section 2. 758 o Eliminated references to resource aliases list from the aud 759 validation guidance in Section 4. 760 o Introduced a new subsection Section 2.2.1, moved the definitions 761 of auth_time, acr and amr there and incorporated the language 762 proposed by Annabelle and Brian on the WG mailing list. 764 o In section Section 3 softened (from MUST to SHOULD) the 765 requirement that ties the resource identifier in the request to 766 the value in the aud claim of the issued access token. 767 o Updated acknowledgements. 768 o In the section Section 3, the example request now has 769 response_type=code. 770 o Updated text in the Privacy Consideration section to clarify what 771 protection steps the text refers to. 772 o Updated the typ header discussion in Section 2.1 to clarify that 773 it helps preventing resources from accepting OpenID Connect ID 774 Tokens as JWT access tokens. 775 o Updated refrences to token exchange, resource indicators and JWT 776 best practices to reflect their RFC status (8693,8707,8725). 778 draft-ietf-oauth-access-token-jwt-03 780 o Varios typos fixed. 781 o In the security considerations section, relaxed the claim that the 782 typ header value "at+jwt" will prevent RS from misinterpreting JWT 783 ATs as idtokens. 784 o In the "Requesting JWT Access Tokens" section, added 785 "invalid_target" as a possible error returned for the multiple 786 resources request case. 787 o In the Validating JWT Access Tokens" section, disallowed JWTs with 788 "alg":"none" 789 o in the IANA registration entries for the SCIM claim types, 790 complemented the reference to the SCIM spec with a reference to 791 this spec so that the eventual registration entries have better 792 context. 793 o Updated acknowledgements. 794 o In the section Section 3, the example request now has 795 response_type=code. 796 o Updated text in the Privacy Consideration section to clarify what 797 protection steps the text refers to. 799 draft-ietf-oauth-access-token-jwt-02 801 o In 2.2.1, opened the sources of identity attributes to any 802 identity related specification. 803 o In 2.2.2, relaxed from MUST to SHOULD the requirement that 804 requests including a scope always result in access tkens 805 containing a corresponding scope claim. 806 o In the security considerations setting, added a requirement for 807 the authorization server to assing unique identifiers for 808 different resources- to prevent cross JWT confusion. 809 o Added IANA registration for the authorization attributes borrowed 810 from SCIM CORE 812 o Added note on authenticated encryption. 813 o Added a mention to the 1st party clients scenarios in the identity 814 claims section. 815 o Changed the definition reference for the iss, exp, aud, sub, iat 816 claims from OpenID.Core to RFC7519. 817 o Added a mention of the client_id==sub case in the security 818 considerations section, added a reference to draft-ietf-oauth- 819 security-topics-13. Added a reference to the security 820 considerations from the sub claim definition section. 821 o Specified invalid_request as the error code the authorization 822 server should return in case of multiple resources in the access 823 token request. 824 o Specified invalid_scope as the error code the authorization server 825 should return in case it isn;t possible to determine to which 826 resource the requested scopes refers to. 827 o In the identity claims section, added a reference to introspection 828 as possible source of claim types and added language explicitly 829 stating that the AS can add arbitrary attributes as long as they 830 are collision resistant or private. 831 o Updated language for the auth_time claim to include the case in 832 which the AS reauthenticates the user mid-session (e.g. during 833 step up auth). 834 o Removed note about adding a mechanism for extablishing whether the 835 token was obtained on behalf or the resource owner or of the 836 client itself (client credentials grant). 837 o Removed note about adding a mechanism for indicating whether the 838 authorization server sent the resource owner to authenticate with 839 a federated identity provider, and the identity of that federated 840 provider. 841 o Removed the note in the security consideration sections about 842 discussing the purpose of aud, iss, exp validation (redundant). 843 o In the authorization claims section, stated intent to register 844 roles, groups and entitlements as claim types in IANA 845 o Clarified in the privacy considerations that clients should not 846 inspect access tokens. 847 o Expanded the privacy considerations with more explicit guidance 848 about privacy preserving approaches. 849 o Added IANA registry content for the at+JWT MIME type. 850 o Updated acknowledgements. 852 draft-ietf-oauth-access-token-jwt-00 854 o Initial draft to define a JWTt profile for OAuth 2.0 access 855 tokens. 857 Author's Address 859 Vittorio Bertocci 860 Auth0 862 Email: vittorio@auth0.com