draft-ietf-jose-json-web-signature-05.txt   draft-ietf-jose-json-web-signature-06.txt 
JOSE Working Group M. Jones JOSE Working Group M. Jones
Internet-Draft Microsoft Internet-Draft Microsoft
Intended status: Standards Track J. Bradley Intended status: Standards Track J. Bradley
Expires: January 31, 2013 Ping Identity Expires: April 18, 2013 Ping Identity
N. Sakimura N. Sakimura
NRI NRI
July 30, 2012 October 15, 2012
JSON Web Signature (JWS) JSON Web Signature (JWS)
draft-ietf-jose-json-web-signature-05 draft-ietf-jose-json-web-signature-06
Abstract Abstract
JSON Web Signature (JWS) is a means of representing content secured JSON Web Signature (JWS) is a means of representing content secured
with digital signatures or Message Authentication Codes (MACs) using with digital signatures or Message Authentication Codes (MACs) using
JavaScript Object Notation (JSON) data structures. Cryptographic JavaScript Object Notation (JSON) data structures. Cryptographic
algorithms and identifiers for use with this specification are algorithms and identifiers for use with this specification are
described in the separate JSON Web Algorithms (JWA) specification. described in the separate JSON Web Algorithms (JWA) specification.
Related encryption capabilities are described in the separate JSON Related encryption capabilities are described in the separate JSON
Web Encryption (JWE) specification. Web Encryption (JWE) specification.
skipping to change at page 1, line 39 skipping to change at page 1, line 39
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on January 31, 2013. This Internet-Draft will expire on April 18, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 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
skipping to change at page 2, line 40 skipping to change at page 2, line 40
4.3. Private Header Parameter Names . . . . . . . . . . . . . . 10 4.3. Private Header Parameter Names . . . . . . . . . . . . . . 10
5. Rules for Creating and Validating a JWS . . . . . . . . . . . 10 5. Rules for Creating and Validating a JWS . . . . . . . . . . . 10
6. Securing JWSs with Cryptographic Algorithms . . . . . . . . . 12 6. Securing JWSs with Cryptographic Algorithms . . . . . . . . . 12
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
7.1. JSON Web Signature and Encryption Header Parameters 7.1. JSON Web Signature and Encryption Header Parameters
Registry . . . . . . . . . . . . . . . . . . . . . . . . . 13 Registry . . . . . . . . . . . . . . . . . . . . . . . . . 13
7.1.1. Registration Template . . . . . . . . . . . . . . . . 13 7.1.1. Registration Template . . . . . . . . . . . . . . . . 13
7.1.2. Initial Registry Contents . . . . . . . . . . . . . . 14 7.1.2. Initial Registry Contents . . . . . . . . . . . . . . 14
7.2. JSON Web Signature and Encryption Type Values Registry . . 15 7.2. JSON Web Signature and Encryption Type Values Registry . . 15
7.2.1. Registration Template . . . . . . . . . . . . . . . . 15 7.2.1. Registration Template . . . . . . . . . . . . . . . . 15
7.2.2. Initial Registry Contents . . . . . . . . . . . . . . 16 7.2.2. Initial Registry Contents . . . . . . . . . . . . . . 15
7.3. Media Type Registration . . . . . . . . . . . . . . . . . 16 7.3. Media Type Registration . . . . . . . . . . . . . . . . . 16
7.3.1. Registry Contents . . . . . . . . . . . . . . . . . . 16 7.3.1. Registry Contents . . . . . . . . . . . . . . . . . . 16
8. Security Considerations . . . . . . . . . . . . . . . . . . . 17 8. Security Considerations . . . . . . . . . . . . . . . . . . . 16
8.1. Cryptographic Security Considerations . . . . . . . . . . 17 8.1. Cryptographic Security Considerations . . . . . . . . . . 16
8.2. JSON Security Considerations . . . . . . . . . . . . . . . 18 8.2. JSON Security Considerations . . . . . . . . . . . . . . . 17
8.3. Unicode Comparison Security Considerations . . . . . . . . 19 8.3. Unicode Comparison Security Considerations . . . . . . . . 18
9. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 19 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 9.1. Normative References . . . . . . . . . . . . . . . . . . . 18
10.1. Normative References . . . . . . . . . . . . . . . . . . . 19 9.2. Informative References . . . . . . . . . . . . . . . . . . 20
10.2. Informative References . . . . . . . . . . . . . . . . . . 21 Appendix A. JWS Examples . . . . . . . . . . . . . . . . . . . . 20
A.1. JWS using HMAC SHA-256 . . . . . . . . . . . . . . . . . . 20
Appendix A. JWS Examples . . . . . . . . . . . . . . . . . . . . 21 A.1.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 20
A.1. JWS using HMAC SHA-256 . . . . . . . . . . . . . . . . . . 22 A.1.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 22
A.1.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 22 A.1.3. Validating . . . . . . . . . . . . . . . . . . . . . . 22
A.1.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 24 A.2. JWS using RSA SHA-256 . . . . . . . . . . . . . . . . . . 23
A.1.3. Validating . . . . . . . . . . . . . . . . . . . . . . 24 A.2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 23
A.2. JWS using RSA SHA-256 . . . . . . . . . . . . . . . . . . 24 A.2.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 26
A.2.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 24 A.2.3. Validating . . . . . . . . . . . . . . . . . . . . . . 26
A.2.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 28 A.3. JWS using ECDSA P-256 SHA-256 . . . . . . . . . . . . . . 26
A.2.3. Validating . . . . . . . . . . . . . . . . . . . . . . 28 A.3.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 26
A.3. JWS using ECDSA P-256 SHA-256 . . . . . . . . . . . . . . 28 A.3.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 28
A.3.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 28 A.3.3. Validating . . . . . . . . . . . . . . . . . . . . . . 28
A.3.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 30 A.4. JWS using ECDSA P-521 SHA-512 . . . . . . . . . . . . . . 29
A.3.3. Validating . . . . . . . . . . . . . . . . . . . . . . 30 A.4.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 29
A.4. JWS using ECDSA P-521 SHA-512 . . . . . . . . . . . . . . 31 A.4.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 31
A.4.1. Encoding . . . . . . . . . . . . . . . . . . . . . . . 31 A.4.3. Validating . . . . . . . . . . . . . . . . . . . . . . 31
A.4.2. Decoding . . . . . . . . . . . . . . . . . . . . . . . 33 A.5. Example Plaintext JWS . . . . . . . . . . . . . . . . . . 32
A.4.3. Validating . . . . . . . . . . . . . . . . . . . . . . 33 Appendix B. "x5c" (X.509 Certificate Chain) Example . . . . . . . 32
A.5. Example Plaintext JWS . . . . . . . . . . . . . . . . . . 34
Appendix B. "x5c" (X.509 Certificate Chain) Example . . . . . . . 34
Appendix C. Notes on implementing base64url encoding without Appendix C. Notes on implementing base64url encoding without
padding . . . . . . . . . . . . . . . . . . . . . . . 36 padding . . . . . . . . . . . . . . . . . . . . . . . 34
Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 37 Appendix D. Acknowledgements . . . . . . . . . . . . . . . . . . 35
Appendix E. Document History . . . . . . . . . . . . . . . . . . 38 Appendix E. Open Issues . . . . . . . . . . . . . . . . . . . . . 36
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41 Appendix F. Document History . . . . . . . . . . . . . . . . . . 36
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 39
1. Introduction 1. Introduction
JSON Web Signature (JWS) is a compact format for representing content JSON Web Signature (JWS) is a compact format for representing content
secured with digital signatures or Message Authentication Codes secured with digital signatures or Message Authentication Codes
(MACs) intended for space constrained environments such as HTTP (MACs) intended for space constrained environments such as HTTP
Authorization headers and URI query parameters. It represents this Authorization headers and URI query parameters. It represents this
content using JavaScript Object Notation (JSON) [RFC4627] based data content using JavaScript Object Notation (JSON) [RFC4627] based data
structures. The JWS cryptographic mechanisms provide integrity structures. The JWS cryptographic mechanisms provide integrity
protection for arbitrary sequences of bytes. protection for arbitrary sequences of bytes.
skipping to change at page 4, line 36 skipping to change at page 4, line 36
2. Terminology 2. Terminology
JSON Web Signature (JWS) A data structure cryptographically securing JSON Web Signature (JWS) A data structure cryptographically securing
a JWS Header and a JWS Payload with a JWS Signature value. a JWS Header and a JWS Payload with a JWS Signature value.
JWS Header A string representing a JSON object that describes the JWS Header A string representing a JSON object that describes the
digital signature or MAC operation applied to create the JWS digital signature or MAC operation applied to create the JWS
Signature value. Signature value.
JWS Payload The bytes to be secured - a.k.a., the message. The JWS Payload The bytes to be secured -- a.k.a., the message. The
payload can contain an arbitrary sequence of bytes. payload can contain an arbitrary sequence of bytes.
JWS Signature A byte array containing the cryptographic material JWS Signature A byte array containing the cryptographic material
that secures the JWS Header and the JWS Payload. that secures the JWS Header and the JWS Payload.
Base64url Encoding The URL- and filename-safe Base64 encoding Base64url Encoding The URL- and filename-safe Base64 encoding
described in RFC 4648 [RFC4648], Section 5, with the (non URL- described in RFC 4648 [RFC4648], Section 5, with the (non URL-
safe) '=' padding characters omitted, as permitted by Section 3.2. safe) '=' padding characters omitted, as permitted by Section 3.2.
(See Appendix C for notes on implementing base64url encoding (See Appendix C for notes on implementing base64url encoding
without padding.) without padding.)
skipping to change at page 5, line 21 skipping to change at page 5, line 21
Header Parameter Name The name of a member of the JSON object Header Parameter Name The name of a member of the JSON object
representing a JWS Header. representing a JWS Header.
Header Parameter Value The value of a member of the JSON object Header Parameter Value The value of a member of the JSON object
representing a JWS Header. representing a JWS Header.
JWS Compact Serialization A representation of the JWS as the JWS Compact Serialization A representation of the JWS as the
concatenation of the Encoded JWS Header, the Encoded JWS Payload, concatenation of the Encoded JWS Header, the Encoded JWS Payload,
and the Encoded JWS Signature in that order, with the three and the Encoded JWS Signature in that order, with the three
strings being separated by period ('.') characters. strings being separated by two period ('.') characters.
Collision Resistant Namespace A namespace that allows names to be Collision Resistant Namespace A namespace that allows names to be
allocated in a manner such that they are highly unlikely to allocated in a manner such that they are highly unlikely to
collide with other names. For instance, collision resistance can collide with other names. For instance, collision resistance can
be achieved through administrative delegation of portions of the be achieved through administrative delegation of portions of the
namespace or through use of collision-resistant name allocation namespace or through use of collision-resistant name allocation
functions. Examples of Collision Resistant Namespaces include: functions. Examples of Collision Resistant Namespaces include:
Domain Names, Object Identifiers (OIDs) as defined in the ITU-T Domain Names, Object Identifiers (OIDs) as defined in the ITU-T
X.660 and X.670 Recommendation series, and Universally Unique X.660 and X.670 Recommendation series, and Universally Unique
IDentifiers (UUIDs) [RFC4122]. When using an administratively IDentifiers (UUIDs) [RFC4122]. When using an administratively
skipping to change at page 5, line 49 skipping to change at page 5, line 49
values are compared as case-sensitive strings with no values are compared as case-sensitive strings with no
transformations or canonicalizations applied. transformations or canonicalizations applied.
3. JSON Web Signature (JWS) Overview 3. JSON Web Signature (JWS) Overview
JWS represents digitally signed or MACed content using JSON data JWS represents digitally signed or MACed content using JSON data
structures and base64url encoding. The representation consists of structures and base64url encoding. The representation consists of
three parts: the JWS Header, the JWS Payload, and the JWS Signature. three parts: the JWS Header, the JWS Payload, and the JWS Signature.
In the Compact Serialization, the three parts are base64url-encoded In the Compact Serialization, the three parts are base64url-encoded
for transmission, and represented as the concatenation of the encoded for transmission, and represented as the concatenation of the encoded
strings in that order, with the three strings being separated by strings in that order, with the three strings being separated by two
period ('.') characters. (A JSON Serialization for this information period ('.') characters. (A JSON Serialization for this information
is defined in the separate JSON Web Signature JSON Serialization is defined in the separate JSON Web Signature JSON Serialization
(JWS-JS) [JWS-JS] specification.) (JWS-JS) [JWS-JS] specification.)
The JWS Header describes the signature or MAC method and parameters The JWS Header describes the signature or MAC method and parameters
employed. The JWS Payload is the message content to be secured. The employed. The JWS Payload is the message content to be secured. The
JWS Signature ensures the integrity of both the JWS Header and the JWS Signature ensures the integrity of both the JWS Header and the
JWS Payload. JWS Payload.
3.1. Example JWS 3.1. Example JWS
skipping to change at page 6, line 50 skipping to change at page 6, line 50
Computing the HMAC of the bytes of the ASCII [USASCII] representation Computing the HMAC of the bytes of the ASCII [USASCII] representation
of the JWS Secured Input (the concatenation of the Encoded JWS of the JWS Secured Input (the concatenation of the Encoded JWS
Header, a period ('.') character, and the Encoded JWS Payload) with Header, a period ('.') character, and the Encoded JWS Payload) with
the HMAC SHA-256 algorithm using the key specified in Appendix A.1 the HMAC SHA-256 algorithm using the key specified in Appendix A.1
and base64url encoding the result yields this Encoded JWS Signature and base64url encoding the result yields this Encoded JWS Signature
value: value:
dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
Concatenating these parts in the order Header.Payload.Signature with Concatenating these parts in the order Header.Payload.Signature with
period characters between the parts yields this complete JWS period ('.') characters between the parts yields this complete JWS
representation (with line breaks for display purposes only): representation (with line breaks for display purposes only):
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
. .
dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
This computation is illustrated in more detail in Appendix A.1. This computation is illustrated in more detail in Appendix A.1.
skipping to change at page 8, line 8 skipping to change at page 8, line 8
a key for use with that algorithm associated with the party that a key for use with that algorithm associated with the party that
digitally signed or MACed the content or the JWS MUST be rejected. digitally signed or MACed the content or the JWS MUST be rejected.
"alg" values SHOULD either be registered in the IANA JSON Web "alg" values SHOULD either be registered in the IANA JSON Web
Signature and Encryption Algorithms registry [JWA] or be a URI that Signature and Encryption Algorithms registry [JWA] or be a URI that
contains a Collision Resistant Namespace. The "alg" value is a case contains a Collision Resistant Namespace. The "alg" value is a case
sensitive string containing a StringOrURI value. This header sensitive string containing a StringOrURI value. This header
parameter is REQUIRED. parameter is REQUIRED.
A list of defined "alg" values can be found in the IANA JSON Web A list of defined "alg" values can be found in the IANA JSON Web
Signature and Encryption Algorithms registry [JWA]; the initial Signature and Encryption Algorithms registry [JWA]; the initial
contents of this registry is the values defined in Section 3.1 of the contents of this registry are the values defined in Section 3.1 of
JSON Web Algorithms (JWA) [JWA] specification. the JSON Web Algorithms (JWA) [JWA] specification.
4.1.2. "jku" (JWK Set URL) Header Parameter 4.1.2. "jku" (JWK Set URL) Header Parameter
The "jku" (JWK Set URL) header parameter is a URI [RFC3986] that The "jku" (JWK Set URL) header parameter is a URI [RFC3986] that
refers to a resource for a set of JSON-encoded public keys, one of refers to a resource for a set of JSON-encoded public keys, one of
which corresponds to the key used to digitally sign the JWS. The which corresponds to the key used to digitally sign the JWS. The
keys MUST be encoded as a JSON Web Key Set (JWK Set) [JWK]. The keys MUST be encoded as a JSON Web Key Set (JWK Set) [JWK]. The
protocol used to acquire the resource MUST provide integrity protocol used to acquire the resource MUST provide integrity
protection; an HTTP GET request to retrieve the certificate MUST use protection; an HTTP GET request to retrieve the certificate MUST use
TLS [RFC2818] [RFC5246]; the identity of the server MUST be TLS [RFC2818] [RFC5246]; the identity of the server MUST be
skipping to change at page 9, line 20 skipping to change at page 9, line 20
using SHA-256) header parameter could be defined by registering it in using SHA-256) header parameter could be defined by registering it in
the IANA JSON Web Signature and Encryption Header Parameters registry the IANA JSON Web Signature and Encryption Header Parameters registry
Section 7.1. Section 7.1.
4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter 4.1.6. "x5c" (X.509 Certificate Chain) Header Parameter
The "x5c" (X.509 Certificate Chain) header parameter contains the The "x5c" (X.509 Certificate Chain) header parameter contains the
X.509 public key certificate or certificate chain [RFC5280] X.509 public key certificate or certificate chain [RFC5280]
corresponding to the key used to digitally sign the JWS. The corresponding to the key used to digitally sign the JWS. The
certificate or certificate chain is represented as an array of certificate or certificate chain is represented as an array of
certificate values. Each value is a base64 encoded ([RFC4648] certificate value strings. Each string is a base64 encoded
Section 4 - not base64url encoded) DER [ITU.X690.1994] PKIX ([RFC4648] Section 4 -- not base64url encoded) DER [ITU.X690.1994]
certificate value. The certificate containing the public key of the PKIX certificate value. The certificate containing the public key of
entity that digitally signed the JWS MUST be the first certificate. the entity that digitally signed the JWS MUST be the first
This MAY be followed by additional certificates, with each subsequent certificate. This MAY be followed by additional certificates, with
certificate being the one used to certify the previous one. The each subsequent certificate being the one used to certify the
recipient MUST verify the certificate chain according to [RFC5280] previous one. The recipient MUST verify the certificate chain
and reject the JWS if any validation failure occurs. This header according to [RFC5280] and reject the JWS if any validation failure
parameter is OPTIONAL. occurs. This header parameter is OPTIONAL.
See Appendix B for an example "x5c" value. See Appendix B for an example "x5c" value.
4.1.7. "kid" (Key ID) Header Parameter 4.1.7. "kid" (Key ID) Header Parameter
The "kid" (key ID) header parameter is a hint indicating which key The "kid" (key ID) header parameter is a hint indicating which key
was used to secure the JWS. This parameter allows originators to was used to secure the JWS. This parameter allows originators to
explicitly signal a change of key to recipients. Should the explicitly signal a change of key to recipients. Should the
recipient be unable to locate a key corresponding to the "kid" value, recipient be unable to locate a key corresponding to the "kid" value,
they SHOULD treat that condition as an error. The interpretation of they SHOULD treat that condition as an error. The interpretation of
skipping to change at page 11, line 28 skipping to change at page 11, line 28
algorithm value accurately representing the algorithm used to algorithm value accurately representing the algorithm used to
construct the JWS Signature. construct the JWS Signature.
6. Base64url encode the representation of the JWS Signature to 6. Base64url encode the representation of the JWS Signature to
create the Encoded JWS Signature. create the Encoded JWS Signature.
7. The three encoded parts, taken together, are the result. The 7. The three encoded parts, taken together, are the result. The
Compact Serialization of this result is the concatenation of the Compact Serialization of this result is the concatenation of the
Encoded JWS Header, the Encoded JWS Payload, and the Encoded JWS Encoded JWS Header, the Encoded JWS Payload, and the Encoded JWS
Signature in that order, with the three strings being separated Signature in that order, with the three strings being separated
by period ('.') characters. by two period ('.') characters.
When validating a JWS, the following steps MUST be taken. The order When validating a JWS, the following steps MUST be taken. 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 JWS MUST be rejected. the listed steps fails, then the JWS MUST be rejected.
1. Parse the three parts of the input (which are separated by period 1. Parse the three parts of the input (which are separated by period
characters when using the JWS Compact Serialization) into the ('.') characters when using the JWS Compact Serialization) into
Encoded JWS Header, the Encoded JWS Payload, and the Encoded JWS the Encoded JWS Header, the Encoded JWS Payload, and the Encoded
Signature. JWS Signature.
2. The Encoded JWS Header MUST be successfully base64url decoded 2. The Encoded JWS Header MUST be successfully base64url decoded
following the restriction given in this specification that no following the restriction given in this specification that no
padding characters have been used. padding characters have been used.
3. The resulting JWS Header MUST be completely valid JSON syntax 3. The resulting JWS Header MUST be completely valid JSON syntax
conforming to RFC 4627 [RFC4627]. conforming to RFC 4627 [RFC4627].
4. The resulting JWS Header MUST be validated to only include 4. The resulting JWS Header MUST be validated to only include
parameters and values whose syntax and semantics are both parameters and values whose syntax and semantics are both
skipping to change at page 13, line 12 skipping to change at page 13, line 12
Header Parameter methods described in Section 4.1 or can be Header Parameter methods described in Section 4.1 or can be
distributed using methods that are outside the scope of this distributed using methods that are outside the scope of this
specification. specification.
7. IANA Considerations 7. IANA Considerations
The following registration procedure is used for all the registries The following registration procedure is used for all the registries
established by this specification. established by this specification.
Values are registered with a Specification Required [RFC5226] after a Values are registered with a Specification Required [RFC5226] after a
two week review period on the [TBD]@ietf.org mailing list, on the two-week review period on the [TBD]@ietf.org mailing list, on the
advice of one or more Designated Experts. However, to allow for the advice of one or more Designated Experts. However, to allow for the
allocation of values prior to publication, the Designated Expert(s) allocation of values prior to publication, the Designated Expert(s)
may approve registration once they are satisfied that such a may approve registration once they are satisfied that such a
specification will be published. specification will be published.
Registration requests must be sent to the [TBD]@ietf.org mailing list Registration requests must be sent to the [TBD]@ietf.org mailing list
for review and comment, with an appropriate subject (e.g., "Request for review and comment, with an appropriate subject (e.g., "Request
for access token type: example"). [[ Note to RFC-EDITOR: The name of for access token type: example"). [[ Note to RFC-EDITOR: The name of
the mailing list should be determined in consultation with the IESG the mailing list should be determined in consultation with the IESG
and IANA. Suggested name: jose-reg-review. ]] and IANA. Suggested name: jose-reg-review. ]]
Within the review period, the Designated Expert(s) will either Within the review period, the Designated Expert(s) will either
approve or deny the registration request, communicating this decision approve or deny the registration request, communicating this decision
to the review list and IANA. Denials should include an explanation to the review list and IANA. Denials should include an explanation
and, if applicable, suggestions as to how to make the request and, if applicable, suggestions as to how to make the request
successful. successful.
IANA must only accept registry updates from the Designated Expert(s), IANA must only accept registry updates from the Designated Expert(s)
and should direct all requests for registration to the review mailing and should direct all requests for registration to the review mailing
list. list.
7.1. JSON Web Signature and Encryption Header Parameters Registry 7.1. JSON Web Signature and Encryption Header Parameters Registry
This specification establishes the IANA JSON Web Signature and This specification establishes the IANA JSON Web Signature and
Encryption Header Parameters registry for reserved JWS and JWE header Encryption Header Parameters registry for reserved JWS and JWE header
parameter names. The registry records the reserved header parameter parameter names. The registry records the reserved header parameter
name and a reference to the specification that defines it. The same name and a reference to the specification that defines it. The same
Header Parameter Name may be registered multiple times, provided that Header Parameter Name may be registered multiple times, provided that
the parameter usage is compatible between the specifications. the parameter usage is compatible between the specifications.
7.1.1. Registration Template 7.1.1. Registration Template
Header Parameter Name: Header Parameter Name:
The name requested (e.g., "example"). This name is case The name requested (e.g., "example"). This name is case
sensitive. Names that match other registered names in a case sensitive. Names that match other registered names in a case
insensitive manner SHOULD NOT be accepted. insensitive manner SHOULD NOT be accepted.
Change Controller: Change Controller:
For standards-track RFCs, state "IETF". For others, give the name For Standards Track RFCs, state "IETF". For others, give the name
of the responsible party. Other details (e.g., postal address, of the responsible party. Other details (e.g., postal address,
e-mail address, home page URI) may also be included. email address, home page URI) may also be included.
Specification Document(s): Specification Document(s):
Reference to the document that specifies the parameter, preferably Reference to the document(s) that specify the parameter,
including a URI that can be used to retrieve a copy of the preferably including URI(s) that can be used to retrieve copies of
document. An indication of the relevant sections may also be the document(s). An indication of the relevant sections may also
included, but is not required. be included but is not required.
7.1.2. Initial Registry Contents 7.1.2. Initial Registry Contents
This specification registers the Header Parameter Names defined in This specification registers the Header Parameter Names defined in
Section 4.1 in this registry. Section 4.1 in this registry.
o Header Parameter Name: "alg" o Header Parameter Name: "alg"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.1 of [[ this document ]] o Specification Document(s): Section 4.1.1 of [[ this document ]]
o Header Parameter Name: "jku" o Header Parameter Name: "jku"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.2 of [[ this document ]] o Specification Document(s): Section 4.1.2 of [[ this document ]]
o Header Parameter Name: "jwk" o Header Parameter Name: "jwk"
o Change Controller: IETF o Change Controller: IETF
o Specification document(s): Section 4.1.3 of [[ this document ]] o Specification document(s): Section 4.1.3 of [[ this document ]]
o Header Parameter Name: "x5u" o Header Parameter Name: "x5u"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.4 of [[ this document ]] o Specification Document(s): Section 4.1.4 of [[ this document ]]
o Header Parameter Name: "x5t" o Header Parameter Name: "x5t"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.5 of [[ this document ]] o Specification Document(s): Section 4.1.5 of [[ this document ]]
o Header Parameter Name: "x5c"
o Header Parameter Name: "x5c"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.6 of [[ this document ]] o Specification Document(s): Section 4.1.6 of [[ this document ]]
o Header Parameter Name: "kid" o Header Parameter Name: "kid"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.7 of [[ this document ]] o Specification Document(s): Section 4.1.7 of [[ this document ]]
o Header Parameter Name: "typ" o Header Parameter Name: "typ"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.8 of [[ this document ]] o Specification Document(s): Section 4.1.8 of [[ this document ]]
o Header Parameter Name: "cty" o Header Parameter Name: "cty"
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.9 of [[ this document ]] o Specification Document(s): Section 4.1.9 of [[ this document ]]
7.2. JSON Web Signature and Encryption Type Values Registry 7.2. JSON Web Signature and Encryption Type Values Registry
This specification establishes the IANA JSON Web Signature and This specification establishes the IANA JSON Web Signature and
Encryption Type Values registry for values of the JWS and JWE "typ" Encryption Type Values registry for values of the JWS and JWE "typ"
(type) header parameter. It is RECOMMENDED that all registered "typ" (type) header parameter. It is RECOMMENDED that all registered "typ"
values also include a MIME Media Type [RFC2046] value that the values also include a MIME Media Type [RFC2046] value that the
registered value is a short name for. The registry records the "typ" registered value is a short name for. The registry records the "typ"
value, the MIME type value that it is an abbreviation for (if any), value, the MIME type value that it is an abbreviation for (if any),
skipping to change at page 16, line 10 skipping to change at page 15, line 36
"typ" Header Parameter Value: "typ" Header Parameter Value:
The name requested (e.g., "example"). This name is case The name requested (e.g., "example"). This name is case
sensitive. Names that match other registered names in a case sensitive. Names that match other registered names in a case
insensitive manner SHOULD NOT be accepted. insensitive manner SHOULD NOT be accepted.
Abbreviation for MIME Type: Abbreviation for MIME Type:
The MIME type that this name is an abbreviation for (e.g., The MIME type that this name is an abbreviation for (e.g.,
"application/example"). "application/example").
Change Controller: Change Controller:
For standards-track RFCs, state "IETF". For others, give the name For Standards Track RFCs, state "IETF". For others, give the name
of the responsible party. Other details (e.g., postal address, of the responsible party. Other details (e.g., postal address,
e-mail address, home page URI) may also be included. email address, home page URI) may also be included.
Specification Document(s): Specification Document(s):
Reference to the document that specifies the parameter, preferably Reference to the document(s) that specify the parameter,
including a URI that can be used to retrieve a copy of the preferably including URI(s) that can be used to retrieve copies of
document. An indication of the relevant sections may also be the document(s). An indication of the relevant sections may also
included, but is not required. be included but is not required.
7.2.2. Initial Registry Contents 7.2.2. Initial Registry Contents
This specification registers the "JWS" type value in this registry: This specification registers the "JWS" type value in this registry:
o "typ" Header Parameter Value: "JWS" o "typ" Header Parameter Value: "JWS"
o Abbreviation for MIME type: application/jws o Abbreviation for MIME type: application/jws
o Change Controller: IETF o Change Controller: IETF
o Specification Document(s): Section 4.1.8 of [[ this document ]] o Specification Document(s): Section 4.1.8 of [[ this document ]]
7.3. Media Type Registration 7.3. Media Type Registration
7.3.1. Registry Contents 7.3.1. Registry Contents
This specification registers the "application/jws" Media Type This specification registers the "application/jws" Media Type
[RFC2046] in the MIME Media Type registry [RFC4288] to indicate that [RFC2046] in the MIME Media Type registry [RFC4288] to indicate that
the content is a JWS using the Compact Serialization. the content is a JWS using the Compact Serialization.
skipping to change at page 19, line 24 skipping to change at page 18, line 30
JSON strings MAY contain characters outside the Unicode Basic JSON strings MAY contain characters outside the Unicode Basic
Multilingual Plane. For instance, the G clef character (U+1D11E) may Multilingual Plane. For instance, the G clef character (U+1D11E) may
be represented in a JSON string as "\uD834\uDD1E". Ideally, JWS be represented in a JSON string as "\uD834\uDD1E". Ideally, JWS
implementations SHOULD ensure that characters outside the Basic implementations SHOULD ensure that characters outside the Basic
Multilingual Plane are preserved and compared correctly; Multilingual Plane are preserved and compared correctly;
alternatively, if this is not possible due to these characters alternatively, if this is not possible due to these characters
exercising limitations present in the underlying JSON implementation, exercising limitations present in the underlying JSON implementation,
then input containing them MUST be rejected. then input containing them MUST be rejected.
9. Open Issues 9. References
[[ to be removed by the RFC editor before publication as an RFC ]]
The following items remain to be considered or done in this draft:
o Should we define an optional nonce and/or timestamp header
parameter? (Use of a nonce is an effective countermeasure to some
kinds of attacks.)
o Some have objected to the language "Implementations MUST
understand the entire contents of the header; otherwise, the JWS
MUST be rejected" in this spec and the related language in the
JWE, JWK, and JWT specs. Others believe that this is essential in
a security specification.
o Finish the Security Considerations section.
10. References
10.1. Normative References 9.1. Normative References
[ITU.X690.1994] [ITU.X690.1994]
International Telecommunications Union, "Information International Telecommunications Union, "Information
Technology - ASN.1 encoding rules: Specification of Basic Technology - ASN.1 encoding rules: Specification of Basic
Encoding Rules (BER), Canonical Encoding Rules (CER) and Encoding Rules (BER), Canonical Encoding Rules (CER) and
Distinguished Encoding Rules (DER)", ITU-T Recommendation Distinguished Encoding Rules (DER)", ITU-T Recommendation
X.690, 1994. X.690, 1994.
[JWA] Jones, M., "JSON Web Algorithms (JWA)", July 2012. [JWA] Jones, M., "JSON Web Algorithms (JWA)", October 2012.
[JWK] Jones, M., "JSON Web Key (JWK)", July 2012. [JWK] Jones, M., "JSON Web Key (JWK)", October 2012.
[RFC1421] Linn, J., "Privacy Enhancement for Internet Electronic [RFC1421] Linn, J., "Privacy Enhancement for Internet Electronic
Mail: Part I: Message Encryption and Authentication Mail: Part I: Message Encryption and Authentication
Procedures", RFC 1421, February 1993. Procedures", RFC 1421, February 1993.
[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. November 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
skipping to change at page 21, line 16 skipping to change at page 20, line 5
[USASCII] American National Standards Institute, "Coded Character [USASCII] American National Standards Institute, "Coded Character
Set -- 7-bit American Standard Code for Information Set -- 7-bit American Standard Code for Information
Interchange", ANSI X3.4, 1986. Interchange", ANSI X3.4, 1986.
[W3C.WD-xmldsig-bestpractices-20110809] [W3C.WD-xmldsig-bestpractices-20110809]
Datta, P. and F. Hirsch, "XML Signature Best Practices", Datta, P. and F. Hirsch, "XML Signature Best Practices",
World Wide Web Consortium WD WD-xmldsig-bestpractices- World Wide Web Consortium WD WD-xmldsig-bestpractices-
20110809, August 2011, <http://www.w3.org/TR/2011/ 20110809, August 2011, <http://www.w3.org/TR/2011/
WD-xmldsig-bestpractices-20110809>. WD-xmldsig-bestpractices-20110809>.
10.2. Informative References 9.2. Informative References
[CanvasApp] [CanvasApp]
Facebook, "Canvas Applications", 2010. Facebook, "Canvas Applications", 2010.
[JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", [JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign",
September 2010. September 2010.
[JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web [JWE] Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web
Encryption (JWE)", July 2012. Encryption (JWE)", October 2012.
[JWS-JS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web [JWS-JS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web
Signature JSON Serialization (JWS-JS)", July 2012. Signature JSON Serialization (JWS-JS)", October 2012.
[JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token [JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", July 2012. (JWT)", October 2012.
[MagicSignatures] [MagicSignatures]
Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic Panzer (editor), J., Laurie, B., and D. Balfanz, "Magic
Signatures", January 2011. Signatures", January 2011.
[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. July 2005.
[W3C.CR-xmldsig-core2-20120124] [W3C.CR-xmldsig-core2-20120124]
Solo, D., Datta, P., Hirsch, F., Cantor, S., Reagle, J., Roessler, T., Yiu, K., Solo, D., Reagle, J., Datta, P.,
Roessler, T., Eastlake, D., and K. Yiu, "XML Signature Eastlake, D., Hirsch, F., and S. Cantor, "XML Signature
Syntax and Processing Version 2.0", World Wide Web Syntax and Processing Version 2.0", World Wide Web
Consortium CR CR-xmldsig-core2-20120124, January 2012, Consortium CR CR-xmldsig-core2-20120124, January 2012,
<http://www.w3.org/TR/2012/CR-xmldsig-core2-20120124>. <http://www.w3.org/TR/2012/CR-xmldsig-core2-20120124>.
Appendix A. JWS Examples Appendix A. JWS Examples
This section provides several examples of JWSs. While these examples This section provides several examples of JWSs. While these examples
all represent JSON Web Tokens (JWTs) [JWT], the payload can be any all represent JSON Web Tokens (JWTs) [JWT], the payload can be any
base64url encoded content. base64url encoded content.
skipping to change at page 23, line 5 skipping to change at page 21, line 40
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 above yields the Encoded JWS Payload value Base64url encoding the above yields the Encoded JWS Payload value
(with line breaks for display purposes only): (with line breaks for display purposes only):
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
Concatenating the Encoded JWS Header, a period character, and the Concatenating the Encoded JWS Header, a period ('.') character, and
Encoded JWS Payload yields this JWS Secured Input value (with line the Encoded JWS Payload yields this JWS Secured Input value (with
breaks for display purposes only): line breaks for display purposes only):
eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
The ASCII representation of the JWS Secured Input is the following The ASCII representation of the JWS Secured Input is the following
byte array: byte array:
[101, 121, 74, 48, 101, 88, 65, 105, 79, 105, 74, 75, 86, 49, 81, [101, 121, 74, 48, 101, 88, 65, 105, 79, 105, 74, 75, 86, 49, 81,
skipping to change at page 25, line 9 skipping to change at page 23, line 40
eyJhbGciOiJSUzI1NiJ9 eyJhbGciOiJSUzI1NiJ9
The JWS Payload used in this example, which follows, is the same as The JWS Payload used in this example, which follows, is the same as
in the previous example. Since the Encoded JWS Payload will in the previous example. Since the Encoded JWS Payload will
therefore be the same, its computation is not repeated here. therefore be the same, its computation is not repeated here.
{"iss":"joe", {"iss":"joe",
"exp":1300819380, "exp":1300819380,
"http://example.com/is_root":true} "http://example.com/is_root":true}
Concatenating the Encoded JWS Header, a period character, and the Concatenating the Encoded JWS Header, a period ('.') character, and
Encoded JWS Payload yields this JWS Secured Input value (with line the Encoded JWS Payload yields this JWS Secured Input value (with
breaks for display purposes only): line breaks for display purposes only):
eyJhbGciOiJSUzI1NiJ9 eyJhbGciOiJSUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
The ASCII representation of the JWS Secured Input is the following The ASCII representation of the JWS Secured Input is the following
byte array: byte array:
[101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 83, 85, 122, 73, [101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 83, 85, 122, 73,
skipping to change at page 29, line 16 skipping to change at page 27, line 16
eyJhbGciOiJFUzI1NiJ9 eyJhbGciOiJFUzI1NiJ9
The JWS Payload used in this example, which follows, is the same as The JWS Payload used in this example, which follows, is the same as
in the previous examples. Since the Encoded JWS Payload will in the previous examples. Since the Encoded JWS Payload will
therefore be the same, its computation is not repeated here. therefore be the same, its computation is not repeated here.
{"iss":"joe", {"iss":"joe",
"exp":1300819380, "exp":1300819380,
"http://example.com/is_root":true} "http://example.com/is_root":true}
Concatenating the Encoded JWS Header, a period character, and the Concatenating the Encoded JWS Header, a period ('.') character, and
Encoded JWS Payload yields this JWS Secured Input value (with line the Encoded JWS Payload yields this JWS Secured Input value (with
breaks for display purposes only): line breaks for display purposes only):
eyJhbGciOiJFUzI1NiJ9 eyJhbGciOiJFUzI1NiJ9
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
The ASCII representation of the JWS Secured Input is the following The ASCII representation of the JWS Secured Input is the following
byte array: byte array:
[101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 70, 85, 122, 73, [101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 70, 85, 122, 73,
skipping to change at page 31, line 46 skipping to change at page 29, line 46
The JWS Payload used in this example, is the ASCII string "Payload". The JWS Payload used in this example, is the ASCII string "Payload".
The representation of this string is the byte array: The representation of this string is the byte array:
[80, 97, 121, 108, 111, 97, 100] [80, 97, 121, 108, 111, 97, 100]
Base64url encoding these bytes yields the Encoded JWS Payload value: Base64url encoding these bytes yields the Encoded JWS Payload value:
UGF5bG9hZA UGF5bG9hZA
Concatenating the Encoded JWS Header, a period character, and the Concatenating the Encoded JWS Header, a period ('.') character, and
Encoded JWS Payload yields this JWS Secured Input value: the Encoded JWS Payload yields this JWS Secured Input value:
eyJhbGciOiJFUzUxMiJ9.UGF5bG9hZA eyJhbGciOiJFUzUxMiJ9.UGF5bG9hZA
The ASCII representation of the JWS Secured Input is the following The ASCII representation of the JWS Secured Input is the following
byte array: byte array:
[101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 70, 85, 122, 85, [101, 121, 74, 104, 98, 71, 99, 105, 79, 105, 74, 70, 85, 122, 85,
120, 77, 105, 74, 57, 46, 85, 71, 70, 53, 98, 71, 57, 104, 90, 65] 120, 77, 105, 74, 57, 46, 85, 71, 70, 53, 98, 71, 57, 104, 90, 65]
The ECDSA key consists of a public part, the EC point (x, y), and a The ECDSA key consists of a public part, the EC point (x, y), and a
skipping to change at page 34, line 36 skipping to change at page 32, line 36
in the previous examples. Since the Encoded JWS Payload will in the previous examples. Since the Encoded JWS Payload will
therefore be the same, its computation is not repeated here. therefore be the same, its computation is not repeated here.
{"iss":"joe", {"iss":"joe",
"exp":1300819380, "exp":1300819380,
"http://example.com/is_root":true} "http://example.com/is_root":true}
The Encoded JWS Signature is the empty string. The Encoded JWS Signature is the empty string.
Concatenating these parts in the order Header.Payload.Signature with Concatenating these parts in the order Header.Payload.Signature with
period characters between the parts yields this complete JWS (with period ('.') characters between the parts yields this complete JWS
line breaks for display purposes only): (with line breaks for display purposes only):
eyJhbGciOiJub25lIn0 eyJhbGciOiJub25lIn0
. .
eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt
cGxlLmNvbS9pc19yb290Ijp0cnVlfQ cGxlLmNvbS9pc19yb290Ijp0cnVlfQ
. .
Appendix B. "x5c" (X.509 Certificate Chain) Example Appendix B. "x5c" (X.509 Certificate Chain) Example
The string below is an example of a certificate chain that could be The JSON array below is an example of a certificate chain that could
used as the value of an "x5c" (X.509 Certificate Chain) header be used as the value of an "x5c" (X.509 Certificate Chain) header
parameter, per Section 4.1.6. parameter, per Section 4.1.6. Note that since these strings contain
base64 encoded (not base64url encoded) values, they are allowed to
contain white space and line breaks.
-----BEGIN CERTIFICATE----- ["MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVM
MIIE3jCCA8agAwIBAgICAwEwDQYJKoZIhvcNAQEFBQAwYzELMAkGA1UEBhMCVVM xITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR2
xITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR2 8gRGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExM
8gRGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExM TYwMTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UE
TYwMTU0MzdaFw0yNjExMTYwMTU0MzdaMIHKMQswCQYDVQQGEwJVUzEQMA4GA1UE CBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWR
CBMHQXJpem9uYTETMBEGA1UEBxMKU2NvdHRzZGFsZTEaMBgGA1UEChMRR29EYWR keS5jb20sIEluYy4x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Q7/nHk01xC+YDgkRoKWzk2Z/M/VXwb
XJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQD P7RfZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQU
ExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9 AA4GBADt/UG9vUJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQ
AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5a C1u+mNr0HZDzTuIYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMM
vIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zf j4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd"]
N1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwb
P7RfZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQU
AA4GBADt/UG9vUJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQ
C1u+mNr0HZDzTuIYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMM
j4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
-----END CERTIFICATE-----
Appendix C. Notes on implementing base64url encoding without padding Appendix C. Notes on implementing base64url encoding without padding
This appendix describes how to implement base64url encoding and This appendix describes how to implement base64url encoding and
decoding functions without padding based upon standard base64 decoding functions without padding based upon standard base64
encoding and decoding functions that do use padding. encoding and decoding functions that do use padding.
To be concrete, example C# code implementing these functions is shown To be concrete, example C# code implementing these functions is shown
below. Similar code could be used in other languages. below. Similar code could be used in other languages.
skipping to change at page 38, line 8 skipping to change at page 36, line 8
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. Dirk Applications [CanvasApp], all of which influenced this draft. Dirk
Balfanz, Yaron Y. Goland, John Panzer, and Paul Tarjan all made Balfanz, Yaron Y. Goland, John Panzer, and Paul Tarjan all made
significant contributions to the design of this specification. significant contributions to the design of this specification.
Thanks to Axel Nennker for his early implementation and feedback on Thanks to Axel Nennker for his early implementation and feedback on
the JWS and JWE specifications. the JWS and JWE specifications.
Appendix E. Document History Jim Schaad and Karen O'Donoghue chaired the JOSE working group and
Sean Turner and Stephen Farrell served as Security area directors
during the creation of this specification.
Appendix E. Open Issues
[[ to be removed by the RFC editor before publication as an RFC ]]
The following items remain to be considered or done in this draft:
o Should we define optional nonce, timestamp, and/or uninterpreted
string header parameter(s)?
Appendix F. Document History
[[ to be removed by the RFC editor before publication as an RFC ]] [[ to be removed by the RFC editor before publication as an RFC ]]
-06
o Changed "x5c" (X.509 Certificate Chain) representation from being
a single string to being an array of strings, each containing a
single base64 encoded DER certificate value, representing elements
of the certificate chain.
o Applied changes made by the RFC Editor to RFC 6749's registry
language to this specification.
-05 -05
o Added statement that "StringOrURI values are compared as case- o Added statement that "StringOrURI values are compared as case-
sensitive strings with no transformations or canonicalizations sensitive strings with no transformations or canonicalizations
applied". applied".
o Indented artwork elements to better distinguish them from the body o Indented artwork elements to better distinguish them from the body
text. text.
-04 -04
 End of changes. 63 change blocks. 
213 lines changed or deleted 193 lines changed or added

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