Proof-of-Possession Key Semantics for CBOR Web Tokens (CWTs)Microsoftmbj@microsoft.comhttp://self-issued.info/RISE SICSScheelevaegen 17Lund223 70Swedenludwig@ri.seEricsson ABFärögatan 6Kista164 80Swedengoran.selander@ericsson.comSwedenerik@wahlstromstekniska.seSpotify ABBirger Jarlsgatan 61, 4trStockholm113 56Sweden+46702691499erdtman@spotify.comARM Ltd.6060Hall in TirolAustriaHannes.Tschofenig@arm.com
Security
ACE Working GroupCBOR Web TokenCWTProof-of-PossessionHolder-of-Key
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.
Being able to prove possession of a key is also sometimes described as
being the holder-of-key.
This specification provides equivalent functionality to
"Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)" (RFC 7800),
but using CBOR and CWTs rather than JSON and JWTs.
This specification describes how a CBOR Web Token can declare
that the presenter of the CWT possesses a particular proof-of-possession (PoP) key.
Proof of possession of a key is also sometimes described as
being the holder-of-key.
This specification provides equivalent functionality to
"Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)" ,
but using CBOR and CWTs
rather than JSON and JWTs .
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 BCP 14
when, and only when, they appear in all capitals, as shown here.
Unless otherwise noted, all the protocol parameter names and values are case sensitive.
This specification uses terms defined in
the CBOR Web Token ,
CBOR Object Signing and Encryption (COSE) , and
Concise Binary Object Representation (CBOR)
specifications.
These terms are defined by this specification:
Party that creates the CWT and binds its claims to the proof-of-possession key.
Party that proves possession of a private key (for asymmetric key cryptography)
or secret key (for symmetric key cryptography) to a recipient.
Party that receives the CWT containing the proof-of-possession key information from the presenter.
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 CBOR map
and the members of that map 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 ,
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 .)
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
Security Assertion Markup Language (SAML) 2.0 SubjectConfirmation usage.
At least one of the sub and iss
claims is typically present in the CWT and
some use cases may require that both be present.
The cnf claim is used in the CWT
to contain members used to identify the proof-of-possession key.
Other members of the cnf map 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
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 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. 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 .
When the key held by the presenter is an asymmetric private key,
the COSE_Key member
is a COSE_Key
representing the corresponding asymmetric public key.
The following example (using CBOR diagonstic notation) demonstrates such a declaration
in the CWT Claims Set of a CWT:
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 .
If the CWT is not encrypted, the symmetric key MUST be encrypted as described below.
When the key held by the presenter is a symmetric key,
the Encrypted_COSE_Key member
is an encrypted COSE_Key
representing the symmetric key
encrypted to a key known to the recipient
using COSE_Encrypt or COSE_Encrypt0.
The following example (using CBOR diagnostic notation, with linebreaks for readability)
illustrates a symmetric key that could subsequently be encrypted for use in the
Encrypted_COSE_Key member:
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.
The following example CWT Claims Set of a CWT (using CBOR diagnostic notation, with
linebreaks for readability) illustrates the use of an encrypted symmetric key as the
Encrypted_COSE_Key member value:
The example above was generated with the 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 CBOR map with the CBOR map containing a
kid member
identifying the key.
The following example (using CBOR diagnostic notation) demonstrates such a declaration
in the CWT Claims Set of a CWT:
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.
Proof of possession is often 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.
All of the security considerations that
are discussed in 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 ,
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.
As described in Section 6 (Key Identification) and Appendix D (Notes on Key Selection)
of , it is important to make explicit trust decisions about the keys.
Proof-of-possession signatures made with keys
not meeting the application's trust criteria MUST NOT not be relied upon.
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.
The following registration procedure is used for all the
registries established by this specification.
Values are registered on a Specification Required
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.
This specification registers the cnf claim in the IANA
"CBOR Web Token Claims" registry
established by .
Claim Name: cnf
Claim Description: Confirmation
JWT Claim Name: cnf
Claim Key: TBD (maybe 8)
Claim Value Type(s): map
Change Controller: IESG
Specification Document(s): of [[ this document ]]
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.
The human-readable name requested (e.g., "kid").
Brief description of the confirmation method (e.g., "Key Identifier").
Claim Name of the equivalent JWT confirmation method value,
as registered in .
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 map key value for the confirmation method.
CBOR types that can be used for the confirmation method value.
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.
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.
Confirmation Method Name: COSE_Key
Confirmation Method Description: COSE_Key Representing Public Key
JWT Confirmation Method Name: jwk
Confirmation Key: 1
Confirmation Value Type(s): map
Change Controller: IESG
Specification Document(s): of [[ this document ]]
Confirmation Method Name: Encrypted_COSE_Key
Confirmation Method Description: Encrypted COSE_Key
JWT Confirmation Method Name: jwe
Confirmation Key: 2
Confirmation Value Type(s): array (with an optional COSE_Encrypt or COSE_Encrypt0 tag)
Change Controller: IESG
Specification Document(s): of [[ this document ]]
Confirmation Method Name: kid
Confirmation Method Description: Key Identifier
JWT Confirmation Method Name: kid
Confirmation Key: 3
Confirmation Value Type(s): binary string
Change Controller: IESG
Specification Document(s): of [[ this document ]]
CBOR Web Token (CWT)Microsoftmbj@microsoft.comhttp://self-issued.info/erik@wahlstromstekniska.seSpotify ABerdtman@spotify.comARM Ltd.Hannes.Tschofenig@arm.comCBOR Web Token ClaimsIANAJSON Web Signature (JWS)Microsoftmbj@microsoft.comhttp://self-issued.info/Ping Identityve7jtb@ve7jtb.comNomura Research Instituten-sakimura@nri.co.jpJSON Web Token (JWT)Microsoftmbj@microsoft.comhttp://self-issued.info/Ping Identityve7jtb@ve7jtb.comNomura Research Instituten-sakimura@nri.co.jpAssertions and Protocol for the OASIS Security Assertion Markup Language
(SAML) V2.0Internet2cantor.2@osu.eduNokiaJohn.Kemp@nokia.comRSA Securityrphilpott@rsasecurity.comSun Microsystemseve.maler@sun.comJSON Web Token ClaimsIANA
Thanks to the following people for their reviews of the specification:
Michael Richardson and
Jim Schaad.
[[ to be removed by the RFC Editor before publication as an RFC ]]
-02
Changed "typically" to "often" when describing ways of performing proof of possession.
Changed b64 to hex encoding in an example.
Changed to using the RFC 8174 boilerplate instead of the RFC 2119 boilerplate.
-01
Now uses CBOR diagnostic notation for the examples.
Added a table summarizing the "cnf" names, keys, and value types.
Addressed some of Jim Schaad's feedback on -00.
-00
Created the initial working group draft from draft-jones-ace-cwt-proof-of-possession-01.