idnits 2.17.1 draft-yusef-oauth-nested-jwt-05.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: ---------------------------------------------------------------------------- == There are 2 instances of lines with non-ascii characters in the document. 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 contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (14 June 2022) is 679 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) == Missing Reference: 'NSM' is mentioned on line 170, but not defined 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 R. Shekh-Yusef 3 Internet-Draft Okta 4 Intended status: Standards Track 14 June 2022 5 Expires: 16 December 2022 7 Multi-Subject JSON Web Token (JWT) 8 draft-yusef-oauth-nested-jwt-05 10 Abstract 12 This specification defines a mechanism for including multiple 13 subjects in a JWT. A primary subject in an enclosing JWT with its 14 own claims, and a related secondary subject in a nested JWT with its 15 own claims. 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 16 December 2022. 34 Copyright Notice 36 Copyright (c) 2022 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 (https://trustee.ietf.org/ 41 license-info) in effect on the date of publication of this document. 42 Please review these documents carefully, as they describe your rights 43 and restrictions with respect to this document. Code Components 44 extracted from this document must include Revised BSD License text as 45 described in Section 4.e of the Trust Legal Provisions and are 46 provided without warranty as described in the Revised BSD License. 48 This document may contain material from IETF Documents or IETF 49 Contributions published or made publicly available before November 50 10, 2008. The person(s) controlling the copyright in some of this 51 material may not have granted the IETF Trust the right to allow 52 modifications of such material outside the IETF Standards Process. 53 Without obtaining an adequate license from the person(s) controlling 54 the copyright in such materials, this document may not be modified 55 outside the IETF Standards Process, and derivative works of it may 56 not be created outside the IETF Standards Process, except to format 57 it for publication as an RFC or to translate it into languages other 58 than English. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 2.1. One Issuer Category . . . . . . . . . . . . . . . . . . . 3 66 2.1.1. Primary Subject with Secondary Authority Subject . . 3 67 2.1.2. Multiple Primary Subjects . . . . . . . . . . . . . . 3 68 2.1.3. Delegation of Authority . . . . . . . . . . . . . . . 4 69 2.2. Multiple Issuers Category . . . . . . . . . . . . . . . . 4 70 2.2.1. STIR . . . . . . . . . . . . . . . . . . . . . . . . 4 71 2.2.2. Network Service Mesh (NSM) . . . . . . . . . . . . . 4 72 3. Authorization Request . . . . . . . . . . . . . . . . . . . . 4 73 4. JWT Content . . . . . . . . . . . . . . . . . . . . . . . . . 5 74 5. Token Relationship . . . . . . . . . . . . . . . . . . . . . 5 75 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 76 7. Security Considerations . . . . . . . . . . . . . . . . . . . 7 77 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 78 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 7 79 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 80 10.1. Normative References . . . . . . . . . . . . . . . . . . 7 81 10.2. Informative References . . . . . . . . . . . . . . . . . 7 82 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 84 1. Introduction 86 JSON Web Token (JWT) [RFC7519] is a mechanism that is used to 87 transfer claims between two parties across security domains. Nested 88 JWT is a JWT in which the payload is another JWT. The current 89 specification does not define a means by which the enclosing JWT 90 could have its own Claims Set, only the enclosed JWT would have 91 claims. 93 There are a number of use cases where there is a need to represent 94 multiple related subjects in one JWT; a primary subject and a related 95 secondary subject. 97 This specification defines a mechanism for including multiple 98 subjects in a JWT. A primary subject in an enclosing JWT with its 99 own claims, and a related secondary subject in a nested JWT with its 100 own claims. 102 1.1. Terminology 104 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 105 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 106 document are to be interpreted as described in [RFC8174]. 108 2. Use Cases 110 The following are few use cases that might benefit from such a 111 concept, that fall into two different categories: 113 2.1. One Issuer Category 115 In the following cases, both JWTs are issued by the same issuer. 117 2.1.1. Primary Subject with Secondary Authority Subject 119 A primary subject with a related secondary subject that has authority 120 over the primary subject, e.g. Child/Parent, Pet/Owner. 122 The secondary user (e.g., parent) logs in to an application (e.g., 123 pharmacy application), gets redirected to the authorization server, 124 authenticates, and asks for permission to access resources (e.g., 125 medication) for the primary subject (e.g., child). The authorization 126 server then issues a JWT with the primary subject in the enclosing 127 JWT and the secondary subject in the nested JWT. 129 2.1.2. Multiple Primary Subjects 131 Two or more primary related subjects e.g. a married couple. The 132 authorization server is setup to provide one of the subjects with 133 permissions to access the other related subject resources. 135 One user (e.g., wife) logs in to a application (e.g., pharmacy 136 application), gets redirected to the authorization server, 137 authenticates, and asks for permission to access resources (e.g., 138 medication) for the other primary subject (e.g., husband). The 139 authorization server then issues a JWT with the primary subject in 140 the enclosing JWT and the other primary subject in the nested JWT. 142 2.1.3. Delegation of Authority 144 A primary subject delegates authority over a resource to a secondary 145 subject who acts on behalf of the primary subject, as defined in 146 [RFC8693]. 148 2.2. Multiple Issuers Category 150 In the following cases, the JWTs are issued by different issuers. 152 2.2.1. STIR 154 [RFC8225] defines a PASSporT, which is a JWT, that is used to verify 155 the identity of a caller in an incoming call. 157 The PASSporT Extension for Diverted Calls draft [STIR] uses a nested 158 PASSporT to deliver the details of an incoming call that get 159 redirected. An authentication service acting for a retargeting 160 entity generates new PASSporT and embeds the original PASSporT inside 161 the new one. When the new target receives the nested PASSporT it 162 will be able to validate the enclosing PASSporT and use the details 163 of the enclosed PASSporT to identify the original target. 165 In this case, the original JWT is issued by the calling service, and 166 the new enclosing JWT is issued by the retargeting service. 168 2.2.2. Network Service Mesh (NSM) 170 Network Service Mesh [NSM] is a mechanism that maps the concept of a 171 service mesh in Kubernetes to L2/L3 payloads. 173 NSM GRPS messages may pass through multiple intermediaries, each of 174 which may transform the message. Each intermediary is expected to 175 create its own JWT token, and include a claim that contains the JWT 176 it received with the message it has transformed. 178 In this case, the original JWT is issued by the entity sending the 179 initial message, and the new enclosing JWT is issued by the 180 intermediate entity. 182 3. Authorization Request 184 To allow the AS to differentiate between an authorization request for 185 a single subject and an authorization request for multiple subjects, 186 this document defines the following parameter: 188 issuer-hint: 190 A hint to the AS that the request is for a multi-subject token, 191 which can take one of two values: 193 Internal 194 Indicates that the AS handling the current request will be 195 issuing both enclosing and enclosed JWTs. 197 External 198 Indicates that an external entity has issued the JWT to be 199 enclosed, which will be carried in access_token parameter. 201 If the access_token query parameter is included in the request, then 202 the AS SHOULD embed the provided token in the issued token, if the 203 issuer-hint has the "External" value. 205 4. JWT Content 207 The payload of the enclosing JWT is JSON object that contains the 208 Claims Set of the primary subject, and one new claim that is used to 209 hold the enclosed JWT and its relation to the primary subject. 211 This document defines a new claim, "rsub" (Related Subject) Claim, 212 that is used to contain the enclosed JWT and its relation to the 213 primary subject. The "rsub" contains two claims: 215 rel: 216 Defines the relationship between the enclosed JWT and the 217 enclosing JWT. It can take one of the values defined in section 218 Section 5 220 jwt: 221 Contains the enclosed JWT. 223 5. Token Relationship 225 The following relathionship types are defined by this specification: 227 urn:ietf:params:oauth:subject-type:authority 228 Indicates that the subject in the enclosed JWT has authority over 229 the subject in the enclosing JWT. 231 This URN could be used in the child/parent use case described in 232 Section 2.1.1. 234 urn:ietf:params:oauth:subject-type:primary 235 Indicates that the subject in the enclosed JWT is related primary 236 subject 237 This URN could be used in the married couple use case described in 238 Section 2.1.2. 240 urn:ietf:params:oauth:subject-type:actor 241 Indicates that the subject in the enclosed JWT is acting on behalf 242 of the primary subject 244 This URN could be used in the delegation use case described in 245 Section 2.1.3. 247 urn:ietf:params:oauth:subject-type:original 248 Indicates that the subject in the enclosed JWT is the original JWT 249 that resulted in the primary subject JWT 251 This URN could be used in all the use cases described in 252 Section 2.2. 254 6. Example 256 The following example is for a multi-subject token that represents a 257 child/parent relashionship. The enclosing JWT represents the primary 258 user, the child in this case, and the enclosed token in the "rsub" 259 claim represents the secondary user, the parent in this case. 261 { 262 "alg": "HS256", 263 "typ": "JWT", 264 } 265 { 266 "sub": "1234567890", 267 "name": "John Doe", 268 "iat": 1516239022, 269 "rsub": { 270 “rel” : "urn:ietf:params:oauth:subject-type:authority" 271 “jwt” : { 272 "sub": "9876543210", 273 "name": "Alice Doe", 274 "iat": 1516239022, 275 } 276 } 277 } 279 In this use case, both JWTs are issued by the same entity handling 280 the authorization request. 282 7. Security Considerations 284 The existing security considerations apply to the use cases where the 285 JWTs are issued by the same entity. Allowing more than one subject 286 to access the same account might open the door for potential abuse. 287 Care must be taken to ensure that when a secondary subject is added 288 to an account that an adequate approval process is in place. 290 In the multiple issuers use cases, the entity handling the incoming 291 authorization request that contains a JWT MUST validate the token and 292 ensure that it is coming from a trusted entity, before attempting to 293 embed that JWT into a new multi-subject JWT issued by the AS. 295 8. IANA Considerations 297 TODO 299 9. Acknowledgments 301 TODO 303 10. References 305 10.1. Normative References 307 [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token 308 (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, 309 . 311 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 312 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 313 May 2017, . 315 10.2. Informative References 317 [RFC8225] Wendt, C. and J. Peterson, "PASSporT: Personal Assertion 318 Token", RFC 8225, DOI 10.17487/RFC8225, February 2018, 319 . 321 [RFC8693] Jones, M., Nadalin, A., Campbell, B., Bradley, J., and C. 322 Mortimore, "OAuth 2.0 Token Exchange", October 2018. 324 [STIR] Peterson, J., "PASSporT Extension for Diverted Calls", 325 October 2018. 327 Author's Address 328 Rifaat Shekh-Yusef 329 Okta 330 Ottawa, Ontario, Canada 331 Email: rifaat.s.ietf@gmail.com