<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.2.12 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc rfcedstyle="yes"?>
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc strict="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc text-list-symbols="-o*+"?>
<?rfc docmapping="yes"?>

<rfc ipr="trust200902" docName="draft-ietf-suit-report-00" category="info">

  <front>
    <title abbrev="Secure Reporting of Update Status">Secure Reporting of Update Status</title>

    <author initials="B." surname="Moran" fullname="Brendan Moran">
      <organization>Arm Limited</organization>
      <address>
        <email>Brendan.Moran@arm.com</email>
      </address>
    </author>

    <date year="2021" month="July" day="12"/>

    <area>Security</area>
    <workgroup>SUIT</workgroup>
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>The Software Update for the Internet of Things (SUIT) manifest provides
a way for many different update and boot
workflows to be described by a common format. However, this does not
provide a feedback mechanism for developers in the event that an update
or boot fails.</t>

<t>This specification describes a lightweight feedback mechanism that
allows a developer in possession of a manifest to reconstruct the
decisions made and actions performed by a manifest processor.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>A SUIT manifest processor can fail to install or boot an update for many
reasons. Frequently, the error codes generated by such systems fail to
provide developers with enough information to find root causes and
produce corrective actions, resulting in extra effort to reproduce
failures. Logging the results of each SUIT command can simplify this
process.</t>

<t>While it is possible to report the results of SUIT commands through
existing logging or attestation mechanisms, this comes with several
drawbacks:</t>

<t><list style="symbols">
  <t>data inflation, particularly when designed for text-based logging</t>
  <t>missing information elements</t>
  <t>missing support for multiple components</t>
</list></t>

<t>The CBOR objects defined in this document allow devices to:</t>

<t><list style="symbols">
  <t>report a trace of how an update was performed</t>
  <t>report expected vs. actual values for critical checks</t>
  <t>describe the installation of complex multi-component architectures</t>
</list></t>

<t>This document provides a definition of a SUIT-specific logging container
that may be used in a variety of scenarios.</t>

</section>
<section anchor="terminology" title="Conventions and Terminology">

<t>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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

<t>Terms used in this specification include:</t>

<t><list style="symbols">
  <t>Boot: initialization of an executable image. Although this
specification refers to boot, any boot-specific operations described
are equally applicable to starting an executable in an OS context.</t>
</list></t>

</section>
<section anchor="the-suit-record" title="The SUIT Record">

<t>If the developer can be assumed to have a copy of the
manifest, then they need little information to reconstruct what the
manifest processor has done. They simply need any data that influences
the control flow of the manifest. The manifest only supports the
following control flow primitives:</t>

<t><list style="symbols">
  <t>Set Component/Dependency Index</t>
  <t>Set/Override Parameters</t>
  <t>Try-Each</t>
  <t>Run Sequence</t>
  <t>Conditions.</t>
</list></t>

<t>Of these, only conditions change the behavior of the processor from the
default, and then only when the condition fails.</t>

<t>Then, to reconstruct the flow of a manifest, all a developer needs is
a list of metadata about failed conditions:</t>

<t><list style="symbols">
  <t>the current manifest</t>
  <t>the current section</t>
  <t>the offset into the current section</t>
  <t>the current component index</t>
  <t>the “reason” for failure</t>
</list></t>

<t>Most conditions compare a parameter to an actual value, so the “reason”
is typically simply the actual value.</t>

<t>Since it is possible that a non-condition command may fail in an
exceptional circumstance, this must be included as well. To accommodate
for a failed command, the list of failed conditions is expanded to be a
list of failed commands instead. In the case of a command failure,
the failure reason is typically a numeric error code.</t>

<t>Reconstructing what a device has done in this way is compact,
however it requires some reconstruction effort. This is an issue that
can be solved by tooling.</t>

<figure><artwork><![CDATA[
suit-record = {
    suit-record-manifest-id        => [* uint ],
    suit-record-manifest-section   => int,
    suit-record-section-offset     => uint,
    (
        suit-record-component-index  => uint //
        suit-record-dependency-index => uint
    ),
    suit-record-failure-reason     => SUIT_Parameters / int,
}
]]></artwork></figure>

<t>suit-record-manifest-id is used to identify which manifest contains the
command that caused the record to be generated. The manifest id is a
list of integers that form a walk of the manifest tree, starting at the
root. An empty list indicates that the command was contained in the
root manifest. If the list is not empty, the command was contained in
one of the root manifest’s dependencies, or nested even further below
that.</t>

<t>For example, suppose that the root manifest has 3 dependencies
and each of those dependencies has 2 dependencies of its own:</t>

<t><list style="symbols">
  <t>Root  <list style="symbols">
      <t>Dependency A      <list style="symbols">
          <t>Dependency A0</t>
          <t>Dependency A1</t>
        </list></t>
      <t>Dependency B      <list style="symbols">
          <t>Dependency B0</t>
          <t>Dependency B1</t>
        </list></t>
      <t>Dependency C      <list style="symbols">
          <t>Dependency C0</t>
          <t>Dependency C1</t>
        </list></t>
    </list></t>
</list></t>

