<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-netconf-sztp-csr-14" number="9646" ipr="trust200902" updates="8572" obsoletes="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" prepTime="2024-10-10T16:34:37" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-netconf-sztp-csr-14" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9646" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Conveying a CSR in an SZTP Request">Conveying a Certificate Signing Request (CSR) in a Secure Zero-Touch Provisioning (SZTP) Bootstrapping Request</title>
    <seriesInfo name="RFC" value="9646" stream="IETF"/>
    <author initials="K." surname="Watsen" fullname="Kent Watsen">
      <organization showOnFrontPage="true">Watsen Networks</organization>
      <address>
        <email>kent+ietf@watsen.net</email>
      </address>
    </author>
    <author initials="R." surname="Housley" fullname="Russ Housley">
      <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
      <address>
        <email>housley@vigilsec.com</email>
      </address>
    </author>
    <author initials="S." surname="Turner" fullname="Sean Turner">
      <organization showOnFrontPage="true">sn3rd</organization>
      <address>
        <email>sean@sn3rd.com</email>
      </address>
    </author>
    <date month="10" year="2024"/>
    <area>ops</area>
    <workgroup>netconf</workgroup>
    <keyword>zerotouch</keyword>
    <keyword>bootstrap</keyword>
    <keyword>sztp</keyword>
    <keyword>ztp</keyword>
    <keyword>csr</keyword>
    <keyword>pkcs#10</keyword>
    <keyword>p10</keyword>
    <keyword>p10cr</keyword>
    <keyword>cmc</keyword>
    <keyword>cmp</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document extends the input to the "get-bootstrapping-data" RPC defined in
            RFC 8572 to include an optional certificate signing request (CSR),
            enabling a bootstrapping device to additionally obtain an identity
            certificate (e.g., a Local Device Identifier (LDevID) from IEEE 802.1AR) as part of the 
            "onboarding information" response provided in the RPC-reply.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9646" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2024 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-overview">Overview</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-language">Requirements Language</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.4">
                <t indent="0" pn="section-toc.1-1.1.2.4.1"><xref derivedContent="1.4" format="counter" sectionFormat="of" target="section-1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions">Conventions</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-ietf-sztp-csr-module">The "ietf-sztp-csr" Module</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-data-model-overview">Data Model Overview</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example-usage">Example Usage</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-yang-module">YANG Module</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-ietf-ztp-types-module">The "ietf-ztp-types" Module</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-data-model-overview-2">Data Model Overview</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-yang-module-2">YANG Module</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sztp-client-considerations">SZTP-Client Considerations</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.1.2">
                  <li pn="section-toc.1-1.4.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.1.1"><xref derivedContent="4.1.1" format="counter" sectionFormat="of" target="section-4.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ensuring-the-integrity-of-a">Ensuring the Integrity of Asymmetric Private Keys</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.2.1"><xref derivedContent="4.1.2" format="counter" sectionFormat="of" target="section-4.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-reuse-of-a-manufacturer-gen">Reuse of a Manufacturer-Generated Private Key</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.3.1"><xref derivedContent="4.1.3" format="counter" sectionFormat="of" target="section-4.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-replay-attack-protection">Replay Attack Protection</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.4">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.4.1"><xref derivedContent="4.1.4" format="counter" sectionFormat="of" target="section-4.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-connecting-to-an-untrusted-">Connecting to an Untrusted Bootstrap Server</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.5">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.5.1"><xref derivedContent="4.1.5" format="counter" sectionFormat="of" target="section-4.1.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-selecting-the-best-origin-a">Selecting the Best Origin Authentication Mechanism</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.1.2.6">
                    <t indent="0" pn="section-toc.1-1.4.2.1.2.6.1"><xref derivedContent="4.1.6" format="counter" sectionFormat="of" target="section-4.1.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-clearing-the-private-key-an">Clearing the Private Key and Associated Certificate</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sztp-server-considerations">SZTP-Server Considerations</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2.2.2">
                  <li pn="section-toc.1-1.4.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.1.1"><xref derivedContent="4.2.1" format="counter" sectionFormat="of" target="section-4.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-verifying-proof-of-possessi">Verifying Proof-of-Possession</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.2.1"><xref derivedContent="4.2.2" format="counter" sectionFormat="of" target="section-4.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-verifying-proof-of-origin">Verifying Proof-of-Origin</xref></t>
                  </li>
                  <li pn="section-toc.1-1.4.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.4.2.2.2.3.1"><xref derivedContent="4.2.3" format="counter" sectionFormat="of" target="section-4.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-supporting-sztp-clients-tha">Supporting SZTP-Clients That Don't Trust the SZTP-Server</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations-for">Security Considerations for the "ietf-sztp-csr" YANG Module</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations-for-">Security Considerations for the "ietf-ztp-types" YANG Module</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-ietf-xml-registry">The IETF XML Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-yang-module-names-regis">The YANG Module Names Registry</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-contributors">Contributors</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-overview">Overview</name>
        <t indent="0" pn="section-1.1-1">This document extends the input to the "get-bootstrapping-data" RPC defined in
            <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> to include an optional certificate
            signing request (CSR) <xref target="RFC2986" format="default" sectionFormat="of" derivedContent="RFC2986"/>, enabling a
            bootstrapping device to additionally obtain an identity
            certificate (e.g., an LDevID from <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>)
            as part of the "onboarding information" response provided in
            the RPC-reply.</t>
        <t indent="0" pn="section-1.1-2">The ability to provision an identity certificate that is purpose-built 
            for a production environment during the bootstrapping process
            removes reliance on the manufacturer Certification Authority (CA), and it also enables the
            bootstrapped device to join the production environment with an
            appropriate identity and other attributes in its identity
            certificate (e.g., an LDevID).</t>
        <t indent="0" pn="section-1.1-3">Two YANG <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/> modules are defined.  The
             "ietf-ztp-types" module defines three YANG groupings for the
             various messages defined in this document.  The "ietf-sztp-csr"
             module augments two groupings into the "get-bootstrapping-data"
             RPC and defines a YANG data structure <xref target="RFC8791" format="default" sectionFormat="of" derivedContent="RFC8791"/>
               around the third grouping.</t>
      </section>
      <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-1.2">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.2-1">This document uses the following terms from <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>:</t>
        <ul spacing="compact" bare="false" empty="false" indent="3" pn="section-1.2-2">
          <li pn="section-1.2-2.1">Bootstrap Server</li>
          <li pn="section-1.2-2.2">Bootstrapping Data</li>
          <li pn="section-1.2-2.3">Conveyed Information</li>
          <li pn="section-1.2-2.4">Device</li>
          <li pn="section-1.2-2.5">Manufacturer</li>
          <li pn="section-1.2-2.6">Onboarding Information</li>
          <li pn="section-1.2-2.7">Signed Data</li>
        </ul>
        <t indent="0" pn="section-1.2-3">This document defines the following new terms:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-1.2-4">
          <dt pn="section-1.2-4.1">SZTP-client:</dt>
          <dd pn="section-1.2-4.2">The term "SZTP-client" refers to a "device" that is using a
              "bootstrap server" as a source of "bootstrapping data".</dd>
          <dt pn="section-1.2-4.3">SZTP-server:</dt>
          <dd pn="section-1.2-4.4">The term "SZTP-server" is an alternative term for "bootstrap
              server" that is symmetric with the "SZTP-client" term.</dd>
        </dl>
      </section>
      <section anchor="requirements-language" numbered="true" toc="include" removeInRFC="false" pn="section-1.3">
        <name slugifiedName="name-requirements-language">Requirements Language</name>
        <t indent="0" pn="section-1.3-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.4">
        <name slugifiedName="name-conventions">Conventions</name>
        <t indent="0" pn="section-1.4-1">Various examples in this document use "BASE64VALUE=" as a placeholder
            value for binary data that has been base64 encoded (per <xref target="RFC7950" sectionFormat="of" section="9.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7950#section-9.8" derivedContent="RFC7950"/>).   This placeholder value is used because real
            base64-encoded structures are often many lines long and
        hence distracting to the example being presented.</t>
        <t indent="0" pn="section-1.4-2"> Various examples in this document contain long lines that may be folded,
  as described in <xref target="RFC8792" format="default" sectionFormat="of" derivedContent="RFC8792"/>.</t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-the-ietf-sztp-csr-module">The "ietf-sztp-csr" Module</name>
      <t indent="0" pn="section-2-1">The "ietf-sztp-csr" module is a YANG 1.1 <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/>
          module that augments the "ietf-sztp-bootstrap-server" module defined in
          <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> and defines a YANG "structure" that is to be
          conveyed in the "error-info" node defined in <xref section="7.1" target="RFC8040" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8040#section-7.1" derivedContent="RFC8040"/>.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-data-model-overview">Data Model Overview</name>
        <t indent="0" pn="section-2.1-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the 
            "ietf-sztp-csr" module.</t>
        <sourcecode type="yangtree" name="ietf-sztp-csr-tree.txt" markers="false" pn="section-2.1-2">
module: ietf-sztp-csr

  augment /sztp-svr:get-bootstrapping-data/sztp-svr:input:
    +---w (msg-type)?
       +--:(csr-support)
       |  +---w csr-support
       |     +---w key-generation!
       |     |  +---w supported-algorithms
       |     |     +---w algorithm-identifier*   binary
       |     +---w csr-generation
       |        +---w supported-formats
       |           +---w format-identifier*   identityref
       +--:(csr)
          +---w (csr-type)
             +--:(p10-csr)
             |  +---w p10-csr?   ct:csr
             +--:(cmc-csr)
             |  +---w cmc-csr?   binary
             +--:(cmp-csr)
                +---w cmp-csr?   binary

  structure csr-request:
    +-- key-generation!
    |  +-- selected-algorithm
    |     +-- algorithm-identifier    binary
    +-- csr-generation
    |  +-- selected-format
    |     +-- format-identifier    identityref
    +-- cert-req-info?    ct:csr-info
