TOC |
|
This specification defines how to express a declaration in a JSON Web Token (JWT) that the presenter of the JWT possesses a particular key and that the recipient can cryptographically confirm proof-of-possession of the key by the presenter. This property is also sometimes described as the presenter being a holder-of-key.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as “work in progress.”
This Internet-Draft will expire on January 7, 2016.
Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
1.
Introduction
1.1.
Notational Conventions
2.
Terminology
3.
Representations for Proof-of-Possession Keys
3.1.
Representation for an Asymmetric Proof-of-Possession Key
3.2.
Representation for an Encrypted Symmetric Proof-of-Possession Key
3.3.
Representation of a Key ID for a Proof-of-Possession Key
3.4.
Confirmation
3.5.
Specifics Intentionally Not Specified
4.
Security Considerations
5.
IANA Considerations
5.1.
JSON Web Token Claims Registration
5.1.1.
Registry Contents
5.2.
JWT Confirmation Methods Registry
5.2.1.
Registration Template
5.2.2.
Initial Registry Contents
6.
References
6.1.
Normative References
6.2.
Informative References
Appendix A.
Acknowledgements
Appendix B.
Document History
§
Authors' Addresses
TOC |
This specification defines how to express a declaration in a JSON Web Token (JWT) [JWT] (Jones, M., Bradley, J., and N. Sakimura, “JSON Web Token (JWT),” May 2015.) that the presenter of the JWT possesses a particular key and that the recipient can cryptographically confirm proof-of-possession of the key by the presenter. This property is also sometimes described as the presenter being a holder-of-key.
Envision the following two use cases. The first use case describes the use of a symmetric proof-of-possession key and the second use case uses an asymmetric proof-of-possession key.
An issuer generates a JWT and places an encrypted symmetric key inside the newly introduced confirmation claim. This symmetric key is encrypted with a key known only to the issuer and the recipient. The entire JWT is then integrity protected by the issuer. The JWT is then sent to the presenter. Since the presenter is unable to obtain the encrypted symmetric key from the JWT itself, the issuer conveys that symmetric key separately to the presenter. Now, the presenter is in possession of the symmetric key as well as the JWT (which includes the confirmation claim member). When the presenter needs to present the JWT to the recipient, it also needs to demonstrate possession of the symmetric key; the presenter, for example, uses the symmetric key in a challenge/response protocol with the recipient. The recipient is then able to verify that it is interacting with the genuine presenter by decrypting the JWK contained inside the confirmation claim of the JWT. By doing this, the recipient obtains the symmetric key, which it then uses to verify cryptographically protected messages exchanged with the presenter. This symmetric key mechanism described above is conceptually similar to the use of Kerberos tickets.
In the second case, consider a presenter that generates a public/private key pair. It then sends the public key to an issuer, which creates a JWT and places a public key (or an identifier for it) inside the newly introduced confirmation claim. The entire JWT is integrity protected using a digital signature to protect it against modifications. The JWT is then sent to the presenter. When the presenter needs to present the JWT to the recipient, it also needs to demonstrate possession of the private key. The presenter, for example, uses the private key in a TLS exchange with the recipient or signs a nonce with the private key. The recipient is able to verify that it is interacting with the genuine presenter by extracting the public key from the confirmation claim of the JWT (after verifying the digital signature of the JWT) and utilizing it with the private key in the TLS exchange or checking the nonce signature.
In both cases the JWT may contain other claims that are needed by the application.
TOC |
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119] (Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” March 1997.).
Unless otherwise noted, all the protocol parameter names and values are case sensitive.
TOC |
This specification uses terms defined in the JSON Web Token (JWT) [JWT] (Jones, M., Bradley, J., and N. Sakimura, “JSON Web Token (JWT),” May 2015.), JSON Web Key (JWK) [JWK] (Jones, M., “JSON Web Key (JWK),” May 2015.), and JSON Web Encryption (JWE) [JWE] (Jones, M. and J. Hildebrand, “JSON Web Encryption (JWE),” May 2015.) specifications.
These terms are defined by this specification:
- Issuer
- Party that creates the JWT and binds the proof-of-possession key to it.
- Presenter
- Party that proves possession of a private key (for asymmetric key cryptography) or secret key (for symmetric key cryptography) to a recipient. The presenter may be the issuer or a party distinct from the issuer.
- Recipient
- Party that receives the JWT containing the proof-of-possession key information from the presenter.
TOC |
The issuer of a JWT declares that the presenter possesses a particular key and that the recipient can cryptographically confirm proof-of-possession of the key by the presenter by including a cnf (confirmation) claim in the JWT whose value is a JSON object, with a JSON object containing a jwk (JSON Web Key) member, a jwe (JSON Web Encryption) member, or a kid (key ID) member identifying the key.
The presenter can be identified in one of several ways by the JWT, depending upon the application requirements. If the JWT contains a sub (subject) claim, the presenter is normally the subject identified by the JWT. (In some applications, the subject identifier will be relative to the issuer identified by the iss (issuer) claim.) If the JWT contains no sub (subject) claim, the presenter is normally the issuer identified by the JWT using the iss (issuer) claim. The case in which the presenter is the subject of the JWT is analogous to SAML 2.0 [OASIS.saml‑core‑2.0‑os] (Cantor, S., Kemp, J., Philpott, R., and E. Maler, “Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0,” March 2005.) SubjectConfirmation usage. At least one of the sub and iss claims MUST be present in the JWT. Some use cases may require that both be present.
Another means used by some applications to identify the presenter is an explicit claim, such as the azp (authorized party) claim defined by OpenID Connect [OpenID.Core] (Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and C. Mortimore, “OpenID Connect Core 1.0,” November 2014.). Ultimately, the means of identifying the presenter is application-specific, as is the means of confirming possession of the key that is communicated.
TOC |
When the key held by the presenter is an asymmetric private key, the jwk member is a JSON Web Key (JWK) [JWK] (Jones, M., “JSON Web Key (JWK),” May 2015.) representing the corresponding asymmetric public key. The following example demonstrates such a declaration in the JWT Claims Set of a JWT:
{ "iss": "https://server.example.com", "aud": "https://client.example.org", "exp": "1361398824", "nbf": "1360189224", "cnf":{ "jwk":{ "kty": "EC", "use": "sig", "crv": "P-256", "x": "18wHLeIgW9wVN6VD1Txgpqy2LszYkMf6J8njVAibvhM", "y": "-V4dS4UaLMgP_4fY4j8ir7cl1TXlFdAgcx55o7TkcSA" } } }
The JWK MUST contain the required key members for a JWK of that key type and MAY contain other JWK members, including the kid (key ID) member.
TOC |
When the key held by the presenter is a symmetric key, the jwe member is an encrypted JSON Web Key (JWK) [JWK] (Jones, M., “JSON Web Key (JWK),” May 2015.) encrypted to a key known to the recipient using the JWE Compact Serialization containing the symmetric key. The rules for encrypting a JWK are found in Section 7 of the JSON Web Key [JWK] (Jones, M., “JSON Web Key (JWK),” May 2015.) specification.
The following example illustrates a symmetric key that could subsequently be encrypted for use in the jwe member:
{ "kty": "oct", "alg": "HS256", "k": "ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE" }
The UTF-8 [RFC3629] (Yergeau, F., “UTF-8, a transformation format of ISO 10646,” November 2003.) encoding of this JWK would be used as the JWE Plaintext when encrypting the key.
The following example is a JWE Header that could be used when encrypting this key:
{ "alg": "RSA1_5", "enc": "A128CBC-HS256" }
The following example JWT Claims Set of a JWT illustrates the use of an encrypted symmetric key as the jwe member value:
{ "iss": "https://server.example.com", "sub": "24400320", "aud": "s6BhdRkqt3", "nonce": "n-0S6_WzA2Mj", "exp": 1311281970, "iat": 1311280970, "cnf":{ "jwe": "eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0. (remainder of JWE omitted for brevity)" } }
TOC |
The proof-of-possession key can also be identified by the use of a Key ID instead of communicating the actual key, provided the recipient is able to obtain the identified key using the Key ID. In this case, the issuer of a JWT declares that the presenter possesses a particular key and that the recipient can cryptographically confirm proof-of-possession of the key by the presenter by including a cnf (confirmation) claim in the JWT whose value is a JSON object, with the JSON object containing a kid (key ID) member identifying the key.
The following example demonstrates such a declaration in the JWT Claims Set of a JWT:
{ "iss": "https://server.example.com", "aud": "https://client.example.org", "exp": "1361398824", "nbf": "1360189224", "cnf":{ "kid": "dfd1aa97-6d8d-4575-a0fe-34b96de2bfad" } }
TOC |
The cnf (confirmation) claim is used in the JWT to contain the jwk, jwe, or kid member because a proof-of-possession key may not be the only means of confirming the authenticity of the token. This is analogous to the SAML 2.0 [OASIS.saml‑core‑2.0‑os] (Cantor, S., Kemp, J., Philpott, R., and E. Maler, “Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0,” March 2005.) SubjectConfirmation element, in which a number of different subject confirmation methods can be included, including proof-of-possession key information. When a recipient receives a cnf claim with a member that it does not understand, it MUST ignore that member.
This specification establishes the IANA "JWT Confirmation Methods" registry for these members in Section 5.2 (JWT Confirmation Methods Registry) and registers the jwk, jwe, and kid members within the registry. Other specifications can register other members used for confirmation, including members for conveying other proof-of-possession keys, possibly using different key representations.
TOC |
Proof-of-possession is typically demonstrated by having the presenter sign a value determined by the recipient using the key possessed by the presenter. This value is sometimes called a "nonce" or a "challenge".
The means of communicating the nonce and the nature of its contents are intentionally not described in this specification, as different protocols will communicate this information in different ways. Likewise, the means of communicating the signed nonce is also not specified, as this is also protocol-specific.
Note that another means of proving possession of the key when it is a symmetric key is to encrypt the key to the recipient. The means of obtaining a key for the recipient is likewise protocol-specific.
For an example specification that uses the mechanisms defined in this document, see [I‑D.ietf‑oauth‑pop‑architecture] (Hunt, P., Richer, J., Mills, W., Mishra, P., and H. Tschofenig, “OAuth 2.0 Proof-of-Possession (PoP) Security Architecture,” March 2015.).
TOC |
All of the normal security issues, especially in relationship to comparing URIs and dealing with unrecognized values, that are discussed in JWT (Jones, M., Bradley, J., and N. Sakimura, “JSON Web Token (JWT),” May 2015.) [JWT] also apply here.
In addition, proof-of-possession introduces its own unique security issues. Possessing the key is only valuable if it is kept secret. Appropriate means must be used to ensure that unintended parties do not learn the private key or symmetric key value.
Proof-of-possession via encrypted symmetric secrets is subject to replay attacks. This attack can be avoided when a signed nonce or challenge is used, since the recipient can use a distinct nonce or challenged for each interaction.
Similarly to other information included in a JWT, it is necessary to apply data origin authentication and integrity protection (via a keyed message digest or a digital signature). Data origin authentication ensures that the recipient of the JWT learns about the entity that created the JWT, since this will be important for any policy decisions. Integrity protection prevents an adversary from changing any elements conveyed within the JWT payload. Special care has to be applied when carrying symmetric keys inside the JWT, since those not only require integrity protection, but also confidentiality protection.
A recipient may not understand the newly introduced cnf claim and may consequently treat it as a bearer token. While this is a legitimate concern, it is outside the scope of this specification, since demonstration the possession of the key associated with the cnf claim is not covered by this specification. For more details, please consult [I‑D.ietf‑oauth‑pop‑architecture] (Hunt, P., Richer, J., Mills, W., Mishra, P., and H. Tschofenig, “OAuth 2.0 Proof-of-Possession (PoP) Security Architecture,” March 2015.).
TOC |
The following registration procedure is used for all the registries established by this specification.
Values are registered on a Specification Required [RFC5226] (Narten, T. and H. Alvestrand, “Guidelines for Writing an IANA Considerations Section in RFCs,” May 2008.) basis after a three-week review period on the oauth-pop-reg-review@ietf.org mailing list, on the advice of one or more Designated Experts. However, to allow for the allocation of values prior to publication, the Designated Experts may approve registration once they are satisfied that such a specification will be published. [[ Note to the RFC Editor: The name of the mailing list should be determined in consultation with the IESG and IANA. Suggested name: oauth-pop-reg-review@ietf.org. ]]
Registration requests sent to the mailing list for review should use an appropriate subject (e.g., "Request to register JWT Confirmation Method: example").
Within the review period, the Designated Experts will either approve or deny the registration request, communicating this decision to the review list and IANA. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful. Registration requests that are undetermined for a period longer than 21 days can be brought to the IESG's attention (using the iesg@ietf.org mailing list) for resolution.
Criteria that should be applied by the Designated Experts includes determining whether the proposed registration duplicates existing functionality, determining whether it is likely to be of general applicability or whether it is useful only for a single application, and whether the registration makes sense.
IANA must only accept registry updates from the Designated Experts and should direct all requests for registration to the review mailing list.
It is suggested that multiple Designated Experts be appointed who are able to represent the perspectives of different applications using this specification, in order to enable broadly-informed review of registration decisions. In cases where a registration decision could be perceived as creating a conflict of interest for a particular Expert, that Expert should defer to the judgment of the other Experts.
TOC |
This specification registers the cnf claim in the IANA JSON Web Token Claims registry defined in [JWT] (Jones, M., Bradley, J., and N. Sakimura, “JSON Web Token (JWT),” May 2015.).
TOC |
TOC |
This specification establishes the IANA "JWT Confirmation Methods" registry for JWT cnf member values. The registry records the confirmation method member and a reference to the specification that defines it.
TOC |
- Confirmation Method Value:
- The name requested (e.g., "kid"). Because a core goal of this specification is for the resulting representations to be compact, it is RECOMMENDED that the name be short -- not to exceed 8 characters without a compelling reason to do so. This name is case-sensitive. Names may not match other registered names in a case-insensitive manner unless the Designated Experts state that there is a compelling reason to allow an exception.
- Confirmation Method Description:
- Brief description of the confirmation method (e.g., "Key Identifier").
- Change Controller:
- For Standards Track RFCs, list the "IESG". For others, give the name of the responsible party. Other details (e.g., postal address, email address, home page URI) may also be included.
- Specification Document(s):
- Reference to the document or documents that specify the parameter, preferably including URIs that can be used to retrieve copies of the documents. An indication of the relevant sections may also be included but is not required.
TOC |
TOC |
TOC |
[JWE] | Jones, M. and J. Hildebrand, “JSON Web Encryption (JWE),” RFC 7516, May 2015. |
[JWK] | Jones, M., “JSON Web Key (JWK),” RFC 7517, May 2015. |
[JWT] | Jones, M., Bradley, J., and N. Sakimura, “JSON Web Token (JWT),” RFC 7519, May 2015. |
[RFC2119] | Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels,” BCP 14, RFC 2119, March 1997 (TXT, HTML, XML). |
[RFC3629] | Yergeau, F., “UTF-8, a transformation format of ISO 10646,” STD 63, RFC 3629, November 2003 (TXT). |
[RFC5226] | Narten, T. and H. Alvestrand, “Guidelines for Writing an IANA Considerations Section in RFCs,” BCP 26, RFC 5226, May 2008 (TXT). |
TOC |
[I-D.ietf-oauth-pop-architecture] | Hunt, P., Richer, J., Mills, W., Mishra, P., and H. Tschofenig, “OAuth 2.0 Proof-of-Possession (PoP) Security Architecture,” draft-ietf-oauth-pop-architecture-01 (work in progress), March 2015 (TXT). |
[OASIS.saml-core-2.0-os] | Cantor, S., Kemp, J., Philpott, R., and E. Maler, “Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0,” OASIS Standard saml-core-2.0-os, March 2005. |
[OpenID.Core] | Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and C. Mortimore, “OpenID Connect Core 1.0,” November 2014 (HTML). |
TOC |
The authors wish to thank Brian Campbell, James Manger, Justin Richer, and Nat Sakimura for their reviews of the specification.
TOC |
[[ to be removed by the RFC Editor before publication as an RFC ]]
-03
-02
-01
-00
TOC |
Michael B. Jones | |
Microsoft | |
Email: | mbj@microsoft.com |
URI: | http://self-issued.info/ |
John Bradley | |
Ping Identity | |
Email: | ve7jtb@ve7jtb.com |
URI: | http://www.thread-safe.com/ |
Hannes Tschofenig | |
ARM Limited | |
Austria | |
Email: | Hannes.Tschofenig@gmx.net |
URI: | http://www.tschofenig.priv.at |