RFC 7800 PROPOSED STANDARD SECURITY · TOKENS · JSON

JWT Proof of Possession: Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)

How a JSON Web Token can say "only the holder of this key may use me", and how a recipient checks it.

On rfc-editor.org ↗
PUBLISHED
April 2016
AUTHORS
M. Jones, J. Bradley, H. Tschofenig
STREAM
IETF
CLAIM NAME
cnf (Confirmation)
CONFIRMATION MEMBERS
jwk, jwe, kid, jku
KEYS PER CNF
Only one PoP key
REGISTRY NAME LENGTH
Not over eight characters (RECOMMENDED)
REGISTRATION REVIEW
Three weeks, Specification Required
DOI
10.17487/RFC7800
ERRATA
Reported errata

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 7800                                     Microsoft
Category: Standards Track                                     J. Bradley
ISSN: 2070-1721                                            Ping Identity
                                                           H. Tschofenig
                                                             ARM Limited
                                                              April 2016


      Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)

Abstract

   This specification describes how to declare in a JSON Web Token (JWT)
   that the presenter of the JWT possesses a particular proof-of-
   possession key and how the recipient can cryptographically confirm
   proof of possession of the key by the presenter.  Being able to prove
   possession of a key is also sometimes described as the presenter
   being a holder-of-key.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   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/rfc7800.

Copyright Notice

   Copyright (c) 2016 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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   5
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Representations for Proof-of-Possession Keys  . . . . . . . .   5
     3.1.  Confirmation Claim  . . . . . . . . . . . . . . . . . . .   6
     3.2.  Representation of an Asymmetric Proof-of-Possession Key .   7
     3.3.  Representation of an Encrypted Symmetric Proof-of-
           Possession Key  . . . . . . . . . . . . . . . . . . . . .   7
     3.4.  Representation of a Key ID for a Proof-of-Possession Key    8
     3.5.  Representation of a URL for a Proof-of-Possession Key . .   9
     3.6.  Specifics Intentionally Not Specified . . . . . . . . . .  10
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   5.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  11
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  11
     6.1.  JSON Web Token Claims Registration  . . . . . . . . . . .  12
       6.1.1.  Registry Contents . . . . . . . . . . . . . . . . . .  12
     6.2.  JWT Confirmation Methods Registry . . . . . . . . . . . .  12
       6.2.1.  Registration Template . . . . . . . . . . . . . . . .  12
       6.2.2.  Initial Registry Contents . . . . . . . . . . . . . .  13
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  13
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  13
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  14
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  15
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  15