</sourcecode>
        <t indent="0" pn="section-2.1-3">The augmentation defines two kinds of 
            parameters that an SZTP-client can send to an SZTP-server.  The
            YANG structure defines one collection of parameters that an
        SZTP-server can send to an SZTP-client.</t>
        <t indent="0" pn="section-2.1-4">In the order of their intended use:</t>
        <ol type="1" indent="adaptive" spacing="normal" start="1" pn="section-2.1-5">
          <li pn="section-2.1-5.1" derivedCounter="1.">The SZTP-client sends a "csr-support" node, encoded in a first 
              "get-bootstrapping-data" request to the SZTP-server, to indicate
              that it supports the ability to generate CSRs.
              This input parameter conveys if the SZTP-client is able to generate a
              new asymmetric key and, if so, which key algorithms it supports, 
              as well as what kinds of CSR structures the SZTP-client
          is able to generate.</li>
          <li pn="section-2.1-5.2" derivedCounter="2.">The SZTP-server responds with an error, containing the "csr-request"
              structure, to request
              the SZTP-client to generate a CSR.  This structure is used to
              select the key algorithm the SZTP-client should use to generate
              a new asymmetric key (if supported), the kind of CSR structure
              the SZTP-client should generate, and optionally the content for
              the CSR itself.</li>
          <li pn="section-2.1-5.3" derivedCounter="3.">The SZTP-client sends one of the "*-csr" nodes, encoded in a second 
              "get-bootstrapping-data" request to the SZTP-server.  This node 
              encodes the server-requested CSR.</li>
          <li pn="section-2.1-5.4" derivedCounter="4.">The SZTP-server responds with onboarding information to communicate
              the signed certificate to the SZTP-client.  How to do this is
              discussed in <xref target="example-usage" format="default" sectionFormat="of" derivedContent="Section 2.2"/>.</li>
        </ol>
        <t indent="0" pn="section-2.1-6">To further illustrate how the augmentation and structure defined
            by the "ietf-sztp-csr" module are used, below are two additional
            tree diagrams showing these nodes placed where they are used.</t>
        <t indent="0" pn="section-2.1-7">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates SZTP's 
            "get-bootstrapping-data" RPC with the augmentation in place.</t>
        <sourcecode type="yangtree" name="ietf-sztp-csr-api-n-csr-tree.txt" markers="false" pn="section-2.1-8">
=============== NOTE: '\' line wrapping per RFC 8792 ================

module: ietf-sztp-bootstrap-server

  rpcs:
    +---x get-bootstrapping-data
       +---w input
       |  +---w signed-data-preferred?          empty
       |  +---w hw-model?                       string
       |  +---w os-name?                        string
       |  +---w os-version?                     string
       |  +---w nonce?                          binary
       |  +---w (sztp-csr:msg-type)?
       |     +--:(sztp-csr:csr-support)
       |     |  +---w sztp-csr:csr-support
       |     |     +---w sztp-csr:key-generation!
       |     |     |  +---w sztp-csr:supported-algorithms
       |     |     |     +---w sztp-csr:algorithm-identifier*   bina\
ry
       |     |     +---w sztp-csr:csr-generation
       |     |        +---w sztp-csr:supported-formats
       |     |           +---w sztp-csr:format-identifier*   identit\
yref
       |     +--:(sztp-csr:csr)
       |        +---w (sztp-csr:csr-type)
       |           +--:(sztp-csr:p10-csr)
       |           |  +---w sztp-csr:p10-csr?   ct:csr
       |           +--:(sztp-csr:cmc-csr)
       |           |  +---w sztp-csr:cmc-csr?   binary
       |           +--:(sztp-csr:cmp-csr)
       |              +---w sztp-csr:cmp-csr?   binary
       +--ro output
          +--ro reporting-level?    enumeration {onboarding-server}?
          +--ro conveyed-information    cms
          +--ro owner-certificate?      cms
          +--ro ownership-voucher?      cms
</sourcecode>
        <t indent="0" pn="section-2.1-9">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates RESTCONF's
            "errors" RPC-reply message with the "csr-request" structure in place.</t>
        <sourcecode type="yangtree" name="ietf-sztp-csr-errors-n-struct-tree.txt" markers="false" pn="section-2.1-10">
module: ietf-restconf
  +--ro errors
     +--ro error* []
        +--ro error-type       enumeration
        +--ro error-tag        string
        +--ro error-app-tag?   string
        +--ro error-path?      instance-identifier
        +--ro error-message?   string
        +--ro error-info
           +--ro sztp-csr:csr-request
              +--ro sztp-csr:key-generation!
              |  +--ro sztp-csr:selected-algorithm
              |     +--ro sztp-csr:algorithm-identifier    binary
              +--ro sztp-csr:csr-generation
              |  +--ro sztp-csr:selected-format
              |     +--ro sztp-csr:format-identifier    identityref
              +--ro sztp-csr:cert-req-info?    ct:csr-info
</sourcecode>
      </section>
      <section anchor="example-usage" numbered="true" toc="include" removeInRFC="false" pn="section-2.2">
        <name slugifiedName="name-example-usage">Example Usage</name>
        <aside pn="section-2.2-1">
          <t indent="0" pn="section-2.2-1.1">NOTE: The examples below are encoded using JSON, but they could
              equally well be encoded using XML, as is supported by SZTP.</t>
        </aside>
        <t indent="0" pn="section-2.2-2">An SZTP-client implementing this specification would signal
            to the bootstrap server its willingness to generate a CSR by
            including the "csr-support" node in its "get-bootstrapping-data"
            RPC. In the example below, the SZTP-client additionally
            indicates that it is able to generate keys and provides
            a list of key algorithms it supports, as well as provide
            a list of certificate formats it supports.</t>
        <t keepWithNext="true" indent="0" pn="section-2.2-3">REQUEST</t>
        <sourcecode type="json" name="ex-api-gbd-without-csr-rpc.json" markers="false" pn="section-2.2-4">
=============== NOTE: '\' line wrapping per RFC 8792 ================

POST /restconf/operations/ietf-sztp-bootstrap-server:get-bootstrappi\
ng-data HTTP/1.1
HOST: example.com
Content-Type: application/yang-data+json

