<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.21 (Ruby 2.7.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-fossati-rats-message-types-00" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.24.0 -->
  <front>
    <title>RATS Message Types</title>
    <seriesInfo name="Internet-Draft" value="draft-fossati-rats-message-types-00"/>
    <author initials="T." surname="Fossati" fullname="Thomas Fossati">
      <organization>Linaro</organization>
      <address>
        <email>thomas.fossati@linaro.org</email>
      </address>
    </author>
    <author initials="L." surname="Lundblade" fullname="Laurence Lundblade">
      <organization>Security Theory LLC</organization>
      <address>
        <email>lgl@securitytheory.com</email>
      </address>
    </author>
    <date year="2024" month="November" day="19"/>
    <area>Security</area>
    <workgroup>RATS</workgroup>
    <keyword>cbor</keyword>
    <abstract>
      <?line 44?>

<t>This establishes that RATs messages types should be identified by either CoAP Content-Format or Media Type (MIME type) or both.
CBOR tags and other type mechanisms should not be used.</t>
      <t>This updates EAT, in a backwards-compatible way, so that the type of EAT nested tokens can be identified by CoAP Content-Format and Media Type.</t>
    </abstract>
  </front>
  <middle>
    <?line 51?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>When EAT <xref target="I-D.ietf-rats-eat"/> and CMW <xref target="I-D.ietf-rats-msg-wrap"/> were designed, some of the nesting requirements were not fully understood.
What is understood now is that composite and layered attestation has to accommodate an open-ended range of formats for attestation evidence messages (a.k. a., attestation tokens).</t>
      <t>When composing attestation for a complex device like a car or airplane, there are likely to be hundreds of components from hundreds of suppliers.
Individual suppliers are likely to have picked an attestation token format convenient for their environment.
For example, traditional security-oriented components like HSMs are likely to choose ASN.1 based formats while higher level components may use JSON-based formats.
In many cases, the components and the attestation implementation will be subject to expensive certification requirements.
It is not possible for the manufacturer of the complex device to dictate that all suppliers use the same format.</t>
      <t>Encoding-specific message type indicators like CBOR tags (See <xref target="STD94"/>) are not recommended, because they work only in the particular protocol environments.</t>
      <t>Proprietary type indicators are also not recommended as there are perfectly usable standard type indicators.
Standard type indicators have the benefit of working with established protocols like HTTP and CoAP <xref target="RFC7252"/>.</t>
      <t>It is expected that attestation, and thus attestation messages, will be integrated into other protocols like TLS.
Some uniform means of identifying RATS messages is desirable.
This is akin to identify image format types in a general way that works for email, web pages and so on.</t>
      <t>A concern with multiple formats for RATS messages is incurring n-squared complexity where n is the number of formats for something like evidence.
Orienting around a standard content types will mostly reduce from n-squared to simple order of n.</t>
      <t>It is advantageous to identify one point in RATS protocols where message-formats can change, say from CBOR to JSON or DER (ASN.1) to CBOR.
Since RATS messages can be many formats, the logical place to do that is at the message level.
This is how EAT does it.
The only place a message format boundary is crossed is for nested tokens.</t>
      <t>(EAT also allows a message format boundary crossing for manifests and measurements, but technically they are not attestation messages.
Never the less, in EAT this boundary makes use of CoAP Content-Format).</t>
    </section>
    <section anchor="type-identifiers-and-receptacles">
      <name>Type Identifiers and Receptacles</name>
      <t>A type system needs identifiers for each message that plugs-in and a receptacle structure for the place the message plugs-in.</t>
      <section anchor="type-identifiers">
        <name>Type Identifiers</name>
        <t>A CoAP Content-Format and Media Type SHOULD be registered for each RATS protocol message definition.</t>
        <t>A CBOR tag SHOULD NOT be registered for RATS protocol messages.
If a CBOR tag is needed, one can be derived by the TN() mechanism described in <xref target="RFC7252"/>.</t>
      </section>
      <section anchor="receptacle-definition">
        <name>Receptacle Definition</name>
        <t>A receptacle is a place in a protocol where a RATS message can occur.
For example, a nested-token in EAT or a cbor-record in CMW.
In a sense, HTTP is largely a receptacle.</t>
        <t>A receptacle is a content type and a body. cbor-record and json-record in CMW are receptacles.
The content type header and message body in HTTP are a receptacle.</t>
        <t>All RATS protocols SHOULD use a receptacle that is based on CoAP Content-Format or Media Type or both.</t>
        <t>CBOR-based protocols SHOULD use the cbor-record defined in CMW as a receptacle.
JSON-based protocols should use the json-record defined in CMW as a receptacle.</t>
        <t>This does not deprecate previously registered CBOR tags or CBOR tag-using receptacles.</t>
      </section>
      <section anchor="receptacle-commentary">
        <name>Receptacle Commentary</name>
        <t>The actual definition and encoding for a receptacle should match the format and encoding of the surround protocol.
For example, in a CBOR-format CMW token, a cbor-record is used for the receptacle.
In an ASN.1-based protocol the receptacle will be defined in ASN.1.
It is perhaps an INTEGER and an OCTET-STREAM or an OID that maps to a CoAP Content-Format and an OCTET-STREAM.</t>
        <t>A receptacle is a place where encoding formats can change.
A JSON-format message can be put into a CBOR-format message.
It is recommended that in RATS protocols a receptacle be the only place where the encoding format can change. Stated conversely, any place in a RATS protocol were the encoding format can change, a receptacle should be used.</t>
        <t>A typical receptacle implementation will decode the message type, and then switch or dispatch to a handler for that type.
This may be by a look up table or such. The important part is the implementation of the receptacle doesn’t have to be changed for each new type.
Only a configuration has to be adjusted.</t>
        <t>Some protocols, like TLS, don’t have receptacles and need one to transport RATS messages.</t>
        <t>Note that in EAT, both the manifests and measurements claims are defined are receptacles as described here.</t>
      </section>
    </section>
    <section anchor="eat-updates">
      <name>EAT Updates</name>
      <t>The definition of a nested-token in EAT <xref target="I-D.ietf-rats-eat"/> doesn’t meet the above criterion, so it needs to be adjusted.
This doesn’t deprecate anything in EAT, just refines some definitions.</t>
      <t>In CBOR-format EAT tokens, the type of a nested token is identified by a CBOR tag.
This document updates EAT to say the CBOR tag SHOULD use CoAP Content-Formats <xref target="RFC7252"/> and tn() described in <xref target="RFC9277"/> to turn them into CBOR tags.</t>
      <t>In JSON-format EAT tokens, the JSON-Selector structure is used to identify the type of a nested token.
The string identifier in JSON-Selector may be one of a small number of strings defined by the EAT standard and may be update only by a standards document.</t>
      <t>This document updates the JSON-Selector as follows.
When the string in the JSON-selector is one of the top-level media types (e.g., “application”) the JSON-selector is a media type identifier.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="I-D.ietf-rats-eat">
          <front>
            <title>The Entity Attestation Token (EAT)</title>
            <author fullname="Laurence Lundblade" initials="L." surname="Lundblade">
              <organization>Security Theory LLC</organization>
            </author>
            <author fullname="Giridhar Mandyam" initials="G." surname="Mandyam">
              <organization>Mediatek USA</organization>
            </author>
            <author fullname="Jeremy O'Donoghue" initials="J." surname="O'Donoghue">
              <organization>Qualcomm Technologies Inc.</organization>
            </author>
            <author fullname="Carl Wallace" initials="C." surname="Wallace">
              <organization>Red Hound Software, Inc.</organization>
            </author>
            <date day="6" month="September" year="2024"/>
            <abstract>
              <t>   An Entity Attestation Token (EAT) provides an attested claims set
   that describes state and characteristics of an entity, a device like
   a smartphone, IoT device, network equipment or such.  This claims set
   is used by a relying party, server or service to determine the type
   and degree of trust placed in the entity.

   An EAT is either a CBOR Web Token (CWT) or JSON Web Token (JWT) with
   attestation-oriented claims.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-eat-31"/>
        </reference>
        <reference anchor="RFC7252">
          <front>
            <title>The Constrained Application Protocol (CoAP)</title>
            <author fullname="Z. Shelby" initials="Z." surname="Shelby"/>
            <author fullname="K. Hartke" initials="K." surname="Hartke"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="June" year="2014"/>
            <abstract>
              <t>The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks. The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s. The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.</t>
              <t>CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types. CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7252"/>
          <seriesInfo name="DOI" value="10.17487/RFC7252"/>
        </reference>
        <reference anchor="RFC9277">
          <front>
            <title>On Stable Storage for Items in Concise Binary Object Representation (CBOR)</title>
            <author fullname="M. Richardson" initials="M." surname="Richardson"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document defines a stored ("file") format for Concise Binary Object Representation (CBOR) data items that is friendly to common systems that recognize file types, such as the Unix file(1) command.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9277"/>
          <seriesInfo name="DOI" value="10.17487/RFC9277"/>
        </reference>
        <reference anchor="RFC6838">
          <front>
            <title>Media Type Specifications and Registration Procedures</title>
            <author fullname="N. Freed" initials="N." surname="Freed"/>
            <author fullname="J. Klensin" initials="J." surname="Klensin"/>
            <author fullname="T. Hansen" initials="T." surname="Hansen"/>
            <date month="January" year="2013"/>
            <abstract>
              <t>This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="13"/>
          <seriesInfo name="RFC" value="6838"/>
          <seriesInfo name="DOI" value="10.17487/RFC6838"/>
        </reference>
        <reference anchor="I-D.ietf-rats-msg-wrap">
          <front>
            <title>RATS Conceptual Messages Wrapper (CMW)</title>
            <author fullname="Henk Birkholz" initials="H." surname="Birkholz">
              <organization>Fraunhofer SIT</organization>
            </author>
            <author fullname="Ned Smith" initials="N." surname="Smith">
              <organization>Intel</organization>
            </author>
            <author fullname="Thomas Fossati" initials="T." surname="Fossati">
              <organization>Linaro</organization>
            </author>
            <author fullname="Hannes Tschofenig" initials="H." surname="Tschofenig">
              <organization>University of Applied Sciences Bonn-Rhein-Sieg</organization>
            </author>
            <author fullname="Dionna Glaze" initials="D." surname="Glaze">
              <organization>Google LLC</organization>
            </author>
            <date day="15" month="November" year="2024"/>
            <abstract>
              <t>   This document defines the RATS conceptual message wrapper (CMW)
   format, a type of encapsulation format that can be used for any RATS
   messages, such as Evidence, Attestation Results, Endorsements, and
   Reference Values.  Additionally, the document describes a collection
   type that enables the aggregation of one or more CMWs into a single
   message.

   This document also defines corresponding CBOR tag, JSON Web Tokens
   (JWT) and CBOR Web Tokens (CWT) claims, as well as an X.509
   extension.  These allow embedding the wrapped conceptual messages
   into CBOR-based protocols, web APIs, and PKIX protocols.  In
   addition, a Media Type and a CoAP Content-Format are defined for
   transporting CMWs in HTTP, MIME, CoAP and other Internet protocols.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-rats-msg-wrap-11"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <referencegroup anchor="STD94" target="https://www.rfc-editor.org/info/std94">
          <reference anchor="RFC8949" target="https://www.rfc-editor.org/info/rfc8949">
            <front>
              <title>Concise Binary Object Representation (CBOR)</title>
              <author fullname="C. Bormann" initials="C." surname="Bormann"/>
              <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
              <date month="December" year="2020"/>
              <abstract>
                <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
                <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
              </abstract>
            </front>
            <seriesInfo name="STD" value="94"/>
            <seriesInfo name="RFC" value="8949"/>
            <seriesInfo name="DOI" value="10.17487/RFC8949"/>
          </reference>
        </referencegroup>
      </references>
    </references>
    <?line 146?>



  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA4VY227cOBJ911cQMy820BISz+5k4qfx2s6OF74E7h7kIcgD
W2J3M5ZIDSm502/5jQV2fy5fsqeK1NWdDTCYtCWxWHWq6tQh0zRNns/FL0nS
6KZU5+LxYrUUd8p7uVVidaiVTwqbG1nhXeHkpkk3Fi8bnTrZ+LQKX6YNfZmW
slG+SXLZnAvfFElS4MF5klvjlfGtPxeNa1XiG6dkdS5urlfvEl07fuybs1ev
3r46SyRengvx01LlrdPN4adkb93T1tm2Du4lT+qAR8W5yNfWJUki22Zn3XmS
Cm2wxyoT74KPiRDB89XOVtKPHlu3PRe32khn8ZeqpC7hBX+VxQB/L/l1hk+T
zvRtJm5bU6xLWaje+K1snTK5mrziDboQsL+y7iBuby+H3cpt+buPHzT8Pstt
lSTGugrbPwM4IR7fXZ69fv32PMHvm/Qq06rZBOQVQE7CF2/O/n7W/X579uZN
9/vX33757cjKym/TvZM1XmmzGe+2XF29/Rsep2kq5BppknmTJKud9gJ5letS
+53ywEk2lAkvYvrxiPIv/M62ZSHWSuhCmUZvtMJfB6E0AnTi0l68x/9Mg3fp
O94YOKHaCi251sTJ3c3dNRs7pTdr2+yy5PIfD4+ikVsvpCmEZVP0CXbPd9Jo
X/U7G9vQ7q1XRRYdb2sqQi+uL1YLJFFIsZb50166wqfAu0bw61KJvTwshLch
NmwRdrAbWicMokckjX1CGYtcmpchHouN3B2CywKulS6KUiXJz+LGNM4Wbd5o
a5Lkw04Z3uzjizx/YkuXdx/m77pMfhJ75ZQolNdbowoKpGLnKRByXputcOqv
Vjt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