--- 1/draft-ietf-ace-cbor-web-token-13.txt 2018-03-16 02:14:11.043026467 -0700 +++ 2/draft-ietf-ace-cbor-web-token-14.txt 2018-03-16 02:14:11.091027613 -0700 @@ -1,23 +1,23 @@ ACE Working Group M. Jones Internet-Draft Microsoft Intended status: Standards Track E. Wahlstroem -Expires: September 6, 2018 +Expires: September 16, 2018 S. Erdtman Spotify AB H. Tschofenig ARM Ltd. - March 5, 2018 + March 15, 2018 CBOR Web Token (CWT) - draft-ietf-ace-cbor-web-token-13 + draft-ietf-ace-cbor-web-token-14 Abstract CBOR Web Token (CWT) is a compact means of representing claims to be transferred between two parties. The claims in a CWT are encoded in the Concise Binary Object Representation (CBOR) and CBOR Object Signing and Encryption (COSE) is used for added application layer security protection. A claim is a piece of information asserted about a subject and is represented as a name/value pair consisting of a claim name and a claim value. CWT is derived from JSON Web Token @@ -31,21 +31,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on September 6, 2018. + This Internet-Draft will expire on September 16, 2018. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -95,21 +95,21 @@ A.2.1. 128-bit Symmetric Key . . . . . . . . . . . . . . . . 17 A.2.2. 256-bit Symmetric Key . . . . . . . . . . . . . . . . 17 A.2.3. ECDSA P-256 256-bit COSE Key . . . . . . . . . . . . 17 A.3. Example Signed CWT . . . . . . . . . . . . . . . . . . . 18 A.4. Example MACed CWT . . . . . . . . . . . . . . . . . . . . 19 A.5. Example Encrypted CWT . . . . . . . . . . . . . . . . . . 20 A.6. Example Nested CWT . . . . . . . . . . . . . . . . . . . 21 A.7. Example MACed CWT with a floating-point value . . . . . . 22 Appendix B. Acknowledgements . . . . . . . . . . . . . . . . . . 23 Appendix C. Document History . . . . . . . . . . . . . . . . . . 23 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 26 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 27 1. Introduction The JSON Web Token (JWT) [RFC7519] is a standardized security token format that has found use in OAuth 2.0 and OpenID Connect deployments, among other applications. JWT uses JSON Web Signature (JWS) [RFC7515] and JSON Web Encryption (JWE) [RFC7516] to secure the contents of the JWT, which is a set of claims represented in JSON. The use of JSON for encoding information is popular for Web and native applications, but it is considered inefficient for some @@ -141,31 +141,32 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. This document reuses terminology from JWT [RFC7519] and COSE [RFC8152]. StringOrURI - The "StringOrURI" term has the same meaning and processing rules - as the "StringOrURI" term defined in Section 2 of [RFC7519], - except that it uses a CBOR text string instead of a JSON string - value. + The "StringOrURI" term in this specification has the same meaning + and processing rules as the JWT "StringOrURI" term defined in + Section 2 of [RFC7519], except that it is represented as a CBOR + text string instead of a JSON text string. NumericDate - The "NumericDate" term has the same meaning and processing rules - as the "NumericDate" term defined in Section 2 of [RFC7519], - except that the CBOR numeric date representation (from - Section 2.4.1 of [RFC7049]) is used. The encoding is modified so - that the leading tag 1 (epoch-based date/time) MUST be omitted. + The "NumericDate" term in this specification has the same meaning + and processing rules as the JWT "NumericDate" term defined in + Section 2 of [RFC7519], except that it is represented as a CBOR + numeric date (from Section 2.4.1 of [RFC7049]) instead of a JSON + number. The encoding is modified so that the leading tag 1 + (epoch-based date/time) MUST be omitted. Claim Name The human-readable name used to identify a claim. Claim Key The CBOR map key used to identify a claim. Claim Value The CBOR map value representing the value of the claim. @@ -190,66 +191,66 @@ None of the claims defined below are intended to be mandatory to use or implement. They rather provide a starting point for a set of useful, interoperable claims. Applications using CWTs should define which specific claims they use and when they are required or optional. 3.1.1. iss (Issuer) Claim The "iss" (issuer) claim has the same meaning and processing rules as the "iss" claim defined in Section 4.1.1 of [RFC7519], except that - the value is of type StringOrURI. The Claim Key 1 is used to - identify this claim. + the value is a StringOrURI. The Claim Key 1 is used to identify this + claim. 3.1.2. sub (Subject) Claim The "sub" (subject) claim has the same meaning and processing rules as the "sub" claim defined in Section 4.1.2 of [RFC7519], except that - the value is of type StringOrURI. The Claim Key 2 is used to - identify this claim. + the value is a StringOrURI. The Claim Key 2 is used to identify this + claim. 3.1.3. aud (Audience) Claim The "aud" (audience) claim has the same meaning and processing rules as the "aud" claim defined in Section 4.1.3 of [RFC7519], except that - the value of the audience claim is of type StringOrURI when it is not - an array or the values of the audience array elements are of type - StringOrURI when the audience claim value is an array. The Claim Key - 3 is used to identify this claim. + the value of the audience claim is a StringOrURI when it is not an + array or each of the audience array element values is a StringOrURI + when the audience claim value is an array. The Claim Key 3 is used + to identify this claim. 3.1.4. exp (Expiration Time) Claim The "exp" (expiration time) claim has the same meaning and processing rules as the "exp" claim defined in Section 4.1.4 of [RFC7519], - except that the value is of type NumericDate. The Claim Key 4 is - used to identify this claim. + except that the value is a NumericDate. The Claim Key 4 is used to + identify this claim. 3.1.5. nbf (Not Before) Claim The "nbf" (not before) claim has the same meaning and processing rules as the "nbf" claim defined in Section 4.1.5 of [RFC7519], - except that the value is of type NumericDate. The Claim Key 5 is - used to identify this claim. + except that the value is a NumericDate. The Claim Key 5 is used to + identify this claim. 3.1.6. iat (Issued At) Claim The "iat" (issued at) claim has the same meaning and processing rules as the "iat" claim defined in Section 4.1.6 of [RFC7519], except that - the value is of type NumericDate. The Claim Key 6 is used to - identify this claim. + the value is a NumericDate. The Claim Key 6 is used to identify this + claim. 3.1.7. cti (CWT ID) Claim The "cti" (CWT ID) claim has the same meaning and processing rules as the "jti" claim defined in Section 4.1.7 of [RFC7519], except that - the value is of type byte string. The Claim Key 7 is used to - identify this claim. + the value is a byte string. The Claim Key 7 is used to identify this + claim. 4. Summary of the claim names, keys, and value types +------+-----+----------------------------------+ | Name | Key | Value type | +------+-----+----------------------------------+ | iss | 1 | text string | | sub | 2 | text string | | aud | 3 | text string | | exp | 4 | integer or floating-point number | @@ -403,21 +404,21 @@ Since the claims conveyed in a CWT may be used to make authorization decisions, it is not only important to protect the CWT in transit but also to ensure that the recipient can authenticate the party that assembled the claims and created the CWT. Without trust of the recipient in the party that created the CWT, no sensible authorization decision can be made. Furthermore, the creator of the CWT needs to carefully evaluate each claim value prior to including it in the CWT so that the recipient can be assured of the validity of the information provided. - While syntactically, the signing and encryption operations for Nested + While syntactically the signing and encryption operations for Nested CWTs may be applied in any order, if both signing and encryption are necessary, normally producers should sign the message and then encrypt the result (thus encrypting the signature). This prevents attacks in which the signature is stripped, leaving just an encrypted message, as well as providing privacy for the signer. Furthermore, signatures over encrypted text are not considered valid in many jurisdictions. 9. IANA Considerations @@ -443,20 +444,24 @@ iesg@ietf.org mailing list) for resolution. Criteria that should be applied by the Designated Experts includes determining whether the proposed registration duplicates existing functionality, whether it is likely to be of general applicability or whether it is useful only for a single application, and whether the registration description is clear. Registrations for the limited set of values between -256 and 255 and strings of length 1 are to be restricted to claims with general applicability. + IANA must only accept registry updates from the Designated Experts + and should direct all requests for registration to the review mailing + list. + It is suggested that multiple Designated Experts be appointed who are able to represent the perspectives of different applications using this specification in order to enable broadly informed review of registration decisions. In cases where a registration decision could be perceived as creating a conflict of interest for a particular Expert, that Expert should defer to the judgment of the other Experts. Since a high degree of overlap is expected between the contents of the "CBOR Web Token (CWT) Claims" registry and the "JSON Web Token @@ -474,27 +479,27 @@ JWT Claim Name: Claim Name of the equivalent JWT claim, as registered in [IANA.JWT.Claims]. CWT claims should normally have a corresponding JWT claim. If a corresponding JWT claim would not make sense, the Designated Experts can choose to accept registrations for which the JWT Claim Name is listed as "N/A". Claim Key: CBOR map key for the claim. Different ranges of values use - different registration policies [RFC8126]. Integer values between - -256 and 255 and strings of length 1 are designated as Standards - Action. Integer values from -65536 to 65535 and strings of length - 2 are designated as Specification Required. Integer values of - greater than 65535 and strings of length greater than 2 are - designated as Expert Review. Integer values less than -65536 are - marked as Private Use. + different registration policies [RFC8126]. Integer values from + -256 to 255 and strings of length 1 are designated as Standards + Action. Integer values from -65536 to -257 and from 256 to 65535 + and strings of length 2 are designated as Specification Required. + Integer values greater than 65535 and strings of length greater + than 2 are designated as Expert Review. Integer values less than + -65536 are marked as Private Use. Claim Value Type(s): CBOR types that can be used for the claim value. Change Controller: For Standards Track RFCs, list the "IESG". For others, give the name of the responsible party. Other details (e.g., postal address, email address, home page URI) may also be included. Specification Document(s): @@ -1004,32 +1009,55 @@ ) Figure 19: MACed CWT with a floating-point value in CBOR diagnostic notation Appendix B. Acknowledgements This specification is based on JSON Web Token (JWT) [RFC7519], the authors of which also include Nat Sakimura and John Bradley. It also incorporates suggestions made by many people, including Carsten - Bormann, Esko Dijk, Benjamin Kaduk, Carlos Martinez, Kathleen - Moriarty, Dan Romascanu, Kyle Rose, Jim Schaad, Ludwig Seitz, and + Bormann, Alissa Cooper, Esko Dijk, Benjamin Kaduk, Warren Kumari, + Carlos Martinez, Alexey Melnikov, Kathleen Moriarty, Eric Rescorla, + Dan Romascanu, Adam Roach, Kyle Rose, Jim Schaad, Ludwig Seitz, and Goeran Selander. [[ RFC Editor: Is it possible to preserve the non-ASCII spellings of the names Erik Wahlstroem and Goeran Selander in the final specification? ]] Appendix C. Document History [[ to be removed by the RFC Editor before publication as an RFC ]] + -14 + + o Cleaned up the descriptions of the numeric ranges of claim keys + being registered in the registration template for the "CBOR Web + Token (CWT) Claims" registry, as suggested by Adam Roach. + + o Clarified the relationships between the JWT and CWT "NumericDate" + and "StringOrURI" terms, as suggested by Adam Roach. + + o Eliminated unnecessary uses of the word "type", as suggested by + Adam Roach. + + o Added the text "IANA must only accept registry updates from the + Designated Experts and should direct all requests for registration + to the review mailing list" from RFC 7519, as suggested by Amanda + Baber of IANA, which is also intended to address Alexey Melnikov's + comment. + + o Removed a superfluous comma, as suggested by Warren Kumari. + + o Acknowledged additional reviewers. + -13 o Clarified the registration criteria applied to different ranges of Claim Key values, as suggested by Kathleen Moriarty and Dan Romascanu. o No longer describe the syntax of CWT claims as being the same as that of the corresponding JWT claims, as suggested by Kyle Rose. o Added guidance about the selection of the Designated Experts, as