{
  "ietf-sztp-bootstrap-server:input" : {
    "hw-model": "model-x",
    "os-name": "vendor-os",
    "os-version": "17.3R2.1",
    "nonce": "extralongbase64encodedvalue=",
    "ietf-sztp-csr:csr-support": {
      "key-generation": {
        "supported-algorithms": {
          "algorithm-identifier": [
            "BASE64VALUE1",
            "BASE64VALUE2",
            "BASE64VALUE3"
          ]
        }
      },
      "csr-generation": {
        "supported-formats": {
          "format-identifier": [
            "ietf-ztp-types:p10-csr",
            "ietf-ztp-types:cmc-csr",
            "ietf-ztp-types:cmp-csr"
          ]
        }
      }
    }
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-5">Assuming the SZTP-server wishes to prompt the SZTP-client to
            provide a CSR, then it would respond with an HTTP 400 Bad Request
            error code.  In the example below, the SZTP-server specifies
            that it wishes the SZTP-client to generate a key using a specific
            algorithm and generate a PKCS#10-based CSR containing specific
            content.</t>
        <t keepWithNext="true" indent="0" pn="section-2.2-6">RESPONSE</t>
        <sourcecode type="json" name="ex-api-gbd-without-csr-rpc-reply.json" markers="false" pn="section-2.2-7">
HTTP/1.1 400 Bad Request
Date: Sat, 31 Oct 2021 17:02:40 GMT
Server: example-server
Content-Type: application/yang-data+json

{
  "ietf-restconf:errors" : {
    "error" : [
      {
        "error-type": "application",
        "error-tag": "missing-attribute",
        "error-message": "Missing input parameter",
        "error-info": {
          "ietf-sztp-csr:csr-request": {
            "key-generation": {
              "selected-algorithm": {
                "algorithm-identifier": "BASE64VALUE="
              }
            },
            "csr-generation": {
              "selected-format": {
                "format-identifier": "ietf-ztp-types:p10-csr"
              }
            },
            "cert-req-info": "BASE64VALUE="
          }
        }
      }
    ]
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-8">Upon being prompted to provide a CSR, the SZTP-client would
        POST another "get-bootstrapping-data" request but this time
	including one of the "csr" nodes to convey its CSR to the
            SZTP-server:</t>
        <t keepWithNext="true" indent="0" pn="section-2.2-9">REQUEST</t>
        <sourcecode type="json" name="ex-api-gbd-with-csr-rpc.json" markers="false" pn="section-2.2-10">
=============== NOTE: '\' line wrapping per RFC 8792 ================

POST /restconf/operations/ietf-sztp-bootstrap-server:get-bootstrappi\
ng-data HTTP/1.1
HOST: example.com
Content-Type: application/yang-data+json

{
  "ietf-sztp-bootstrap-server:input" : {
    "hw-model": "model-x",
    "os-name": "vendor-os",
    "os-version": "17.3R2.1",
    "nonce": "extralongbase64encodedvalue=",
    "ietf-sztp-csr:p10-csr": "BASE64VALUE="
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-11">At this point, it is expected that the SZTP-server, perhaps
            in conjunction with other systems, such as a backend CA or registration authority (RA),
            will validate the CSR's origin and proof-of-possession and,
            assuming the CSR is approved, issue a signed certificate for
            the bootstrapping device.</t>
        <t indent="0" pn="section-2.2-12">The SZTP-server responds with conveyed information
        (the "conveyed-information" node shown below) that encodes
	"onboarding-information" (inside the base64 value) containing
            a signed identity certificate for the CSR provided by the
            SZTP-client:</t>
        <t keepWithNext="true" indent="0" pn="section-2.2-13">RESPONSE</t>
        <sourcecode type="json" name="ex-api-gbd-with-csr-rpc-reply.json" markers="false" pn="section-2.2-14">
HTTP/1.1 200 OK
Date: Sat, 31 Oct 2021 17:02:40 GMT
Server: example-server
Content-Type: application/yang-data+json

{
  "ietf-sztp-bootstrap-server:output" : {
    "reporting-level": "verbose",
    "conveyed-information": "BASE64VALUE="
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-15">How the signed certificate is conveyed inside the onboarding information
            is outside the scope of this document.  Some implementations may choose
            to convey it inside a script (e.g., SZTP's "pre-configuration-script"),
            while other implementations may choose to convey it inside the SZTP
            "configuration" node.  SZTP onboarding information is described in 
            <xref section="2.2" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-2.2" derivedContent="RFC8572"/>.</t>
        <t indent="0" pn="section-2.2-16">Below are two examples of conveying the signed certificate inside
            the "configuration" node.  Both examples assume that the SZTP-client
            understands the "ietf-keystore" module defined in
            <xref target="RFC9642" format="default" sectionFormat="of" derivedContent="RFC9642"/>.</t>
        <t indent="0" pn="section-2.2-17">This first example illustrates the case where the signed certificate is
            for the same asymmetric key used by the SZTP-client's manufacturer-generated
            identity certificate (e.g., an Initial Device Identifier (IDevID) from <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>).
            As such, the configuration needs to associate the newly signed certificate
            with the existing asymmetric key:</t>
        <sourcecode type="json" name="ex-keystore-ldevid-same-key.json" markers="false" pn="section-2.2-18">
=============== NOTE: '\' line wrapping per RFC 8792 ================

{
  "ietf-keystore:keystore": {
    "asymmetric-keys": {
      "asymmetric-key": [
        {
          "name": "Manufacturer-Generated Hidden Key",
          "public-key-format": "ietf-crypto-types:subject-public-key\
-info-format",
          "public-key": "BASE64VALUE=",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Manufacturer-Generated IDevID Cert",
                "cert-data": "BASE64VALUE="
              },
              {
                "name": "Newly-Generated LDevID Cert",
                "cert-data": "BASE64VALUE="
              }
            ]
          }
        }
      ]
    }
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-19">This second example illustrates the case where the signed certificate is
            for a newly generated asymmetric key.  As such, the configuration needs
            to associate the newly signed certificate with the newly generated
            asymmetric key:</t>
        <sourcecode type="json" name="ex-keystore-ldevid-new-key.json" markers="false" pn="section-2.2-20">
=============== NOTE: '\' line wrapping per RFC 8792 ================

{
  "ietf-keystore:keystore": {
    "asymmetric-keys": {
      "asymmetric-key": [
        {
          "name": "Manufacturer-Generated Hidden Key",
          "public-key-format": "ietf-crypto-types:subject-public-key\
-info-format",
          "public-key": "BASE64VALUE=",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Manufacturer-Generated IDevID Cert",
                "cert-data": "BASE64VALUE="
              }
            ]
          }
        },
        {
          "name": "Newly-Generated Hidden Key",
          "public-key-format": "ietf-crypto-types:subject-public-key\
-info-format",
          "public-key": "BASE64VALUE=",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Newly-Generated LDevID Cert",
                "cert-data": "BASE64VALUE="
              }
            ]
          }
        }
      ]
    }
  }
}
</sourcecode>
        <t indent="0" pn="section-2.2-21">In addition to configuring the signed certificate, it is often
            necessary to also configure the issuer's signing certificate
            so that the device (i.e., STZP-client) can authenticate
            certificates presented by peer devices signed by the same
            issuer as its own.  While outside the scope of this document,
            one way to do this would be to use the "ietf-truststore" module
            defined in <xref target="RFC9641" format="default" sectionFormat="of" derivedContent="RFC9641"/>.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.3">
        <name slugifiedName="name-yang-module">YANG Module</name>
        <t indent="0" pn="section-2.3-1">This module augments an RPC defined in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>. The
            module uses data types and groupings defined in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>,
            <xref target="RFC8791" format="default" sectionFormat="of" derivedContent="RFC8791"/>, and <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>.
        The module also has an informative reference to <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>.</t>
        <sourcecode type="yang" name="ietf-sztp-csr@2024-10-10.yang" markers="true" pn="section-2.3-2">
module ietf-sztp-csr {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-sztp-csr";
  prefix sztp-csr;

  import ietf-sztp-bootstrap-server {
    prefix sztp-svr;
    reference
      "RFC 8572: Secure Zero Touch Provisioning (SZTP)";
  }

  import ietf-yang-structure-ext {
    prefix sx;
    reference
      "RFC 8791: YANG Data Structure Extensions";
  }

  import ietf-ztp-types {
    prefix zt;
    reference
      "RFC 9646: Conveying a Certificate Signing Request (CSR)
                 in a Secure Zero-Touch Provisioning (SZTP)
                 Bootstrapping Request";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   https://datatracker.ietf.org/wg/netconf
     WG List:  NETCONF WG list &lt;mailto:netconf@ietf.org&gt;
     Authors:  Kent Watsen &lt;mailto:kent+ietf@watsen.net&gt;
               Russ Housley &lt;mailto:housley@vigilsec.com&gt;
               Sean Turner &lt;mailto:sean@sn3rd.com&gt;";

  description
    "This module augments the 'get-bootstrapping-data' RPC,
     defined in the 'ietf-sztp-bootstrap-server' module from
     SZTP (RFC 8572), enabling the SZTP-client to obtain a
     signed identity certificate (e.g., an LDevID from IEEE
     802.1AR) as part of the SZTP onboarding information
     response.

     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
     (RFC 2119) (RFC 8174) when, and only when, they appear
     in all capitals, as shown here.

     Copyright (c) 2024 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 9646
     (https://www.rfc-editor.org/info/rfc9646); see the
     RFC itself for full legal notices.";

  revision 2024-10-10 {
    description
      "Initial version.";
    reference
      "RFC 9646: Conveying a Certificate Signing Request (CSR)
                 in a Secure Zero-Touch Provisioning (SZTP)
                 Bootstrapping Request";
  }

  // Protocol-accessible nodes

  augment "/sztp-svr:get-bootstrapping-data/sztp-svr:input" {
    description
      "This augmentation adds the 'csr-support' and 'csr' nodes to
       the SZTP (RFC 8572) 'get-bootstrapping-data' request message,
       enabling the SZTP-client to obtain an identity certificate
       (e.g., an LDevID from IEEE 802.1AR) as part of the onboarding
       information response provided by the SZTP-server.

       The 'csr-support' node enables the SZTP-client to indicate
       that it supports generating certificate signing requests
       (CSRs) and to provide details around the CSRs it is able
       to generate.

       The 'csr' node enables the SZTP-client to relay a CSR to
       the SZTP-server.";
    reference
      "IEEE 802.1AR: IEEE Standard for Local and Metropolitan
                     Area Networks - Secure Device Identity
       RFC 8572: Secure Zero Touch Provisioning (SZTP)";
    choice msg-type {
      description
        "Messages are mutually exclusive.";
      case csr-support {
        description
          "Indicates how the SZTP-client supports generating CSRs.

           If present and a SZTP-server wishes to request the
           SZTP-client generate a CSR, the SZTP-server MUST
           respond with an HTTP 400 Bad Request error code with an
           'ietf-restconf:errors' message having the 'error-tag'
           value 'missing-attribute' and the 'error-info' node
           containing the 'csr-request' structure described
           in this module.";
        uses zt:csr-support-grouping;
      }
      case csr {
        description
          "Provides the CSR generated by the SZTP-client.

           When present, the SZTP-server SHOULD respond with
           an SZTP onboarding information message containing
           a signed certificate for the conveyed CSR.  The
           SZTP-server MAY alternatively respond with another
           HTTP error containing another 'csr-request'; in
           which case, the SZTP-client MUST delete any key
           generated for the previously generated CSR.";
        uses zt:csr-grouping;
      }
    }
  }

  sx:structure csr-request {
    description
      "A YANG data structure, per RFC 8791, that specifies
       details for the CSR that the ZTP-client is to generate.";
    reference
      "RFC 8791: YANG Data Structure Extensions";
    uses zt:csr-request-grouping;
  }

}
</sourcecode>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-the-ietf-ztp-types-module">The "ietf-ztp-types" Module</name>
      <t indent="0" pn="section-3-1">This section defines a YANG 1.1 <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/> module
          that defines three YANG groupings, one for each message sent
          between a ZTP-client and ZTP-server.  This module is defined
          independently of the "ietf-sztp-csr" module so that its 
          groupings may be used by bootstrapping protocols other than
          SZTP <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-data-model-overview-2">Data Model Overview</name>
        <t indent="0" pn="section-3.1-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates
            the three groupings defined in the "ietf-ztp-types" module.</t>
        <sourcecode type="yangtree" name="ietf-ztp-types-tree.txt" markers="false" pn="section-3.1-2">
module: ietf-ztp-types

  grouping csr-support-grouping
    +-- csr-support
       +-- key-generation!
       |  +-- supported-algorithms
       |     +-- algorithm-identifier*   binary
       +-- csr-generation
          +-- supported-formats
             +-- format-identifier*   identityref
  grouping csr-request-grouping
    +-- key-generation!
    |  +-- selected-algorithm
    |     +-- algorithm-identifier    binary
    +-- csr-generation
    |  +-- selected-format
    |     +-- format-identifier    identityref
    +-- cert-req-info?    ct:csr-info
  grouping csr-grouping
    +-- (csr-type)
       +--:(p10-csr)
       |  +-- p10-csr?   ct:csr
       +--:(cmc-csr)
       |  +-- cmc-csr?   binary
       +--:(cmp-csr)
          +-- cmp-csr?   binary
</sourcecode>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-yang-module-2">YANG Module</name>
        <t indent="0" pn="section-3.2-1">This module uses data types and groupings defined in <xref target="RFC8791" format="default" sectionFormat="of" derivedContent="RFC8791"/>
            and <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>.  The module has
            additional normative references to <xref target="RFC2986" format="default" sectionFormat="of" derivedContent="RFC2986"/>,
            <xref target="RFC4210" format="default" sectionFormat="of" derivedContent="RFC4210"/>, <xref target="RFC5272" format="default" sectionFormat="of" derivedContent="RFC5272"/>, and
            <xref target="ITU.X690.2021" format="default" sectionFormat="of" derivedContent="ITU.X690.2021"/> and an informative reference
            to <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>.</t>
        <sourcecode name="ietf-ztp-types@2024-10-10.yang" type="yang" markers="true" pn="section-3.2-2">
module ietf-ztp-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-ztp-types";
  prefix zt;

  import ietf-crypto-types {
    prefix ct;
    reference
      "RFC 9640: YANG Data Types and Groupings for Cryptography";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   https://datatracker.ietf.org/wg/netconf
     WG List:  NETCONF WG list &lt;mailto:netconf@ietf.org&gt;
     Authors:  Kent Watsen &lt;mailto:kent+ietf@watsen.net&gt;
               Russ Housley &lt;mailto:housley@vigilsec.com&gt;
               Sean Turner &lt;mailto:sean@sn3rd.com&gt;";

  description
    "This module defines three groupings that enable
     bootstrapping devices to 1) indicate if and how they
     support generating CSRs, 2) obtain a request to
     generate a CSR, and 3) communicate the requested CSR.

     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
     (RFC 2119) (RFC 8174) when, and only when, they appear
     in all capitals, as shown here.

     Copyright (c) 2024 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 9646
     (https://www.rfc-editor.org/info/rfc9646); see the
     RFC itself for full legal notices.";

  revision 2024-10-10 {
    description
      "Initial version.";
    reference
      "RFC 9646: Conveying a Certificate Signing Request (CSR)
                 in a Secure Zero-Touch Provisioning (SZTP)
                 Bootstrapping Request";
  }

  identity certificate-request-format {
    description
      "A base identity for the request formats supported
       by the ZTP-client.

       Additional derived identities MAY be defined by
       future efforts.";
  }

  identity p10-csr {
    base certificate-request-format;
    description
      "Indicates that the ZTP-client supports generating
       requests using the 'CertificationRequest' structure
       defined in RFC 2986.";
    reference
      "RFC 2986: PKCS #10: Certification Request Syntax
                 Specification Version 1.7";
  }

  identity cmp-csr {
    base certificate-request-format;
    description
      "Indicates that the ZTP-client supports generating
       requests using a profiled version of the PKIMessage
       that MUST contain a PKIHeader followed by a PKIBody
       containing only the ir, cr, kur, or p10cr structures
       defined in RFC 4210.";
    reference
      "RFC 4210: Internet X.509 Public Key Infrastructure
                 Certificate Management Protocol (CMP)";
  }

  identity cmc-csr {
    base certificate-request-format;
    description
      "Indicates that the ZTP-client supports generating
       requests using a profiled version of the 'Full
       PKI Request' structure defined in RFC 5272.";
    reference
      "RFC 5272: Certificate Management over CMS (CMC)";
  }

  // Protocol-accessible nodes

  grouping csr-support-grouping {
    description
      "A grouping enabling use by other efforts.";
    container csr-support {
      description
        "Enables a ZTP-client to indicate that it supports
         generating certificate signing requests (CSRs) and
         provides details about the CSRs it is able to
         generate.";
      container key-generation {
        presence "Indicates that the ZTP-client is capable of
                  generating a new asymmetric key pair.

                  If this node is not present, the ZTP-server MAY
                  request a CSR using the asymmetric key associated
                  with the device's existing identity certificate
                  (e.g., an IDevID from IEEE 802.1AR).";
        description
          "Specifies details for the ZTP-client's ability to
           generate a new asymmetric key pair.";
        container supported-algorithms {
          description
            "A list of public key algorithms supported by the
             ZTP-client for generating a new asymmetric key.";
          leaf-list algorithm-identifier {
            type binary;
            min-elements 1;
            description
              "An AlgorithmIdentifier, as defined in RFC 2986,
               encoded using ASN.1 Distinguished Encoding Rules
               (DER), as specified in ITU-T X.690.";
            reference
              "RFC 2986: PKCS #10: Certification Request Syntax
                         Specification Version 1.7
               ITU-T X.690:
                 Information technology - ASN.1 encoding rules:
                 Specification of Basic Encoding Rules (BER),
                 Canonical Encoding Rules (CER) and Distinguished
                 Encoding Rules (DER)";
          }
        }
      }
      container csr-generation {
        description
          "Specifies details for the ZTP-client's ability to
           generate certificate signing requests.";
        container supported-formats {
          description
            "A list of certificate request formats supported
             by the ZTP-client for generating a new key.";
          leaf-list format-identifier {
            type identityref {
              base zt:certificate-request-format;
            }
            min-elements 1;
            description
              "A certificate request format supported by the
               ZTP-client.";
          }
        }
      }
    }
  }

  grouping csr-request-grouping {
    description
      "A grouping enabling use by other efforts.";
    container key-generation {
      presence "Provided by a ZTP-server to indicate that it wishes
                the ZTP-client to generate a new asymmetric key.

                This statement is present so the mandatory
                descendant nodes do not imply that this node must
                be configured.";
      description
        "The key generation parameters selected by the ZTP-server.

         This leaf MUST only appear if the ZTP-client's
         'csr-support' included the 'key-generation' node.";
      container selected-algorithm {
        description
          "The key algorithm selected by the ZTP-server.  The
           algorithm MUST be one of the algorithms specified by
           the 'supported-algorithms' node in the ZTP-client's
           message containing the 'csr-support' structure.";
        leaf algorithm-identifier {
          type binary;
          mandatory true;
          description
            "An AlgorithmIdentifier, as defined in RFC 2986,
             encoded using ASN.1 Distinguished Encoding Rules
             (DER), as specified in ITU-T X.690.";
          reference
            "RFC 2986: PKCS #10: Certification Request Syntax
                       Specification Version 1.7
             ITU-T X.690:
               Information technology - ASN.1 encoding rules:
               Specification of Basic Encoding Rules (BER),
               Canonical Encoding Rules (CER) and Distinguished
               Encoding Rules (DER)";
        }
      }
    }
    container csr-generation {
      description
        "Specifies details for the CSR that the ZTP-client
         is to generate.";
      container selected-format {
        description
          "The CSR format selected by the ZTP-server.  The
           format MUST be one of the formats specified by
           the 'supported-formats' node in the ZTP-client's
           request message.";
        leaf format-identifier {
          type identityref {
            base zt:certificate-request-format;
          }
          mandatory true;
          description
            "A certificate request format to be used by the
             ZTP-client.";
        }
      }
    }
    leaf cert-req-info {
      type ct:csr-info;
      description
        "A CertificationRequestInfo structure, as defined in
         RFC 2986, and modeled via a 'typedef' statement by
         RFC 9640.

         Enables the ZTP-server to provide a fully populated
         CertificationRequestInfo structure that the ZTP-client
         only needs to sign in order to generate the complete
         'CertificationRequest' structure to send to the ZTP-server
         in its next 'get-bootstrapping-data' request message.

         When provided, the ZTP-client MUST use this structure
         to generate its CSR; failure to do so will result in a
         400 Bad Request response containing another 'csr-request'
         structure.

         When not provided, the ZTP-client SHOULD generate a CSR
         using the same structure defined in its existing identity
         certificate (e.g., an IDevID from IEEE 802.1AR).

         If the 'AlgorithmIdentifier' field contained inside the
         certificate 'SubjectPublicKeyInfo' field does not match
         the algorithm identified by the 'selected-algorithm' node,
         then the client MUST reject the certificate and raise an
         error.";

      reference
        "RFC 2986:
           PKCS #10: Certification Request Syntax Specification
           Version 1.7
         RFC 9640:
           YANG Data Types and Groupings for Cryptography";
    }
  }

  grouping csr-grouping {
    description
      "Enables a ZTP-client to convey a certificate signing
       request, using the encoding format selected by a
       ZTP-server's 'csr-request' response to the ZTP-client's
       previously sent request containing the 'csr-support'
       node.";
    choice csr-type {
      mandatory true;
      description
        "A choice amongst certificate signing request formats.

         Additional formats MAY be augmented into this 'choice'
         statement by future efforts.";
      case p10-csr {
        leaf p10-csr {
          type ct:p10-csr;
          description
            "A CertificationRequest structure, per RFC 2986.
             Encoding details are defined in the 'ct:csr'
             typedef defined in RFC 9640.

             A raw P10 does not support origin authentication in
             the CSR structure.  External origin authentication
             may be provided via the ZTP-client's authentication
             to the ZTP-server at the transport layer (e.g., TLS).";
          reference
            "RFC 2986: PKCS #10: Certification Request Syntax
                       Specification Version 1.7
             RFC 9640: YANG Data Types and Groupings for
                       Cryptography";
        }
      }
      case cmc-csr {
        leaf cmc-csr {
          type binary;
          description
            "A profiled version of the 'Full PKI Request'
             message defined in RFC 5272, encoded using ASN.1
             Distinguished Encoding Rules (DER), as specified
             in ITU-T X.690.

             For asymmetric-key-based origin authentication of a
             CSR based on the initial device identity certificate's
             private key for the associated identity certificate's
             public key, the PKIData contains one reqSequence
             element and no cmsSequence or otherMsgSequence
             elements.  The reqSequence is the TaggedRequest,
             and it is the tcr CHOICE branch.  The tcr is the
             TaggedCertificationRequest, and it is the bodyPartID
             and the certificateRequest elements.  The
             certificateRequest is signed with the initial device
             identity certificate's private key.  The initial device
             identity certificate, and optionally its certificate
             chain is included in the SignedData certificates that
             encapsulate the PKIData.

             For asymmetric-key-based origin authentication based on
             the initial device identity certificate's private key
             that signs the encapsulated CSR signed by the local
             device identity certificate's private key, the
             PKIData contains one cmsSequence element and no
             reqSequence or otherMsgSequence
             elements.  The cmsSequence is the TaggedContentInfo,
             and it includes a bodyPartID element and a contentInfo.
             The contentInfo is a SignedData encapsulating a PKIData
             with one reqSequence element and no cmsSequence or
             otherMsgSequence elements.  The reqSequence is the
             TaggedRequest, and it is the tcr CHOICE.  The tcr is the
             TaggedCertificationRequest, and it is the bodyPartID and
             the certificateRequest elements.  PKIData contains one
             cmsSequence element and no controlSequence, reqSequence,
             or otherMsgSequence elements.  The certificateRequest
             is signed with the local device identity certificate's
             private key.  The initial device identity certificate
             and optionally its certificate chain is included in
             the SignedData certificates that encapsulate the
             PKIData.

             For shared-secret-based origin authentication of a
             CSR signed by the local device identity certificate's
             private key, the PKIData contains one cmsSequence
             element and no reqSequence or otherMsgSequence
             elements.  The cmsSequence is the TaggedContentInfo,
             and it includes a bodyPartID element and a contentInfo.
             The contentInfo is an AuthenticatedData encapsulating
             a PKIData with one reqSequence element and no
             cmsSequences or otherMsgSequence elements.  The
             reqSequence is the TaggedRequest, and it is the tcr
             CHOICE.  The tcr is the TaggedCertificationRequest,
             and it is the bodyPartID and the certificateRequest
             elements.  The certificateRequest is signed with the
             local device identity certificate's private key.  The
             initial device identity certificate and optionally its
             certificate chain is included in the SignedData
             certificates that encapsulate the PKIData.";
          reference
            "RFC 5272: Certificate Management over CMS (CMC)
             ITU-T X.690:
               Information technology - ASN.1 encoding rules:
               Specification of Basic Encoding Rules (BER),
               Canonical Encoding Rules (CER) and Distinguished
               Encoding Rules (DER)";
        }
      }
      case cmp-csr {
        leaf cmp-csr {
          type binary;
          description
            "A PKIMessage structure, as defined in RFC 4210,
             encoded using ASN.1 Distinguished Encoding Rules
             (DER), as specified in ITU-T X.690.

             For asymmetric-key-based origin authentication of a
             CSR based on the initial device identity certificate's
             private key for the associated initial device identity
             certificate's public key, PKIMessages contain one
             PKIMessage with the header and body elements, do not
             contain a protection element, and SHOULD contain the
             extraCerts element.  The header element contains the
             pvno, sender, and recipient elements.  The pvno contains
             cmp2000, and the sender contains the subject of the
             initial device identity certificate. The body element
             contains an ir, cr, kur, or p10cr CHOICE of type
             CertificationRequest.  It is signed with the initial
             device identity certificate's private key.  The
             extraCerts element contains the initial device identity
             certificate, optionally followed by its certificate
             chain excluding the trust anchor.

             For asymmetric-key-based origin authentication based
             on the initial device identity certificate's private
             key that signs the encapsulated CSR signed by the local
             device identity certificate's private key, PKIMessages
             contain one PKIMessage with the header, body, and
             protection elements and SHOULD contain the extraCerts
             element.  The header element contains the pvno, sender,
             recipient, protectionAlg, and optionally senderKID
             elements.  The pvno contains cmp2000, the sender
             contains the subject of the initial device identity
             certificate, the protectionAlg contains the
             AlgorithmIdentifier of the used signature algorithm,
             and the senderKID contains the subject key identifier
             of the initial device identity certificate. The body
             element contains an ir, cr, kur, or p10cr CHOICE of
             type CertificationRequest.  It is signed with the local
             device identity certificate's private key.  The
             protection element contains the digital signature
             generated with the initial device identity
             certificate's private key.  The extraCerts element
             contains the initial device identity certificate,
             optionally followed by its certificate chain excluding
             the trust anchor.

             For shared-secret-based origin authentication of a
             CSR signed by the local device identity certificate's
             private key, PKIMessages contain one PKIMessage with
             the header, body, and protection element and no
             extraCerts element.  The header element contains the
             pvno, sender, recipient, protectionAlg, and senderKID
             elements.  The pvno contains cmp2000, the protectionAlg
             contains the AlgorithmIdentifier of the used Message
             Authentication Code (MAC) algorithm, and the senderKID
             contains a reference the recipient can use to identify
             the shared secret.  The body element contains an ir, cr,
             kur, or p10cr CHOICE of type CertificationRequest.  It
             is signed with the local device identity certificate's
             private key.  The protection element contains the MAC
             value generated with the shared secret.";
          reference
            "RFC 4210:
               Internet X.509 Public Key Infrastructure
               Certificate Management Protocol (CMP)
             ITU-T X.690:
               Information technology - ASN.1 encoding rules:
               Specification of Basic Encoding Rules (BER),
               Canonical Encoding Rules (CER) and Distinguished
               Encoding Rules (DER)";
        }
      }
    }
  }

}
</sourcecode>
      </section>
    </section>
    <section anchor="sec-con" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-4-1">This document builds on top of the solution presented in
          <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>, and therefore all the security
      considerations discussed in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> apply here as well.</t>
      <t indent="0" pn="section-4-2">For the various CSR formats, when using PKCS#10, the security considerations
          in <xref target="RFC2986" format="default" sectionFormat="of" derivedContent="RFC2986"/> apply; when using CMP, the
          security considerations in <xref target="RFC4210" format="default" sectionFormat="of" derivedContent="RFC4210"/> apply;
          and when using CMC, the security considerations in
      <xref target="RFC5272" format="default" sectionFormat="of" derivedContent="RFC5272"/> apply.</t>
      <t indent="0" pn="section-4-3">For the various authentication mechanisms, when using
          TLS-level authentication, the security considerations in
          <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/> apply, and when using HTTP-level
          authentication, the security considerations in
      <xref target="RFC9110" format="default" sectionFormat="of" derivedContent="RFC9110"/> apply.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-sztp-client-considerations">SZTP-Client Considerations</name>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1.1">
          <name slugifiedName="name-ensuring-the-integrity-of-a">Ensuring the Integrity of Asymmetric Private Keys</name>
          <t indent="0" pn="section-4.1.1-1">The private key the SZTP-client uses for the dynamically generated
              identity certificate <bcp14>MUST</bcp14> be protected from inadvertent disclosure
              in order to prevent identity fraud.</t>
          <t indent="0" pn="section-4.1.1-2">The security of this private key is essential in order to
              ensure the associated identity certificate can be used to
              authenticate the device it is issued to.</t>
          <t indent="0" pn="section-4.1.1-3">It is <bcp14>RECOMMENDED</bcp14> that devices are manufactured with a
              hardware security module (HSM), such as a trusted platform
              module (TPM), to generate and contain the private key within
              the security perimeter of the HSM.  In such cases, the private
              key and its associated certificates <bcp14>MAY</bcp14> have long validity
              periods.</t>
          <t indent="0" pn="section-4.1.1-4">In cases where the SZTP-client does not possess an HSM or
              is unable to use an HSM to protect the private key, it is
              <bcp14>RECOMMENDED</bcp14> to periodically reset the private key (and
              associated identity certificates) in order to minimize the
              lifetime of unprotected private keys.  For instance, a Network Management System (NMS)
              controller/orchestrator application could periodically prompt
              the SZTP-client to generate a new private key and provide a
              certificate signing request (CSR) or, alternatively, push
              both the key and an identity certificate to the SZTP-client
              using, e.g., a PKCS#12 message <xref target="RFC7292" format="default" sectionFormat="of" derivedContent="RFC7292"/>.  In another
              example, the SZTP-client could be configured to periodically
              reset the configuration to its factory default, thus causing
              removal of the private key and associated identity certificates
              and re-execution of the SZTP protocol.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1.2">
          <name slugifiedName="name-reuse-of-a-manufacturer-gen">Reuse of a Manufacturer-Generated Private Key</name>
          <t indent="0" pn="section-4.1.2-1">It is <bcp14>RECOMMENDED</bcp14> that a new private key is generated for each
              CSR described in this document.</t>
          <t indent="0" pn="section-4.1.2-2">Implementations must randomly generate nonces and private keys.
              The use of inadequate pseudorandom number generators (PRNGs) to
              generate cryptographic keys can result in little or no security.
              An attacker may find it much easier to reproduce the PRNG environment
              that produced the keys, searching the resulting small set of
              possibilities, rather than brute force searching the whole
              key space. As an example of predictable random numbers, see
              CVE-2008-0166 <xref target="CVE-2008-0166" format="default" sectionFormat="of" derivedContent="CVE-2008-0166"/>, and some consequences
              of low-entropy random numbers are discussed in "Mining Your Ps and Qs"
              <xref target="MiningPsQs" format="default" sectionFormat="of" derivedContent="MiningPsQs"/>.  The generation of quality random
              numbers is difficult. <xref target="ISO.20543-2019" format="default" sectionFormat="of" derivedContent="ISO.20543-2019"/>,
              <xref target="NIST.SP.800-90Ar1" format="default" sectionFormat="of" derivedContent="NIST.SP.800-90Ar1"/>, BSI AIS 31 <xref target="AIS31" format="default" sectionFormat="of" derivedContent="AIS31"/>,
              BCP 106 <xref target="RFC4086" format="default" sectionFormat="of" derivedContent="RFC4086"/>, and others offer valuable
              guidance in this area.</t>
          <t indent="0" pn="section-4.1.2-3">This private key <bcp14>SHOULD</bcp14> be protected as well as the built-in
              private key associated with the SZTP-client's initial device identity
              certificate (e.g., the IDevID from <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>).</t>
          <t indent="0" pn="section-4.1.2-4">In cases where it is not possible to generate a new private key
              that is protected as well as the built-in private key, it is
              <bcp14>RECOMMENDED</bcp14> to reuse the built-in private key rather than
              generate a new private key that is not as well protected.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1.3">
          <name slugifiedName="name-replay-attack-protection">Replay Attack Protection</name>
          <t indent="0" pn="section-4.1.3-1">This RFC enables an SZTP-client to announce an ability to
              generate a new key to use for its CSR.</t>
          <t indent="0" pn="section-4.1.3-2">When the SZTP-server responds with a request for the SZTP-client
              to generate a new key, it is essential that the SZTP-client actually
              generates a new key.</t>
          <t indent="0" pn="section-4.1.3-3">Generating a new key each time enables the random bytes used
              to create the key to also serve the dual-purpose of acting like
              a "nonce" used in other mechanisms to detect replay attacks.</t>
          <t indent="0" pn="section-4.1.3-4">When a fresh public/private key pair is generated for the
              request, confirmation to the SZTP-client that the response
              has not been replayed is enabled by the SZTP-client's fresh 
              public key appearing in the signed certificate provided by
              the SZTP-server.</t>
          <t indent="0" pn="section-4.1.3-5">When a public/private key pair associated with the 
              manufacturer-generated identity certificate (e.g., IDevID) is
              used for the request, there may not be confirmation to the
              SZTP-client that the response has not been replayed; however,
              the worst case result is a lost certificate that is associated
              to the private key known only to the SZTP-client.  Protection
              of the private-key information is vital to public-key
              cryptography.  Disclosure of the private-key material to
              another entity can lead to masquerades.</t>
        </section>
        <section anchor="untrusted" numbered="true" toc="include" removeInRFC="false" pn="section-4.1.4">
          <name slugifiedName="name-connecting-to-an-untrusted-">Connecting to an Untrusted Bootstrap Server</name>
          <t indent="0" pn="section-4.1.4-1"><xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> allows SZTP-clients to connect
              to untrusted SZTP-servers by blindly authenticating the
              SZTP-server's TLS end-entity certificate.</t>
          <t indent="0" pn="section-4.1.4-2">As is discussed in <xref section="9.5" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-9.5" derivedContent="RFC8572"/>,
              in such cases, the SZTP-client <bcp14>MUST</bcp14> assert that the
              bootstrapping data returned is signed if the SZTP-client
              is to trust it.</t>
          <t indent="0" pn="section-4.1.4-3">However, the HTTP error message used in this document
              cannot be signed data, as described in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>.</t>
          <t indent="0" pn="section-4.1.4-4">Therefore, the solution presented in this document
              cannot be used when the SZTP-client connects to an
              untrusted SZTP-server.</t>
          <t indent="0" pn="section-4.1.4-5">Consistent with the recommendation presented in 
            <xref section="9.6" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-9.6" derivedContent="RFC8572"/>, SZTP-clients
              <bcp14>SHOULD NOT</bcp14> pass the "csr-support" input parameter
              to an untrusted SZTP-server.  SZTP-clients <bcp14>SHOULD</bcp14>
              instead pass the "signed-data-preferred" input
              parameter, as discussed in <xref section="B" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#appendix-B" derivedContent="RFC8572"/>.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1.5">
          <name slugifiedName="name-selecting-the-best-origin-a">Selecting the Best Origin Authentication Mechanism</name>
          <t indent="0" pn="section-4.1.5-1">The origin of the CSR must be verified before a
              certificate is issued.</t>
          <t indent="0" pn="section-4.1.5-2">When generating a new key, it is important that the
              SZTP-client be able to provide additional proof that it
              was the entity that generated the key.</t>
          <t indent="0" pn="section-4.1.5-3">The CMP and CMC certificate request formats defined in this
              document support origin authentication.  A raw 
              PKCS#10 CSR does not support origin authentication.</t>
          <t indent="0" pn="section-4.1.5-4">The CMP and CMC request formats support origin
              authentication using both PKI and a shared secret.</t>
          <t indent="0" pn="section-4.1.5-5">Typically, only one possible origin authentication
              mechanism can possibly be used, but in the case that the
              SZTP-client authenticates itself using both TLS-level
              (e.g., IDevID) and HTTP-level credentials (e.g., Basic), 
              as is allowed by <xref section="5.3" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-5.3" derivedContent="RFC8572"/>,
              then the SZTP-client may need to choose between the two
              options.</t>
          <t indent="0" pn="section-4.1.5-6">In the case that the SZTP-client must choose between an
              asymmetric key option versus a shared secret for origin
              authentication, it is <bcp14>RECOMMENDED</bcp14> that the SZTP-client
              choose using the asymmetric key.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1.6">
          <name slugifiedName="name-clearing-the-private-key-an">Clearing the Private Key and Associated Certificate</name>
          <t indent="0" pn="section-4.1.6-1">Unlike a manufacturer-generated identity certificate (e.g., IDevID),
              the deployment-generated identity certificate (e.g., LDevID) and
              the associated private key (assuming a new private key was generated
              for the purpose) are considered user data and <bcp14>SHOULD</bcp14> be cleared
              whenever the SZTP-client is reset to its factory default state,
              such as by the "factory-reset" RPC defined in
              <xref target="RFC8808" format="default" sectionFormat="of" derivedContent="RFC8808"/>.</t>
        </section>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-sztp-server-considerations">SZTP-Server Considerations</name>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2.1">
          <name slugifiedName="name-verifying-proof-of-possessi">Verifying Proof-of-Possession</name>
          <t indent="0" pn="section-4.2.1-1">Regardless, if using a new asymmetric key or the bootstrapping
              device's manufacturer-generated key (e.g., the IDevID key), the
              public key is placed in the CSR and the CSR is signed by that
              private key.  Proof-of-possession of the private key is verified
              by ensuring the signature over the CSR using the public key
              placed in the CSR.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2.2">
          <name slugifiedName="name-verifying-proof-of-origin">Verifying Proof-of-Origin</name>
          <t indent="0" pn="section-4.2.2-1">When the bootstrapping device's manufacturer-generated 
              private key (e.g., the IDevID key) is reused for the CSR, 
              proof-of-origin is verified by validating the IDevID-issuer cert
              and ensuring that the CSR uses the same key pair.</t>
          <t indent="0" pn="section-4.2.2-2">When the bootstrapping device's manufacturer-generated private key
              (e.g., an IDevID key from IEEE 802.1AR) is reused for the CSR, proof-of-origin is
              verified by validating the IDevID certification path and ensuring that
              the CSR uses the same key pair.</t>
          <t indent="0" pn="section-4.2.2-3">When a fresh asymmetric key is used with the CMP or CMC formats, the
              authentication is part of the protocols, which could employ either
              the manufacturer-generated private key or a shared secret.  In addition,
              CMP and CMC support processing by an RA before the request is passed
              to the CA, which allows for more robust handling of errors.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2.3">
          <name slugifiedName="name-supporting-sztp-clients-tha">Supporting SZTP-Clients That Don't Trust the SZTP-Server</name>
          <t indent="0" pn="section-4.2.3-1"><xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> allows SZTP-clients to connect
              to untrusted SZTP-servers by blindly authenticating the
              SZTP-server's TLS end-entity certificate.</t>
          <t indent="0" pn="section-4.2.3-2">As is recommended in <xref target="untrusted" format="default" sectionFormat="of" derivedContent="Section 4.1.4"/> of this
              document, in such cases, SZTP-clients <bcp14>SHOULD</bcp14> pass the
              "signed-data-preferred" input parameter.</t>
          <t indent="0" pn="section-4.2.3-3">The reciprocal of this statement is that SZTP-servers,
              wanting to support SZTP-clients that don't trust them,
              <bcp14>SHOULD</bcp14> support the "signed-data-preferred" input parameter,
              as discussed in <xref section="B" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#appendix-B" derivedContent="RFC8572"/>.</t>
        </section>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-security-considerations-for">Security Considerations for the "ietf-sztp-csr" YANG Module</name>
        <t indent="0" pn="section-4.3-1">The recommended format for documenting the security
            considerations for YANG modules is described in <xref section="3.7" target="RFC8407" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8407#section-3.7" derivedContent="RFC8407"/>.  However, this module
            only augments two input parameters
            into the "get-bootstrapping-data" RPC in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> and therefore only needs to point
            to the relevant Security Considerations sections in
            that RFC.</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-4.3-2">
          <li pn="section-4.3-2.1">Security considerations for the "get-bootstrapping-data" RPC
              are described in <xref section="9.16" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-9.16" derivedContent="RFC8572"/>.</li>
          <li pn="section-4.3-2.2">Security considerations for the "input" parameters passed inside the
              "get-bootstrapping-data" RPC are described in <xref section="9.6" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-9.6" derivedContent="RFC8572"/>.</li>
        </ul>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.4">
        <name slugifiedName="name-security-considerations-for-">Security Considerations for the "ietf-ztp-types" YANG Module</name>
        <t indent="0" pn="section-4.4-1">The recommended format for documenting the security
        considerations for YANG modules is described in <xref section="3.7" target="RFC8407" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8407#section-3.7" derivedContent="RFC8407"/>.  However, this module
            does not define any protocol-accessible nodes (it only
            defines "identity" and "grouping" statements), and therefore
            there are no security considerations to report.</t>
      </section>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-the-ietf-xml-registry">The IETF XML Registry</name>
        <t indent="0" pn="section-5.1-1">IANA has registered two URIs in the "ns" registry of
            the "IETF XML Registry" <xref target="RFC3688" format="default" sectionFormat="of" derivedContent="RFC3688"/> maintained at 
            <eref target="https://www.iana.org/assignments/xml-registry/" brackets="angle"/>.  
        </t>
        <dl newline="false" spacing="compact" indent="3" pn="section-5.1-2">
          <dt pn="section-5.1-2.1">URI:</dt>
          <dd pn="section-5.1-2.2">urn:ietf:params:xml:ns:yang:ietf-sztp-csr</dd>
          <dt pn="section-5.1-2.3">Registrant Contact:</dt>
          <dd pn="section-5.1-2.4">The NETCONF WG of the IETF.</dd>
          <dt pn="section-5.1-2.5">XML:</dt>
          <dd pn="section-5.1-2.6">N/A; the requested URI is an XML namespace.</dd>
        </dl>
        <dl newline="false" spacing="compact" indent="3" pn="section-5.1-3">
          <dt pn="section-5.1-3.1">URI:</dt>
          <dd pn="section-5.1-3.2">urn:ietf:params:xml:ns:yang:ietf-ztp-types</dd>
          <dt pn="section-5.1-3.3">Registrant Contact:</dt>
          <dd pn="section-5.1-3.4">The NETCONF WG of the IETF.</dd>
          <dt pn="section-5.1-3.5">XML:</dt>
          <dd pn="section-5.1-3.6">N/A; the requested URI is an XML namespace.</dd>
        </dl>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-the-yang-module-names-regis">The YANG Module Names Registry</name>
        <t indent="0" pn="section-5.2-1">IANA has registered two YANG modules in the "YANG Module
            Names" registry <xref target="RFC6020" format="default" sectionFormat="of" derivedContent="RFC6020"/> maintained at
            <eref target="https://www.iana.org/assignments/yang-parameters/" brackets="angle"/>.</t>
        <dl newline="false" spacing="compact" indent="3" pn="section-5.2-2">
          <dt pn="section-5.2-2.1">Name:</dt>
          <dd pn="section-5.2-2.2">ietf-sztp-csr</dd>
          <dt pn="section-5.2-2.3">Namespace:</dt>
          <dd pn="section-5.2-2.4">urn:ietf:params:xml:ns:yang:ietf-sztp-csr</dd>
          <dt pn="section-5.2-2.5">Prefix:</dt>
          <dd pn="section-5.2-2.6">sztp-csr</dd>
          <dt pn="section-5.2-2.7">Reference:</dt>
          <dd pn="section-5.2-2.8">RFC 9646</dd>
        </dl>
        <dl newline="false" spacing="compact" indent="3" pn="section-5.2-3">
          <dt pn="section-5.2-3.1">Name:</dt>
          <dd pn="section-5.2-3.2">ietf-ztp-types</dd>
          <dt pn="section-5.2-3.3">Namespace:</dt>
          <dd pn="section-5.2-3.4">urn:ietf:params:xml:ns:yang:ietf-ztp-types</dd>
          <dt pn="section-5.2-3.5">Prefix:</dt>
          <dd pn="section-5.2-3.6">ztp-types</dd>
          <dt pn="section-5.2-3.7">Reference:</dt>
          <dd pn="section-5.2-3.8">RFC 9646</dd>
        </dl>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-6">
      <name slugifiedName="name-references">References</name>
      <references pn="section-6.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="ITU.X690.2021" target="https://www.itu.int/rec/T-REC-X.690/" quoteTitle="true" derivedAnchor="ITU.X690.2021">
          <front>
            <title>Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <seriesInfo name="ITU-T Recommendation" value="X.690"/>
            <seriesInfo name="ISO/IEC" value="8825-1"/>
            <author>
              <organization showOnFrontPage="true">ITU</organization>
            </author>
            <date month="February" year="2021"/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="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 indent="0">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="RFC2986" target="https://www.rfc-editor.org/info/rfc2986" quoteTitle="true" derivedAnchor="RFC2986">
          <front>
            <title>PKCS #10: Certification Request Syntax Specification Version 1.7</title>
            <author fullname="M. Nystrom" initials="M." surname="Nystrom"/>
            <author fullname="B. Kaliski" initials="B." surname="Kaliski"/>
            <date month="November" year="2000"/>
            <abstract>
              <t indent="0">This memo represents a republication of PKCS #10 v1.7 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, and change control is retained within the PKCS process. The body of this document, except for the security considerations section, is taken directly from the PKCS #9 v2.0 or the PKCS #10 v1.7 document. This memo provides information for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="2986"/>
          <seriesInfo name="DOI" value="10.17487/RFC2986"/>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" quoteTitle="true" derivedAnchor="RFC3688">
          <front>
            <title>The IETF XML Registry</title>
            <author fullname="M. Mealling" initials="M." surname="Mealling"/>
            <date month="January" year="2004"/>
            <abstract>
              <t indent="0">This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="81"/>
          <seriesInfo name="RFC" value="3688"/>
          <seriesInfo name="DOI" value="10.17487/RFC3688"/>
        </reference>
        <reference anchor="RFC4210" target="https://www.rfc-editor.org/info/rfc4210" quoteTitle="true" derivedAnchor="RFC4210">
          <front>
            <title>Internet X.509 Public Key Infrastructure Certificate Management Protocol (CMP)</title>
            <author fullname="C. Adams" initials="C." surname="Adams"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <author fullname="T. Kause" initials="T." surname="Kause"/>
            <author fullname="T. Mononen" initials="T." surname="Mononen"/>
            <date month="September" year="2005"/>
            <abstract>
              <t indent="0">This document describes the Internet X.509 Public Key Infrastructure (PKI) Certificate Management Protocol (CMP). Protocol messages are defined for X.509v3 certificate creation and management. CMP provides on-line interactions between PKI components, including an exchange between a Certification Authority (CA) and a client system. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4210"/>
          <seriesInfo name="DOI" value="10.17487/RFC4210"/>
        </reference>
        <reference anchor="RFC5272" target="https://www.rfc-editor.org/info/rfc5272" quoteTitle="true" derivedAnchor="RFC5272">
          <front>
            <title>Certificate Management over CMS (CMC)</title>
            <author fullname="J. Schaad" initials="J." surname="Schaad"/>
            <author fullname="M. Myers" initials="M." surname="Myers"/>
            <date month="June" year="2008"/>
            <abstract>
              <t indent="0">This document defines the base syntax for CMC, a Certificate Management protocol using the Cryptographic Message Syntax (CMS). This protocol addresses two immediate needs within the Internet Public Key Infrastructure (PKI) community:</t>
              <t indent="0">1. The need for an interface to public key certification products and services based on CMS and PKCS #10 (Public Key Cryptography Standard), and</t>
              <t indent="0">2. The need for a PKI enrollment protocol for encryption only keys due to algorithm or hardware design.</t>
              <t indent="0">CMC also requires the use of the transport document and the requirements usage document along with this document for a full definition. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5272"/>
          <seriesInfo name="DOI" value="10.17487/RFC5272"/>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" quoteTitle="true" derivedAnchor="RFC6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="October" year="2010"/>
            <abstract>
              <t indent="0">YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6020"/>
          <seriesInfo name="DOI" value="10.17487/RFC6020"/>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" quoteTitle="true" derivedAnchor="RFC7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="August" year="2016"/>
            <abstract>
              <t indent="0">YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7950"/>
          <seriesInfo name="DOI" value="10.17487/RFC7950"/>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" quoteTitle="true" derivedAnchor="RFC8040">
          <front>
            <title>RESTCONF Protocol</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <date month="January" year="2017"/>
            <abstract>
              <t indent="0">This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8040"/>
          <seriesInfo name="DOI" value="10.17487/RFC8040"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t indent="0">This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t indent="0">This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="RFC8572" target="https://www.rfc-editor.org/info/rfc8572" quoteTitle="true" derivedAnchor="RFC8572">
          <front>
            <title>Secure Zero Touch Provisioning (SZTP)</title>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="I. Farrer" initials="I." surname="Farrer"/>
            <author fullname="M. Abrahamsson" initials="M." surname="Abrahamsson"/>
            <date month="April" year="2019"/>
            <abstract>
              <t indent="0">This document presents a technique to securely provision a networking device when it is booting in a factory-default state. Variations in the solution enable it to be used on both public and private networks. The provisioning steps are able to update the boot image, commit an initial configuration, and execute arbitrary scripts to address auxiliary needs. The updated device is subsequently able to establish secure connections with other systems. For instance, a device may establish NETCONF (RFC 6241) and/or RESTCONF (RFC 8040) connections with deployment-specific network management systems.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8572"/>
          <seriesInfo name="DOI" value="10.17487/RFC8572"/>
        </reference>
        <reference anchor="RFC8791" target="https://www.rfc-editor.org/info/rfc8791" quoteTitle="true" derivedAnchor="RFC8791">
          <front>
            <title>YANG Data Structure Extensions</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Björklund" initials="M." surname="Björklund"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <date month="June" year="2020"/>
            <abstract>
              <t indent="0">This document describes YANG mechanisms for defining abstract data structures with YANG.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8791"/>
          <seriesInfo name="DOI" value="10.17487/RFC8791"/>
        </reference>
        <reference anchor="RFC9110" target="https://www.rfc-editor.org/info/rfc9110" quoteTitle="true" derivedAnchor="RFC9110">
          <front>
            <title>HTTP Semantics</title>
            <author fullname="R. Fielding" initials="R." role="editor" surname="Fielding"/>
            <author fullname="M. Nottingham" initials="M." role="editor" surname="Nottingham"/>
            <author fullname="J. Reschke" initials="J." role="editor" surname="Reschke"/>
            <date month="June" year="2022"/>
            <abstract>
              <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes.</t>
              <t indent="0">This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="97"/>
          <seriesInfo name="RFC" value="9110"/>
          <seriesInfo name="DOI" value="10.17487/RFC9110"/>
        </reference>
        <reference anchor="RFC9640" target="https://www.rfc-editor.org/info/rfc9640" quoteTitle="true" derivedAnchor="RFC9640">
          <front>
            <title>YANG Data Types and Groupings for Cryptography</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9640"/>
          <seriesInfo name="DOI" value="10.17487/RFC9640"/>
        </reference>
      </references>
      <references pn="section-6.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="AIS31" target="https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Zertifizierung/Interpretationen/AIS_31_Functionality_classes_for_random_number_generators_e.pdf" quoteTitle="true" derivedAnchor="AIS31">
          <front>
            <title>A proposal for: Functionality classes for random number generators - Version 2.0</title>
            <author initials="W" surname="Killmann" fullname="Wolfgang Killmann">
              <organization showOnFrontPage="true">T-Systems GEI GmbH</organization>
            </author>
            <author initials="W." surname="Schindler" fullname="Werner Schindler">
              <organization showOnFrontPage="true">Bundesamt für Sicherheit in der Informationstechnik (BSI)</organization>
            </author>
            <date month="September" year="2011"/>
          </front>
        </reference>
        <reference anchor="CVE-2008-0166" target="https://nvd.nist.gov/vuln/detail/CVE-2008-0166" quoteTitle="true" derivedAnchor="CVE-2008-0166">
          <front>
            <title>National Vulnerability Database - CVE-2008-0166 Detail</title>
            <author>
              <organization showOnFrontPage="true">National Institute of Science and Technology (NIST)</organization>
            </author>
            <date month="May" year="2008"/>
          </front>
        </reference>
        <reference anchor="ISO.20543-2019" quoteTitle="true" derivedAnchor="ISO.20543-2019">
          <front>
            <title>Information technology -- Security techniques -- Test and analysis methods for random bit generators within ISO/IEC 19790 and ISO/IEC 15408</title>
            <author>
              <organization showOnFrontPage="true">International Organization for Standardization (ISO)</organization>
            </author>
            <date month="October" year="2019"/>
          </front>
          <seriesInfo name="ISO/IEC" value="20543:2019"/>
        </reference>
        <reference anchor="MiningPsQs" target="https://www.usenix.org/conference/usenixsecurity12/technical-sessions/presentation/heninger" quoteTitle="true" derivedAnchor="MiningPsQs">
          <front>
            <title>Mining Your Ps and Qs: Detection of Widespread Weak Keys in Network Devices</title>
            <author fullname="Nadia Heninger" initials="N." surname="Heninger">
              <organization showOnFrontPage="true">UC San Diego</organization>
            </author>
            <author fullname="Zakir Durumeric" initials="Z." surname="Durumeric">
              <organization showOnFrontPage="true">University of Michigan</organization>
            </author>
            <author fullname="Eric Wustrow" initials="E." surname="Wustrow">
              <organization showOnFrontPage="true">University of Michigan</organization>
            </author>
            <author fullname="J. Alex Halderman" initials="J." surname="Halderman">
              <organization showOnFrontPage="true">University of Michigan</organization>
            </author>
            <date month="August" year="2012"/>
          </front>
          <refcontent>Security'12: Proceedings of the 21st USENIX Conference on Security Symposium</refcontent>
        </reference>
        <reference anchor="NIST.SP.800-90Ar1" target="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf" quoteTitle="true" derivedAnchor="NIST.SP.800-90Ar1">
          <front>
            <title>Recommendation for Random Number Generation Using Deterministic Random Bit Generators</title>
            <author initials="E" surname="Barker" fullname="Elaine B. Barker">
              <organization showOnFrontPage="true">Information Technology Laboratory</organization>
            </author>
            <author initials="J" surname="Kelsey" fullname="John M. Kelsey">
              <organization showOnFrontPage="true">Information Technology Laboratory</organization>
            </author>
            <date year="2015" month="June"/>
          </front>
          <seriesInfo name="DOI" value="10.6028/NIST.SP.800-90Ar1"/>
          <seriesInfo name="NIST SP" value="800-90Ar1"/>
        </reference>
        <reference anchor="RFC4086" target="https://www.rfc-editor.org/info/rfc4086" quoteTitle="true" derivedAnchor="RFC4086">
          <front>
            <title>Randomness Requirements for Security</title>
            <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
            <author fullname="J. Schiller" initials="J." surname="Schiller"/>
            <author fullname="S. Crocker" initials="S." surname="Crocker"/>
            <date month="June" year="2005"/>
            <abstract>
              <t indent="0">Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts. However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities. The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t>
              <t indent="0">Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications. 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="106"/>
          <seriesInfo name="RFC" value="4086"/>
          <seriesInfo name="DOI" value="10.17487/RFC4086"/>
        </reference>
        <reference anchor="RFC7292" target="https://www.rfc-editor.org/info/rfc7292" quoteTitle="true" derivedAnchor="RFC7292">
          <front>
            <title>PKCS #12: Personal Information Exchange Syntax v1.1</title>
            <author fullname="K. Moriarty" initials="K." role="editor" surname="Moriarty"/>
            <author fullname="M. Nystrom" initials="M." surname="Nystrom"/>
            <author fullname="S. Parkinson" initials="S." surname="Parkinson"/>
            <author fullname="A. Rusch" initials="A." surname="Rusch"/>
            <author fullname="M. Scott" initials="M." surname="Scott"/>
            <date month="July" year="2014"/>
            <abstract>
              <t indent="0">PKCS #12 v1.1 describes a transfer syntax for personal identity information, including private keys, certificates, miscellaneous secrets, and extensions. Machines, applications, browsers, Internet kiosks, and so on, that support this standard will allow a user to import, export, and exercise a single set of personal identity information. This standard supports direct transfer of personal information under several privacy and integrity modes.</t>
              <t indent="0">This document represents a republication of PKCS #12 v1.1 from RSA Laboratories' Public Key Cryptography Standard (PKCS) series. By publishing this RFC, change control is transferred to the IETF.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7292"/>
          <seriesInfo name="DOI" value="10.17487/RFC7292"/>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" quoteTitle="true" derivedAnchor="RFC8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="L. Berger" initials="L." role="editor" surname="Berger"/>
            <date month="March" year="2018"/>
            <abstract>
              <t indent="0">This document captures the current syntax used in YANG module tree diagrams. The purpose of this document is to provide a single location for this definition. This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="215"/>
          <seriesInfo name="RFC" value="8340"/>
          <seriesInfo name="DOI" value="10.17487/RFC8340"/>
        </reference>
        <reference anchor="RFC8407" target="https://www.rfc-editor.org/info/rfc8407" quoteTitle="true" derivedAnchor="RFC8407">
          <front>
            <title>Guidelines for Authors and Reviewers of Documents Containing YANG Data Models</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <date month="October" year="2018"/>
            <abstract>
              <t indent="0">This memo provides guidelines for authors and reviewers of specifications containing YANG modules. Recommendations and procedures are defined, which are intended to increase interoperability and usability of Network Configuration Protocol (NETCONF) and RESTCONF protocol implementations that utilize YANG modules. This document obsoletes RFC 6087.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="216"/>
          <seriesInfo name="RFC" value="8407"/>
          <seriesInfo name="DOI" value="10.17487/RFC8407"/>
        </reference>
        <reference anchor="RFC8792" target="https://www.rfc-editor.org/info/rfc8792" quoteTitle="true" derivedAnchor="RFC8792">
          <front>
            <title>Handling Long Lines in Content of Internet-Drafts and RFCs</title>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="E. Auerswald" initials="E." surname="Auerswald"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <author fullname="Q. Wu" initials="Q." surname="Wu"/>
            <date month="June" year="2020"/>
            <abstract>
              <t indent="0">This document defines two strategies for handling long lines in width-bounded text content. One strategy, called the "single backslash" strategy, is based on the historical use of a single backslash ('\') character to indicate where line-folding has occurred, with the continuation occurring with the first character that is not a space character (' ') on the next line. The second strategy, called the "double backslash" strategy, extends the first strategy by adding a second backslash character to identify where the continuation begins and is thereby able to handle cases not supported by the first strategy. Both strategies use a self-describing header enabling automated reconstitution of the original content.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8792"/>
          <seriesInfo name="DOI" value="10.17487/RFC8792"/>
        </reference>
        <reference anchor="RFC8808" target="https://www.rfc-editor.org/info/rfc8808" quoteTitle="true" derivedAnchor="RFC8808">
          <front>
            <title>A YANG Data Model for Factory Default Settings</title>
            <author fullname="Q. Wu" initials="Q." surname="Wu"/>
            <author fullname="B. Lengyel" initials="B." surname="Lengyel"/>
            <author fullname="Y. Niu" initials="Y." surname="Niu"/>
            <date month="August" year="2020"/>
            <abstract>
              <t indent="0">This document defines a YANG data model with the "factory-reset" RPC to allow clients to reset a server back to its factory default condition. It also defines an optional "factory-default" datastore to allow clients to read the factory default configuration for the device.</t>
              <t indent="0">The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8808"/>
          <seriesInfo name="DOI" value="10.17487/RFC8808"/>
        </reference>
        <reference anchor="RFC9641" target="https://www.rfc-editor.org/info/rfc9641" quoteTitle="true" derivedAnchor="RFC9641">
          <front>
            <title>A YANG Data Model for a Truststore</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9641"/>
          <seriesInfo name="DOI" value="10.17487/RFC9641"/>
        </reference>
        <reference anchor="RFC9642" target="https://www.rfc-editor.org/info/rfc9642" quoteTitle="true" derivedAnchor="RFC9642">
          <front>
            <title>A YANG Data Model for a Keystore</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9642"/>
          <seriesInfo name="DOI" value="10.17487/RFC9642"/>
        </reference>
        <reference anchor="Std-802.1AR-2018" target="https://standards.ieee.org/ieee/802.1AR/6995/" quoteTitle="true" derivedAnchor="Std-802.1AR-2018">
          <front>
            <title>IEEE Standard for Local and Metropolitan Area Networks - Secure Device Identity</title>
            <author>
              <organization showOnFrontPage="true">IEEE</organization>
            </author>
            <date month="August" year="2018"/>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1">The authors would like to thank for following for lively
          discussions on list and in the halls (ordered by first name):
          <contact fullname="Benjamin Kaduk"/>,
          <contact fullname="Dan Romascanu"/>,	  
          <contact fullname="David von Oheimb"/>,
          <contact fullname="Éric Vyncke"/>,
          <contact fullname="Guy Fedorkow"/>,
          <contact fullname="Hendrik Brockhaus"/>,	  
          <contact fullname="Joe Clarke"/>,
          <contact fullname="Meral Shirazipour"/>,
          <contact fullname="Murray Kucherawy"/>,
          <contact fullname="Rich Salz"/>,
          <contact fullname="Rob Wilton"/>,
          <contact fullname="Roman Danyliw"/>,
          <contact fullname="Qin Wu"/>,
          <contact fullname="Yaron Sheffer"/>,
          and <contact fullname="Zaheduzzaman Sarkar"/>.
      </t>
    </section>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-contributors">Contributors</name>
      <t indent="0" pn="section-appendix.b-1">Special thanks go to <contact fullname="David von Oheimb"/> and <contact fullname="Hendrik Brockhaus"/>
          for helping with the descriptions for the "cmc-csr" and "cmp-csr"
          nodes.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="K." surname="Watsen" fullname="Kent Watsen">
        <organization showOnFrontPage="true">Watsen Networks</organization>
        <address>
          <email>kent+ietf@watsen.net</email>
        </address>
      </author>
      <author initials="R." surname="Housley" fullname="Russ Housley">
        <organization abbrev="Vigil Security" showOnFrontPage="true">Vigil Security, LLC</organization>
        <address>
          <email>housley@vigilsec.com</email>
        </address>
      </author>
      <author initials="S." surname="Turner" fullname="Sean Turner">
        <organization showOnFrontPage="true">sn3rd</organization>
        <address>
          <email>sean@sn3rd.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
