<?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-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="2020" month="October" day="23"/>

    <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,
}
]]></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-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-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='July' day='13' year='2020' />

<abstract><t>This specification describes the format of a manifest.  A manifest is a bundle of metadata about the firmware for an IoT device, where to find the firmware, the devices to which it applies, and cryptographic information protecting the manifest.  Firmware updates and secure boot both tend to use sequences of common operations, so the manifest encodes those sequences of operations, rather than declaring the metadata.  The manifest also serves as a building block for secure boot.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-suit-manifest-09' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-suit-manifest-09.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:
H4sIAEY6k18AA41Z624ctxX+z6dg5R9N3J215ARoIyBtdXEQAbaVSjKKIjEC
7gxnl/XMcEJytN4KyrP0Wfpk/c4h57ZaBfEPeYdDHh6ey3e+w8myTAQTKn0q
b3XeOS1vdGtdMM1a2lJ+aAsVtLwNKnReqNXK6fvfM7OweaNqCC2cKkNWW6ea
zHcmZI4XZcfHIsf8tXW7U2ma0gphWncqg+t8eH18/M3xa6GcVmkzE3Zia92n
tbNdi7EPV3fik95hqDiVV03QrtEhu6TNhPBBNcXPqrINFNhpL1pzKqR0Za4L
H3ZVGpUy2Hzy0zSFbkI/4KGl06Ufnnf17DE4kw+Tc1vXWDu8NU1lmnEb/Tlk
lfEhg5CVrTAtsy//hDcwU63aFiaMc1UXNtZB2Qwv+Z9pMPt8Kd+RBfvBaNpz
p5tCNfNX1q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