draft-ietf-oauth-json-web-token-32.txt   rfc7519.txt 
OAuth Working Group M. Jones Internet Engineering Task Force (IETF) M. Jones
Internet-Draft Microsoft Request for Comments: 7519 Microsoft
Intended status: Standards Track J. Bradley Category: Standards Track J. Bradley
Expires: June 12, 2015 Ping Identity ISSN: 2070-1721 Ping Identity
N. Sakimura N. Sakimura
NRI NRI
December 9, 2014 May 2015
JSON Web Token (JWT) JSON Web Token (JWT)
draft-ietf-oauth-json-web-token-32
Abstract Abstract
JSON Web Token (JWT) is a compact, URL-safe means of representing JSON Web Token (JWT) is a compact, URL-safe means of representing
claims to be transferred between two parties. The claims in a JWT claims to be transferred between two parties. The claims in a JWT
are encoded as a JavaScript Object Notation (JSON) object that is are encoded as a JSON object that is used as the payload of a JSON
used as the payload of a JSON Web Signature (JWS) structure or as the Web Signature (JWS) structure or as the plaintext of a JSON Web
plaintext of a JSON Web Encryption (JWE) structure, enabling the Encryption (JWE) structure, enabling the claims to be digitally
claims to be digitally signed or MACed and/or encrypted. signed or integrity protected with a Message Authentication Code
(MAC) and/or encrypted.
Status of this Memo
This Internet-Draft is submitted in full conformance with the Status of This Memo
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering This is an Internet Standards Track document.
Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in Section 2 of RFC 5741.
This Internet-Draft will expire on June 12, 2015. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc7519.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 4
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. JSON Web Token (JWT) Overview . . . . . . . . . . . . . . . . 6 3. JSON Web Token (JWT) Overview . . . . . . . . . . . . . . . . 6
3.1. Example JWT . . . . . . . . . . . . . . . . . . . . . . . 6 3.1. Example JWT . . . . . . . . . . . . . . . . . . . . . . . 7
4. JWT Claims . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4. JWT Claims . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1. Registered Claim Names . . . . . . . . . . . . . . . . . . 8 4.1. Registered Claim Names . . . . . . . . . . . . . . . . . 9
4.1.1. "iss" (Issuer) Claim . . . . . . . . . . . . . . . . . 9 4.1.1. "iss" (Issuer) Claim . . . . . . . . . . . . . . . . 9
4.1.2. "sub" (Subject) Claim . . . . . . . . . . . . . . . . 9 4.1.2. "sub" (Subject) Claim . . . . . . . . . . . . . . . . 9
4.1.3. "aud" (Audience) Claim . . . . . . . . . . . . . . . . 9 4.1.3. "aud" (Audience) Claim . . . . . . . . . . . . . . . 9
4.1.4. "exp" (Expiration Time) Claim . . . . . . . . . . . . 9 4.1.4. "exp" (Expiration Time) Claim . . . . . . . . . . . . 9
4.1.5. "nbf" (Not Before) Claim . . . . . . . . . . . . . . . 9 4.1.5. "nbf" (Not Before) Claim . . . . . . . . . . . . . . 10
4.1.6. "iat" (Issued At) Claim . . . . . . . . . . . . . . . 10 4.1.6. "iat" (Issued At) Claim . . . . . . . . . . . . . . . 10
4.1.7. "jti" (JWT ID) Claim . . . . . . . . . . . . . . . . . 10 4.1.7. "jti" (JWT ID) Claim . . . . . . . . . . . . . . . . 10
4.2. Public Claim Names . . . . . . . . . . . . . . . . . . . . 10 4.2. Public Claim Names . . . . . . . . . . . . . . . . . . . 10
4.3. Private Claim Names . . . . . . . . . . . . . . . . . . . 10 4.3. Private Claim Names . . . . . . . . . . . . . . . . . . . 10
5. JOSE Header . . . . . . . . . . . . . . . . . . . . . . . . . 10 5. JOSE Header . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.1. "typ" (Type) Header Parameter . . . . . . . . . . . . . . 11 5.1. "typ" (Type) Header Parameter . . . . . . . . . . . . . . 11
5.2. "cty" (Content Type) Header Parameter . . . . . . . . . . 11 5.2. "cty" (Content Type) Header Parameter . . . . . . . . . . 11
5.3. Replicating Claims as Header Parameters . . . . . . . . . 11 5.3. Replicating Claims as Header Parameters . . . . . . . . . 12
6. Unsecured JWTs . . . . . . . . . . . . . . . . . . . . . . . . 12 6. Unsecured JWTs . . . . . . . . . . . . . . . . . . . . . . . 12
6.1. Example Unsecured JWT . . . . . . . . . . . . . . . . . . 12 6.1. Example Unsecured JWT . . . . . . . . . . . . . . . . . . 12
7. Creating and Validating JWTs . . . . . . . . . . . . . . . . . 13 7. Creating and Validating JWTs . . . . . . . . . . . . . . . . 13
7.1. Creating a JWT . . . . . . . . . . . . . . . . . . . . . . 13 7.1. Creating a JWT . . . . . . . . . . . . . . . . . . . . . 13
7.2. Validating a JWT . . . . . . . . . . . . . . . . . . . . . 14 7.2. Validating a JWT . . . . . . . . . . . . . . . . . . . . 14
7.3. String Comparison Rules . . . . . . . . . . . . . . . . . 15 7.3. String Comparison Rules . . . . . . . . . . . . . . . . . 15
8. Implementation Requirements . . . . . . . . . . . . . . . . . 16 8. Implementation Requirements . . . . . . . . . . . . . . . . . 16
9. URI for Declaring that Content is a JWT . . . . . . . . . . . 16 9. URI for Declaring that Content is a JWT . . . . . . . . . . . 17
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
10.1. JSON Web Token Claims Registry . . . . . . . . . . . . . . 16 10.1. JSON Web Token Claims Registry . . . . . . . . . . . . . 17
10.1.1. Registration Template . . . . . . . . . . . . . . . . 18 10.1.1. Registration Template . . . . . . . . . . . . . . . 18
10.1.2. Initial Registry Contents . . . . . . . . . . . . . . 18 10.1.2. Initial Registry Contents . . . . . . . . . . . . . 18
10.2. Sub-Namespace Registration of 10.2. Sub-Namespace Registration of
urn:ietf:params:oauth:token-type:jwt . . . . . . . . . . . 19 urn:ietf:params:oauth:token-type:jwt . . . . . . . . . . 19
10.2.1. Registry Contents . . . . . . . . . . . . . . . . . . 19 10.2.1. Registry Contents . . . . . . . . . . . . . . . . . 19
10.3. Media Type Registration . . . . . . . . . . . . . . . . . 19 10.3. Media Type Registration . . . . . . . . . . . . . . . . 20
10.3.1. Registry Contents . . . . . . . . . . . . . . . . . . 19 10.3.1. Registry Contents . . . . . . . . . . . . . . . . . 20
10.4. Header Parameter Names Registration . . . . . . . . . . . 20 10.4. Header Parameter Names Registration . . . . . . . . . . 20
10.4.1. Registry Contents . . . . . . . . . . . . . . . . . . 20 10.4.1. Registry Contents . . . . . . . . . . . . . . . . . 21
11. Security Considerations . . . . . . . . . . . . . . . . . . . 21 11. Security Considerations . . . . . . . . . . . . . . . . . . . 21
11.1. Trust Decisions . . . . . . . . . . . . . . . . . . . . . 21 11.1. Trust Decisions . . . . . . . . . . . . . . . . . . . . 21
11.2. Signing and Encryption Order . . . . . . . . . . . . . . . 21 11.2. Signing and Encryption Order . . . . . . . . . . . . . . 21
12. Privacy Considerations . . . . . . . . . . . . . . . . . . . . 22 12. Privacy Considerations . . . . . . . . . . . . . . . . . . . 22
13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 22 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 22
13.1. Normative References . . . . . . . . . . . . . . . . . . . 22 13.1. Normative References . . . . . . . . . . . . . . . . . . 22
13.2. Informative References . . . . . . . . . . . . . . . . . . 23 13.2. Informative References . . . . . . . . . . . . . . . . . 23
Appendix A. JWT Examples . . . . . . . . . . . . . . . . . . . . 24
A.1. Example Encrypted JWT . . . . . . . . . . . . . . . . . . 24 Appendix A. JWT Examples . . . . . . . . . . . . . . . . . . . . 26
A.2. Example Nested JWT . . . . . . . . . . . . . . . . . . . . 25 A.1. Example Encrypted JWT . . . . . . . . . . . . . . . . . . 26
Appendix B. Relationship of JWTs to SAML Assertions . . . . . . . 26 A.2. Example Nested JWT . . . . . . . . . . . . . . . . . . . 26
Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs) . . 27 Appendix B. Relationship of JWTs to SAML Assertions . . . . . . 28
Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 27 Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs) . . 28
Appendix E. Document History . . . . . . . . . . . . . . . . . . 28 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 28
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 34 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29
1. Introduction 1. Introduction
JSON Web Token (JWT) is a compact claims representation format JSON Web Token (JWT) is a compact claims representation format
intended for space constrained environments such as HTTP intended for space constrained environments such as HTTP
Authorization headers and URI query parameters. JWTs encode claims Authorization headers and URI query parameters. JWTs encode claims
to be transmitted as a JavaScript Object Notation (JSON) [RFC7159] to be transmitted as a JSON [RFC7159] object that is used as the
object that is used as the payload of a JSON Web Signature (JWS) payload of a JSON Web Signature (JWS) [JWS] structure or as the
[JWS] structure or as the plaintext of a JSON Web Encryption (JWE) plaintext of a JSON Web Encryption (JWE) [JWE] structure, enabling
[JWE] structure, enabling the claims to be digitally signed or MACed the claims to be digitally signed or integrity protected with a
and/or encrypted. JWTs are always represented using the JWS Compact Message Authentication Code (MAC) and/or encrypted. JWTs are always
Serialization or the JWE Compact Serialization. represented using the JWS Compact Serialization or the JWE Compact
Serialization.
The suggested pronunciation of JWT is the same as the English word The suggested pronunciation of JWT is the same as the English word
"jot". "jot".
1.1. Notational Conventions 1.1. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in Key "OPTIONAL" in this document are to be interpreted as described in
words for use in RFCs to Indicate Requirement Levels [RFC2119]. If "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119].
these words are used without being spelled in uppercase then they are The interpretation should only be applied when the terms appear in
to be interpreted with their normal natural language meanings. all capital letters.
2. Terminology 2. Terminology
These terms defined by the JSON Web Signature (JWS) [JWS] The terms "JSON Web Signature (JWS)", "Base64url Encoding", "Header
specification are incorporated into this specification: "JSON Web Parameter", "JOSE Header", "JWS Compact Serialization", "JWS
Signature (JWS)", "Base64url Encoding", "Header Parameter", "JOSE Payload", "JWS Signature", and "Unsecured JWS" are defined by the JWS
Header", "JWS Compact Serialization", "JWS Payload", "JWS Signature", specification [JWS].
and "Unsecured JWS".
These terms defined by the JSON Web Encryption (JWE) [JWE] The terms "JSON Web Encryption (JWE)", "Content Encryption Key
specification are incorporated into this specification: "JSON Web (CEK)", "JWE Compact Serialization", "JWE Encrypted Key", and "JWE
Encryption (JWE)", "Content Encryption Key (CEK)", "JWE Compact Initialization Vector" are defined by the JWE specification [JWE].
Serialization", "JWE Encrypted Key", "JWE Initialization Vector", and
"JWE Plaintext".
These terms defined by the Internet Security Glossary, Version 2 The terms "Ciphertext", "Digital Signature", "Message Authentication
[RFC4949] are incorporated into this specification: "Ciphertext", Code (MAC)", and "Plaintext" are defined by the "Internet Security
"Digital Signature" "Message Authentication Code (MAC)", and Glossary, Version 2" [RFC4949].
"Plaintext".
These terms are defined by this specification: These terms are defined by this specification:
JSON Web Token (JWT) JSON Web Token (JWT)
A string representing a set of claims as a JSON object that is A string representing a set of claims as a JSON object that is
encoded in a JWS or JWE, enabling the claims to be digitally encoded in a JWS or JWE, enabling the claims to be digitally
signed or MACed and/or encrypted. signed or MACed and/or encrypted.
JWT Claims Set JWT Claims Set
A JSON object that contains the Claims conveyed by the JWT. A JSON object that contains the claims conveyed by the JWT.
Claim Claim
A piece of information asserted about a subject. A Claim is A piece of information asserted about a subject. A claim is
represented as a name/value pair consisting of a Claim Name and a represented as a name/value pair consisting of a Claim Name and a
Claim Value. Claim Value.
Claim Name Claim Name
The name portion of a Claim representation. A Claim Name is The name portion of a claim representation. A Claim Name is
always a string. always a string.
Claim Value Claim Value
The value portion of a Claim representation. A Claim Value can be The value portion of a claim representation. A Claim Value can be
any JSON value. any JSON value.
Encoded JOSE Header
Base64url encoding of the JOSE Header.
Nested JWT Nested JWT
A JWT in which nested signing and/or encryption are employed. In A JWT in which nested signing and/or encryption are employed. In
nested JWTs, a JWT is used as the payload or plaintext value of an Nested JWTs, a JWT is used as the payload or plaintext value of an
enclosing JWS or JWE structure, respectively. enclosing JWS or JWE structure, respectively.
Unsecured JWT Unsecured JWT
A JWT whose Claims are not integrity protected or encrypted. A JWT whose claims are not integrity protected or encrypted.
Collision-Resistant Name Collision-Resistant Name
A name in a namespace that enables names to be allocated in a A name in a namespace that enables names to be allocated in a
manner such that they are highly unlikely to collide with other manner such that they are highly unlikely to collide with other
names. Examples of collision-resistant namespaces include: Domain names. Examples of collision-resistant namespaces include: Domain
Names, Object Identifiers (OIDs) as defined in the ITU-T X.660 and Names, Object Identifiers (OIDs) as defined in the ITU-T X.660 and
X.670 Recommendation series, and Universally Unique IDentifiers X.670 Recommendation series, and Universally Unique IDentifiers
(UUIDs) [RFC4122]. When using an administratively delegated (UUIDs) [RFC4122]. When using an administratively delegated
namespace, the definer of a name needs to take reasonable namespace, the definer of a name needs to take reasonable
precautions to ensure they are in control of the portion of the precautions to ensure they are in control of the portion of the
namespace they use to define the name. namespace they use to define the name.
StringOrURI StringOrURI
A JSON string value, with the additional requirement that while A JSON string value, with the additional requirement that while
arbitrary string values MAY be used, any value containing a ":" arbitrary string values MAY be used, any value containing a ":"
character MUST be a URI [RFC3986]. StringOrURI values are character MUST be a URI [RFC3986]. StringOrURI values are
compared as case-sensitive strings with no transformations or compared as case-sensitive strings with no transformations or
canonicalizations applied. canonicalizations applied.
NumericDate NumericDate
A JSON numeric value representing the number of seconds from 1970- A JSON numeric value representing the number of seconds from
01-01T00:00:00Z UTC until the specified UTC date/time, ignoring 1970-01-01T00:00:00Z UTC until the specified UTC date/time,
leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 ignoring leap seconds. This is equivalent to the IEEE Std 1003.1,
Edition [POSIX.1] definition "Seconds Since the Epoch", in which 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in
each day is accounted for by exactly 86400 seconds, other than which each day is accounted for by exactly 86400 seconds, other
that non-integer values can be represented. See RFC 3339 than that non-integer values can be represented. See RFC 3339
[RFC3339] for details regarding date/times in general and UTC in [RFC3339] for details regarding date/times in general and UTC in
particular. particular.
3. JSON Web Token (JWT) Overview 3. JSON Web Token (JWT) Overview
JWTs represent a set of claims as a JSON object that is encoded in a JWTs represent a set of claims as a JSON object that is encoded in a
JWS and/or JWE structure. This JSON object is the JWT Claims Set. As JWS and/or JWE structure. This JSON object is the JWT Claims Set.
per Section 4 of RFC 7159 [RFC7159], the JSON object consists of zero As per Section 4 of RFC 7159 [RFC7159], the JSON object consists of
or more name/value pairs (or members), where the names are strings zero or more name/value pairs (or members), where the names are
and the values are arbitrary JSON values. These members are the strings and the values are arbitrary JSON values. These members are
claims represented by the JWT. This JSON object MAY contain white the claims represented by the JWT. This JSON object MAY contain
space and/or line breaks before or after any JSON values or whitespace and/or line breaks before or after any JSON values or
structural characters, in accordance with Section 2 of RFC 7159 structural characters, in accordance with Section 2 of RFC 7159
[RFC7159]. [RFC7159].
The member names within the JWT Claims Set are referred to as Claim The member names within the JWT Claims Set are referred to as Claim
Names. The corresponding values are referred to as Claim Values. Names. The corresponding values are referred to as Claim Values.
The contents of the JOSE Header describe the cryptographic operations The contents of the JOSE Header describe the cryptographic operations
applied to the JWT Claims Set. If the JOSE Header is for a JWS, the applied to the JWT Claims Set. If the JOSE Header is for a JWS, the
JWT is represented as a JWS and the claims are digitally signed or JWT is represented as a JWS and the claims are digitally signed or
MACed, with the JWT Claims Set being the JWS Payload. If the JOSE MACed, with the JWT Claims Set being the JWS Payload. If the JOSE
Header is for a JWE, the JWT is represented as a JWE and the claims Header is for a JWE, the JWT is represented as a JWE and the claims
are encrypted, with the JWT Claims Set being the JWE Plaintext. A are encrypted, with the JWT Claims Set being the plaintext encrypted
JWT may be enclosed in another JWE or JWS structure to create a by the JWE. A JWT may be enclosed in another JWE or JWS structure to
Nested JWT, enabling nested signing and encryption to be performed. create a Nested JWT, enabling nested signing and encryption to be
performed.
A JWT is represented as a sequence of URL-safe parts separated by A JWT is represented as a sequence of URL-safe parts separated by
period ('.') characters. Each part contains a base64url encoded period ('.') characters. Each part contains a base64url-encoded
value. The number of parts in the JWT is dependent upon the value. The number of parts in the JWT is dependent upon the
representation of the resulting JWS using the JWS Compact representation of the resulting JWS using the JWS Compact
Serialization or JWE using the JWE Compact Serialization. Serialization or JWE using the JWE Compact Serialization.
3.1. Example JWT 3.1. Example JWT
The following example JOSE Header declares that the encoded object is The following example JOSE Header declares that the encoded object is
a JSON Web Token (JWT) and the JWT is a JWS that is MACed using the a JWT, and the JWT is a JWS that is MACed using the HMAC SHA-256
HMAC SHA-256 algorithm: algorithm:
{"typ":"JWT", {"typ":"JWT",
"alg":"HS256"} "alg":"HS256"}
To remove potential ambiguities in the representation of the JSON To remove potential ambiguities in the representation of the JSON
object above, the octet sequence for the actual UTF-8 representation object above, the octet sequence for the actual UTF-8 representation
used in this example for the JOSE Header above is also included used in this example for the JOSE Header above is also included
below. (Note that ambiguities can arise due to differing platform below. (Note that ambiguities can arise due to differing platform
representations of line breaks (CRLF versus LF), differing spacing at representations of line breaks (CRLF versus LF), differing spacing at
the beginning and ends of lines, whether the last line has a the beginning and ends of lines, whether the last line has a
skipping to change at page 7, line 26 skipping to change at page 7, line 32
trailing spaces, a CRLF line break (13, 10) occurs between the first trailing spaces, a CRLF line break (13, 10) occurs between the first
and second lines, the second line has one leading space (32) and no and second lines, the second line has one leading space (32) and no
trailing spaces, and the last line does not have a terminating line trailing spaces, and the last line does not have a terminating line
break.) The octets representing the UTF-8 representation of the JOSE break.) The octets representing the UTF-8 representation of the JOSE
Header in this example (using JSON array notation) are: Header in this example (using JSON array notation) are:
[123, 34, 116, 121, 112, 34, 58, 34, 74, 87, 84, 34, 44, 13, 10, 32, [123, 34, 116, 121, 112, 34, 58, 34, 74, 87, 84, 34, 44, 13, 10, 32,
34, 97, 108, 103, 34, 58, 34, 72, 83, 50, 53, 54, 34, 125] 34, 97, 108, 103, 34, 58, 34, 72, 83, 50, 53, 54, 34, 125]
Base64url encoding the octets of the UTF-8 representation of the JOSE Base64url encoding the octets of the UTF-8 representation of the JOSE
Header yields this Encoded JOSE Header value: Header yields this encoded JOSE Header value:
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
The following is an example of a JWT Claims Set: The following is an example of a JWT Claims Set:
{"iss":"joe", {"iss":"joe",
"exp":1300819380, "exp":1300819380,
"http://example.com/is_root":true} "http://example.com/is_root":true}
The following octet sequence, which is the UTF-8 representation used The following octet sequence, which is the UTF-8 representation used
skipping to change at page 7, line 44 skipping to change at page 8, line 4
"http://example.com/is_root":true} "http://example.com/is_root":true}
The following octet sequence, which is the UTF-8 representation used The following octet sequence, which is the UTF-8 representation used
in this example for the JWT Claims Set above, is the JWS Payload: in this example for the JWT Claims Set above, is the JWS Payload:
[123, 34, 105, 115, 115, 34, 58, 34, 106, 111, 101, 34, 44, 13, 10, [123, 34, 105, 115, 115, 34, 58, 34, 106, 111, 101, 34, 44, 13, 10,
32, 34, 101, 120, 112, 34, 58, 49, 51, 48, 48, 56, 49, 57, 51, 56, 32, 34, 101, 120, 112, 34, 58, 49, 51, 48, 48, 56, 49, 57, 51, 56,
48, 44, 13, 10, 32, 34, 104, 116, 116, 112, 58, 47, 47, 101, 120, 97, 48, 44, 13, 10, 32, 34, 104, 116, 116, 112, 58, 47, 47, 101, 120, 97,
109, 112, 108, 101, 46, 99, 111, 109, 47, 105, 115, 95, 114, 111, 109, 112, 108, 101, 46, 99, 111, 109, 47, 105, 115, 95, 114, 111,
111, 116, 34, 58, 116, 114, 117, 101, 125] 111, 116, 34, 58, 116, 114, 117, 101, 125]
Base64url encoding the JWS Payload yields this encoded JWS Payload Base64url encoding the JWS Payload yields this encoded JWS Payload
(with line breaks for display purposes only): (with line breaks for display purposes only):
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly
9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ 9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ
Computing the MAC of the encoded JOSE Header and encoded JWS Payload Computing the MAC of the encoded JOSE Header and encoded JWS Payload
with the HMAC SHA-256 algorithm and base64url encoding the HMAC value with the HMAC SHA-256 algorithm and base64url encoding the HMAC value
in the manner specified in [JWS], yields this encoded JWS Signature: in the manner specified in [JWS] yields this encoded JWS Signature:
dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
Concatenating these encoded parts in this order with period ('.') Concatenating these encoded parts in this order with period ('.')
characters between the parts yields this complete JWT (with line characters between the parts yields this complete JWT (with line
breaks for display purposes only): breaks for display purposes only):
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
skipping to change at page 8, line 28 skipping to change at page 8, line 36
This computation is illustrated in more detail in Appendix A.1 of This computation is illustrated in more detail in Appendix A.1 of
[JWS]. See Appendix A.1 for an example of an encrypted JWT. [JWS]. See Appendix A.1 for an example of an encrypted JWT.
4. JWT Claims 4. JWT Claims
The JWT Claims Set represents a JSON object whose members are the The JWT Claims Set represents a JSON object whose members are the
claims conveyed by the JWT. The Claim Names within a JWT Claims Set claims conveyed by the JWT. The Claim Names within a JWT Claims Set
MUST be unique; JWT parsers MUST either reject JWTs with duplicate MUST be unique; JWT parsers MUST either reject JWTs with duplicate
Claim Names or use a JSON parser that returns only the lexically last Claim Names or use a JSON parser that returns only the lexically last
duplicate member name, as specified in Section 15.12 (The JSON duplicate member name, as specified in Section 15.12 ("The JSON
Object) of ECMAScript 5.1 [ECMAScript]. Object") of ECMAScript 5.1 [ECMAScript].
The set of claims that a JWT must contain to be considered valid is The set of claims that a JWT must contain to be considered valid is
context-dependent and is outside the scope of this specification. context dependent and is outside the scope of this specification.
Specific applications of JWTs will require implementations to Specific applications of JWTs will require implementations to
understand and process some claims in particular ways. However, in understand and process some claims in particular ways. However, in
the absence of such requirements, all claims that are not understood the absence of such requirements, all claims that are not understood
by implementations MUST be ignored. by implementations MUST be ignored.
There are three classes of JWT Claim Names: Registered Claim Names, There are three classes of JWT Claim Names: Registered Claim Names,
Public Claim Names, and Private Claim Names. Public Claim Names, and Private Claim Names.
4.1. Registered Claim Names 4.1. Registered Claim Names
The following Claim Names are registered in the IANA JSON Web Token The following Claim Names are registered in the IANA "JSON Web Token
Claims registry defined in Section 10.1. None of the claims defined Claims" registry established by Section 10.1. None of the claims
below are intended to be mandatory to use or implement in all cases, defined below are intended to be mandatory to use or implement in all
but rather, provide a starting point for a set of useful, cases, but rather they provide a starting point for a set of useful,
interoperable claims. Applications using JWTs should define which interoperable claims. Applications using JWTs should define which
specific claims they use and when they are required or optional. All specific claims they use and when they are required or optional. All
the names are short because a core goal of JWTs is for the the names are short because a core goal of JWTs is for the
representation to be compact. representation to be compact.
4.1.1. "iss" (Issuer) Claim 4.1.1. "iss" (Issuer) Claim
The "iss" (issuer) claim identifies the principal that issued the The "iss" (issuer) claim identifies the principal that issued the
JWT. The processing of this claim is generally application specific. JWT. The processing of this claim is generally application specific.
The "iss" value is a case-sensitive string containing a StringOrURI The "iss" value is a case-sensitive string containing a StringOrURI
value. Use of this claim is OPTIONAL. value. Use of this claim is OPTIONAL.
4.1.2. "sub" (Subject) Claim 4.1.2. "sub" (Subject) Claim
The "sub" (subject) claim identifies the principal that is the The "sub" (subject) claim identifies the principal that is the
subject of the JWT. The Claims in a JWT are normally statements subject of the JWT. The claims in a JWT are normally statements
about the subject. The subject value MUST either be scoped to be about the subject. The subject value MUST either be scoped to be
locally unique in the context of the issuer or be globally unique. locally unique in the context of the issuer or be globally unique.
The processing of this claim is generally application specific. The The processing of this claim is generally application specific. The
"sub" value is a case-sensitive string containing a StringOrURI "sub" value is a case-sensitive string containing a StringOrURI
value. Use of this claim is OPTIONAL. value. Use of this claim is OPTIONAL.
4.1.3. "aud" (Audience) Claim 4.1.3. "aud" (Audience) Claim
The "aud" (audience) claim identifies the recipients that the JWT is The "aud" (audience) claim identifies the recipients that the JWT is
intended for. Each principal intended to process the JWT MUST intended for. Each principal intended to process the JWT MUST
skipping to change at page 10, line 29 skipping to change at page 10, line 41
accidentally assigned to a different data object; if the application accidentally assigned to a different data object; if the application
uses multiple issuers, collisions MUST be prevented among values uses multiple issuers, collisions MUST be prevented among values
produced by different issuers as well. The "jti" claim can be used produced by different issuers as well. The "jti" claim can be used
to prevent the JWT from being replayed. The "jti" value is a case- to prevent the JWT from being replayed. The "jti" value is a case-
sensitive string. Use of this claim is OPTIONAL. sensitive string. Use of this claim is OPTIONAL.
4.2. Public Claim Names 4.2. Public Claim Names
Claim Names can be defined at will by those using JWTs. However, in Claim Names can be defined at will by those using JWTs. However, in
order to prevent collisions, any new Claim Name should either be order to prevent collisions, any new Claim Name should either be
registered in the IANA JSON Web Token Claims registry defined in registered in the IANA "JSON Web Token Claims" registry established
Section 10.1 or be a Public Name: a value that contains a Collision- by Section 10.1 or be a Public Name: a value that contains a
Resistant Name. In each case, the definer of the name or value needs Collision-Resistant Name. In each case, the definer of the name or
to take reasonable precautions to make sure they are in control of value needs to take reasonable precautions to make sure they are in
the part of the namespace they use to define the Claim Name. control of the part of the namespace they use to define the Claim
Name.
4.3. Private Claim Names 4.3. Private Claim Names
A producer and consumer of a JWT MAY agree to use Claim Names that A producer and consumer of a JWT MAY agree to use Claim Names that
are Private Names: names that are not Registered Claim Names are Private Names: names that are not Registered Claim Names
Section 4.1 or Public Claim Names Section 4.2. Unlike Public Claim (Section 4.1) or Public Claim Names (Section 4.2). Unlike Public
Names, Private Claim Names are subject to collision and should be Claim Names, Private Claim Names are subject to collision and should
used with caution. be used with caution.
5. JOSE Header 5. JOSE Header
For a JWT object, the members of the JSON object represented by the For a JWT object, the members of the JSON object represented by the
JOSE Header describe the cryptographic operations applied to the JWT JOSE Header describe the cryptographic operations applied to the JWT
and optionally, additional properties of the JWT. Depending upon and optionally, additional properties of the JWT. Depending upon
whether the JWT is a JWS or JWE, the corresponding rules for the JOSE whether the JWT is a JWS or JWE, the corresponding rules for the JOSE
Header values apply. Header values apply.
This specification further specifies the use of the following Header This specification further specifies the use of the following Header
Parameters in both the cases where the JWT is a JWS and where it is a Parameters in both the cases where the JWT is a JWS and where it is a
JWE. JWE.
5.1. "typ" (Type) Header Parameter 5.1. "typ" (Type) Header Parameter
The "typ" (type) Header Parameter defined by [JWS] and [JWE] is used The "typ" (type) Header Parameter defined by [JWS] and [JWE] is used
by JWT applications to declare the MIME Media Type [IANA.MediaTypes] by JWT applications to declare the media type [IANA.MediaTypes] of
of this complete JWT. This is intended for use by the JWT this complete JWT. This is intended for use by the JWT application
application when values that are not JWTs could also be present in an when values that are not JWTs could also be present in an application
application data structure that can contain a JWT object; the data structure that can contain a JWT object; the application can use
application can use this value to disambiguate among the different this value to disambiguate among the different kinds of objects that
kinds of objects that might be present. It will typically not be might be present. It will typically not be used by applications when
used by applications when it is already known that the object is a it is already known that the object is a JWT. This parameter is
JWT. This parameter is ignored by JWT implementations; any ignored by JWT implementations; any processing of this parameter is
processing of this parameter is performed by the JWT application. If performed by the JWT application. If present, it is RECOMMENDED that
present, it is RECOMMENDED that its value be "JWT" to indicate that its value be "JWT" to indicate that this object is a JWT. While
this object is a JWT. While media type names are not case-sensitive, media type names are not case sensitive, it is RECOMMENDED that "JWT"
it is RECOMMENDED that "JWT" always be spelled using uppercase always be spelled using uppercase characters for compatibility with
characters for compatibility with legacy implementations. Use of legacy implementations. Use of this Header Parameter is OPTIONAL.
this Header Parameter is OPTIONAL.
5.2. "cty" (Content Type) Header Parameter 5.2. "cty" (Content Type) Header Parameter
The "cty" (content type) Header Parameter defined by [JWS] and [JWE] The "cty" (content type) Header Parameter defined by [JWS] and [JWE]
is used by this specification to convey structural information about is used by this specification to convey structural information about
the JWT. the JWT.
In the normal case in which nested signing or encryption operations In the normal case in which nested signing or encryption operations
are not employed, the use of this Header Parameter is NOT are not employed, the use of this Header Parameter is NOT
RECOMMENDED. In the case that nested signing or encryption is RECOMMENDED. In the case that nested signing or encryption is
employed, this Header Parameter MUST be present; in this case, the employed, this Header Parameter MUST be present; in this case, the
value MUST be "JWT", to indicate that a Nested JWT is carried in this value MUST be "JWT", to indicate that a Nested JWT is carried in this
JWT. While media type names are not case-sensitive, it is JWT. While media type names are not case sensitive, it is
RECOMMENDED that "JWT" always be spelled using uppercase characters RECOMMENDED that "JWT" always be spelled using uppercase characters
for compatibility with legacy implementations. See Appendix A.2 for for compatibility with legacy implementations. See Appendix A.2 for
an example of a Nested JWT. an example of a Nested JWT.
5.3. Replicating Claims as Header Parameters 5.3. Replicating Claims as Header Parameters
In some applications using encrypted JWTs, it is useful to have an In some applications using encrypted JWTs, it is useful to have an
unencrypted representation of some Claims. This might be used, for unencrypted representation of some claims. This might be used, for
instance, in application processing rules to determine whether and instance, in application processing rules to determine whether and
how to process the JWT before it is decrypted. how to process the JWT before it is decrypted.
This specification allows Claims present in the JWT Claims Set to be This specification allows claims present in the JWT Claims Set to be
replicated as Header Parameters in a JWT that is a JWE, as needed by replicated as Header Parameters in a JWT that is a JWE, as needed by
the application. If such replicated Claims are present, the the application. If such replicated claims are present, the
application receiving them SHOULD verify that their values are application receiving them SHOULD verify that their values are
identical, unless the application defines other specific processing identical, unless the application defines other specific processing
rules for these Claims. It is the responsibility of the application rules for these claims. It is the responsibility of the application
to ensure that only claims that are safe to be transmitted in an to ensure that only claims that are safe to be transmitted in an
unencrypted manner are replicated as Header Parameter values in the unencrypted manner are replicated as Header Parameter values in the
JWT. JWT.
Section 10.4.1 of this specification registers the "iss" (issuer), Section 10.4.1 of this specification registers the "iss" (issuer),
"sub" (subject), and "aud" (audience) Header Parameter names for the "sub" (subject), and "aud" (audience) Header Parameter names for the
purpose of providing unencrypted replicas of these Claims in purpose of providing unencrypted replicas of these claims in
encrypted JWTs for applications that need them. Other specifications encrypted JWTs for applications that need them. Other specifications
MAY similarly register other names that are registered Claim Names as MAY similarly register other names that are registered Claim Names as
Header Parameter names, as needed. Header Parameter names, as needed.
6. Unsecured JWTs 6. Unsecured JWTs
To support use cases in which the JWT content is secured by a means To support use cases in which the JWT content is secured by a means
other than a signature and/or encryption contained within the JWT other than a signature and/or encryption contained within the JWT
(such as a signature on a data structure containing the JWT), JWTs (such as a signature on a data structure containing the JWT), JWTs
MAY also be created without a signature or encryption. An Unsecured MAY also be created without a signature or encryption. An Unsecured
JWT is a JWS using the "alg" Header Parameter value "none" and with JWT is a JWS using the "alg" Header Parameter value "none" and with
the empty string for its JWS Signature value, as defined in JSON Web the empty string for its JWS Signature value, as defined in the JWA
Algorithms (JWA) [JWA]; it is an Unsecured JWS with the JWT Claims specification [JWA]; it is an Unsecured JWS with the JWT Claims Set
Set as its JWS Payload. as its JWS Payload.
6.1. Example Unsecured JWT 6.1. Example Unsecured JWT
The following example JOSE Header declares that the encoded object is The following example JOSE Header declares that the encoded object is
an Unsecured JWT: an Unsecured JWT:
{"alg":"none"} {"alg":"none"}
Base64url encoding the octets of the UTF-8 representation of the JOSE Base64url encoding the octets of the UTF-8 representation of the JOSE
Header yields this Encoded JOSE Header: Header yields this encoded JOSE Header value:
eyJhbGciOiJub25lIn0 eyJhbGciOiJub25lIn0
The following is an example of a JWT Claims Set: The following is an example of a JWT Claims Set:
{"iss":"joe", {"iss":"joe",
"exp":1300819380, "exp":1300819380,
"http://example.com/is_root":true} "http://example.com/is_root":true}
Base64url encoding the octets of the UTF-8 representation of the JWT Base64url encoding the octets of the UTF-8 representation of the JWT
skipping to change at page 13, line 29 skipping to change at page 13, line 39
7. Creating and Validating JWTs 7. Creating and Validating JWTs
7.1. Creating a JWT 7.1. Creating a JWT
To create a JWT, the following steps are performed. The order of the To create a JWT, the following steps are performed. The order of the
steps is not significant in cases where there are no dependencies steps is not significant in cases where there are no dependencies
between the inputs and outputs of the steps. between the inputs and outputs of the steps.
1. Create a JWT Claims Set containing the desired claims. Note that 1. Create a JWT Claims Set containing the desired claims. Note that
white space is explicitly allowed in the representation and no whitespace is explicitly allowed in the representation and no
canonicalization need be performed before encoding. canonicalization need be performed before encoding.
2. Let the Message be the octets of the UTF-8 representation of the 2. Let the Message be the octets of the UTF-8 representation of the
JWT Claims Set. JWT Claims Set.
3. Create a JOSE Header containing the desired set of Header 3. Create a JOSE Header containing the desired set of Header
Parameters. The JWT MUST conform to either the [JWS] or [JWE] Parameters. The JWT MUST conform to either the [JWS] or [JWE]
specification. Note that white space is explicitly allowed in specification. Note that whitespace is explicitly allowed in the
the representation and no canonicalization need be performed representation and no canonicalization need be performed before
before encoding. encoding.
4. Depending upon whether the JWT is a JWS or JWE, there are two 4. Depending upon whether the JWT is a JWS or JWE, there are two
cases: cases:
* If the JWT is a JWS, create a JWS using the Message as the JWS * If the JWT is a JWS, create a JWS using the Message as the JWS
Payload; all steps specified in [JWS] for creating a JWS MUST Payload; all steps specified in [JWS] for creating a JWS MUST
be followed. be followed.
* Else, if the JWT is a JWE, create a JWE using the Message as * Else, if the JWT is a JWE, create a JWE using the Message as
the JWE Plaintext; all steps specified in [JWE] for creating a the plaintext for the JWE; all steps specified in [JWE] for
JWE MUST be followed. creating a JWE MUST be followed.
5. If a nested signing or encryption operation will be performed, 5. If a nested signing or encryption operation will be performed,
let the Message be the JWS or JWE, and return to Step 3, using a let the Message be the JWS or JWE, and return to Step 3, using a
"cty" (content type) value of "JWT" in the new JOSE Header "cty" (content type) value of "JWT" in the new JOSE Header
created in that step. created in that step.
6. Otherwise, let the resulting JWT be the JWS or JWE. 6. Otherwise, let the resulting JWT be the JWS or JWE.
7.2. Validating a JWT 7.2. Validating a JWT
When validating a JWT, the following steps are performed. The order When validating a JWT, the following steps are performed. The order
of the steps is not significant in cases where there are no of the steps is not significant in cases where there are no
dependencies between the inputs and outputs of the steps. If any of dependencies between the inputs and outputs of the steps. If any of
the listed steps fails then the JWT MUST be rejected -- treated by the listed steps fail, then the JWT MUST be rejected -- that is,
the application as an invalid input. treated by the application as an invalid input.
1. Verify that the JWT contains at least one period ('.') 1. Verify that the JWT contains at least one period ('.')
character. character.
2. Let the Encoded JOSE Header be the portion of the JWT before the 2. Let the Encoded JOSE Header be the portion of the JWT before the
first period ('.') character. first period ('.') character.
3. Base64url decode the Encoded JOSE Header following the 3. Base64url decode the Encoded JOSE Header following the
restriction that no line breaks, white space, or other restriction that no line breaks, whitespace, or other additional
additional characters have been used. characters have been used.
4. Verify that the resulting octet sequence is a UTF-8 encoded 4. Verify that the resulting octet sequence is a UTF-8-encoded
representation of a completely valid JSON object conforming to representation of a completely valid JSON object conforming to
RFC 7159 [RFC7159]; let the JOSE Header be this JSON object. RFC 7159 [RFC7159]; let the JOSE Header be this JSON object.
5. Verify that the resulting JOSE Header includes only parameters 5. Verify that the resulting JOSE Header includes only parameters
and values whose syntax and semantics are both understood and and values whose syntax and semantics are both understood and
supported or that are specified as being ignored when not supported or that are specified as being ignored when not
understood. understood.
6. Determine whether the JWT is a JWS or a JWE using any of the 6. Determine whether the JWT is a JWS or a JWE using any of the
methods described in Section 9 of [JWE]. methods described in Section 9 of [JWE].
7. Depending upon whether the JWT is a JWS or JWE, there are two 7. Depending upon whether the JWT is a JWS or JWE, there are two
cases: cases:
* If the JWT is a JWS, follow the steps specified in [JWS] for * If the JWT is a JWS, follow the steps specified in [JWS] for
validating a JWS. Let the Message be the result of base64url validating a JWS. Let the Message be the result of base64url
decoding the JWS Payload. decoding the JWS Payload.
* Else, if the JWT is a JWE, follow the steps specified in * Else, if the JWT is a JWE, follow the steps specified in
[JWE] for validating a JWE. Let the Message be the JWE [JWE] for validating a JWE. Let the Message be the resulting
Plaintext. plaintext.
8. If the JOSE Header contains a "cty" (content type) value of 8. If the JOSE Header contains a "cty" (content type) value of
"JWT", then the Message is a JWT that was the subject of nested "JWT", then the Message is a JWT that was the subject of nested
signing or encryption operations. In this case, return to Step signing or encryption operations. In this case, return to Step
1, using the Message as the JWT. 1, using the Message as the JWT.
9. Otherwise, base64url decode the Message following the 9. Otherwise, base64url decode the Message following the
restriction that no line breaks, white space, or other restriction that no line breaks, whitespace, or other additional
additional characters have been used. characters have been used.
10. Verify that the resulting octet sequence is a UTF-8 encoded 10. Verify that the resulting octet sequence is a UTF-8-encoded
representation of a completely valid JSON object conforming to representation of a completely valid JSON object conforming to
RFC 7159 [RFC7159]; let the JWT Claims Set be this JSON object. RFC 7159 [RFC7159]; let the JWT Claims Set be this JSON object.
Finally, note that it is an application decision which algorithms may Finally, note that it is an application decision which algorithms may
be used in a given context. Even if a JWT can be successfully be used in a given context. Even if a JWT can be successfully
validated, unless the algorithm(s) used in the JWT are acceptable to validated, unless the algorithms used in the JWT are acceptable to
the application, it SHOULD reject the JWT. the application, it SHOULD reject the JWT.
7.3. String Comparison Rules 7.3. String Comparison Rules
Processing a JWT inevitably requires comparing known strings to Processing a JWT inevitably requires comparing known strings to
members and values in JSON objects. For example, in checking what members and values in JSON objects. For example, in checking what
the algorithm is, the Unicode string encoding "alg" will be checked the algorithm is, the Unicode [UNICODE] string encoding "alg" will be
against the member names in the JOSE Header to see if there is a checked against the member names in the JOSE Header to see if there
matching Header Parameter name. is a matching Header Parameter name.
The JSON rules for doing member name comparison are described in The JSON rules for doing member name comparison are described in
Section 8.3 of RFC 7159 [RFC7159]. Since the only string comparison Section 8.3 of RFC 7159 [RFC7159]. Since the only string comparison
operations that are performed are equality and inequality, the same operations that are performed are equality and inequality, the same
rules can be used for comparing both member names and member values rules can be used for comparing both member names and member values
against known strings. against known strings.
These comparison rules MUST be used for all JSON string comparisons These comparison rules MUST be used for all JSON string comparisons
except in cases where the definition of the member explicitly calls except in cases where the definition of the member explicitly calls
out that a different comparison rule is to be used for that member out that a different comparison rule is to be used for that member
value. In this specification, only the "typ" and "cty" member values value. In this specification, only the "typ" and "cty" member values
do not use these comparison rules. do not use these comparison rules.
Some applications may include case-insensitive information in a case- Some applications may include case-insensitive information in a case-
sensitive value, such as including a DNS name as part of the "iss" sensitive value, such as including a DNS name as part of the "iss"
(issuer) claim value. In those cases, the application may need to (issuer) claim value. In those cases, the application may need to
define a convention for the canonical case to use for representing define a convention for the canonical case to use for representing
the case-insensitive portions, such as lowercasing them, if more than the case-insensitive portions, such as lowercasing them, if more than
one party might need to produce the same value so that they can be one party might need to produce the same value so that they can be
compared. (However if all other parties consume whatever value the compared. (However, if all other parties consume whatever value the
producing party emitted verbatim without attempting to compare it to producing party emitted verbatim without attempting to compare it to
an independently produced value, then the case used by the producer an independently produced value, then the case used by the producer
will not matter.) will not matter.)
8. Implementation Requirements 8. Implementation Requirements
This section defines which algorithms and features of this This section defines which algorithms and features of this
specification are mandatory to implement. Applications using this specification are mandatory to implement. Applications using this
specification can impose additional requirements upon implementations specification can impose additional requirements upon implementations
that they use. For instance, one application might require support that they use. For instance, one application might require support
for encrypted JWTs and Nested JWTs, while another might require for encrypted JWTs and Nested JWTs, while another might require
support for signing JWTs with ECDSA using the P-256 curve and the support for signing JWTs with the Elliptic Curve Digital Signature
SHA-256 hash algorithm ("ES256"). Algorithm (ECDSA) using the P-256 curve and the SHA-256 hash
algorithm ("ES256").
Of the signature and MAC algorithms specified in JSON Web Algorithms Of the signature and MAC algorithms specified in JSON Web Algorithms
(JWA) [JWA], only HMAC SHA-256 ("HS256") and "none" MUST be [JWA], only HMAC SHA-256 ("HS256") and "none" MUST be implemented by
implemented by conforming JWT implementations. It is RECOMMENDED conforming JWT implementations. It is RECOMMENDED that
that implementations also support RSASSA-PKCS1-V1_5 with the SHA-256 implementations also support RSASSA-PKCS1-v1_5 with the SHA-256 hash
hash algorithm ("RS256") and ECDSA using the P-256 curve and the SHA- algorithm ("RS256") and ECDSA using the P-256 curve and the SHA-256
256 hash algorithm ("ES256"). Support for other algorithms and key hash algorithm ("ES256"). Support for other algorithms and key sizes
sizes is OPTIONAL. is OPTIONAL.
Support for encrypted JWTs is OPTIONAL. If an implementation Support for encrypted JWTs is OPTIONAL. If an implementation
provides encryption capabilities, of the encryption algorithms provides encryption capabilities, of the encryption algorithms
specified in [JWA], only RSAES-PKCS1-V1_5 with 2048 bit keys specified in [JWA], only RSAES-PKCS1-v1_5 with 2048-bit keys
("RSA1_5"), AES Key Wrap with 128 and 256 bit keys ("A128KW" and ("RSA1_5"), AES Key Wrap with 128- and 256-bit keys ("A128KW" and
"A256KW"), and the composite authenticated encryption algorithm using "A256KW"), and the composite authenticated encryption algorithm using
AES CBC and HMAC SHA-2 ("A128CBC-HS256" and "A256CBC-HS512") MUST be AES-CBC and HMAC SHA-2 ("A128CBC-HS256" and "A256CBC-HS512") MUST be
implemented by conforming implementations. It is RECOMMENDED that implemented by conforming implementations. It is RECOMMENDED that
implementations also support using ECDH-ES to agree upon a key used implementations also support using Elliptic Curve Diffie-Hellman
to wrap the Content Encryption Key ("ECDH-ES+A128KW" and Ephemeral Static (ECDH-ES) to agree upon a key used to wrap the
"ECDH-ES+A256KW") and AES in Galois/Counter Mode (GCM) with 128 bit Content Encryption Key ("ECDH-ES+A128KW" and "ECDH-ES+A256KW") and
and 256 bit keys ("A128GCM" and "A256GCM"). Support for other AES in Galois/Counter Mode (GCM) with 128- and 256-bit keys
algorithms and key sizes is OPTIONAL. ("A128GCM" and "A256GCM"). Support for other algorithms and key
sizes is OPTIONAL.
Support for Nested JWTs is OPTIONAL. Support for Nested JWTs is OPTIONAL.
9. URI for Declaring that Content is a JWT 9. URI for Declaring that Content is a JWT
This specification registers the URN This specification registers the URN
"urn:ietf:params:oauth:token-type:jwt" for use by applications that "urn:ietf:params:oauth:token-type:jwt" for use by applications that
declare content types using URIs (rather than, for instance, MIME declare content types using URIs (rather than, for instance, media
Media Types) to indicate that the content referred to is a JWT. types) to indicate that the content referred to is a JWT.
10. IANA Considerations 10. IANA Considerations
10.1. JSON Web Token Claims Registry 10.1. JSON Web Token Claims Registry
This specification establishes the IANA JSON Web Token Claims This section establishes the IANA "JSON Web Token Claims" registry
registry for JWT Claim Names. The registry records the Claim Name for JWT Claim Names. The registry records the Claim Name and a
and a reference to the specification that defines it. This reference to the specification that defines it. This section
specification registers the Claim Names defined in Section 4.1. registers the Claim Names defined in Section 4.1.
Values are registered on a Specification Required [RFC5226] basis Values are registered on a Specification Required [RFC5226] basis
after a three-week review period on the jwt-reg-review@ietf.org after a three-week review period on the jwt-reg-review@ietf.org
mailing list, on the advice of one or more Designated Experts. mailing list, on the advice of one or more Designated Experts.
However, to allow for the allocation of values prior to publication, However, to allow for the allocation of values prior to publication,
the Designated Expert(s) may approve registration once they are the Designated Experts may approve registration once they are
satisfied that such a specification will be published. satisfied that such a specification will be published.
Registration requests must be sent to the jwt-reg-review@ietf.org Registration requests sent to the mailing list for review should use
mailing list for review and comment, with an appropriate subject an appropriate subject (e.g., "Request to register claim: example").
(e.g., "Request to register claim: example").
Within the review period, the Designated Expert(s) will either Within the review period, the Designated Experts will either approve
approve or deny the registration request, communicating this decision or deny the registration request, communicating this decision to the
to the review list and IANA. Denials should include an explanation review list and IANA. Denials should include an explanation and, if
and, if applicable, suggestions as to how to make the request applicable, suggestions as to how to make the request successful.
successful. Registration requests that are undetermined for a period Registration requests that are undetermined for a period longer than
longer than 21 days can be brought to the IESG's attention (using the 21 days can be brought to the IESG's attention (using the
iesg@ietf.org mailing list) for resolution. iesg@ietf.org mailing list) for resolution.
Criteria that should be applied by the Designated Expert(s) includes Criteria that should be applied by the Designated Experts includes
determining whether the proposed registration duplicates existing determining whether the proposed registration duplicates existing
functionality, determining whether it is likely to be of general functionality, whether it is likely to be of general applicability or
applicability or whether it is useful only for a single application, whether it is useful only for a single application, and whether the
and whether the registration description is clear. registration description is clear.
IANA must only accept registry updates from the Designated Expert(s) IANA must only accept registry updates from the Designated Experts
and should direct all requests for registration to the review mailing and should direct all requests for registration to the review mailing
list. list.
It is suggested that multiple Designated Experts be appointed who are It is suggested that multiple Designated Experts be appointed who are
able to represent the perspectives of different applications using able to represent the perspectives of different applications using
this specification, in order to enable broadly-informed review of this specification, in order to enable broadly informed review of
registration decisions. In cases where a registration decision could registration decisions. In cases where a registration decision could
be perceived as creating a conflict of interest for a particular be perceived as creating a conflict of interest for a particular
Expert, that Expert should defer to the judgment of the other Expert, that Expert should defer to the judgment of the other
Expert(s). Experts.
[[ Note to the RFC Editor and IANA: Pearl Liang of ICANN had
requested that the draft supply the following proposed registry
description information.
o Protocol Category: JSON Web Token (JWT)
o Registry Location: http://www.iana.org/assignments/jwt
o Webpage Title: (same as the protocol category)
o Registry Name: JSON Web Token Claims
]]
10.1.1. Registration Template 10.1.1. Registration Template
Claim Name: Claim Name:
The name requested (e.g., "iss"). Because a core goal of this The name requested (e.g., "iss"). Because a core goal of this
specification is for the resulting representations to be compact, specification is for the resulting representations to be compact,
it is RECOMMENDED that the name be short -- not to exceed 8 it is RECOMMENDED that the name be short -- that is, not to exceed
characters without a compelling reason to do so. This name is 8 characters without a compelling reason to do so. This name is
case-sensitive. Names may not match other registered names in a case sensitive. Names may not match other registered names in a
case-insensitive manner unless the Designated Expert(s) state that case-insensitive manner unless the Designated Experts state that
there is a compelling reason to allow an exception in this there is a compelling reason to allow an exception.
particular case.
Claim Description: Claim Description:
Brief description of the Claim (e.g., "Issuer"). Brief description of the claim (e.g., "Issuer").
Change Controller: Change Controller:
For Standards Track RFCs, state "IESG". For others, give the name For Standards Track RFCs, list the "IESG". For others, give the
of the responsible party. Other details (e.g., postal address, name of the responsible party. Other details (e.g., postal
email address, home page URI) may also be included. address, email address, home page URI) may also be included.
Specification Document(s): Specification Document(s):
Reference to the document(s) that specify the parameter, Reference to the document or documents that specify the parameter,
preferably including URI(s) that can be used to retrieve copies of preferably including URIs that can be used to retrieve copies of
the document(s). An indication of the relevant sections may also the documents. An indication of the relevant sections may also be
be included but is not required. included but is not required.
10.1.2. Initial Registry Contents 10.1.2. Initial Registry Contents
o Claim Name: "iss" o Claim Name: "iss"
o Claim Description: Issuer o Claim Description: Issuer
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.1 of [[ this document ]] o Specification Document(s): Section 4.1.1 of RFC 7519
o Claim Name: "sub" o Claim Name: "sub"
o Claim Description: Subject o Claim Description: Subject
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.2 of [[ this document ]] o Specification Document(s): Section 4.1.2 of RFC 7519
o Claim Name: "aud" o Claim Name: "aud"
o Claim Description: Audience o Claim Description: Audience
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.3 of [[ this document ]] o Specification Document(s): Section 4.1.3 of RFC 7519
o Claim Name: "exp" o Claim Name: "exp"
o Claim Description: Expiration Time o Claim Description: Expiration Time
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.4 of [[ this document ]] o Specification Document(s): Section 4.1.4 of RFC 7519
o Claim Name: "nbf" o Claim Name: "nbf"
o Claim Description: Not Before o Claim Description: Not Before
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.5 of [[ this document ]] o Specification Document(s): Section 4.1.5 of RFC 7519
o Claim Name: "iat" o Claim Name: "iat"
o Claim Description: Issued At o Claim Description: Issued At
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.6 of [[ this document ]] o Specification Document(s): Section 4.1.6 of RFC 7519
o Claim Name: "jti" o Claim Name: "jti"
o Claim Description: JWT ID o Claim Description: JWT ID
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.7 of [[ this document ]] o Specification Document(s): Section 4.1.7 of RFC 7519
10.2. Sub-Namespace Registration of 10.2. Sub-Namespace Registration of
urn:ietf:params:oauth:token-type:jwt urn:ietf:params:oauth:token-type:jwt
10.2.1. Registry Contents 10.2.1. Registry Contents
This specification registers the value "token-type:jwt" in the IANA This section registers the value "token-type:jwt" in the IANA "OAuth
urn:ietf:params:oauth registry established in An IETF URN Sub- URI" registry established by "An IETF URN Sub-Namespace for OAuth"
Namespace for OAuth [RFC6755], which can be used to indicate that the [RFC6755], which can be used to indicate that the content is a JWT.
content is a JWT.
o URN: urn:ietf:params:oauth:token-type:jwt o URN: urn:ietf:params:oauth:token-type:jwt
o Common Name: JSON Web Token (JWT) Token Type o Common Name: JSON Web Token (JWT) Token Type
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): [[this document]] o Specification Document(s): RFC 7519
10.3. Media Type Registration 10.3. Media Type Registration
10.3.1. Registry Contents 10.3.1. Registry Contents
This specification registers the "application/jwt" Media Type This section registers the "application/jwt" media type [RFC2046] in
[RFC2046] in the MIME Media Types registry [IANA.MediaTypes] in the the "Media Types" registry [IANA.MediaTypes] in the manner described
manner described in RFC 6838 [RFC6838], which can be used to indicate in RFC 6838 [RFC6838], which can be used to indicate that the content
that the content is a JWT. is a JWT.
o Type Name: application o Type name: application
o Subtype Name: jwt o Subtype name: jwt
o Required Parameters: n/a o Required parameters: n/a
o Optional Parameters: n/a o Optional parameters: n/a
o Encoding considerations: 8bit; JWT values are encoded as a series o Encoding considerations: 8bit; JWT values are encoded as a series
of base64url encoded values (some of which may be the empty of base64url-encoded values (some of which may be the empty
string) separated by period ('.') characters. string) separated by period ('.') characters.
o Security Considerations: See the Security Considerations section o Security considerations: See the Security Considerations section
of [[ this document ]] of RFC 7519
o Interoperability Considerations: n/a o Interoperability considerations: n/a
o Published Specification: [[ this document ]] o Published specification: RFC 7519
o Applications that use this media type: OpenID Connect, Mozilla o Applications that use this media type: OpenID Connect, Mozilla
Persona, Salesforce, Google, Android, Windows Azure, Amazon Web Persona, Salesforce, Google, Android, Windows Azure, Amazon Web
Services, and numerous others Services, and numerous others
o Fragment identifier considerations: n/a o Fragment identifier considerations: n/a
o Additional Information: Magic number(s): n/a, File extension(s): o Additional information:
n/a, Macintosh file type code(s): n/a
o Person & email address to contact for further information: Michael Magic number(s): n/a
B. Jones, mbj@microsoft.com File extension(s): n/a
o Intended Usage: COMMON Macintosh file type code(s): n/a
o Restrictions on Usage: none
o Person & email address to contact for further information:
Michael B. Jones, mbj@microsoft.com
o Intended usage: COMMON
o Restrictions on usage: none
o Author: Michael B. Jones, mbj@microsoft.com o Author: Michael B. Jones, mbj@microsoft.com
o Change Controller: IESG o Change controller: IESG
o Provisional registration? No o Provisional registration? No
10.4. Header Parameter Names Registration 10.4. Header Parameter Names Registration
This specification registers specific Claim Names defined in This section registers specific Claim Names defined in Section 4.1 in
Section 4.1 in the IANA JSON Web Signature and Encryption Header the IANA "JSON Web Signature and Encryption Header Parameters"
Parameters registry defined in [JWS] for use by Claims replicated as registry established by [JWS] for use by claims replicated as Header
Header Parameters in JWEs, per Section 5.3. Parameters in JWEs, per Section 5.3.
10.4.1. Registry Contents 10.4.1. Registry Contents
o Header Parameter Name: "iss" o Header Parameter Name: "iss"
o Header Parameter Description: Issuer o Header Parameter Description: Issuer
o Header Parameter Usage Location(s): JWE o Header Parameter Usage Location(s): JWE
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.1 of [[ this document ]] o Specification Document(s): Section 4.1.1 of RFC 7519
o Header Parameter Name: "sub" o Header Parameter Name: "sub"
o Header Parameter Description: Subject o Header Parameter Description: Subject
o Header Parameter Usage Location(s): JWE o Header Parameter Usage Location(s): JWE
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.2 of [[ this document ]] o Specification Document(s): Section 4.1.2 of RFC 7519
o Header Parameter Name: "aud" o Header Parameter Name: "aud"
o Header Parameter Description: Audience o Header Parameter Description: Audience
o Header Parameter Usage Location(s): JWE o Header Parameter Usage Location(s): JWE
o Change Controller: IESG o Change Controller: IESG
o Specification Document(s): Section 4.1.3 of [[ this document ]] o Specification Document(s): Section 4.1.3 of RFC 7519
11. Security Considerations 11. Security Considerations
All of the security issues that are pertinent to any cryptographic All of the security issues that are pertinent to any cryptographic
application must be addressed by JWT/JWS/JWE/JWK agents. Among these application must be addressed by JWT/JWS/JWE/JWK agents. Among these
issues are protecting the user's asymmetric private and symmetric issues are protecting the user's asymmetric private and symmetric
secret keys and employing countermeasures to various attacks. secret keys and employing countermeasures to various attacks.
All the security considerations in the JWS specification also apply All the security considerations in the JWS specification also apply
to JWT, as do the JWE security considerations when encryption is to JWT, as do the JWE security considerations when encryption is
employed. In particular, the JWS JSON Security Considerations and employed. In particular, Sections 10.12 ("JSON Security
Unicode Comparison Security Considerations apply equally to the JWT Considerations") and 10.13 ("Unicode Comparison Security
Claims Set in the same manner that they do to the JOSE Header. Considerations") of [JWS] apply equally to the JWT Claims Set in the
same manner that they do to the JOSE Header.
11.1. Trust Decisions 11.1. Trust Decisions
The contents of a JWT cannot be relied upon in a trust decision The contents of a JWT cannot be relied upon in a trust decision
unless its contents have been cryptographically secured and bound to unless its contents have been cryptographically secured and bound to
the context necessary for the trust decision. In particular, the the context necessary for the trust decision. In particular, the
key(s) used to sign and/or encrypt the JWT will typically need to key(s) used to sign and/or encrypt the JWT will typically need to
verifiably be under the control of the party identified as the issuer verifiably be under the control of the party identified as the issuer
of the JWT. of the JWT.
skipping to change at page 22, line 13 skipping to change at page 22, line 26
specification. specification.
12. Privacy Considerations 12. Privacy Considerations
A JWT may contain privacy-sensitive information. When this is the A JWT may contain privacy-sensitive information. When this is the
case, measures MUST be taken to prevent disclosure of this case, measures MUST be taken to prevent disclosure of this
information to unintended parties. One way to achieve this is to use information to unintended parties. One way to achieve this is to use
an encrypted JWT and authenticate the recipient. Another way is to an encrypted JWT and authenticate the recipient. Another way is to
ensure that JWTs containing unencrypted privacy-sensitive information ensure that JWTs containing unencrypted privacy-sensitive information
are only transmitted using protocols utilizing encryption that are only transmitted using protocols utilizing encryption that
support endpoint authentication, such as TLS. Omitting privacy- support endpoint authentication, such as Transport Layer Security
sensitive information from a JWT is the simplest way of minimizing (TLS). Omitting privacy-sensitive information from a JWT is the
privacy issues. simplest way of minimizing privacy issues.
13. References 13. References
13.1. Normative References 13.1. Normative References
[ECMAScript] [ECMAScript]
Ecma International, "ECMAScript Language Specification, Ecma International, "ECMAScript Language Specification,
5.1 Edition", ECMA 262, June 2011. 5.1 Edition", ECMA Standard 262, June 2011,
<http://www.ecma-international.org/ecma-262/5.1/
ECMA-262.pdf>.
[IANA.MediaTypes] [IANA.MediaTypes]
Internet Assigned Numbers Authority (IANA), "MIME Media IANA, "Media Types",
Types", 2005. <http://www.iana.org/assignments/media-types>.
[JWA] Jones, M., "JSON Web Algorithms (JWA)", [JWA] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518,
draft-ietf-jose-json-web-algorithms (work in progress), DOI 10.17487/RFC7518, May 2015,
December 2014. <http://www.rfc-editor.org/info/rfc7518>.
[JWE] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", [JWE] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)",
draft-ietf-jose-json-web-encryption (work in progress), RFC 7516, DOI 10.17487/RFC7516, May 2015,
December 2014. <http://www.rfc-editor.org/info/rfc7516>.
[JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web [JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature (JWS)", draft-ietf-jose-json-web-signature (work Signature (JWS)", RFC 7515, DOI 10.17487/RFC, May 2015,
in progress), December 2014. <http://www.rfc-editor.org/info/rfc7515>.
[RFC20] Cerf, V., "ASCII format for Network Interchange", RFC 20, [RFC20] Cerf, V., "ASCII format for Network Interchange", STD 80,
October 1969. RFC 20, DOI 10.17487/RFC0020, October 1969,
<http://www.rfc-editor.org/info/rfc20>.
[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
November 1996. DOI 10.17487/RFC2046, November 1996,
<http://www.rfc-editor.org/info/rfc2046>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, Resource Identifier (URI): Generic Syntax", STD 66,
RFC 3986, January 2005. RFC 3986, DOI 10.17487/RFC3986, January 2005,
<http://www.rfc-editor.org/info/rfc3986>.
[RFC4949] Shirey, R., "Internet Security Glossary, Version 2", [RFC4949] Shirey, R., "Internet Security Glossary, Version 2",
RFC 4949, August 2007. FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007,
<http://www.rfc-editor.org/info/rfc4949>.
[RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", RFC 7159, March 2014. Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
2014, <http://www.rfc-editor.org/info/rfc7159>.
[UNICODE] The Unicode Consortium, "The Unicode Standard",
<http://www.unicode.org/versions/latest/>.
13.2. Informative References 13.2. Informative References
[CanvasApp] [CanvasApp]
Facebook, "Canvas Applications", 2010. Facebook, "Canvas Applications", 2010,
<http://developers.facebook.com/docs/authentication/
canvas>.
[JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", [JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign",
September 2010. September 2010, <http://jsonenc.info/jss/1.0/>.
[MagicSignatures] [MagicSignatures]
Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic Panzer, J., Ed., Laurie, B., and D. Balfanz, "Magic
Signatures", January 2011. Signatures", January 2011,
<http://salmon-protocol.googlecode.com/svn/
trunk/draft-panzer-magicsig-01.html>.
[OASIS.saml-core-2.0-os] [OASIS.saml-core-2.0-os]
Cantor, S., Kemp, J., Philpott, R., and E. Maler, Cantor, S., Kemp, J., Philpott, R., and E. Maler,
"Assertions and Protocol for the OASIS Security Assertion "Assertions and Protocols for the OASIS Security Assertion
Markup Language (SAML) V2.0", OASIS Standard saml-core- Markup Language (SAML) V2.0", OASIS Standard
2.0-os, March 2005. saml-core-2.0-os, March 2005,
<http://docs.oasis-open.org/security/saml/v2.0/
saml-core-2.0-os.pdf>.
[POSIX.1] Institute of Electrical and Electronics Engineers, "The [POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", IEEE
Open Group Base Specifications Issue 7", IEEE Std 1003.1, Std 1003.1, 2013 Edition, 2013,
2013 Edition, 2013. <http://pubs.opengroup.org/onlinepubs/9699919799/
basedefs/V1_chap04.html#tag_04_15>.
[RFC3275] Eastlake, D., Reagle, J., and D. Solo, "(Extensible Markup [RFC3275] Eastlake 3rd, D., Reagle, J., and D. Solo, "(Extensible
Language) XML-Signature Syntax and Processing", RFC 3275, Markup Language) XML-Signature Syntax and Processing",
March 2002. RFC 3275, DOI 10.17487/RFC3275, March 2002,
<http://www.rfc-editor.org/info/rfc3275>.
[RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Internet: Timestamps", RFC 3339, July 2002. Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<http://www.rfc-editor.org/info/rfc3339>.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally [RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally
Unique IDentifier (UUID) URN Namespace", RFC 4122, Unique IDentifier (UUID) URN Namespace", RFC 4122,
July 2005. DOI 10.17487/RFC4122, July 2005,
<http://www.rfc-editor.org/info/rfc4122>.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226, IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008. DOI 10.17487/RFC5226, May 2008,
<http://www.rfc-editor.org/info/rfc5226>.
[RFC6755] Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace [RFC6755] Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace
for OAuth", RFC 6755, October 2012. for OAuth", RFC 6755, DOI 10.17487/RFC6755, October 2012,
<http://www.rfc-editor.org/info/rfc6755>.
[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type
Specifications and Registration Procedures", BCP 13, Specifications and Registration Procedures", BCP 13,
RFC 6838, January 2013. RFC 6838, DOI 10.17487/RFC6838, January 2013,
<http://www.rfc-editor.org/info/rfc6838>.
[SWT] Hardt, D. and Y. Goland, "Simple Web Token (SWT)", [SWT] Hardt, D. and Y. Goland, "Simple Web Token (SWT)", Version
Version 0.9.5.1, November 2009. 0.9.5.1, November 2009, <http://msdn.microsoft.com/en-us/
library/windowsazure/hh781551.aspx>.
[W3C.CR-xml11-20021015] [W3C.CR-xml11-20060816]
Cowan, J., "Extensible Markup Language (XML) 1.1", W3C Cowan, J., "Extensible Markup Language (XML) 1.1 (Second
CR CR-xml11-20021015, October 2002. Edition)", World Wide Web Consortium Recommendation
REC-xml11-20060816, August 2006,
<http://www.w3.org/TR/2006/REC-xml11-20060816>.
[W3C.REC-xml-c14n-20010315] [W3C.REC-xml-c14n-20010315]
Boyer, J., "Canonical XML Version 1.0", World Wide Web Boyer, J., "Canonical XML Version 1.0", World Wide Web
Consortium Recommendation REC-xml-c14n-20010315, Consortium Recommendation REC-xml-c14n-20010315, March
March 2001, 2001, <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.
<http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.
Appendix A. JWT Examples Appendix A. JWT Examples
This section contains examples of JWTs. For other example JWTs, see This section contains examples of JWTs. For other example JWTs, see
Section 6.1 and Appendices A.1, A.2, and A.3 of [JWS]. Section 6.1 of this document and Appendices A.1 - A.3 of [JWS].
A.1. Example Encrypted JWT A.1. Example Encrypted JWT
This example encrypts the same claims as used in Section 3.1 to the This example encrypts the same claims as used in Section 3.1 to the
recipient using RSAES-PKCS1-V1_5 and AES_128_CBC_HMAC_SHA_256. recipient using RSAES-PKCS1-v1_5 and AES_128_CBC_HMAC_SHA_256.
The following example JOSE Header declares that: The following example JOSE Header declares that:
o The Content Encryption Key is encrypted to the recipient using the o The Content Encryption Key is encrypted to the recipient using the
RSAES-PKCS1-V1_5 algorithm to produce the JWE Encrypted Key. RSAES-PKCS1-v1_5 algorithm to produce the JWE Encrypted Key.
o Authenticated encryption is performed on the plaintext using the
o Authenticated encryption is performed on the Plaintext using the
AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext
and the JWE Authentication Tag. and the JWE Authentication Tag.
{"alg":"RSA1_5","enc":"A128CBC-HS256"} {"alg":"RSA1_5","enc":"A128CBC-HS256"}
Other than using the octets of the UTF-8 representation of the JWT Other than using the octets of the UTF-8 representation of the JWT
Claims Set from Section 3.1 as the plaintext value, the computation Claims Set from Section 3.1 as the plaintext value, the computation
of this JWT is identical to the computation of the JWE in Appendix of this JWT is identical to the computation of the JWE in
A.2 of [JWE], including the keys used. Appendix A.2 of [JWE], including the keys used.
The final result in this example (with line breaks for display The final result in this example (with line breaks for display
purposes only) is: purposes only) is:
eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0. eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.
QR1Owv2ug2WyPBnbQrRARTeEk9kDO2w8qDcjiHnSJflSdv1iNqhWXaKH4MqAkQtM QR1Owv2ug2WyPBnbQrRARTeEk9kDO2w8qDcjiHnSJflSdv1iNqhWXaKH4MqAkQtM
oNfABIPJaZm0HaA415sv3aeuBWnD8J-Ui7Ah6cWafs3ZwwFKDFUUsWHSK-IPKxLG oNfABIPJaZm0HaA415sv3aeuBWnD8J-Ui7Ah6cWafs3ZwwFKDFUUsWHSK-IPKxLG
TkND09XyjORj_CHAgOPJ-Sd8ONQRnJvWn_hXV1BNMHzUjPyYwEsRhDhzjAD26ima TkND09XyjORj_CHAgOPJ-Sd8ONQRnJvWn_hXV1BNMHzUjPyYwEsRhDhzjAD26ima
sOTsgruobpYGoQcXUwFDn7moXPRfDE8-NoQX7N7ZYMmpUDkR-Cx9obNGwJQ3nM52 sOTsgruobpYGoQcXUwFDn7moXPRfDE8-NoQX7N7ZYMmpUDkR-Cx9obNGwJQ3nM52
YCitxoQVPzjbl7WBuB7AohdBoZOdZ24WlN1lVIeh8v1K4krB8xgKvRU8kgFrEn_a YCitxoQVPzjbl7WBuB7AohdBoZOdZ24WlN1lVIeh8v1K4krB8xgKvRU8kgFrEn_a
skipping to change at page 25, line 25 skipping to change at page 27, line 7
fiK51VwhsxJ-siBMR-YFiA fiK51VwhsxJ-siBMR-YFiA
A.2. Example Nested JWT A.2. Example Nested JWT
This example shows how a JWT can be used as the payload of a JWE or This example shows how a JWT can be used as the payload of a JWE or
JWS to create a Nested JWT. In this case, the JWT Claims Set is JWS to create a Nested JWT. In this case, the JWT Claims Set is
first signed, and then encrypted. first signed, and then encrypted.
The inner signed JWT is identical to the example in Appendix A.2 of The inner signed JWT is identical to the example in Appendix A.2 of
[JWS]. Therefore, its computation is not repeated here. This [JWS]. Therefore, its computation is not repeated here. This
example then encrypts this inner JWT to the recipient using RSAES- example then encrypts this inner JWT to the recipient using
PKCS1-V1_5 and AES_128_CBC_HMAC_SHA_256. RSAES-PKCS1-v1_5 and AES_128_CBC_HMAC_SHA_256.
The following example JOSE Header declares that: The following example JOSE Header declares that:
o The Content Encryption Key is encrypted to the recipient using the o The Content Encryption Key is encrypted to the recipient using the
RSAES-PKCS1-V1_5 algorithm to produce the JWE Encrypted Key. RSAES-PKCS1-v1_5 algorithm to produce the JWE Encrypted Key.
o Authenticated encryption is performed on the plaintext using the
o Authenticated encryption is performed on the Plaintext using the
AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext
and the JWE Authentication Tag. and the JWE Authentication Tag.
o The plaintext is itself a JWT.
o The Plaintext is itself a JWT.
{"alg":"RSA1_5","enc":"A128CBC-HS256","cty":"JWT"} {"alg":"RSA1_5","enc":"A128CBC-HS256","cty":"JWT"}
Base64url encoding the octets of the UTF-8 representation of the JOSE Base64url encoding the octets of the UTF-8 representation of the JOSE
Header yields this encoded JOSE Header value: Header yields this encoded JOSE Header value:
eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0 eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0
The computation of this JWT is identical to the computation of the The computation of this JWT is identical to the computation of the
JWE in Appendix A.2 of [JWE], other than that different JOSE Header, JWE in Appendix A.2 of [JWE], other than that different JOSE Header,
Plaintext, JWE Initialization Vector, and Content Encryption Key plaintext, JWE Initialization Vector, and Content Encryption Key
values are used. (The RSA key used is the same.) values are used. (The RSA key used is the same.)
The Payload used is the octets of the ASCII [RFC20] representation of The plaintext used is the octets of the ASCII [RFC20] representation
the JWT at the end of Appendix A.2.1 of [JWS] (with all whitespace of the JWT at the end of Appendix A.2.1 of [JWS] (with all whitespace
and line breaks removed), which is a sequence of 458 octets. and line breaks removed), which is a sequence of 458 octets.
The JWE Initialization Vector value used (using JSON array notation) The JWE Initialization Vector value used (using JSON array notation)
is: is:
[82, 101, 100, 109, 111, 110, 100, 32, 87, 65, 32, 57, 56, 48, 53, [82, 101, 100, 109, 111, 110, 100, 32, 87, 65, 32, 57, 56, 48, 53,
50] 50]
This example uses the Content Encryption Key represented by the This example uses the Content Encryption Key represented by the
base64url encoded value below: base64url-encoded value below:
GawgguFyGrWKav7AX4VKUg GawgguFyGrWKav7AX4VKUg
The final result for this Nested JWT (with line breaks for display The final result for this Nested JWT (with line breaks for display
purposes only) is: purposes only) is:
eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldU eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldU
In0. In0.
g_hEwksO1Ax8Qn7HoN-BVeBoa8FXe0kpyk_XdcSmxvcM5_P296JXXtoHISr_DD_M g_hEwksO1Ax8Qn7HoN-BVeBoa8FXe0kpyk_XdcSmxvcM5_P296JXXtoHISr_DD_M
qewaQSH4dZOQHoUgKLeFly-9RI11TG-_Ge1bZFazBPwKC5lJ6OLANLMd0QSL4fYE qewaQSH4dZOQHoUgKLeFly-9RI11TG-_Ge1bZFazBPwKC5lJ6OLANLMd0QSL4fYE
skipping to change at page 26, line 44 skipping to change at page 28, line 31
Kw1bpgIqGYsw2v_grHjszJZ-_I5uM-9RA8ycX9KqPRp9gc6pXmoU_-27ATs9XCvr Kw1bpgIqGYsw2v_grHjszJZ-_I5uM-9RA8ycX9KqPRp9gc6pXmoU_-27ATs9XCvr
ZXUtK2902AUzqpeEUJYjWWxSNsS-r1TJ1I-FMJ4XyAiGrfmo9hQPcNBYxPz3GQb2 ZXUtK2902AUzqpeEUJYjWWxSNsS-r1TJ1I-FMJ4XyAiGrfmo9hQPcNBYxPz3GQb2
8Y5CLSQfNgKSGt0A4isp1hBUXBHAndgtcslt7ZoQJaKe_nNJgNliWtWpJ_ebuOpE 8Y5CLSQfNgKSGt0A4isp1hBUXBHAndgtcslt7ZoQJaKe_nNJgNliWtWpJ_ebuOpE
l8jdhehdccnRMIwAmU1n7SPkmhIl1HlSOpvcvDfhUN5wuqU955vOBvfkBOh5A11U l8jdhehdccnRMIwAmU1n7SPkmhIl1HlSOpvcvDfhUN5wuqU955vOBvfkBOh5A11U
zBuo2WlgZ6hYi9-e3w29bR0C2-pp3jbqxEDw3iWaf2dc5b-LnR0FEYXvI_tYk5rd zBuo2WlgZ6hYi9-e3w29bR0C2-pp3jbqxEDw3iWaf2dc5b-LnR0FEYXvI_tYk5rd
_J9N0mg0tQ6RbpxNEMNoA9QWk5lgdPvbh9BaO195abQ. _J9N0mg0tQ6RbpxNEMNoA9QWk5lgdPvbh9BaO195abQ.
AVO9iT5AV4CzvDJCdhSFlQ AVO9iT5AV4CzvDJCdhSFlQ
Appendix B. Relationship of JWTs to SAML Assertions Appendix B. Relationship of JWTs to SAML Assertions
SAML 2.0 [OASIS.saml-core-2.0-os] provides a standard for creating Security Assertion Markup Language (SAML) 2.0
security tokens with greater expressivity and more security options [OASIS.saml-core-2.0-os] provides a standard for creating security
than supported by JWTs. However, the cost of this flexibility and tokens with greater expressivity and more security options than
supported by JWTs. However, the cost of this flexibility and
expressiveness is both size and complexity. SAML's use of XML expressiveness is both size and complexity. SAML's use of XML
[W3C.CR-xml11-20021015] and XML DSIG [RFC3275] contributes to the [W3C.CR-xml11-20060816] and XML Digital Signature (DSIG) [RFC3275]
size of SAML assertions; its use of XML and especially XML contributes to the size of SAML Assertions; its use of XML and
Canonicalization [W3C.REC-xml-c14n-20010315] contributes to their especially XML Canonicalization [W3C.REC-xml-c14n-20010315]
complexity. contributes to their complexity.
JWTs are intended to provide a simple security token format that is JWTs are intended to provide a simple security token format that is
small enough to fit into HTTP headers and query arguments in URIs. small enough to fit into HTTP headers and query arguments in URIs.
It does this by supporting a much simpler token model than SAML and It does this by supporting a much simpler token model than SAML and
using the JSON [RFC7159] object encoding syntax. It also supports using the JSON [RFC7159] object encoding syntax. It also supports
securing tokens using Message Authentication Codes (MACs) and digital securing tokens using Message Authentication Codes (MACs) and digital
signatures using a smaller (and less flexible) format than XML DSIG. signatures using a smaller (and less flexible) format than XML DSIG.
Therefore, while JWTs can do some of the things SAML assertions do, Therefore, while JWTs can do some of the things SAML Assertions do,
JWTs are not intended as a full replacement for SAML assertions, but JWTs are not intended as a full replacement for SAML Assertions, but
rather as a token format to be used when ease of implementation or rather as a token format to be used when ease of implementation or
compactness are considerations. compactness are considerations.
SAML Assertions are always statements made by an entity about a SAML Assertions are always statements made by an entity about a
subject. JWTs are often used in the same manner, with the entity subject. JWTs are often used in the same manner, with the entity
making the statements being represented by the "iss" (issuer) claim, making the statements being represented by the "iss" (issuer) claim,
and the subject being represented by the "sub" (subject) claim. and the subject being represented by the "sub" (subject) claim.
However, with these claims being optional, other uses of the JWT However, with these claims being optional, other uses of the JWT
format are also permitted. format are also permitted.
Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs) Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs)
Both JWTs and Simple Web Tokens SWT [SWT], at their core, enable sets Both JWTs and SWTs [SWT], at their core, enable sets of claims to be
of claims to be communicated between applications. For SWTs, both communicated between applications. For SWTs, both the claim names
the claim names and claim values are strings. For JWTs, while claim and claim values are strings. For JWTs, while claim names are
names are strings, claim values can be any JSON type. Both token strings, claim values can be any JSON type. Both token types offer
types offer cryptographic protection of their content: SWTs with HMAC cryptographic protection of their content: SWTs with HMAC SHA-256 and
SHA-256 and JWTs with a choice of algorithms, including signature, JWTs with a choice of algorithms, including signature, MAC, and
MAC, and encryption algorithms. encryption algorithms.
Appendix D. Acknowledgements Acknowledgements
The authors acknowledge that the design of JWTs was intentionally The authors acknowledge that the design of JWTs was intentionally
influenced by the design and simplicity of Simple Web Tokens [SWT] influenced by the design and simplicity of SWTs [SWT] and ideas for
and ideas for JSON tokens that Dick Hardt discussed within the OpenID JSON tokens that Dick Hardt discussed within the OpenID community.
community.
Solutions for signing JSON content were previously explored by Magic Solutions for signing JSON content were previously explored by Magic
Signatures [MagicSignatures], JSON Simple Sign [JSS], and Canvas Signatures [MagicSignatures], JSON Simple Sign [JSS], and Canvas
Applications [CanvasApp], all of which influenced this draft. Applications [CanvasApp], all of which influenced this document.
This specification is the work of the OAuth Working Group, which This specification is the work of the OAuth working group, which
includes dozens of active and dedicated participants. In particular, includes dozens of active and dedicated participants. In particular,
the following individuals contributed ideas, feedback, and wording the following individuals contributed ideas, feedback, and wording
that influenced this specification: that influenced this specification:
Dirk Balfanz, Richard Barnes, Brian Campbell, Alissa Cooper, Breno de Dirk Balfanz, Richard Barnes, Brian Campbell, Alissa Cooper, Breno de
Medeiros, Stephen Farrell, Dick Hardt, Joe Hildebrand, Jeff Hodges, Medeiros, Stephen Farrell, Yaron Y. Goland, Dick Hardt, Joe
Edmund Jay, Yaron Y. Goland, Warren Kumari, Ben Laurie, Barry Leiba, Hildebrand, Jeff Hodges, Edmund Jay, Warren Kumari, Ben Laurie, Barry
Ted Lemon, James Manger, Prateek Mishra, Kathleen Moriarty, Tony Leiba, Ted Lemon, James Manger, Prateek Mishra, Kathleen Moriarty,
Nadalin, Axel Nennker, John Panzer, Emmanuel Raviart, David Recordon, Tony Nadalin, Axel Nennker, John Panzer, Emmanuel Raviart, David
Eric Rescorla, Jim Schaad, Paul Tarjan, Hannes Tschofenig, Sean Recordon, Eric Rescorla, Jim Schaad, Paul Tarjan, Hannes Tschofenig,
Turner, and Tom Yu. Sean Turner, and Tom Yu.
Hannes Tschofenig and Derek Atkins chaired the OAuth working group Hannes Tschofenig and Derek Atkins chaired the OAuth working group
and Sean Turner, Stephen Farrell, and Kathleen Moriarty served as and Sean Turner, Stephen Farrell, and Kathleen Moriarty served as
Security area directors during the creation of this specification. Security Area Directors during the creation of this specification.
Appendix E. Document History
[[ to be removed by the RFC Editor before publication as an RFC ]]
-32
o Replaced uses of the phrases "JWS object" and "JWE object" with
"JWS" and "JWE".
o Applied other minor editorial improvements.
-31
o Updated the example IANA registration request subject line.
-30
o Applied privacy wording supplied by Stephen Farrell.
o Clarified where white space and line breaks may occur in JSON
objects by referencing Section 2 of RFC 7159.
o Specified that registration reviews occur on the
jwt-reg-review@ietf.org mailing list.
-29
o Used real values for examples in the IANA Registration Template.
-28
o Addressed IESG review comments by Alissa Cooper, Barry Leiba,
Stephen Farrell, Ted Lemon, and Richard Barnes.
o Changed the RFC 6755 reference to be informative, based upon
related IESG review feedback on draft-ietf-oauth-saml2-bearer.
-27
o Removed unused reference to RFC 4648.
o Changed to use the term "authenticated encryption" instead of
"encryption", where appropriate.
o Changed the registration review period to three weeks.
o Acknowledged additional contributors.
-26
o Removed an ambiguity in numeric date representations by specifying
that leap seconds are handled in the manner specified by POSIX.1.
o Addressed Gen-ART review comments by Russ Housley.
o Addressed secdir review comments by Warren Kumari and Stephen
Kent.
o Replaced the terms Plaintext JWS and Plaintext JWT with Unsecured
JWS and Unsecured JWT.
-25
o Reworded the language about JWT implementations ignoring the "typ"
parameter, explicitly saying that its processing is performed by
JWT applications.
o Added a Privacy Considerations section.
-24
o Cleaned up the reference syntax in a few places.
o Applied minor wording changes to the Security Considerations
section.
-23
o Replaced the terms JWS Header, JWE Header, and JWT Header with a
single JOSE Header term defined in the JWS specification. This
also enabled a single Header Parameter definition to be used and
reduced other areas of duplication between specifications.
-22
o Revised the introduction to the Security Considerations section.
Also introduced subsection headings for security considerations
items.
o Added text about when applications typically would and would not
use the "typ" header parameter.
-21
o Removed unnecessary informative JWK spec reference.
-20
o Changed the RFC 6755 reference to be normative.
o Changed the JWK reference to be informative.
o Described potential sources of ambiguity in representing the JSON
objects used in the examples. The octets of the actual UTF-8
representations of the JSON objects used in the examples are
included to remove these ambiguities.
o Noted that octet sequences are depicted using JSON array notation.
-19
o Specified that support for Nested JWTs is optional and that
applications using this specification can impose additional
requirements upon implementations that they use.
o Updated the JSON reference to RFC 7159.
-18
o Clarified that the base64url encoding includes no line breaks,
white space, or other additional characters.
o Removed circularity in the audience claim definition.
o Clarified that it is entirely up to applications which claims to
use.
o Changed "SHOULD" to "MUST" in "in the absence of such
requirements, all claims that are not understood by
implementations MUST be ignored".
o Clarified that applications can define their own processing rules
for claims replicated in header parameters, rather than always
requiring that they be identical in the JWT Header and JWT Claims
Set.
o Removed a JWT creation step that duplicated a step in the
underlying JWS or JWE creation.
o Added security considerations about using JWTs in trust decisions.
-17
o Corrected RFC 2119 terminology usage.
o Replaced references to draft-ietf-json-rfc4627bis with RFC 7158.
-16
o Changed some references from being normative to informative, per
JOSE issue #90.
-15
o Replaced references to RFC 4627 with draft-ietf-json-rfc4627bis.
-14
o Referenced the JWE section on Distinguishing between JWS and JWE
Objects.
-13
o Added Claim Description registry field.
o Used Header Parameter Description registry field.
o Removed the phrases "JWA signing algorithms" and "JWA encryption
algorithms".
o Removed the term JSON Text Object.
-12
o Tracked the JOSE change refining the "typ" and "cty" definitions
to always be MIME Media Types, with the omission of "application/"
prefixes recommended for brevity. For compatibility with legacy
implementations, it is RECOMMENDED that "JWT" always be spelled
using uppercase characters when used as a "typ" or "cty" value.
As side effects, this change removed the "typ" Claim definition
and narrowed the uses of the URI
"urn:ietf:params:oauth:token-type:jwt".
o Updated base64url definition to match JOSE definition.
o Changed terminology from "Reserved Claim Name" to "Registered
Claim Name" to match JOSE terminology change.
o Applied other editorial changes to track parallel JOSE changes.
o Clarified that the subject value may be scoped to be locally
unique in the context of the issuer or may be globally unique.
-11
o Added a Nested JWT example.
o Added "sub" to the list of Claims registered for use as Header
Parameter values when an unencrypted representation is required in
an encrypted JWT.
-10
o Allowed Claims to be replicated as Header Parameters in encrypted
JWTs as needed by applications that require an unencrypted
representation of specific Claims.
-09
o Clarified that the "typ" header parameter is used in an
application-specific manner and has no effect upon the JWT
processing.
o Stated that recipients MUST either reject JWTs with duplicate
Header Parameter Names or with duplicate Claim Names or use a JSON
parser that returns only the lexically last duplicate member name.
-08
o Tracked a change to how JWEs are computed (which only affected the
example encrypted JWT value).
-07
o Defined that the default action for claims that are not understood
is to ignore them unless otherwise specified by applications.
o Changed from using the term "byte" to "octet" when referring to 8
bit values.
o Tracked encryption computation changes in the JWE specification.
-06
o Changed the name of the "prn" claim to "sub" (subject) both to
more closely align with SAML name usage and to use a more
intuitive name.
o Allow JWTs to have multiple audiences.
o Applied editorial improvements suggested by Jeff Hodges, Prateek
Mishra, and Hannes Tschofenig. Many of these simplified the
terminology used.
o Explained why Nested JWTs should be signed and then encrypted.
o Clarified statements of the form "This claim is OPTIONAL" to "Use
of this claim is OPTIONAL".
o Referenced String Comparison Rules in JWS.
o Added seriesInfo information to Internet Draft references.
-05
o Updated values for example AES CBC calculations.
-04
o Promoted Initialization Vector from being a header parameter to
being a top-level JWE element. This saves approximately 16 bytes
in the compact serialization, which is a significant savings for
some use cases. Promoting the Initialization Vector out of the
header also avoids repeating this shared value in the JSON
serialization.
o Applied changes made by the RFC Editor to RFC 6749's registry
language to this specification.
o Reference RFC 6755 -- An IETF URN Sub-Namespace for OAuth.
-03
o Added statement that "StringOrURI values are compared as case-
sensitive strings with no transformations or canonicalizations
applied".
o Indented artwork elements to better distinguish them from the body
text.
-02
o Added an example of an encrypted JWT.
o Added this language to Registration Templates: "This name is case
sensitive. Names that match other registered names in a case
insensitive manner SHOULD NOT be accepted."
o Applied editorial suggestions.
-01
o Added the "cty" (content type) header parameter for declaring type
information about the secured content, as opposed to the "typ"
(type) header parameter, which declares type information about
this object. This significantly simplified nested JWTs.
o Moved description of how to determine whether a header is for a
JWS or a JWE from the JWT spec to the JWE spec.
o Changed registration requirements from RFC Required to
Specification Required with Expert Review.
o Added Registration Template sections for defined registries.
o Added Registry Contents sections to populate registry values.
o Added "Collision Resistant Namespace" to the terminology section.
o Numerous editorial improvements.
-00
o Created the initial IETF draft based upon
draft-jones-json-web-token-10 with no normative changes.
Authors' Addresses Authors' Addresses
Michael B. Jones Michael B. Jones
Microsoft Microsoft
Email: mbj@microsoft.com EMail: mbj@microsoft.com
URI: http://self-issued.info/ URI: http://self-issued.info/
John Bradley John Bradley
Ping Identity Ping Identity
Email: ve7jtb@ve7jtb.com EMail: ve7jtb@ve7jtb.com
URI: http://www.thread-safe.com/ URI: http://www.thread-safe.com/
Nat Sakimura Nat Sakimura
Nomura Research Institute Nomura Research Institute
Email: n-sakimura@nri.co.jp EMail: n-sakimura@nri.co.jp
URI: http://nat.sakimura.org/ URI: http://nat.sakimura.org/
 End of changes. 146 change blocks. 
718 lines changed or deleted 407 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/