1.  Introduction

   This specification describes how a JSON Web Token [JWT] can declare
   that the presenter of the JWT possesses a particular proof-of-
   possession (PoP) key and how the recipient can cryptographically
   confirm proof of possession of the key by the presenter.  Proof of
   possession of a key is also sometimes described as the presenter
   being a holder-of-key.  The [OAUTH-POP-ARCH] specification describes
   key confirmation, among other confirmation mechanisms.  This
   specification defines how to communicate confirmation key information
   in JWTs.

   Envision the following two use cases.  The first use case employs a
   symmetric proof-of-possession key and the second use case employs an
   asymmetric proof-of-possession key.

     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Encrypted   |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       ^          ^                           |              |
       |          |                           |              |
      (1) Sym.   (2) JWT w/                   |  Recipient   |
       |  PoP     |  Encrypted                |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |<-(0) Key Exchange for ->|              |
     |   Issuer     |      Key Encryption Key |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+

            Figure 1: Proof of Possession with a Symmetric Key

   In the case illustrated in Figure 1, (1) either the presenter
   generates a symmetric key and privately sends it to the issuer or the
   issuer generates a symmetric key and privately sends it to the
   presenter.  The issuer generates a JWT with an encrypted copy of this
   symmetric key in the confirmation claim.  This symmetric key is
   encrypted with a key known only to the issuer and the recipient,
   which was previously established in step (0).  The entire JWT is
   integrity protected by the issuer.  The JWT is then (2) sent to the
   presenter.  Now, the presenter is in possession of the symmetric key
   as well as the JWT (which includes the confirmation claim).  When the
   presenter (3) presents the JWT to the recipient, it also needs to
   demonstrate possession of the symmetric key; the presenter, for
   example, (4) 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 key in 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 (4).  This symmetric
   key mechanism described above is conceptually similar to the use of
   Kerberos tickets.

   Note that for simplicity, the diagram above and associated text
   describe the direct use of symmetric keys without the use of derived
   keys.  A more secure practice is to derive the symmetric keys
   actually used from secrets exchanged, such as the key exchanged in
   step (0), using a Key Derivation Function (KDF) and use the derived
   keys, rather than directly using the secrets exchanged.

     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Public      |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       |          ^                           |              |
       |          |                           |              |
      (1) Public (2) JWT w/                   |  Recipient   |
       |  PoP     |  Public                   |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         |              |
     |    Issuer    |                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+

           Figure 2: Proof of Possession with an Asymmetric Key

   In the case illustrated in Figure 2, the presenter generates a
   public/private key pair and (1) sends the public key to the issuer,
   which creates a JWT that contains the public key (or an identifier
   for it) in the confirmation claim.  The entire JWT is integrity
   protected using a digital signature to protect it against
   modifications.  The JWT is then (2) sent to the presenter.  When the
   presenter (3) presents the JWT to the recipient, it also needs to
   demonstrate possession of the private key.  The presenter, for
   example, (4) uses the private key in a Transport Layer Security (TLS)
   exchange with the recipient or (4) 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 by
   checking the nonce signature.

   In both cases, the JWT may contain other claims that are needed by
   the application.

1.1.  Notational Conventions

   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].

   Unless otherwise noted, all the protocol parameter names and values
   are case sensitive.

2.  Terminology

   This specification uses terms defined in the JSON Web Token [JWT],
   JSON Web Key [JWK], and JSON Web Encryption [JWE] 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.

   Recipient
      Party that receives the JWT containing the proof-of-possession key
      information from the presenter.

3.  Representations for Proof-of-Possession Keys

   By including a "cnf" (confirmation) claim in a JWT, the issuer of the
   JWT declares that the presenter possesses a particular key and that
   the recipient can cryptographically confirm that the presenter has
   possession of that key.  The value of the "cnf" claim is a JSON
   object and the members of that object identify the proof-of-
   possession 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 [JWT], 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
   [JWT].)  If the JWT contains no "sub" claim, the presenter is
   normally the issuer identified by the JWT using the "iss" claim.  The
   case in which the presenter is the subject of the JWT is analogous to
   Security Assertion Markup Language (SAML) 2.0
   [OASIS.saml-core-2.0-os] 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].  Ultimately, the means of
   identifying the presenter is application specific, as is the means of
   confirming possession of the key that is communicated.

3.1.  Confirmation Claim

   The "cnf" claim is used in the JWT to contain members used to
   identify the proof-of-possession key.  Other members of the "cnf"
   object may be defined 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]
   SubjectConfirmation element in which a number of different subject
   confirmation methods can be included (including proof-of-possession
   key information).

   The set of confirmation members that a JWT must contain to be
   considered valid is context dependent and is outside the scope of
   this specification.  Specific applications of JWTs will require
   implementations to understand and process some confirmation members
   in particular ways.  However, in the absence of such requirements,
   all confirmation members that are not understood by implementations
   MUST be ignored.

   This specification establishes the IANA "JWT Confirmation Methods"
   registry for these members in Section 6.2 and registers the members
   defined by this specification.  Other specifications can register
   other members used for confirmation, including other members for
   conveying proof-of-possession keys using different key
   representations.

   The "cnf" claim value MUST represent only a single proof-of-
   possession key; thus, at most one of the "jwk", "jwe", and "jku" (JWK
   Set URL) confirmation values defined below may be present.  Note that
   if an application needs to represent multiple proof-of-possession
   keys in the same JWT, one way for it to achieve this is to use other
   claim names, in addition to "cnf", to hold the additional proof-of-
   possession key information.  These claims could use the same syntax
   and semantics as the "cnf" claim.  Those claims would be defined by
   applications or other specifications and could be registered in the
   IANA "JSON Web Token Claims" registry [IANA.JWT.Claims].

