<?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-moran-suit-report-01" 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="February" day="22"/>

    <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 initials='B' surname='Moran' fullname='Brendan Moran'>
    <organization />
</author>

<author initials='H' surname='Tschofenig' fullname='Hannes Tschofenig'>
    <organization />
</author>

<author initials='H' surname='Birkholz' fullname='Henk Birkholz'>
    <organization />
</author>

<author initials='K' surname='Zandberg' fullname='Koen Zandberg'>
    <organization />
</author>

<date month='December' day='8' year='2020' />

<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-11' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-suit-manifest-11.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:
H4sIAPsgNGAAA41Z7W4ctxX9z6dg5R9N3J215ARoIyBtJdlBBFhWKskogsQI
uDOcXdYzwwnJ0XorKM/SZ+mT9dxLztdqFTQ/HO0MeXk/zz2Xk2WZCCZU+lTe
6rxzWt7o1rpgmrW0pfzQFipoeRtU6LxQq5XT9//PysLmjaohtHCqDFltnWoy
35mQOd6UHZ+IHOvX1u1OpWlKK4Rp3akMrvPh9fHxN8evhXJapcNM2ImtdZ/W
znYtnn24vBOf9A6PilN52QTtGh2yN3SYED6opvhFVbaBAjvtRWtOhZSuzHXh
w65KT6UMNp/8aZpCN6F/4KGl06Uff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