[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Nits]

Versions: 00 01 draft-ietf-ace-cwt-proof-of-possession

ACE Working Group                                               M. Jones
Internet-Draft                                                 Microsoft
Intended status: Standards Track                          April 20, 2017
Expires: October 22, 2017


      Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)
               draft-jones-ace-cwt-proof-of-possession-00

Abstract

   This specification describes how to declare in a CBOR Web Token (CWT)
   that the presenter of the CWT 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.  This specification is a profile of "Proof-of-
   Possession Key Semantics for JSON Web Tokens (JWTs)" (RFC 7800), but
   using CBOR and CWTs rather than JSON and JWTs.

Status of This Memo

   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 October 22, 2017.

Copyright Notice

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



Jones                   Expires October 22, 2017                [Page 1]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


   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  . . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Representations for Proof-of-Possession Keys  . . . . . . . .   3
     3.1.  Confirmation Claim  . . . . . . . . . . . . . . . . . . .   4
     3.2.  Representation of an Asymmetric Proof-of-Possession Key .   4
     3.3.  Representation of an Encrypted Symmetric Proof-of-
           Possession Key  . . . . . . . . . . . . . . . . . . . . .   5
     3.4.  Representation of a Key ID for a Proof-of-Possession Key    6
     3.5.  Specifics Intentionally Not Specified . . . . . . . . . .   6
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .   7
   5.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .   8
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   8
     6.1.  CBOR Web Token Claims Registration  . . . . . . . . . . .   8
       6.1.1.  Registry Contents . . . . . . . . . . . . . . . . . .   9
     6.2.  CWT Confirmation Methods Registry . . . . . . . . . . . .   9
       6.2.1.  Registration Template . . . . . . . . . . . . . . . .   9
       6.2.2.  Initial Registry Contents . . . . . . . . . . . . . .  10
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  10
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  10
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  11
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  12
   Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
   Document History  . . . . . . . . . . . . . . . . . . . . . . . .  12
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   This specification describes how a CBOR Web Token [CWT] can declare
   that the presenter of the CWT 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.  This specification is a profile of "Proof-of-
   Possession Key Semantics for JSON Web Tokens (JWTs)" [RFC7800], but
   using CBOR [RFC7049] and CWTs [CWT] rather than JSON [RFC7159] and
   JWTs [JWT].








Jones                   Expires October 22, 2017                [Page 2]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


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

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

2.  Terminology

   This specification uses terms defined in the CBOR Web Token [CWT],
   [I-D.ietf-cose-msg], and Concise Binary Object Representation (CBOR)
   [RFC7049] specifications.

   These terms are defined by this specification:

   Issuer
      Party that creates the CWT 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 CWT 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 CWT, the issuer of the
   CWT 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 CWT
   depending upon the application requirements.  If the CWT contains a
   "sub" (subject) claim [CWT], the presenter is normally the subject
   identified by the CWT.  (In some applications, the subject identifier
   will be relative to the issuer identified by the "iss" (issuer) claim
   [CWT].)  If the CWT contains no "sub" claim, the presenter is
   normally the issuer identified by the CWT using the "iss" claim.  The
   case in which the presenter is the subject of the CWT is analogous to



Jones                   Expires October 22, 2017                [Page 3]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


   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 CWT.  Some use
   cases may require that both be present.

3.1.  Confirmation Claim

   The "cnf" claim is used in the CWT 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 CWT must contain to be
   considered valid is context dependent and is outside the scope of
   this specification.  Specific applications of CWTs 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 "CWT 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 "COSE_Key" and
   "Encrypted_COSE_Key" confirmation values defined below may be
   present.  Note that if an application needs to represent multiple
   proof-of-possession keys in the same CWT, 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 "CBOR Web Token Claims" registry
   [IANA.CWT.Claims].

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

   When the key held by the presenter is an asymmetric private key, the
   "COSE_Key" member is a COSE_Key [I-D.ietf-cose-msg] representing the




Jones                   Expires October 22, 2017                [Page 4]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


   corresponding asymmetric public key.  The following example
   demonstrates such a declaration in the CWT Claims Set of a CWT:

     {
      "iss": "https://server.example.com",
      "aud": "https://client.example.org",
      "exp": 1361398824,
      "cnf":{
        "COSE_Key":{
          "kty": "EC",
          "crv": "P-256",
          "x": "18wHLeIgW9wVN6VD1Txgpqy2LszYkMf6J8njVAibvhM",
          "y": "-V4dS4UaLMgP_4fY4j8ir7cl1TXlFdAgcx55o7TkcSA"
         }
       }
     }

   The COSE_Key MUST contain the required key members for a COSE_Key of
   that key type and MAY contain other COSE_Key members, including the
   "kid" (Key ID) member.

   The "COSE_Key" member MAY also be used for a COSE_Key representing a
   symmetric key, provided that the CWT is encrypted so that the key is
   not revealed to unintended parties.  The means of encrypting a CWT is
   explained in [CWT].  If the CWT 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
   "Encrypted_COSE_Key" member is an encrypted COSE_Key
   [I-D.ietf-cose-msg] representing the symmetric key encrypted to a key
   known to the recipient using COSE_Encrypt or COSE_Encrypt0.

   The following example illustrates a symmetric key that could
   subsequently be encrypted for use in the "Encrypted_COSE_Key" member:

     {
      "kty": "oct",
      "alg": "HS256",
      "k": "ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE"
     }

   The COSE_Key representation is used as the plaintext when encrypting
   the key.  The COSE_Key could, for instance, be encrypted using a
   COSE_Encrypt0 representation using the AES-CCM-16-64-128 algorithm.