<t>A manifest-id of [1,0] would indicate that the current command was
contained within Dependency B0. Similarly, a manifest-id of [2,1]
would indicate Dependency C1</t>

<t>suit-record-manifest-section indicates which section of the manifest was
active. This is used in addition to an offset so that the developer can
index into severable sections in a predictable way. The value of this
element is the value of the key that identified the section in the
manifest.</t>

<t>suit-record-section-offset is the number of bytes into the current
section at which the current command is located.</t>

<t>suit-record-component-index is the index of the component that was
specified at the time that the report was generated. This field is
necessary due to the availability of set-current-component values of
True and a list of components. Both of these values cause the manifest
processor to loop over commands using a series of component-ids , so the
developer needs to know which was selected when the command executed.</t>

<t>suit-record-dependency-index is similar to suit-record-component-index
but is used to identify the dependency that was active.</t>

<t>suit-record-failure-reason contains the reason for the command failure.
For example, this could be the actual value of a SUIT_Digest or
class identifier. This is encoded in a SUIT_Parameters block as defined
in <xref target="I-D.ietf-suit-manifest"/>. If it is not a condition that has failed,
but a directive, then the value of this element is an integer that
represents an implementation-defined failure code.</t>

</section>
<section anchor="the-suit-report" title="The SUIT Report">

<t>Some metadata is common to all records, such as the root manifest:
the manifest that is the entry-point for the manifest processor. This
metadata is aggregated with a list of suit-records.</t>

<figure><artwork><![CDATA[
suit-report = {
    suit-report-manifest-digest => SUIT_Digest,
    ? suit-report-manifest-uri  => tstr,
    ? suit-report-nonce         => bstr,
    suit-report-records         => [ *suit-record ]
}
]]></artwork></figure>

<t>suit-report-manifest-digest provides a SUIT_Digest (as defined in
<xref target="I-D.ietf-suit-manifest"/>) that is the characteristic digest of the
Root manifest.</t>

<t>suit-report-manifest-uri provides the reference URI that was provided in
the root manifest.</t>

<t>suit-report-nonce provides a container for freshness or replay
protection information. This field MAY be omitted where the suit-report
is authenticated within a container that provides freshness already.
For example, attestation evidence typically contains a proof of
freshness.</t>

<t>suit-report-records is a list of 0 or more SUIT Records. Because SUIT
Records are only generated on failure, in simple cases this can be an
empty list.</t>

</section>
<section anchor="iana" title="IANA Considerations">

<t>IANA is requested to allocate a CBOR tag for the SUIT Report.</t>

</section>
<section anchor="security-considerations" title="Security Considerations">

<t>The SUIT Report should either be carried over a secure transport, or
signed, or both. Ideally, attestation should be used to prove that the
report was generated by legitimate hardware.</t>

</section>
<section anchor="acknowledgements" title="Acknowledgements">

</section>


  </middle>

  <back>

    <references title='Normative References'>




<reference anchor="I-D.ietf-suit-manifest">
   <front>
      <title>A Concise Binary Object Representation (CBOR)-based Serialization Format for the Software Updates for Internet of Things (SUIT) Manifest</title>
      <author fullname="Brendan Moran">
	 <organization>Arm Limited</organization>
      </author>
      <author fullname="Hannes Tschofenig">
	 <organization>Arm Limited</organization>
      </author>
      <author fullname="Henk Birkholz">
	 <organization>Fraunhofer SIT</organization>
      </author>
      <author fullname="Koen Zandberg">
	 <organization>Inria</organization>
      </author>
      <date month="February" day="22" year="2021" />
      <abstract>
	 <t>   This specification describes the format of a manifest.  A manifest is
   a bundle of metadata about code/data obtained by a recipient (chiefly
   the firmware for an IoT device), where to find the that code/data,
   the devices to which it applies, and cryptographic information
   protecting the manifest.  Software updates and Trusted Invocation
   both tend to use sequences of common operations, so the manifest
   encodes those sequences of operations, rather than declaring the
   metadata.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-suit-manifest-12" />
   <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-suit-manifest-12.txt" />
</reference>



<reference  anchor="RFC2119" target='https://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<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="RFC8174" target='https://www.rfc-editor.org/info/rfc8174'>
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
<author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author>
<date year='2017' month='May' />
<abstract><t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='8174'/>
<seriesInfo name='DOI' value='10.17487/RFC8174'/>
</reference>




    </references>




  </back>

<!-- ##markdown-source:
H4sIAF6T7GAAA41Z7W4ctxX9z6dg5R9N3J215ARoIyBtJdlBBFhWKskogsQI
uDOcXdYzwwnJ0XorKM/SZ+mT9dxLztdqFTQ/HO0MeXk/zz2Xk2WZCCZU+lTe
6rxzWt7o1rpgmrW0pfzQFipoeRtU6LxQq5XT9//PysLmjaohtHCqDJnRocx8
Z0LmeE92fCxyLF9btzuVpimtEKZ1pzK4zofXx8ffHL8WymmVzjJhJ7bWfVo7
27V49uHyTnzSOzwqTuVlE7RrdMje0FlC+KCa4hdV2Qbn77QXrTkVUroy14UP
uyo9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