<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.miek.nl" -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" ipr="trust200902" docName="draft-ietf-cose-cwt-claims-in-headers-02" submissionType="IETF" category="std" xml:lang="en" consensus="true">

<front>
<title>CBOR Web Token (CWT) Claims in COSE Headers</title><seriesInfo value="draft-ietf-cose-cwt-claims-in-headers-02" status="standard" name="Internet-Draft"/>
<author initials="T." surname="Looker" fullname="Tobias Looker"><organization>Mattr</organization><address><postal><street/>
</postal><email>tobias.looker@mattr.global</email>
</address></author>
<author initials="M." surname="Jones" fullname="Michael B. Jones"><organization>Microsoft</organization><address><postal><street/>
</postal><email>mbj@microsoft.com</email>
<uri>https://self-issued.info/</uri>
</address></author>
<date/>
<area>Internet</area>
<workgroup>COSE</workgroup>
<keyword>COSE</keyword>
<keyword>JOSE</keyword>

<abstract>
<t>This document describes how to include CBOR Web Token (CWT) claims in the header parameters of any COSE structure. This functionality helps to facilitate applications that wish to make use of CBOR Web Token (CWT) claims in encrypted COSE structures and/or COSE structures featuring detached signatures, while having some of those claims be available before decryption and/or without inspecting the detached payload.</t>
</abstract>

<note title="Discussion Venues" removeInRFC="true">
<t>Source for this draft and an issue tracker can be found at
    <eref target="https://github.com/tplooker/draft-ietf-cose-cwt-claims-in-headers"/>.</t>
</note>
</front>

<middle>

<section anchor="introduction"><name>Introduction</name>
<t>In some applications of COSE, it is useful to have a standard representation of CWT claims <xref target="RFC8392"/> available in the header parameters. These include encrypted COSE structures, which may or may not be an encrypted CWT and/or those featuring a detached signature.</t>
<t>Section 5.3 of the JWT RFC <xref target="RFC7519"/> defined a similar mechanism for expressing selected JWT based claims as JOSE header parameters.  This JWT feature was motivated by the desire to have certain claims, such as the Issuer value, be visible to software processing the JWT, even though the JWT is encrypted.  No corresponding feature was standardized for CWTs, which was an omission that this specification corrects.</t>
<t>Directly including CWT claim values as COSE header parameter values would not work, since there are conflicts between the numeric header parameter assignments and the numeric CWT claim assignments.  Instead, this specification defines a single header parameter registered in the IANA "COSE Header Parameters" registry that creates a location to store CWT claims in a COSE header parameter.</t>
</section>

<section anchor="terminology"><name>Terminology</name>
</section>

<section anchor="representation"><name>Representation</name>
<t>This document defines the following COSE header parameter:</t>
<table>
<thead>
<tr>
<th>Name</th>
<th>Label</th>
<th>Value Type</th>
<th>Value Registry</th>
<th>Description</th>
</tr>
</thead>

<tbody>
<tr>
<td>cwt claims</td>
<td>TBD (requested assignment 11)</td>
<td>map</td>
<td><xref target="IANA.CWT"/></td>
<td>location for CWT claims in  COSE headers</td>
</tr>
</tbody>
</table><t>The following is a non-normative description for the value type of the cwt claim header parameter using CDDL <xref target="RFC8610"/>.</t>

<artwork>CWT-Claims = {
 * Claim-Label =&gt; any
}

Claim-Label = int / text
</artwork>
</section>

<section anchor="privacy-considerations"><name>Privacy Considerations</name>
<t>Some of the registered CWT claims may contain privacy-sensitive information. Therefore care must be taken when expressing CWT claims in COSE headers.</t>
</section>

<section anchor="security-considerations"><name>Security Considerations</name>
<t>In cases where CWT claims are both present in the payload and the header, an application receiving such as structure MUST verify that their values are identical, unless the application defines other specific processing rules for these claims.</t>
</section>

<section anchor="iana-considerations"><name>IANA Considerations</name>
<t>IANA is requested to register the new COSE Header parameter in the table in <xref target="representation"/> in the "COSE Header Parameters" registry <xref target="IANA.COSE"/>.</t>
</section>

</middle>

<back>
<references><name>Normative References</name>
<reference anchor="IANA.COSE" target="https://www.iana.org/assignments/cose/cose.xhtml#header-parameters">
  <front>
    <title>COSE Header Parameters</title>
    <author>
      <organization>IANA</organization>
    </author>
    <date/>
  </front>
</reference>
<reference anchor="IANA.CWT" target="https://www.iana.org/assignments/cwt/cwt.xhtml">
  <front>
    <title>CBOR Web Token (CWT) Claims</title>
    <author>
      <organization>IANA</organization>
    </author>
    <date/>
  </front>
</reference>
</references>
<references><name>Informative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8392.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml"/>
</references>

<section anchor="document-history"><name>Document History</name>
<t>-01</t>

<ul>
<li>Changed example from Key ID to Issuer.</li>
</ul>
<t>-00</t>

<ul>
<li>Created draft-ietf-cose-cwt-claims-in-headers-00 from draft-looker-cose-cwt-claims-in-headers-00 following working group adoption.</li>
</ul>
</section>

</back>

</rfc>