3.2.  Representation of an Asymmetric Proof-of-Possession Key

   When the key held by the presenter is an asymmetric private key, the
   "jwk" member is a JSON Web Key [JWK] 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,
      "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.

   The "jwk" member MAY also be used for a JWK representing a symmetric
   key, provided that the JWT is encrypted so that the key is not
   revealed to unintended parties.  The means of encrypting a JWT is
   explained in [JWT].  If the JWT is not encrypted, the symmetric key
   MUST be encrypted as described below.

3.3.  Representation of an Encrypted Symmetric Proof-of-Possession Key

   When the key held by the presenter is a symmetric key, the "jwe"
   member is an encrypted JSON Web Key [JWK] 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] 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] encoding of this JWK is 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": "RSA-OAEP",
      "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":
          "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhDQkMtSFMyNTYifQ.
          (remainder of JWE omitted for brevity)"
        }
     }

3.4.  Representation of a Key ID for a Proof-of-Possession Key

   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"
   claim in the JWT whose value is a JSON object with the JSON object
   containing a "kid" 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,
      "cnf":{
        "kid": "dfd1aa97-6d8d-4575-a0fe-34b96de2bfad"
       }
     }

   The content of the "kid" value is application specific.  For
   instance, some applications may choose to use a JWK Thumbprint
   [JWK.Thumbprint] value as the "kid" value.

3.5.  Representation of a URL for a Proof-of-Possession Key

   The proof-of-possession key can be passed by reference instead of
   being passed by value.  This is done using the "jku" member.  Its
   value is a URI [RFC3986] that refers to a resource for a set of JSON-
   encoded public keys represented as a JWK Set [JWK], one of which is
   the proof-of-possession key.  If there are multiple keys in the
   referenced JWK Set document, a "kid" member MUST also be included
   with the referenced key's JWK also containing the same "kid" value.

   The protocol used to acquire the resource MUST provide integrity
   protection.  An HTTP GET request to retrieve the JWK Set MUST use TLS
   [RFC5246] and the identity of the server MUST be validated, as per
   Section 6 of RFC 6125 [RFC6125].

   The following example demonstrates such a declaration in the JWT
   Claims Set of a JWT:

     {
      "iss": "https://server.example.com",
      "sub": "17760704",
      "aud": "https://client.example.org",
      "exp": 1440804813,
      "cnf":{
        "jku": "https://keys.example.net/pop-keys.json",
        "kid": "2015-08-28"
       }
     }

3.6.  Specifics Intentionally Not Specified

   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 examples using the mechanisms defined in this specification, see
   [OAUTH-POP-ARCH].

4.  Security Considerations

   All of the security considerations that are discussed in [JWT] also
   apply here.  In addition, proof of possession introduces its own
   unique security issues.  Possessing a key is only valuable if it is
   kept secret.  Appropriate means must be used to ensure that
   unintended parties do not learn private key or symmetric key values.

   Applications utilizing proof of possession should also utilize
   audience restriction, as described in Section 4.1.3 of [JWT], as it
   provides different protections.  Proof of possession can be used by
   recipients to reject messages from unauthorized senders.  Audience
   restriction can be used by recipients to reject messages intended for
   different recipients.

   A recipient might not understand the "cnf" claim.  Applications that
   require the proof-of-possession keys communicated with it to be
   understood and processed must ensure that the parts of this
   specification that they use are implemented.

   Proof of possession via encrypted symmetric secrets is subject to
   replay attacks.  This attack can, for example, be avoided when a
   signed nonce or challenge is used since the recipient can use a
   distinct nonce or challenge for each interaction.  Replay can also be
   avoided if a sub-key is derived from a shared secret that is specific
   to the instance of the PoP demonstration.

   As is the case with 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.

