idnits 2.17.1 draft-ietf-oauth-jwt-introspection-response-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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (August 22, 2018) is 2074 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: 'RFC2119' is defined on line 388, but no explicit reference was found in the text == Unused Reference: 'RFC2246' is defined on line 393, but no explicit reference was found in the text == Outdated reference: A later version (-07) exists of draft-ietf-oauth-jwt-bcp-03 == Outdated reference: A later version (-26) exists of draft-ietf-oauth-security-topics-06 ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) Summary: 1 error (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Open Authentication Protocol T. Lodderstedt, Ed. 3 Internet-Draft YES.com AG 4 Intended status: Standards Track V. Dzhuvinov 5 Expires: February 23, 2019 Connect2id Ltd. 6 August 22, 2018 8 JWT Response for OAuth Token Introspection 9 draft-ietf-oauth-jwt-introspection-response-01 11 Abstract 13 This draft proposes an additional JSON Web Token (JWT) based response 14 for OAuth 2.0 Token Introspection. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on February 23, 2019. 33 Copyright Notice 35 Copyright (c) 2018 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (https://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Requesting a JWT Response . . . . . . . . . . . . . . . . . . 3 52 3. JWT Response . . . . . . . . . . . . . . . . . . . . . . . . 3 53 4. Client Metadata . . . . . . . . . . . . . . . . . . . . . . . 4 54 5. Authorization Server Metadata . . . . . . . . . . . . . . . . 5 55 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 56 6.1. Cross-JWT Confusion . . . . . . . . . . . . . . . . . . . 5 57 6.2. Token Data Leakage . . . . . . . . . . . . . . . . . . . 6 58 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 59 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 60 8.1. OAuth Dynamic Client Registration Metadata Registration . 7 61 8.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 7 62 8.2. OAuth Authorization Server Metadata Registration . . . . 7 63 8.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 7 64 8.3. OAuth Token Introspection Response . . . . . . . . . . . 8 65 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 66 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 67 9.2. Informative References . . . . . . . . . . . . . . . . . 10 68 Appendix A. Document History . . . . . . . . . . . . . . . . . . 10 69 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 71 1. Introduction 73 OAuth 2.0 Token Introspection [RFC7662] specifies a method for a 74 protected resource to query an OAuth 2.0 authorization server to 75 determine the state of an access token and obtain data associated 76 with the access token. This allows deployments to implement 77 identifier-based access tokens in an interoperable way. 79 The introspection response, as specified in OAuth 2.0 Token 80 Introspection [RFC7662], is a plain JSON object. However, there are 81 use cases where the resource server requires stronger assurance that 82 the authorization server issued the access token, including cases 83 where the authorization server assumes liability for the token's 84 content. An example is a resource server using verified person data 85 to create certificates, which in turn are used to create qualified 86 electronic signatures. 88 In such use cases it may be useful or even required to return a 89 signed JWT as the introspection response. This specification extends 90 the token introspection endpoint with the capability to return 91 responses as JWTs. 93 2. Requesting a JWT Response 95 A resource server requests to receive a JWT introspection response by 96 including an Accept header with content type "application/jwt" in the 97 introspection request. 99 The following is a non-normative example request: 101 POST /introspect HTTP/1.1 102 Host: server.example.com 103 Accept: application/jwt 104 Content-Type: application/x-www-form-urlencoded 106 token=2YotnFZFEjr1zCsicMWpAA 108 3. JWT Response 110 The introspection endpoint responds with a JWT, setting the Content- 111 Type header to "application/jwt". 113 This JWT MUST contain the claims "iss" and "aud" in order to prevent 114 misuse of the JWT as ID or access token (see Section 6.1). 116 This JWT MAY furthermore contain all other claims described in 117 Section 2.2. of [RFC7662] and beyond (e.g. as defined in 118 [OpenID.Core]). 120 The following is a non-normative example response (with line breaks 121 for display purposes only): 123 HTTP/1.1 200 OK 124 Content-Type: application/jwt 126 eyJraWQiOiIxIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJaNU8zdXBQQzg4UXJBa 127 ngwMGRpcyIsImF1ZCI6Imh0dHBzOlwvXC9wcm90ZWN0ZWQuZXhhbXBsZS5uZXRcL 128 3Jlc291cmNlIiwiZXh0ZW5zaW9uX2ZpZWxkIjoidHdlbnR5LXNldmVuIiwic2Nvc 129 GUiOiJyZWFkIHdyaXRlIGRvbHBoaW4iLCJpc3MiOiJodHRwczpcL1wvc2VydmVyL 130 mV4YW1wbGUuY29tXC8iLCJhY3RpdmUiOnRydWUsImV4cCI6MTQxOTM1NjIzOCwia 131 WF0IjoxNDE5MzUwMjM4LCJjbGllbnRfaWQiOiJsMjM4ajMyM2RzLTIzaWo0Iiwid 132 XNlcm5hbWUiOiJqZG9lIn0.HEQHf05vqVvWVnWuEjbzUnPz6JDQVR69QkxgzBNq5 133 kk-sK54ieg1STazXGsdFAT8nUhiiV1f_Z4HOKNnBs8TLKaFXokhA0MqNBOYI--2u 134 nVHDqI_RPmC3p0NmP02Xmv4hzxFmTmpgjSy3vpKQDihOjhwNBh7G81JNaJqjJQTR 135 v_1dHUPJotQjMK3k8_5FyiO2p64Y2VyxyQn1VWVlgOHlJwhj6BaGHk4Qf5F8DHQZ 136 1WCPg2p_-hwfINfXh1_buSjxyDRF4oe9pKy6ZB3ejh9qIMm-WrwltuU1uWMXxN6e 137 S6tUtpKo8UCHBwLWCHmJN7KU6ZojmaISspdS23lELAlyw 139 The example response contains the following JSON document: 141 { 142 "sub": "Z5O3upPC88QrAjx00dis", 143 "aud": "https://protected.example.net/resource", 144 "scope": "read write dolphin", 145 "iss": "https://server.example.com/", 146 "active": true, 147 "exp": 1419356238, 148 "iat": 1419350238, 149 "client_id": "l238j323ds-23ij4", 150 "given_name": "John", 151 "family_name":"Doe", 152 "birthdate":"1982-02-01" 153 } 155 Depending on the specific resource server policy the JWT is either 156 signed, or signed and encrypted. If the JWT is signed and encrypted 157 it MUST be a Nested JWT, as defined in JWT [RFC7519]. 159 Note: If the resource server policy requires a signed and encrypted 160 response and the authorization server receives an unauthenticated 161 request containing an Accept header with content type other than 162 "application/jwt", it MUST refuse to serve the request and return an 163 HTTP status code 400. This is done to prevent downgrading attacks to 164 obtain token data intended for release to legitimate recipients only 165 (see Section 6.2). 167 4. Client Metadata 169 The authorization server determines what algorithm to employ to 170 secure the JWT for a particular introspection response. This 171 decision can be based on registered metadata parameters for the 172 resource server, supplied via dynamic client registration with the 173 resource server posing as the client, as defined by this draft. 175 The parameter names follow the pattern established by OpenID Connect 176 Dynamic Client Registration [OpenID.Registration] for configuring 177 signing and encryption algorithms for JWT responses at the UserInfo 178 endpoint. 180 The following client metadata parameters are introduced by this 181 specification: 183 introspection_signed_response_alg JWS [RFC7515] "alg" algorithm JWA 184 [RFC7518] REQUIRED for signing introspection responses. If 185 this is specified, the response will be signed using JWS and 186 the configured algorithm. The default, if omitted, is 187 "RS256". 189 introspection_encrypted_response_alg JWE [RFC7516] "alg" algorithm 190 JWA [RFC7518] REQUIRED for encrypting introspection 191 responses. If both signing and encryption are requested, the 192 response will be signed then encrypted, with the result being 193 a Nested JWT, as defined in JWT [RFC7519]. The default, if 194 omitted, is that no encryption is performed. 196 introspection_encrypted_response_enc JWE [RFC7516] "enc" algorithm 197 JWA [RFC7518] REQUIRED for encrypting introspection 198 responses. If "introspection_encrypted_response_alg" is 199 specified, the default for this value is A128CBC-HS256. When 200 "introspection_encrypted_response_enc" is included, 201 "introspection_encrypted_response_alg" MUST also be provided. 203 Resource servers may register their public encryption keys using the 204 "jwks_uri" or "jwks" metadata parameters. 206 5. Authorization Server Metadata 208 Authorization servers SHOULD publish the supported algorithms for 209 signing and encrypting the JWT of an introspection response by 210 utilizing OAuth 2.0 Authorization Server Metadata [RFC8414] 211 parameters. 213 The following parameters are introduced by this specification: 215 introspection_signing_alg_values_supported OPTIONAL. JSON array 216 containing a list of the JWS [RFC7515] signing algorithms 217 ("alg" values) JWA [RFC7518] supported by the introspection 218 endpoint to sign the response. 220 introspection_encryption_alg_values_supported OPTIONAL. JSON array 221 containing a list of the JWE [RFC7516] encryption algorithms 222 ("alg" values) JWA [RFC7518] supported by the introspection 223 endpoint to encrypt the response. 225 introspection_encryption_enc_values_supported OPTIONAL. JSON array 226 containing a list of the JWE [RFC7516] encryption algorithms 227 ("enc" values) JWA [RFC7518] supported by the introspection 228 endpoint to encrypt the response. 230 6. Security Considerations 232 6.1. Cross-JWT Confusion 234 JWT introspection responses and OpenID Connect ID Tokens are 235 syntactically similar. An attacker could therefore attempt to 236 impersonate an end-user at a OpenID Connect relying party by passing 237 the JWT as an ID token. 239 Such an attack can be prevented like any other token substitution 240 attack. The authorization server MUST include the claims "iss" and 241 "aud" in each JWT introspection response, with the "iss" value set to 242 the authorization server's issuer URL and the "aud" value set to the 243 resource server's identifier. This allows a correctly implemented 244 OpenID Connect relying party to detect substitution by checking the 245 "iss" and "aud" claims as described in Section 3.1.3.7. of 246 [OpenID.Core]. Relying parties SHOULD also use and check the "nonce" 247 parameter and claim to prevent token and code replay. 249 Resource servers utilizing JWTs to represent structured access tokens 250 could be susceptible to replay attacks. Resource servers should 251 therefore apply proper counter measures against replay as described 252 in [I-D.ietf-oauth-security-topics], section 2.2. 254 JWT Confusion and other attacks involving JWTs are discussed in 255 [I-D.ietf-oauth-jwt-bcp]. 257 6.2. Token Data Leakage 259 If the authorization server supports unauthenticated requests an 260 attacker could potentially retrieve token data which must be kept 261 confidential. This attack can be prevented by either authenticating 262 any request to the token introspection endpoint or by setting up the 263 respective recipient for encrypted responses. 265 In the latter case, confidentiality is ensured by the fact that only 266 the legitimate recipient is able to decrypt the response. An 267 attacker could try to circumvent this measure by requesting a plain 268 JSON response, using an Accept header with the content type set to, 269 for example, "application/json" instead of "application/jwt". To 270 prevent this attack the authorization server MUST NOT serve requests 271 with content type other than "application/jwt" if the resource server 272 is set up to receive encrypted responses (see also Section 3). 274 7. Acknowledgements 276 We would like to thank Petteri Stenius, Neil Madden, Filip Skokan, 277 and Tony Nadalin for their valuable feedback. 279 8. IANA Considerations 280 8.1. OAuth Dynamic Client Registration Metadata Registration 282 This specification requests registration of the following client 283 metadata definitions in the IANA "OAuth Dynamic Client Registration 284 Metadata" registry [IANA.OAuth.Parameters] established by [RFC7591]: 286 8.1.1. Registry Contents 288 o Client Metadata Name: "introspection_signed_response_alg" 290 o Client Metadata Description: String value indicating the client's 291 desired introspection response signing algorithm. 293 o Change Controller: IESG 295 o Specification Document(s): Section 4 of [[ this specification ]] 297 o Client Metadata Name: "introspection_encrypted_response_alg" 299 o Client Metadata Description: String value specifying the desired 300 introspection response encryption algorithm (alg value). 302 o Change Controller: IESG 304 o Specification Document(s): Section 4 of [[ this specification ]] 306 o Client Metadata Name: "introspection_encrypted_response_enc" 308 o Client Metadata Description: String value specifying the desired 309 introspection response encryption algorithm (enc value). 311 o Change Controller: IESG 313 o Specification Document(s): Section 4 of [[ this specification ]] 315 8.2. OAuth Authorization Server Metadata Registration 317 This specification requests registration of the following value in 318 the IANA "OAuth Authorization Server Metadata" registry 319 [IANA.OAuth.Parameters] established by [I-D.ietf-oauth-discovery]. 321 8.2.1. Registry Contents 323 o Metadata Name: "introspection_signing_alg_values_supported" 325 o Metadata Description: JSON array containing a list of algorithms 326 supported by the authorization server for introspection response 327 signing. 329 o Change Controller: IESG 331 o Specification Document(s): Section 5 of [[ this specification ]] 333 o Metadata Name: "introspection_encryption_alg_values_supported" 335 o Metadata Description: JSON array containing a list of algorithms 336 supported by the authorization server for introspection response 337 encryption (alg value). 339 o Change Controller: IESG 341 o Specification Document(s): Section 5 of [[ this specification ]] 343 o Metadata Name: "introspection_encryption_enc_values_supported" 345 o Metadata Description: JSON array containing a list of algorithms 346 supported by the authorization server for introspection response 347 encryption (enc value). 349 o Change Controller: IESG 351 o Specification Document(s): Section 5 of [[ this specification ]] 353 8.3. OAuth Token Introspection Response 355 TBD: add all OpenID Connect standard claims. 357 9. References 359 9.1. Normative References 361 [I-D.ietf-oauth-discovery] 362 Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 363 Authorization Server Metadata", draft-ietf-oauth- 364 discovery-10 (work in progress), March 2018. 366 [I-D.ietf-oauth-jwt-bcp] 367 Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 368 Current Practices", draft-ietf-oauth-jwt-bcp-03 (work in 369 progress), May 2018. 371 [I-D.ietf-oauth-security-topics] 372 Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, 373 "OAuth 2.0 Security Best Current Practice", draft-ietf- 374 oauth-security-topics-06 (work in progress), May 2018. 376 [OpenID.Core] 377 NRI, Ping Identity, Microsoft, Google, and Salesforce, 378 "OpenID Connect Core 1.0 incorporating errata set 1", Nov 379 2014, 380 . 382 [OpenID.Registration] 383 NRI, Ping Identity, and Microsoft, "OpenID Connect Dynamic 384 Client Registration 1.0 incorporating errata set 1", Nov 385 2014, . 388 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 389 Requirement Levels", BCP 14, RFC 2119, 390 DOI 10.17487/RFC2119, March 1997, 391 . 393 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 394 RFC 2246, DOI 10.17487/RFC2246, January 1999, 395 . 397 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 398 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 399 2015, . 401 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 402 RFC 7516, DOI 10.17487/RFC7516, May 2015, 403 . 405 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 406 DOI 10.17487/RFC7518, May 2015, 407 . 409 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 410 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 411 . 413 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 414 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 415 RFC 7591, DOI 10.17487/RFC7591, July 2015, 416 . 418 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 419 RFC 7662, DOI 10.17487/RFC7662, October 2015, 420 . 422 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 423 Authorization Server Metadata", RFC 8414, 424 DOI 10.17487/RFC8414, June 2018, 425 . 427 9.2. Informative References 429 [IANA.OAuth.Parameters] 430 IANA, "OAuth Parameters", 431 . 433 Appendix A. Document History 435 [[ To be removed from the final specification ]] 437 -01 439 o adapted wording to preclude any accept header except "application/ 440 jwt" if encrypted responses are required 442 o use registered alg value RS256 for default signing algorithm 444 o added text on claims in the token introspection response 446 -00 448 o initial version of the WG draft 450 o defined default signing algorithm 452 o changed behavior in case resource server is set up for encryption 454 o Added text on token data leakage prevention to the security 455 considerations 457 o moved Security Considerations section forward 459 WG draft 461 -01 463 o fixed typos in client meta data field names 465 o added OAuth Server Metadata parameters to publish algorithms 466 supported for signing and encrypting the introspection response 468 o added registration of new parameters for OAuth Server Metadata and 469 Client Registration 471 o added explicit request for JWT introspection response 473 o made iss and aud claims mandatory in introspection response 475 o Stylistic and clarifying edits, updates references 477 -00 479 o initial version 481 Authors' Addresses 483 Torsten Lodderstedt (editor) 484 YES.com AG 486 Email: torsten@lodderstedt.net 488 Vladimir Dzhuvinov 489 Connect2id Ltd. 491 Email: vladimir@connect2id.com