Jones                   Expires October 22, 2017                [Page 5]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


   The following example CWT Claims Set of a CWT illustrates the use of
   an encrypted symmetric key as the "Encrypted_COSE_Key" member value:

     {
      "iss": "https://server.example.com",
      "sub": "24400320",
      "aud": "s6BhdRkqt3",
      "exp": 1311281970,
      "iat": 1311280970,
      "cnf":{
        "Encrypted_COSE_Key":
          "(TBD)"
        }
     }

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 CWT 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 CWT 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 CWT
   Claims Set of a CWT:

     {
      "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 cryptographic hash of
   the public key value as the "kid" value.

3.5.  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".



Jones                   Expires October 22, 2017                [Page 6]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


   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.

4.  Security Considerations

   All of the security considerations that are discussed in [CWT] 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 CWT, 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 CWT learns
   about the entity that created the CWT since this will be important
   for any policy decisions.  Integrity protection prevents an adversary
   from changing any elements conveyed within the CWT payload.  Special
   care has to be applied when carrying symmetric keys inside the CWT
   since those not only require integrity protection but also
   confidentiality protection.




Jones                   Expires October 22, 2017                [Page 7]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


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 cwt-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: cwt-reg-
   review@ietf.org. ]]

   Registration requests sent to the mailing list for review should use
   an appropriate subject (e.g., "Request to Register CWT 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.  CBOR Web Token Claims Registration

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




Jones                   Expires October 22, 2017                [Page 8]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


6.1.1.  Registry Contents

   o  Claim Name: "cnf"
   o  Claim Description: Confirmation
   o  JWT Claim Name: "cnf"
   o  CBOR Key Value: TBD (maybe 8)
   o  CBOR Major Type: 5
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.1 of [[ this document ]]

6.2.  CWT Confirmation Methods Registry

   This specification establishes the IANA "CWT Confirmation Methods"
   registry for CWT "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 Name:
      The human-readable name requested (e.g., "kid").

   Confirmation Method Description:
      Brief description of the confirmation method (e.g., "Key
      Identifier").

   JWT Conformation Method Name:
      Claim Name of the equivalent JWT confirmation method value, as
      registered in [IANA.JWT.Claims].  CWT claims should normally have
      a corresponding JWT claim.  If a corresponding JWT claim would not
      make sense, the Designated Experts can choose to accept
      registrations for which the JWT Claim Name is listed as "N/A".

   CBOR Key Value:
      Key value for the confirmation method.  The key value MUST be an
      integer in the range of 1 to 65536.

   CBOR Major Type:
      CBOR major type and, when applicable, minor type for the claim.

   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



Jones                   Expires October 22, 2017                [Page 9]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


      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 Name: "COSE_Key"
   o  Confirmation Method Description: COSE_Key Representing Public Key
   o  JWT Confirmation Method Name: "jwk"
   o  CBOR Key Value: 1
   o  CBOR Major Type: 5
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.2 of [[ this document ]]

   o  Confirmation Method Name: "Encrypted_COSE_Key"
   o  Confirmation Method Description: Encrypted COSE_Key
   o  JWT Confirmation Method Name: "jwe"
   o  CBOR Key Value: 2
   o  CBOR Major Type: 4 (with an optional 6 tag prefix)
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.3 of [[ this document ]]

   o  Confirmation Method Name: "kid"
   o  Confirmation Method Description: Key Identifier
   o  JWT Confirmation Method Name: "kid"
   o  CBOR Key Value: 3
   o  CBOR Major Type: 2
   o  Change Controller: IESG
   o  Specification Document(s): Section 3.4 of [[ this document ]]

7.  References

7.1.  Normative References

   [CWT]      Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig,
              "CBOR Web Token (CWT)", Work in Progress, draft-ietf-ace-
              cbor-web-token-04, April 2017,
              <https://tools.ietf.org/html/draft-ietf-ace-cbor-web-
              token-04>.

   [I-D.ietf-cose-msg]
              Schaad, J., "CBOR Object Signing and Encryption (COSE)",
              draft-ietf-cose-msg-24 (work in progress), November 2016.

   [IANA.CWT.Claims]
              IANA, "CBOR Web Token Claims",
              <http://www.iana.org/assignments/cwt>.





Jones                   Expires October 22, 2017               [Page 10]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


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

   [RFC7049]  Bormann, C. and P. Hoffman, "Concise Binary Object
              Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049,
              October 2013, <http://www.rfc-editor.org/info/rfc7049>.

7.2.  Informative References

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

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







Jones                   Expires October 22, 2017               [Page 11]


Internet-Draft      Proof-of-Possession Key for CWTs          April 2017


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

   [RFC7159]  Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
              Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March
              2014, <http://www.rfc-editor.org/info/rfc7159>.

   [RFC7800]  Jones, M., Bradley, J., and H. Tschofenig, "Proof-of-
              Possession Key Semantics for JSON Web Tokens (JWTs)",
              RFC 7800, DOI 10.17487/RFC7800, April 2016,
              <http://www.rfc-editor.org/info/rfc7800>.

Acknowledgements

   TBD

Open Issues

   o  Convert the examples from JSON/JWT to CBOR/CWT.

Document History

   [[ to be removed by the RFC Editor before publication as an RFC ]]

   -00

   o  Created the initial draft from RFC 7800.

Author's Address

   Michael B. Jones
   Microsoft

   Email: mbj@microsoft.com
   URI:   http://self-issued.info/












Jones                   Expires October 22, 2017               [Page 12]


Html markup produced by rfcmarkup 1.124, available from https://tools.ietf.org/tools/rfcmarkup/