5.  Privacy Considerations

   A proof-of-possession key can be used as a correlation handle if the
   same key is used with multiple parties.  Thus, for privacy reasons,
   it is recommended that different proof-of-possession keys be used
   when interacting with different parties.

6.  IANA Considerations

   The following registration procedure is used for all the registries
   established by this specification.

   Values are registered on a Specification Required [RFC5226] basis
   after a three-week review period on the jwt-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.

   Registration requests sent to the mailing list for review should use
   an appropriate subject (e.g., "Request to Register JWT Confirmation
   Method: example").  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 include
   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 evaluating the security properties of the item being registered
   and whether the registration makes sense.

   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.

6.1.  JSON Web Token Claims Registration

   This specification registers the "cnf" claim in the IANA "JSON Web
   Token Claims" registry [IANA.JWT.Claims] established by [JWT].

6.1.1.  Registry Contents

   o  Claim Name: "cnf"
   o  Claim Description: Confirmation
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.1 of [RFC7800]

6.2.  JWT Confirmation Methods Registry

   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.

6.2.1.  Registration Template

   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 eight
      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.

6.2.2.  Initial Registry Contents

   o  Confirmation Method Value: "jwk"
   o  Confirmation Method Description: JSON Web Key Representing Public
      Key
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.2 of [RFC7800]
   o  Confirmation Method Value: "jwe"
   o  Confirmation Method Description: Encrypted JSON Web Key
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.3 of [RFC7800]

   o  Confirmation Method Value: "kid"
   o  Confirmation Method Description: Key Identifier
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.4 of [RFC7800]

   o  Confirmation Method Value: "jku"
   o  Confirmation Method Description: JWK Set URL
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.5 of [RFC7800]

7.  References

7.1.  Normative References

   [IANA.JWT.Claims]
              IANA, "JSON Web Token Claims",
              <http://www.iana.org/assignments/jwt>.

   [JWE]      Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)",
              RFC 7516, DOI 10.17487/RFC7156, May 2015,
              <http://www.rfc-editor.org/info/rfc7516>.

   [JWK]      Jones, M., "JSON Web Key (JWK)", RFC 7517,
              DOI 10.17487/RFC7157, May 2015,
              <http://www.rfc-editor.org/info/rfc7517>.

   [JWT]      Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
              (JWT)", RFC 7519, DOI 10.17487/RFC7159, May 2015,
              <http://www.rfc-editor.org/info/rfc7519>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
              2003, <http://www.rfc-editor.org/info/rfc3629>.

   [RFC3986]  Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
              Resource Identifier (URI): Generic Syntax", STD 66,
              RFC 3986, DOI 10.17487/RFC3986, January 2005,
              <http://www.rfc-editor.org/info/rfc3986>.

   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs", BCP 26, RFC 5226,
              DOI 10.17487/RFC5226, May 2008,
              <http://www.rfc-editor.org/info/rfc5226>.

   [RFC5246]  Dierks, T. and E. Rescorla, "The Transport Layer Security
              (TLS) Protocol Version 1.2", RFC 5246,
              DOI 10.17487/RFC5246, August 2008,
              <http://www.rfc-editor.org/info/rfc5246>.

   [RFC6125]  Saint-Andre, P. and J. Hodges, "Representation and
              Verification of Domain-Based Application Service Identity
              within Internet Public Key Infrastructure Using X.509
              (PKIX) Certificates in the Context of Transport Layer
              Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March
              2011, <http://www.rfc-editor.org/info/rfc6125>.

