idnits 2.17.1 draft-lodderstedt-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 (May 28, 2018) is 2154 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 353, but no explicit reference was found in the text == Unused Reference: 'RFC2246' is defined on line 358, 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 (-25) 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: November 29, 2018 Connect2id Ltd. 6 May 28, 2018 8 JWT Response for OAuth Token Introspection 9 draft-lodderstedt-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 November 29, 2018. 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 . . . . . . . . . . . . . . . . . . 2 52 3. JWT Response . . . . . . . . . . . . . . . . . . . . . . . . 3 53 4. Client Metadata . . . . . . . . . . . . . . . . . . . . . . . 4 54 5. Authorization Server Metadata . . . . . . . . . . . . . . . . 5 55 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 56 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 57 7.1. OAuth Dynamic Client Registration Metadata Registration . 5 58 7.1.1. Registry Contents . . . . . . . . . . . . . . . . . . 5 59 7.2. OAuth Authorization Server Metadata Registration . . . . 6 60 7.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 6 61 7.3. OAuth Token Introspection Response . . . . . . . . . . . 7 62 8. Security Considerations . . . . . . . . . . . . . . . . . . . 7 63 8.1. Cross-JWT Confusion . . . . . . . . . . . . . . . . . . . 7 64 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 65 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 66 9.2. Informative References . . . . . . . . . . . . . . . . . 9 67 Appendix A. Document History . . . . . . . . . . . . . . . . . . 9 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 70 1. Introduction 72 OAuth 2.0 Token Introspection [RFC7662] specifies a method for a 73 protected resource to query an OAuth 2.0 authorization server to 74 determine the state of an access token and obtain data associated 75 with the access token. This allows deployments to implement 76 identifier-based access tokens in an interoperable way. 78 The introspection response as specified in OAuth 2.0 Token 79 Introspection [RFC7662] is a plain JSON object. However, there are 80 use cases where the resource server requires stronger assurance that 81 the authorisation server issued the access token, including cases 82 where the authorisation server assumes liability for the token's 83 content. An example is a resource server using verified person data 84 to create qualified electronic signatures. 86 In such use cases, it would be useful to return a signed JWT as the 87 introspection response. This specification extends the Token 88 Introspection endpoint with the capability to return responses as 89 JWTs. 91 2. Requesting a JWT Response 93 A resource server requests to receive a JWT introspection response by 94 including an Accept header with content type "application/jwt" in the 95 introspection request. 97 The following is a non-normative example request: 99 POST /introspect HTTP/1.1 100 Host: server.example.com 101 Accept: application/jwt 102 Content-Type: application/x-www-form-urlencoded 104 token=2YotnFZFEjr1zCsicMWpAA 106 3. JWT Response 108 The introspection endpoint responds with a JWT, setting the Content- 109 Type header to "application/jwt". 111 This JWT MUST contain the claims "iss" and "aud" in order to prevent 112 misuse of the JWT as ID or access token (see Section 8.1). 114 This JWT may furthermore contain all other claims described in 115 Section 2.2. of [RFC7662]. 117 The following is a non-normative example response (with line breaks 118 for display purposes only): 120 HTTP/1.1 200 OK 121 Content-Type: application/jwt 123 eyJraWQiOiIxIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJaNU8zdXBQQzg4UXJBa 124 ngwMGRpcyIsImF1ZCI6Imh0dHBzOlwvXC9wcm90ZWN0ZWQuZXhhbXBsZS5uZXRcL 125 3Jlc291cmNlIiwiZXh0ZW5zaW9uX2ZpZWxkIjoidHdlbnR5LXNldmVuIiwic2Nvc 126 GUiOiJyZWFkIHdyaXRlIGRvbHBoaW4iLCJpc3MiOiJodHRwczpcL1wvc2VydmVyL 127 mV4YW1wbGUuY29tXC8iLCJhY3RpdmUiOnRydWUsImV4cCI6MTQxOTM1NjIzOCwia 128 WF0IjoxNDE5MzUwMjM4LCJjbGllbnRfaWQiOiJsMjM4ajMyM2RzLTIzaWo0Iiwid 129 XNlcm5hbWUiOiJqZG9lIn0.HEQHf05vqVvWVnWuEjbzUnPz6JDQVR69QkxgzBNq5 130 kk-sK54ieg1STazXGsdFAT8nUhiiV1f_Z4HOKNnBs8TLKaFXokhA0MqNBOYI--2u 131 nVHDqI_RPmC3p0NmP02Xmv4hzxFmTmpgjSy3vpKQDihOjhwNBh7G81JNaJqjJQTR 132 v_1dHUPJotQjMK3k8_5FyiO2p64Y2VyxyQn1VWVlgOHlJwhj6BaGHk4Qf5F8DHQZ 133 1WCPg2p_-hwfINfXh1_buSjxyDRF4oe9pKy6ZB3ejh9qIMm-WrwltuU1uWMXxN6e 134 S6tUtpKo8UCHBwLWCHmJN7KU6ZojmaISspdS23lELAlyw 136 The example response contains the following JSON document: 138 { 139 "sub": "Z5O3upPC88QrAjx00dis", 140 "aud": "https://protected.example.net/resource", 141 "scope": "read write dolphin", 142 "iss": "https://server.example.com/", 143 "active": true, 144 "exp": 1419356238, 145 "iat": 1419350238, 146 "client_id": "l238j323ds-23ij4", 147 "given_name": "John", 148 "family_name":"Doe", 149 "birthdate":"1982-02-01" 150 } 152 4. Client Metadata 154 The authorization server determines what algorithm to employ to 155 secure the JWT for a particular introspection response. This 156 decision can be based on registered metadata parameters for the 157 resource server, supplied via dynamic client registration with the 158 resource server posing as the client. 160 The parameter names follow the pattern established by OpenID Connect 161 Dynamic Client Registration [OpenID.Registration] for configuring 162 signing and encryption algorithms for JWT responses at the UserInfo 163 endpoint. 165 The following client metadata parameters are introduced by this 166 specification: 168 introspection_signed_response_alg JWS [RFC7515] "alg" algorithm JWA 169 [RFC7518] REQUIRED for signing introspection responses. If 170 this is specified, the response will be JWT [RFC7519] 171 serialized, and signed using JWS. The default, if omitted, 172 is for the introspection response to return the Claims as a 173 UTF-8 encoded JSON object using the "application/json" 174 content type, as defined in [RFC7662]. 176 introspection_encrypted_response_alg JWE [RFC7516] "alg" algorithm 177 JWA [RFC7518] REQUIRED for encrypting introspection 178 responses. If both signing and encryption are requested, the 179 response will be signed then encrypted, with the result being 180 a Nested JWT, as defined in JWT [RFC7519]. The default, if 181 omitted, is that no encryption is performed. 183 introspection_encrypted_response_enc JWE [RFC7516] "enc" algorithm 184 JWA [RFC7518] REQUIRED for encrypting introspection 185 responses. If "introspection_encrypted_response_alg" is 186 specified, the default for this value is A128CBC-HS256. When 187 "introspection_encrypted_response_enc" is included, 188 "introspection_encrypted_response_alg" MUST also be provided. 190 Resource servers may register their public encryption keys using the 191 "jwks_uri" or "jwks" metadata parameters. 193 5. Authorization Server Metadata 195 Authorization servers SHOULD publish the supported algorithms for 196 signing and encrypting the JWT of an introspection response by 197 utilizing OAuth Authorization Server Metadata parameters. 199 The following parameters are introduced by this specification: 201 introspection_signing_alg_values_supported OPTIONAL. JSON array 202 containing a list of the JWS [RFC7515] signing algorithms 203 ("alg" values) JWA [RFC7518] supported by the Introspection 204 Endpoint to sign the response. 206 introspection_encryption_alg_values_supported OPTIONAL. JSON array 207 containing a list of the JWE [RFC7516] encryption algorithms 208 ("alg" values) JWA [RFC7518] supported by the Introspection 209 Endpoint to encrypt the response. 211 introspection_encryption_enc_values_supported OPTIONAL. JSON array 212 containing a list of the JWE [RFC7516] encryption algorithms 213 ("enc" values) JWA [RFC7518] supported by the Introspection 214 Endpoint to encrypt the response. 216 6. Acknowledgements 218 We would like to thank Petteri Stenius and Neil Madden for their 219 valuable feedback. 221 7. IANA Considerations 223 7.1. OAuth Dynamic Client Registration Metadata Registration 225 This specification requests registration of the following client 226 metadata definitions in the IANA "OAuth Dynamic Client Registration 227 Metadata" registry [IANA.OAuth.Parameters] established by [RFC7591]: 229 7.1.1. Registry Contents 231 o Client Metadata Name: "introspection_signed_response_alg" 232 o Client Metadata Description: String value indicating the client's 233 desired introspection response signing algorithm. 235 o Change Controller: IESG 237 o Specification Document(s): Section 4 of [[ this specification ]] 239 o Client Metadata Name: "introspection_encrypted_response_alg" 241 o Client Metadata Description: String value specifying the desired 242 introspection response encryption algorithm (alg value). 244 o Change Controller: IESG 246 o Specification Document(s): Section 4 of [[ this specification ]] 248 o Client Metadata Name: "introspection_encrypted_response_enc" 250 o Client Metadata Description: String value specifying the desired 251 introspection response encryption algorithm (enc value). 253 o Change Controller: IESG 255 o Specification Document(s): Section 4 of [[ this specification ]] 257 7.2. OAuth Authorization Server Metadata Registration 259 This specification requests registration of the following value in 260 the IANA "OAuth Authorization Server Metadata" registry 261 [IANA.OAuth.Parameters] established by [I-D.ietf-oauth-discovery]. 263 7.2.1. Registry Contents 265 o Metadata Name: "introspection_signing_alg_values_supported" 267 o Metadata Description: JSON array containing a list of algorithms 268 supported by the authorization server for introspection response 269 signing. 271 o Change Controller: IESG 273 o Specification Document(s): Section 5 of [[ this specification ]] 275 o Metadata Name: "introspection_encryption_alg_values_supported" 277 o Metadata Description: JSON array containing a list of algorithms 278 supported by the authorization server for introspection response 279 encryption (alg value). 281 o Change Controller: IESG 283 o Specification Document(s): Section 5 of [[ this specification ]] 285 o Metadata Name: "introspection_encryption_enc_values_supported" 287 o Metadata Description: JSON array containing a list of algorithms 288 supported by the authorization server for introspection response 289 encryption (enc value). 291 o Change Controller: IESG 293 o Specification Document(s): Section 5 of [[ this specification ]] 295 7.3. OAuth Token Introspection Response 297 TBD: add all OpenID Connect standard claims. 299 8. Security Considerations 301 8.1. Cross-JWT Confusion 303 JWT introspection responses and OpenID Connect ID Tokens are 304 syntactically more or less equivalent. An attacker could therefore 305 try to misuse an JWT obtained from an introspection response to 306 impersonate the user whose claims are included in this JWT at a 307 OpenID Connect RP. Such an attack is treated and prevented like any 308 other token substitution attack. The AS MUST include the claims 309 "iss" and "aud" into every JWT introspection response. This allows 310 every well behaving OpenID Connect RP to detect substitution by 311 checking the "iss" and "aud" claims as described in Section 3.1.3.7. 312 of [OpenID.Core]. RPs should also use and check the "nonce" 313 parameter and claim to prevent token and code replay. 315 Resource servers utilizing JWTs to represent structured access tokens 316 could be susceptible to replay attacks as well. Resource servers 317 should therefore apply proper counter measures against replay as 318 described in [I-D.ietf-oauth-security-topics], section 2.2. 320 JWT Confusion and other attacks on JWTs are discussed in detail in 321 [I-D.ietf-oauth-jwt-bcp]. 323 9. References 324 9.1. Normative References 326 [I-D.ietf-oauth-discovery] 327 Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 328 Authorization Server Metadata", draft-ietf-oauth- 329 discovery-10 (work in progress), March 2018. 331 [I-D.ietf-oauth-jwt-bcp] 332 Sheffer, Y., Hardt, D., and M. Jones, "JSON Web Token Best 333 Current Practices", draft-ietf-oauth-jwt-bcp-03 (work in 334 progress), May 2018. 336 [I-D.ietf-oauth-security-topics] 337 Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett, 338 "OAuth 2.0 Security Best Current Practice", draft-ietf- 339 oauth-security-topics-06 (work in progress), May 2018. 341 [OpenID.Core] 342 NRI, Ping Identity, Microsoft, Google, and Salesforce, 343 "OpenID Connect Core 1.0 incorporating errata set 1", Nov 344 2014, 345 . 347 [OpenID.Registration] 348 NRI, Ping Identity, and Microsoft, "OpenID Connect Dynamic 349 Client Registration 1.0 incorporating errata set 1", Nov 350 2014, . 353 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 354 Requirement Levels", BCP 14, RFC 2119, 355 DOI 10.17487/RFC2119, March 1997, 356 . 358 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 359 RFC 2246, DOI 10.17487/RFC2246, January 1999, 360 . 362 [RFC7515] Jones, M., Bradley, J., and N. Sakimura, "JSON Web 363 Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 364 2015, . 366 [RFC7516] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", 367 RFC 7516, DOI 10.17487/RFC7516, May 2015, 368 . 370 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 371 DOI 10.17487/RFC7518, May 2015, 372 . 374 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 375 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 376 . 378 [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and 379 P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol", 380 RFC 7591, DOI 10.17487/RFC7591, July 2015, 381 . 383 [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", 384 RFC 7662, DOI 10.17487/RFC7662, October 2015, 385 . 387 9.2. Informative References 389 [IANA.OAuth.Parameters] 390 IANA, "OAuth Parameters", 391 . 393 Appendix A. Document History 395 [[ To be removed from the final specification ]] 397 -01 399 o fixed typos in client meta data field names 401 o added OAuth Server Metadata parameters to publish algorithms 402 supported for signing and encrypting the introspection response 404 o added registration of new parameters for OAuth Server Metadata and 405 Client Registration 407 o added explicit request for JWT introspection response 409 o made iss and aud claims mandatory in introspection response 411 o Stylistic and clarifying edits, updates references 413 -00 415 o initial version 417 Authors' Addresses 419 Torsten Lodderstedt (editor) 420 YES.com AG 422 Email: torsten@lodderstedt.net 424 Vladimir Dzhuvinov 425 Connect2id Ltd. 427 Email: vladimir@connect2id.com