idnits 2.17.1 draft-ietf-oauth-access-token-jwt-02.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 (July 23, 2019) is 1738 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 581, but no explicit reference was found in the text == Unused Reference: 'RFC7644' is defined on line 628, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'ResourceIndicators' -- Possible downref: Non-RFC (?) normative reference: ref. 'TokenExchange' Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). 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 July 23, 2019 5 Expires: January 24, 2020 7 JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens 8 draft-ietf-oauth-access-token-jwt-02 10 Abstract 12 This specification defines a profile for issuing OAuth2 access tokens 13 in JSON web token (JWT) format. Authorization servers and resource 14 servers from different vendors can leverage this profile to issue and 15 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 January 24, 2020. 34 Copyright Notice 36 Copyright (c) 2019 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. Identity Claims . . . . . . . . . . . . . . . . . . . 5 58 2.2.2. Authorization Claims . . . . . . . . . . . . . . . . 6 59 2.2.2.1. Claims for Authorization Outside of Delegation 60 Scenarios . . . . . . . . . . . . . . . . . . . . 6 61 3. Requesting a JWT Access Token . . . . . . . . . . . . . . . . 6 62 4. Validating JWT Access Tokens . . . . . . . . . . . . . . . . 7 63 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 64 6. Privacy Considerations . . . . . . . . . . . . . . . . . . . 10 65 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 66 7.1. Media Type Registration . . . . . . . . . . . . . . . . . 10 67 7.1.1. Registry Content . . . . . . . . . . . . . . . . . . 10 68 7.2. Claims Registration . . . . . . . . . . . . . . . . . . . 11 69 7.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 12 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 71 8.1. Normative References . . . . . . . . . . . . . . . . . . 12 72 8.2. Informative References . . . . . . . . . . . . . . . . . 14 73 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 14 74 Appendix B. Document History . . . . . . . . . . . . . . . . . . 15 75 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 77 1. Introduction 79 The original OAuth 2.0 Authorization Framework [RFC6749] 80 specification does not mandate any specific format for access tokens. 81 While that remains perfectly appropriate for many important scenario, 82 in-market use has shown that many commercial OAuth2 implementations 83 elected to issue access tokens using a format that can be parsed and 84 validated by resource servers directly, without further authorization 85 server involvement. The approach is particularly common in 86 topologies where the authorization server and resource server are not 87 co-located, are not ran by the same entity, or are otherwise 88 separated by some boundary. All of the known commercial 89 implementations known at this time leverage the JSON Web Tokens(JWT) 90 [RFC7519] format. 92 Most vendor specific JWT access tokens share the same functional 93 layout, including information in forms of claims meant to support the 94 same scenarios: token validation, transporting authorization 95 information in forms of scopes and entitlements, carrying identity 96 information about the subject, and so on. The differences are mostly 97 confined to the claim names and syntax used to represent the same 98 entities, suggesting that interoperability could be easily achieved 99 by standardizing on a common set of claims and validation rules. 101 The assumption that access tokens are associated to specific 102 information doesn't appear only in commercial implementations. 103 Various specifications in the OAuth2 family (such as resource 104 indicators [ResourceIndicators], bearer token usage [RFC6750] and 105 others) postulate the presence in access tokens of scoping 106 mechanisms, such as an audience. The family of specifications 107 associated to introspection also indirectly suggest a fundamental set 108 of information access tokens are expected to carry or at least be 109 associated with. 111 This specification aims to provide a standardized and interoperable 112 profile as an alternative to the proprietary JWT access tokens 113 layouts going forward. Besides defining a common set of mandatory 114 and optional claims, the profile provides clear indications on how 115 authorization requests parameters determine the content of the issued 116 JWT access token, how an authorization server can publish metadata 117 relevant to the JWT access tokens it issues, and how a resource 118 server should validate incoming JWT access tokens. 120 Finally, this specification provides security and privacy 121 considerations meant to prevent common mistakes and anti patterns 122 that are likely to occur in naive use of the JWT format to represent 123 access tokens. 125 1.1. Requirements Notation and Conventions 127 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 128 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 129 "OPTIONAL" in this document are to be interpreted as described in BCP 130 14 [RFC2119] [RFC8174] when, and only when, they appear in all 131 capitals, as shown here. 133 1.2. Terminology 135 JWT access token An OAuth 2.0 access token encoded in JWT format and 136 complying with the requirements described in this specification. 138 This specification uses the terms "access token", "refresh token", 139 "authorization server", "resource server", "authorization endpoint", 140 "authorization request", "authorization response", "token endpoint", 141 "grant type", "access token request", "access token response", and 142 "client" defined by The OAuth 2.0 Authorization Framework [RFC6749]. 144 2. JWT Access Token Header and Data Structure 146 JWT access tokens are regular JWT tokens complying with the 147 requirements described in this section. 149 2.1. Header 151 Although JWT access tokens can use any signing algorithm, use of 152 asymmetric algorithms is RECOMMENDED as it simplifies the process of 153 acquiring validation information for resource servers (see 154 Section 4). 156 NOTE: there were discussions about adding a reference to 157 authenticated encyption methods as well, but there's no internet 158 draft specifying interoperable public key methods at this time 160 The typ header parameter for a JWT access token MUST be at+jwt. See 161 the security considerations section for details on the importance of 162 preventing JWT access tokens to be interpreted as id_tokens. 164 2.2. Data Structure 166 The following claims are used in the JWT access token data structure. 168 iss REQUIRED - as defined in section 4.1.1 of [RFC7519]. 170 exp REQUIRED - as defined in section 4.1.4 of [RFC7519]. 172 aud REQUIRED - as defined in section 4.1.3 of [RFC7519]. See 173 Section 3 for indications on how an authorization server should 174 determine the value of aud depending on the request. The aud 175 claim MAY include a list of individual resource indicators if they 176 are all aliases referring to the same requested resource known by 177 the authorization server. 179 sub REQUIRED - as defined in section 4.1.2 of [RFC7519]. In case of 180 access tokens obtained through grants where no resource owner is 181 involved, such as the client credentials grant, the value of sub 182 SHOULD correspond to an identifier the authorization server uses 183 to indicate the client application. Please see Section 5 for more 184 details on this scenario. 186 client_id REQUIRED - as defined in section 4.3 of [TokenExchange]. 188 iat OPTIONAL - as defined in section 4.1.6 of [RFC7519]. 190 auth_time OPTIONAL - as defined in section 2 of [OpenID.Core]. 191 Important: as this claim represents the time at which the end user 192 last authenticated, its value will either remain the same for all 193 the JWT access tokens issued within that session or be updated to 194 the time of latest authentication if reauthentication occurred 195 mid-session (as it is the case for step up authenticaiton and 196 similar occurrences). For example: all the JWT access tokens 197 obtained with a given refresh token will all have the same value 198 of auth_time, corresponding to the instant in which the user first 199 authenticated to obtain the refresh token. 201 jti OPTIONAL - as defined in section 4.1.7 of [RFC7519]. 203 acr, amr OPTIONAL - as defined in section 2 of [OpenID.Core]. The 204 same considerations presented for auth_time apply to acr and amr: 205 those values reflect the authentication context and method used 206 when the end user originally authenticated, and will remain 207 unchanged for the JWT access tokens issued within the context of 208 that session. 210 2.2.1. Identity Claims 212 Commercial authorization servers will often include resource owner 213 attributes directly in access tokens, so that resource servers can 214 consume them directly for authorization or other purposes without any 215 further roudtrips to introspection ([RFC7662]) or userinfo 216 ([OpenID.Core]) endpoints. This is particularly common in scenarios 217 where the client and the resource server belong to the same entity 218 and are part of the same solution, as it is the case for first party 219 clients invoking their own backend API. 221 This profile does not introduce any mechanism for a client to 222 directly request the presence of specific claims in JWT access 223 tokens, as the authorization server can determine what additional 224 claims are required by a particular resource server by taking in 225 consideration the client_id of the client, the scope and the resource 226 parameters included in the request. 228 Any additional attributes whose semantic is well described by the 229 attributes description found in section 5.1 of [OpenID.Core] SHOULD 230 be codified in JWT access tokens via the corresponding claim names in 231 that section of the OpenID Connect specification. The same holds for 232 attributes defined in [RFC7662] and other identity related 233 specifications. 235 Authorization server MAY return arbitrary attributes not defined in 236 any existing specification, as long as the corresponding claim names 237 are collision resistant or the access tokens are meant to be used 238 only within a private subsystem. 240 Authorization servers including resource owner attributes in JWT 241 access tokens should exercise care and verify that all privacy 242 requirements are met, as discussed in Section 6. 244 2.2.2. Authorization Claims 246 If an authorization request includes a scope parameter, the 247 corresponding issued JWT access token SHOULD include a scope claim as 248 defined in section 4.2 of [TokenExchange]. 250 All the individual scopes strings in the scope claim MUST have 251 meaning for the resource indicated in the aud claim. 253 2.2.2.1. Claims for Authorization Outside of Delegation Scenarios 255 Many authorization servers embed in the access tokens they issue 256 authorization attributes that go beyond the delegated scenarios 257 described by [RFC7519]. Typical examples include resource owner 258 memberships in roles and groups that are relevant to the resource 259 being accessed, entitlements assigned to the resource owner for the 260 targeted resource that the authorization server knows about, and so 261 on. 263 An authorization server wanting to include such attributes in a JWT 264 access token SHOULD use as claim types the attributes described by 265 section 4.1.2 of SCIM Core ([RFC7643]) and in particular roles, 266 groups and entitlements. As in their original definition in 267 [RFC7643] , this profile does not provide a specific vocabulary for 268 those entities. The Section 7 section of this document does provide 269 entries for registering the roles, groups and entitlements attributes 270 from [RFC7643] as claim types to be used in this profile. 272 3. Requesting a JWT Access Token 274 An authorization server can issue a JWT access token in response to 275 any authorization grant defined by [RFC6749] and subsequent 276 extensions meant to result in an access token. 278 Every JWT access token MUST include an aud claim (see Section 2.2). 280 If the request includes a resource parameter (as defined in 281 [ResourceIndicators]), the resulting JWT access token aud claim MUST 282 have the same value as the resource parameter in the request. 284 Example request below: 286 GET /as/authorization.oauth2?response_type=token 287 &client_id=s6BhdRkqt3&state=laeb 288 &scope=openid%20profile%20reademail 289 &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb 290 &resource=https%3A%2F%2Frs.example.com%2F HTTP/1.1 291 Host: authorization-server.example.com 293 Figure 1: Authorization Request with Resource and Scope Parameters 295 Once redeemed, the code obtained from the request above will result 296 in a JWT access token in the form shown below: 298 {"typ":"at+JWT","alg":"RS256","kid":"RjEwOwOA"} 299 { 300 "iss": "https://authorization-server.example.com/", 301 "sub": " 5ba552d67", 302 "aud": "https://rs.example.com/", 303 "exp": 1544645174, 304 "client_id": "s6BhdRkqt3_", 305 "scope": "openid profile reademail" 306 } 308 Figure 2: A JWT Access Token 310 If it receives a request for an access token containing more than one 311 resource parameter, an authorization server issuing JWT access tokens 312 MUST reject the request and fail with invalid_request as described in 313 section 4.1.2.1 of [RFC6749]. See Section 2.2 and Section 5 for more 314 details on how this measure ensures there's no confusion on to what 315 resource the access token granted scopes apply. 317 If the request does not include a resource parameter, the 318 authorization server MUST use in the aud claim a default resource 319 indicator. If a scope parameter is present in the request, the 320 authorization server SHOULD use it to infer the value of the default 321 resource indicator to be used in the aud claim. The mechanism 322 through which scopes are associated to default resource indicator 323 values is outside the scope of this specification. If the values in 324 the scope parameter refer to different default resource indicator 325 values, the authorization server SHOULD reject the request with 326 invalid_scope as described in section 4.1.2.1 of [RFC6749]. 328 4. Validating JWT Access Tokens 330 For the purpose of facilitating validation data retrieval, it is 331 RECOMMENDED that authorization servers sign JWT access tokens with an 332 asymmetric algorithm. 334 Authorization servers SHOULD implement OAuth 2.0 Authorization Server 335 Metadata [RFC8414] to advertise to resource servers its signing keys 336 via jwks_uri and what iss claim value to expect via the issuer 337 metadata value. Alternatively, authorization servers implementing 338 OpenID connect MAY use the Openid connect discovery document for the 339 same purpose. If an authorization server supports both AS metadata 340 and Openid discovery, the values provided MUST be consistent across 341 the two publication methods. 343 An authorization server MAY elect to use different keys to sign 344 id_tokens and JWT access tokens. 346 When invoked as described in OAuth2 bearer token usage, resource 347 servers receiving a JWT access token MUST validate it in the 348 following manner. 350 1. The resource server MUST verify that the typ header value is 351 at+jwt and reject tokens carrying any other value. 353 2. If the JWT access token is encrypted, decrypt it using the keys 354 and algorithms that the resource server specified during 355 registration. If encryption was negotiated with the 356 authorization server at registration time and the incoming JWT 357 access token is not encrypted, the resource server SHOULD reject 358 it. 360 3. The Issuer Identifier for the authorization server (which is 361 typically obtained during discovery) MUST exactly match the value 362 of the iss claim. 364 4. The resource server MUST validate that the aud claim contains the 365 resource indicator value corresponding to the identifier the 366 resource server expects for itself. The aud claim MAY contain an 367 array with more than one element. The JWT access token MUST be 368 rejected if aud does not list the resource indicator of the 369 current resource server as a valid audience, or if it contains 370 additional audiences that are not known aliases of the resource 371 indicator of the current resource server. 373 5. The resource server MUST validate the signature of all incoming 374 JWT access token according to [RFC7515] using the algorithm 375 specified in the JWT alg Header Parameter. The resource server 376 MUST use the keys provided by the authorization server. 378 6. The current time MUST be before the time represented by the exp 379 Claim. 381 7. If the auth_time claim is present, the resource server SHOULD 382 check the auth_time value and request re-authentication if it 383 determines too much time has elapsed since the last resource 384 owner authentication. 386 If the JWT access token includes authorization claims as described in 387 the authorization claims section, the resource server SHOULD use them 388 in combination with any other contextual information available to 389 determine whether the current call should be authorized or rejected. 390 Details about how a resource server performs those checks is beyond 391 the scope of this profile specification. 393 5. Security Considerations 395 The JWT access token data layout described here is very similar to 396 the one of the id_token as defined by [OpenID.Core]. Without the 397 explicit typing required in this profile, in line with the 398 recommendations in [JWT.BestPractices] there would be the risk of 399 attackers using JWT access tokens in lieu of id_tokens. 401 Authorization servers should prevent scenarios where clients can 402 affect the value of the sub claim in ways that could confuse resource 403 servers. For example: if the authorization server elects to use the 404 client_id as the sub value for access tokens issued client 405 credentials grant, the authorization server should prevent clients to 406 register an arbitrary client_id value, as this would allow malicious 407 clients to select the sub of a high privilege resource owner and 408 confuse any authorization logic on the resource server relying on the 409 sub value. For more details please refer to section 4.13 of 410 [OAuth2.Security.BestPractices]. 412 To preventing cross-JWT confusion, authorization servers MUST use a 413 distinct identifier as "aud" claim value to uniquely identify access 414 tokens issued by the same issuer for distinct resources. 416 This profile explicitly forbids the use of multi value aud claim when 417 the individual values refer to different resources, as that would 418 introduce confusion about what scopes apply to which resource- 419 possibly opening up avenues for elevation of delegated privileges 420 attacks. Alternative techniques to prevent scope confusion include 421 "scope stuffing", imposing to every individual scope string to 422 include a reference to the resource they are meant to be applied to, 423 but its application is problematic (scope opacity violations, size 424 inflation, more error conditions become possible when the combination 425 of requested scopes and resource indicators is invalid) and the 426 observed frequency of the scenario doesn't warrant complicating the 427 more common cases. 429 6. Privacy Considerations 431 As JWT access tokens carry information by value, it now becomes 432 possible for requestors and receivers to directly peek inside the 433 token claims collection. The client MUST NOT inspect the content of 434 the access token: the authorization server and the resource server 435 might decide to change token format at any time (for example by 436 switching from this profile to opaque tokens) hence any logic in the 437 client relying on the ability to read the access token content would 438 break without recourse. Nonetheless, authorization servers should 439 not assume that clients will comply with the above. Whenever client 440 access to the access token content presents privacy issues for a 441 given scenario, the authorization server should take explicit steps 442 to prevent it as described above. 444 In scenarios in which JWT access tokens are accessible to the end 445 user, it should be evaluated whether the information can be accessed 446 without privacy violations (for example, if an end user would simply 447 access his or her own personal information) or if steps must be taken 448 to enforce cofidentiality. Possible measure include: encrypting the 449 access token, encrypting the sensitive claims, omitting the sensitive 450 claims or not using this profile, falling back on opaque access 451 tokens. 453 In every scenario, the content of the JWT access token will 454 eventually be accessible to the resource server. It's important to 455 evaluate whether the resource server gained the proper entitlement to 456 have access to any content received in form of claims, for example 457 through user consent in some form, policies and agreements with the 458 organization running the authorization servers, and so on. 460 7. IANA Considerations 462 7.1. Media Type Registration 464 7.1.1. Registry Content 466 This section registers the "application/at+jwt" media type [RFC2046] 467 in the "Media Types" registry [IANA.MediaTypes] in the manner 468 described in [RFC6838], which can be used to indicate that the 469 content is an access token encoded in JWT format. 471 o Type name: application 473 o Subtype name: at+jwt 475 o Required parameters: N/A 476 o Optional parameters: N/A 478 o Encoding considerations: binary; JWT values are encoded as a 479 series of base64url-encoded values (with trailing '=' characters 480 removed), some of which may be the empty string, separated by 481 period ('.') characters. 483 o Security considerations: See the Security Considerations 484 Section of [[TODO: update once there's a RFC number for the JWT AT 485 profile]] 487 o Interoperability considerations: N/A 489 o Published specification: [[TODO: update once there's a RFC number 490 for the JWT AT profile]] 492 o Applications that use this media type: Applications that access 493 resource servers using OAuth2 access tokens encoded in JTW format 495 o Fragment identifier considerations: N/ 497 o Additional information: Magic number(s): N/A File extension(s): N/ 498 A Macintosh file type code(s): N/A 500 o Person and email address to contact for further information: 501 Vittorio Bertocci, vittorio@auth0.com 503 o Intended usage: COMMON 505 o Restrictions on usage: none 507 o Author: Vittorio Bertocci, vittorio@auth0.com 509 o Change controller: IESG 511 o Provisional registration? No 513 7.2. Claims Registration 515 Section Section 2.2.2.1 of this specification refers to the 516 attributes "roles","groups", "entitlements" defined in [RFC7643] to 517 express authorization information in JWT access tokens. This section 518 registers those attributes as claims in the JSON Web TOken (JWT) IANA 519 registry introduced in [RFC7519]. 521 7.2.1. Registry Contents 523 o Claim Name: "roles" 525 o Claim Description: Roles 527 o Change Controller: IESG 529 o Specification Document(s): section 4.1.2 of [RFC7643] 531 o Claim Name: "groups" 533 o Claim Description: Groups 535 o Change Controller: IESG 537 o Specification Document(s): section 4.1.2 of [RFC7643] 539 o Claim Name: "entitlements" 541 o Claim Description: Entitlements 543 o Change Controller: IESG 545 o Specification Document(s): section 4.1.2 of [RFC7643] 547 8. References 549 8.1. Normative References 551 [IANA.OAuth.Parameters] 552 IANA, "OAuth Parameters", 553 . 555 [JWT.BestPractices] 556 Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 557 Current Practices", November 2018. 559 [OAuth2.Security.BestPractices] 560 Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, 561 "OAuth 2.0 Security Best Current Practice", July 2019. 563 [OpenID.Core] 564 Sakimura, N., Bradley, J., Jones, M., Medeiros, B., and C. 565 Mortimore, "OpenID Connect Core 1.0", November 2014. 567 [ResourceIndicators] 568 Campbell, B., Bradley, J., and H. Tschofenig, "OAuth 2.0 569 Token Exchange", November 2016. 571 [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail 572 Extensions (MIME) Part Two: Media Types", RFC 2046, 573 DOI 10.17487/RFC2046, November 1996, 574 . 576 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 577 Requirement Levels", BCP 14, RFC 2119, 578 DOI 10.17487/RFC2119, March 1997, 579 . 581 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 582 Resource Identifier (URI): Generic Syntax", STD 66, 583 RFC 3986, DOI 10.17487/RFC3986, January 2005, 584 . 586 [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", 587 RFC 6749, DOI 10.17487/RFC6749, October 2012, 588 . 590 [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type 591 Specifications and Registration Procedures", BCP 13, 592 RFC 6838, DOI 10.17487/RFC6838, January 2013, 593 . 595 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 596 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 597 2015, . 599 [RFC7643] Hunt, P., Ed., Grizzle, K., Wahlstroem, E., and C. 600 Mortimore, "System for Cross-domain Identity Management: 601 Core Schema", RFC 7643, DOI 10.17487/RFC7643, September 602 2015, . 604 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 605 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 606 May 2017, . 608 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 609 Authorization Server Metadata", RFC 8414, 610 DOI 10.17487/RFC8414, June 2018, 611 . 613 [TokenExchange] 614 Nadalin, A., Bradley, J., Jones, M., Campbell, B., and C. 615 Mortimore, "OAuth 2.0 Token Exchange", October 2018. 617 8.2. Informative References 619 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 620 Framework: Bearer Token Usage", RFC 6750, 621 DOI 10.17487/RFC6750, October 2012, 622 . 624 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 625 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 626 . 628 [RFC7644] Hunt, P., Ed., Grizzle, K., Ansari, M., Wahlstroem, E., 629 and C. Mortimore, "System for Cross-domain Identity 630 Management: Protocol", RFC 7644, DOI 10.17487/RFC7644, 631 September 2015, . 633 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 634 RFC 7662, DOI 10.17487/RFC7662, October 2015, 635 . 637 Appendix A. Acknowledgements 639 The initial set of requirements informing this specification was 640 extracted by numerous examples of access tokens issued in JWT format 641 by production systems. Thanks to Dominick Bauer (IdentityServer), 642 Brian Campbell (PingIdentity), Daniel Dobalian (Microsoft), Karl 643 Guinness (Okta) for providing sample tokens issued by their products 644 and services. Brian Campbell and Filip Skokan provided early 645 feedback that shaped the direction of the specification. This 646 profile was discussed at lenght during the OAuth Security Workshop 647 2019, with several individuals contributing ideas and feedback. The 648 author would like to acknowledge the contributions of: 650 John Bradley, Brian Campbell, Vladimir Dzhuvinov, Torsten 651 Lodderstedt, Nat Sakimura, Hannes Tschofenig and everyone who 652 actively participated in the unconference discussions. 654 The following individuals contributed useful feedback and insights on 655 the initial draft, both on the IETF OAuth2 WG DL and during the IIW28 656 conference: 658 Dale Olds, George Fletcher, David Waite, Michael Engan, Mike Jones, 659 Hans Zandbelt, Vladimir Dzhuvinov, Martin Schanzenbach and everyone 660 who actively participated in the IIW28 unconference discussions and 661 the IETF OAuth2 WG DL discussions. 663 Appendix B. Document History 665 [[ to be removed by the RFC Editor before publication as an RFC ]] 667 draft-ietf-oauth-access-token-jwt-02 669 o In 2.2.1, opened the sources of identity attributes to any 670 identity related specification. 671 o In 2.2.2, relaxed from MUST to SHOULD the requirement that 672 requests including a scope always result in access tkens 673 containing a corresponding scope claim. 674 o In the security considerations setting, added a requirement for 675 the authorization server to assing unique identifiers for 676 different resources- to prevent cross JWT confusion. 677 o Added IANA registration for the authorization attributes borrowed 678 from SCIM CORE 680 draft-ietf-oauth-access-token-jwt-01 682 o Added note on authenticated encryption. 683 o Added a mention to the 1st party clients scenarios in the identity 684 claims section. 685 o Changed the definition reference for the iss, exp, aud, sub, iat 686 claims from OpenID.Core to RFC7519. 687 o Added a mention of the client_id==sub case in the security 688 considerations section, added a reference to draft-ietf-oauth- 689 security-topics-13. Added a reference to the security 690 considerations from the sub claim definition section. 691 o Specified invalid_request as the error code the authorization 692 server should return in case of multiple resources in the access 693 token request. 694 o Specified invalid_scope as the error code the authorization server 695 should return in case it isn;t possible to determine to which 696 resource the requested scopes refers to. 697 o In the identity claims section, added a reference to introspection 698 as possible source of claim types and added language explicitly 699 stating that the AS can add arbitrary attributes as long as they 700 are collision resistant or private. 701 o Updated language for the auth_time claim to include the case in 702 which the AS reauthenticates the user mid-session (e.g. during 703 step up auth). 704 o Removed note about adding a mechanism for extablishing whether the 705 token was obtained on behalf or the resource owner or of the 706 client itself (client credentials grant). 708 o Removed note about adding a mechanism for indicating whether the 709 authorization server sent the resource owner to authenticate with 710 a federated identity provider, and the identity of that federated 711 provider. 712 o Removed the note in the security consideration sections about 713 discussing the purpose of aud, iss, exp validation (redundant). 714 o In the authorization claims section, stated intent to register 715 roles, groups and entitlements as claim types in IANA 716 o Clarified in the privacy considerations that clients should not 717 inspect access tokens. 718 o Expanded the privacy considerations with more explicit guidance 719 about privacy preserving approaches. 720 o Added IANA registry content for the at+JWT MIME type. 721 o Updated acknowledgements. 723 draft-ietf-oauth-access-token-jwt-00 725 o Initial draft to define a JWTt profile for OAuth 2.0 access 726 tokens. 728 Author's Address 730 Vittorio Bertocci 731 Auth0 733 Email: vittorio@auth0.com