7.2.  Informative References

   [JWK.Thumbprint]
              Jones, M. and N. Sakimura, "JSON Web Key (JWK)
              Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September
              2015, <http://www.rfc-editor.org/info/rfc7638>.

   [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,
              <http://docs.oasis-open.org/security/saml/v2.0/>.

   [OAUTH-POP-ARCH]
              Hunt, P., Ed, Richer, J., Mills, W., Mishra, P., and H.
              Tschofenig, "OAuth 2.0 Proof-of-Possession (PoP) Security
              Architecture", Work in Progress, draft-ietf-oauth-pop-
              architecture-07, December 2015.

   [OpenID.Core]
              Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
              C. Mortimore, "OpenID Connect Core 1.0", November 2014,
              <http://openid.net/specs/openid-connect-core-1_0.html>.

Acknowledgements

   The authors wish to thank Brian Campbell, Stephen Farrell, Barry
   Leiba, Kepeng Li, Chris Lonvick, James Manger, Kathleen Moriarty,
   Justin Richer, and Nat Sakimura for their reviews of the
   specification.

Authors' Addresses

   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

AI ELI5

On this page
PROBLEMA plain JWT works for whoever holds it, so a stolen token can be replayed by someone else. The recipient needs a way to know the presenter also holds a particular key.
MECHANISMThe issuer adds a "cnf" (confirmation) claim to the JWT. Its members identify the proof-of-possession key: as a public key ("jwk"), an encrypted symmetric key ("jwe"), a key ID ("kid") or a key set URL ("jku"). The presenter then proves it holds the key.
WHY IT MATTERSThe RFC deliberately leaves the proof step (for example signing a nonce) to other protocols. It registers the "cnf" claim and a new IANA registry of confirmation methods.

§1The Holder-of-Key Idea

RFC 7800 describes how a JSON Web Token (JWT, see RFC 7519) can declare that the presenter of the JWT possesses a particular proof-of-possession (PoP) key, and how the recipient can cryptographically confirm that. Proving possession of a key is also called being a holder-of-key.

The RFC defines three roles. The issuer creates the JWT and binds the PoP key to it. The presenter proves possession of a private key (asymmetric) or secret key (symmetric) to a recipient. The recipient receives the JWT with the PoP key information from the presenter.

The RFC defines how to communicate confirmation key information in JWTs. It does not define the protocol that exercises the key.

Think of a concert ticket with a secret handshake written on it. The ticket alone is not enough: you also have to know the handshake. The person who made the ticket, the person holding it and the guard at the door each have a name here.

§2Symmetric and Asymmetric Use Cases

The introduction walks through two cases. With a symmetric key, either the presenter or the issuer generates the key and privately sends it to the other. The issuer puts an encrypted copy of the key in the confirmation claim, encrypted with a key known only to the issuer and the recipient. The whole JWT is integrity protected by the issuer. The presenter then shows the JWT and demonstrates the key, for example in a challenge/response protocol. The RFC compares this to the use of Kerberos tickets.

With an asymmetric key, the presenter generates a public/private key pair and sends the public key to the issuer. The issuer puts the public key (or an identifier for it) in the confirmation claim and protects the JWT with a digital signature. The presenter then uses the private key, for example in a TLS exchange or by signing a nonce, and the recipient checks that against the public key from the claim.

The RFC notes that a more secure practice is to derive the symmetric keys actually used from exchanged secrets with a Key Derivation Function, instead of using the exchanged secrets directly.

There are two kinds of secret. A shared secret is a password only two people know. A key pair has a public half anyone can see and a private half you keep hidden, and only the private half can do the trick.

ASYMMETRIC KEY CASE (RFC 7800, FIGURE 2)
PresenterIssuerRecipient
  1. (1) Public PoP keyThe presenter generates a key pair and sends the public key.
  2. (2) JWT with public PoP keySigned by the issuer; the key is in the confirmation claim.
  3. (3) Present JWT with public PoP key
  4. (4) Communication authenticated by PoP keyFor example a TLS exchange or a signed nonce.

§3The cnf Confirmation Claim

By including a cnf (confirmation) claim, the issuer declares that the presenter possesses a particular key and that the recipient can confirm it. The value is a JSON object whose members identify the PoP key.

The presenter is normally the subject named by the sub claim. If there is no sub, the presenter is normally the issuer named by iss. At least one of sub and iss MUST be present. An application may instead identify the presenter with an explicit claim such as azp, and the means of identifying the presenter is ultimately application specific.

The cnf value MUST represent only a single PoP key, so at most one of jwk, jwe and jku may be present. Members the implementation does not understand MUST be ignored unless the application requires otherwise. The set of confirmation members a JWT must contain is context dependent and outside the scope of the RFC.

The cnf claim is a note on the ticket that says which secret goes with it. Only one secret may be named, and if the guard cannot read part of the note, the guard skips it.

§4Four Ways to Name the Key

Each way of identifying the key is a member of the cnf object.

  • jwk: a JSON Web Key holding the public key that matches the presenter's private key. It MUST contain the required members for its key type and MAY contain others such as kid. It may also hold a symmetric key, but only if the JWT is encrypted; otherwise the symmetric key MUST be encrypted as in jwe.
  • jwe: a symmetric key as a JWK, encrypted to a key known to the recipient using the JWE Compact Serialization. The UTF-8 encoding of the JWK is the JWE plaintext.
  • kid: a key ID, usable when the recipient can obtain the identified key from it. The content of the value is application specific; some applications may use a JWK Thumbprint.
  • jku: a URI pointing to a JWK Set that contains the key. If the set holds several keys, a matching kid MUST also be included.

For jku, the protocol used to fetch the resource MUST provide integrity protection. An HTTP GET for the JWK Set MUST use TLS, and the server identity MUST be validated.

The note can hold the key itself, a locked box with the key inside, just a name tag for the key, or an address where the key can be looked up. You pick one of the four.

CONFIRMATION METHODS REGISTERED BY RFC 7800
  • jwkJSON Web Key — Represents the public key (Section 3.2).
  • jweEncrypted JSON Web Key — Encrypted symmetric key (Section 3.3).
  • kidKey Identifier — Names the key (Section 3.4).
  • jkuJWK Set URL — Points to a JWK Set holding the key (Section 3.5).
A CLAIMS SET WITH A KEY ID (RFC 7800, SECTION 3.4)
cnf with kid
{
 "iss": "https://server.example.com",
 "aud": "https://client.example.org",
 "exp": 1361398824,
 "cnf":{
   "kid": "dfd1aa97-6d8d-4575-a0fe-34b96de2bfad"
  }
}

§5What the RFC Leaves Out

Proof of possession is typically shown by having the presenter sign a value chosen by the recipient, often called a nonce or a challenge. The RFC intentionally does not describe how the nonce is sent, what it contains or how the signed nonce comes back, because different protocols do this differently.

For a symmetric key, another way to prove possession is to encrypt the key to the recipient, and how the recipient obtains its key is also protocol specific. The RFC points to the OAuth 2.0 PoP Security Architecture draft for examples.

The RFC says what is written on the ticket, but not how the guard tests your secret handshake. Each place can invent its own test.

§6Security and Privacy

All the security considerations of RFC 7519 apply. Possessing a key is only valuable if it is kept secret, so unintended parties must not learn private or symmetric key values. Applications using PoP should also use audience restriction: PoP lets a recipient reject messages from unauthorized senders, while audience restriction lets it reject messages meant for other recipients.

PoP via encrypted symmetric secrets is subject to replay attacks. This can be avoided with a signed nonce or challenge (a distinct one per interaction), or by deriving a sub-key from a shared secret specific to that PoP demonstration. A JWT still needs data origin authentication and integrity protection, and a symmetric key carried inside also needs confidentiality protection.

On privacy, a PoP key can act as a correlation handle if the same key is used with multiple parties. The RFC recommends different PoP keys for different parties.

A secret only helps if it stays secret. Also, do not use the same secret handshake at every door, or the guards could compare notes and follow you around.

§7IANA Registrations

The RFC registers the cnf claim (description "Confirmation", change controller IESG) in the IANA "JSON Web Token Claims" registry. It also creates a new "JWT Confirmation Methods" registry for members of the cnf object, and seeds it with jwk, jwe, kid and jku.

New values are registered on a Specification Required basis after a three-week review period, with Designated Experts. Because a goal is compact representations, names are RECOMMENDED not to exceed eight characters without a compelling reason.

There is now an official list of the allowed ways to name the key, so new ideas can be added in an orderly way.

§8References