<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-kwatsen-netconf-sztp-csr-00" indexInclude="true" ipr="trust200902" prepTime="2020-06-09T13:43:22" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="8572" xml:lang="en">
  <!-- xml2rfc v2v3 conversion 2.45.3 -->
  <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="Internet-Draft" value="draft-kwatsen-netconf-sztp-csr-00" 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 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="06" year="2020" day="09"/>
    <area>Operations</area>
    <workgroup>NETCONF Working Group</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 pn="section-abstract-1">This draft extends 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., an LDevID, from IEEE 802.1AR) as part of the 
            "onboarding information" response provided in the RPC-reply.</t>
    </abstract>
    <note removeInRFC="false" pn="section-note.1">
      <name slugifiedName="name-editorial-note-to-be-remove">Editorial Note (To be removed by RFC Editor)</name>
      <t pn="section-note.1-1">This draft contains many placeholder values that need to be replaced
          with finalized values at the time of publication.  This note summarizes
          all of the substitutions that are needed.  No other
          RFC Editor instructions are specified elsewhere in this document.</t>
      <t pn="section-note.1-2">Artwork in this document contains shorthand references to drafts in
          progress.  Please apply the following replacements:
      </t>
      <ul spacing="normal" bare="false" empty="false" pn="section-note.1-3">
        <li pn="section-note.1-3.1">
          <tt>XXXX</tt> --&gt; the assigned numerical RFC value for this draft</li>
        <li pn="section-note.1-3.2">
          <tt>AAAA</tt> --&gt; the assigned RFC value for I-D.ietf-netconf-crypto-types</li>
      </ul>
      <t pn="section-note.1-4">Artwork in this document contains a placeholder value for the publication date of this
          draft.  Please apply the following replacement:
      </t>
      <ul spacing="normal" bare="false" empty="false" pn="section-note.1-5">
        <li pn="section-note.1-5.1">
          <tt>2020-06-09</tt> --&gt; the publication date of this draft</li>
      </ul>
      <t pn="section-note.1-6">This document contains references to other drafts in progress, both in
          the Normative References section, as well as in body text throughout.
          Please update the following references to reflect their final RFC assignments:
      </t>
      <ul spacing="normal" bare="false" empty="false" pn="section-note.1-7">
        <li pn="section-note.1-7.1">I-D.ietf-netconf-crypto-types</li>
        <li pn="section-note.1-7.2">I-D.ietf-netconf-keystore</li>
        <li pn="section-note.1-7.3">I-D.ietf-netconf-trust-anchors</li>
        <li pn="section-note.1-7.4">I-D.ietf-netmod-factory-default</li>
      </ul>
      <!--
          <t>The following one Appendix section is to be removed prior to publication:
            <list  style="symbols">
              <t>Appendix A.  Change Log</t>
            </list>
          </t>
          -->
        </note>
    <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 pn="section-boilerplate.1-1">
        This Internet-Draft is submitted in full conformance with the
        provisions of BCP 78 and BCP 79.
        </t>
        <t pn="section-boilerplate.1-2">
        Internet-Drafts are working documents of the Internet Engineering Task
        Force (IETF). Note that other groups may also distribute working
        documents as Internet-Drafts. The list of current Internet-Drafts is
        at <eref target="https://datatracker.ietf.org/drafts/current/" brackets="none"/>.
        </t>
        <t pn="section-boilerplate.1-3">
        Internet-Drafts are draft documents valid for a maximum of six months
        and may be updated, replaced, or obsoleted by other documents at any
        time. It is inappropriate to use Internet-Drafts as reference
        material or to cite them other than as "work in progress."
        </t>
        <t pn="section-boilerplate.1-4">
        This Internet-Draft will expire on 11 December 2020.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t 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 Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified 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 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 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 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 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>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t 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 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 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 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 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-security-considerations">Security Considerations</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 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-sztp-client-considerations">SZTP-Client Considerations</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.1.2">
                  <li pn="section-toc.1-1.3.2.1.2.1">
                    <t pn="section-toc.1-1.3.2.1.2.1.1"><xref derivedContent="3.1.1" format="counter" sectionFormat="of" target="section-3.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.3.2.1.2.2">
                    <t pn="section-toc.1-1.3.2.1.2.2.1"><xref derivedContent="3.1.2" format="counter" sectionFormat="of" target="section-3.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.3.2.1.2.3">
                    <t pn="section-toc.1-1.3.2.1.2.3.1"><xref derivedContent="3.1.3" format="counter" sectionFormat="of" target="section-3.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.3.2.1.2.4">
                    <t pn="section-toc.1-1.3.2.1.2.4.1"><xref derivedContent="3.1.4" format="counter" sectionFormat="of" target="section-3.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.3.2.1.2.5">
                    <t pn="section-toc.1-1.3.2.1.2.5.1"><xref derivedContent="3.1.5" format="counter" sectionFormat="of" target="section-3.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.3.2.1.2.6">
                    <t pn="section-toc.1-1.3.2.1.2.6.1"><xref derivedContent="3.1.6" format="counter" sectionFormat="of" target="section-3.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.3.2.2">
                <t 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-sztp-server-considerations">SZTP-Server Considerations</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.2.2">
                  <li pn="section-toc.1-1.3.2.2.2.1">
                    <t pn="section-toc.1-1.3.2.2.2.1.1"><xref derivedContent="3.2.1" format="counter" sectionFormat="of" target="section-3.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conveying-proof-of-possessi">Conveying Proof of Possession to a CA</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.2.2.2">
                    <t pn="section-toc.1-1.3.2.2.2.2.1"><xref derivedContent="3.2.2" format="counter" sectionFormat="of" target="section-3.2.2"/>.  <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>
                  <li pn="section-toc.1-1.3.2.2.2.3">
                    <t pn="section-toc.1-1.3.2.2.2.3.1"><xref derivedContent="3.2.3" format="counter" sectionFormat="of" target="section-3.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-yang-module-considerations">YANG Module Considerations</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t 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-iana-considerations">IANA 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 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-the-ietf-xml-registry">The IETF XML Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t 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-the-yang-module-names-regis">The YANG Module Names Registry</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t 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-references">References</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 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-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t 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-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t pn="section-toc.1-1.6.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><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 pn="section-1.1-1">This draft extends 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 <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>
      </section>
      <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-1.2">
        <name slugifiedName="name-terminology">Terminology</name>
        <t 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" 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 pn="section-1.2-3">This document defines the following new terms:</t>
        <!--<dl hanging="false"> FIXME: xml2rfc fails -->
          <dl 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>
          <!--
            <list style="hanging" hangIndent="4">
              <t hangText="SZTP-client:">The term "SZTP-client" refers
                to a "device" that is using a "bootstrap server" as a
                source of "bootstrapping data".</t>
              <t hangText="SZTP-server:">The term "SZTP-server" refers
                to a "bootstrap server".</t>
              </list>
            -->
          </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 pn="section-1.3-1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
          NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
          "MAY", and "OPTIONAL" in this document are to be interpreted as
          described in BCP 14 <xref target="RFC2119" 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>
    <!-- end Introduction -->

      <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 pn="section-2-1">This section defines 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".</t>
      <t pn="section-2-2">The augmentation adds two nodes ("csr-support" and "csr") to
          the "input" parameter of the "get-bootstrapping-data" RPC
          defined in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>.</t>
      <t pn="section-2-3">The YANG structure, "request-info", defines data returned in the
          "error-info" node defined in <xref section="8" target="RFC8572" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8572#section-8" derivedContent="RFC8572"/>.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-data-model-overview">Data Model Overview</name>
        <t pn="section-2.1-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the 
            "ietf-sztp-csr" module. The diagram shows the definition of an
            augmentation adding descendent nodes "csr-support" and "csr"
            and the definition of a structure called "request-info".</t>
        <t pn="section-2.1-2">In the order of their intended use:</t>
        <ul bare="false" empty="false" spacing="normal" pn="section-2.1-3">
          <li pn="section-2.1-3.1">The "csr-support" node is used by the SZTP-client to signal
              to the SZTP-server that it supports the ability the generate CSRs,
              per this specification.  The "csr-support" parameter carries
              details regarding the SZTP-client's ability to generate CSRs.</li>
          <li pn="section-2.1-3.2">The "request-info" structure is used by the SZTP-server to signal back to
              the SZTP-client its desire to sign a CSR.  The "request-info" structure
              additionally communicates details about the CSR the SZTP-client is to
              generate.</li>
          <li pn="section-2.1-3.3">The "csr" node is used by the SZTP-client to communicate
              its CSR to the SZTP-server. Not shown is how the SZTP-server
              communicates the signed certificate to the SZTP-client; how to
              do this is discussed later in this document.</li>
        </ul>
        <artwork name="ietf-sztp-csr-tree.txt" type="" align="left" alt="" pn="section-2.1-4"><![CDATA[
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========

module: ietf-sztp-csr

  augment /ietf-sztp-bootstrap-server:get-bootstrapping-data/ietf-sz\
tp-bootstrap-server:input:
    +---- csr-support!
    |  +---- key-generation!
    |  |  +---- supported-algorithms
    |  |     +---- algorithm-identifier*   binary
    |  +---- csr-generation
    |     +---- supported-formats
    |        +---- format-identifier*   identityref
    +---- csr!
       +---- (request-type)
          +--:(p10)
          |  +---- p10?   ietf-crypto-types:csr
          +--:(cmc)
          |  +---- cmc?   binary
          +--:(cmp)
             +---- cmp?   binary

  structure: request-info
     +-- key-generation!
     |  +-- selected-algorithm
     |     +-- algorithm-identifier    binary
     +-- csr-generation
     |  +-- selected-format
     |     +-- format-identifier    identityref
     +-- cert-req-info?    binary
]]></artwork>
        <t pn="section-2.1-5">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 pn="section-2.1-6">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>
        <artwork name="ietf-sztp-csr-api-n-csr-tree.txt" type="" align="left" alt="" pn="section-2.1-7"><![CDATA[
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:csr-support!
       |  |  +---w sztp-csr:key-generation!
       |  |  |  +---w sztp-csr:supported-algorithms
       |  |  |     +---w sztp-csr:algorithm-identifier*   binary
       |  |  +---w sztp-csr:csr-generation
       |  |     +---w sztp-csr:supported-formats
       |  |        +---w sztp-csr:format-identifier*   identityref
       |  +---w sztp-csr:csr!
       |     +---w (sztp-csr:request-type)
       |        +--:(sztp-csr:p10)
       |        |  +---w sztp-csr:p10?   ct:csr
       |        +--:(sztp-csr:cmc)
       |        |  +---w sztp-csr:cmc?   binary
       |        +--:(sztp-csr:cmp)
       |           +---w sztp-csr:cmp?   binary
       +--ro output
          +--ro reporting-level?    enumeration {onboarding-server}?
          +--ro conveyed-information    cms
          +--ro owner-certificate?      cms
          +--ro ownership-voucher?      cms
]]></artwork>
        <t pn="section-2.1-8">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates RESTCONF's
            "errors" RPC-reply message with the "request-info" structure in place.</t>
        <artwork name="ietf-sztp-csr-errors-n-struct-tree.txt" type="" align="left" alt="" pn="section-2.1-9"><![CDATA[
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 request-info
              +--ro key-generation!
              |  +--ro selected-algorithm
              |     +--ro algorithm-identifier    binary
              +--ro csr-generation
              |  +--ro selected-format
              |     +--ro format-identifier    identityref
              +--ro cert-req-info?    binary
]]></artwork>
      </section>
      <section 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 pn="section-2.2-1.1">The examples below are encoded using JSON, but they could
              equally well be encoded using XML, as is supported by SZTP.</t>
        </aside>
        <t 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, as illustrated below.</t>
        <t keepWithNext="true" pn="section-2.2-3">REQUEST</t>
        <artwork name="ex-api-gbd-without-csr-rpc.json" type="" align="left" alt="" pn="section-2.2-4"><![CDATA[
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========

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": [
            "base64encodedvalue1=",
            "base64encodedvalue2=",
            "base64encodedvalue3="
          ]
        }
      },
      "csr-generation": {
        "supported-formats": {
          "format-identifier": [
            "ietf-sztp-csr:p10",
            "ietf-sztp-csr:cmc",
            "ietf-sztp-csr:cmp"
          ]
        }
      }
    }
  }
}
]]></artwork>
        <t 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:</t>
        <t keepWithNext="true" pn="section-2.2-6">RESPONSE</t>
        <artwork name="ex-api-gbd-without-csr-rpc-reply.json" type="" align="left" alt="" pn="section-2.2-7"><![CDATA[
HTTP/1.1 400 Bad Request
Date: Sat, 31 Oct 2015 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:request-info": {
            "key-generation": {
              "selected-algortithm": {
                "algorithm-identifier": "base64EncodedValue=="
              }
            },
            "csr-generation": {
              "selected-format": {
                "format-identifier": "ietf-sztp-csr:cmc"
              }
            },
            "cert-req-info": "base64EncodedValue=="
          }
        }
      }
    ]
  }
}
]]></artwork>
        <t 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 the "csr" node to convey its CSR to the SZTP-server:</t>
        <t keepWithNext="true" pn="section-2.2-9">REQUEST</t>
        <artwork name="ex-api-gbd-with-csr-rpc.json" type="" align="left" alt="" pn="section-2.2-10"><![CDATA[
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========

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": {
      "p10": "base64encodedvalue=="
    }
  }
}
]]></artwork>
        <t pn="section-2.2-11">The SZTP-server responds with "onboarding-information" (conveyed
            encoded inside the "conveyed-information" node) containing a signed
            identity certificate for the CSR provided by the SZTP-client:</t>
        <t keepWithNext="true" pn="section-2.2-12">RESPONSE</t>
        <artwork name="ex-api-gbd-with-csr-rpc-reply.json" type="" align="left" alt="" pn="section-2.2-13"><![CDATA[
HTTP/1.1 200 OK
Date: Sat, 31 Oct 2015 17:02:40 GMT
Server: example-server
Content-Type: application/yang.data+json

{
  "ietf-sztp-bootstrap-server:output" : {
    "reporting-level": "verbose",
    "conveyed-information": "base64encodedvalue=="
  }
}
]]></artwork>
        <t pn="section-2.2-14">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 convey it inside the SZTP "configuration"
            node.</t>
        <t pn="section-2.2-15">Following 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="I-D.ietf-netconf-keystore" format="default" sectionFormat="of" derivedContent="I-D.ietf-netconf-keystore"/>.</t>
        <t pn="section-2.2-16">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 IDevID).  As such, the configuration needs
            to associate the newly signed certificate with the existing asymmetric
            key:</t>
        <artwork name="ex-keystore-ldevid-same-key.json" type="" align="left" alt="" pn="section-2.2-17"><![CDATA[
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========

{
  "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": "base64encodedvalue==",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Manufacturer-Generated IDevID Cert",
                "cert": "base64encodedvalue=="
              },
              {
                "name": "Newly-Generated LDevID Cert",
                "cert": "base64encodedvalue=="
              }
            ]
          }
        }
      ]
    }
  }
}
]]></artwork>
        <t pn="section-2.2-18">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>
        <artwork name="ex-keystore-ldevid-new-key.json" type="" align="left" alt="" pn="section-2.2-19"><![CDATA[
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========

{
  "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": "base64encodedvalue==",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Manufacturer-Generated IDevID Cert",
                "cert": "base64encodedvalue=="
              }
            ]
          }
        },
        {
          "name": "Newly-Generated Hidden Key",
          "public-key-format": "ietf-crypto-types:subject-public-key\
-info-format",
          "public-key": "base64encodedvalue==",
          "hidden-private-key": [null],
          "certificates": {
            "certificate": [
              {
                "name": "Newly-Generated LDevID Cert",
                "cert": "base64encodedvalue=="
              }
            ]
          }
        }
      ]
    }
  }
}
]]></artwork>
        <t pn="section-2.2-20">In addition to configuring the signed certificate, it is often
            necessary to also configure the Issuer's signing certificate
            so that the 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="I-D.ietf-netconf-trust-anchors" format="default" sectionFormat="of" derivedContent="I-D.ietf-netconf-trust-anchors"/>.</t>
      </section>
      <!-- Example Usage -->

        <section anchor="yang-module" numbered="true" toc="include" removeInRFC="false" pn="section-2.3">
        <name slugifiedName="name-yang-module">YANG Module</name>
        <t pn="section-2.3-1">This module augments an RPC defined in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/>, uses
            a data type defined in <xref target="I-D.ietf-netconf-crypto-types" format="default" sectionFormat="of" derivedContent="I-D.ietf-netconf-crypto-types"/>,
            has an normative references to <xref target="RFC2986" format="default" sectionFormat="of" derivedContent="RFC2986"/> and
            <xref target="ITU.X690.2015" format="default" sectionFormat="of" derivedContent="ITU.X690.2015"/>, and an informative reference
            to <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>.</t>
        <t keepWithNext="true" pn="section-2.3-2">&lt;CODE BEGINS&gt; file "ietf-sztp-csr@2020-06-09.yang"</t>
        <artwork name="ietf-sztp-csr@2020-06-09.yang" type="" align="left" alt="" pn="section-2.3-3"><![CDATA[
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 BBBB:YANG Data Structure Extensions";
  }

  import ietf-crypto-types {
    prefix ct;
    reference "RFC AAAA: Common YANG Data Types for Cryptography";
  }
  
  organization
    "IETF NETCONF (Network Configuration) Working Group";

  contact
    "WG Web:   http://tools.ietf.org/wg/netconf
     WG List:  <mailto:netconf@ietf.org>
     Authors:  Kent Watsen <mailto:kent+ietf@watsen.net>
               Russ Housley <mailto:housley@vigilsec.com>
               Sean Turner <mailto:sean@sn3rd.com>";

  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.

    Copyright (c) 2020 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 Simplified
    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 XXXX
    (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
    itself for full legal notices.

    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.";

  revision 2020-06-09 {
    description
      "Initial version";
    reference
      "RFC XXXX: 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 SZTP-client.
       
       Additional derived identities MAY be defined by
       future efforts.";
  }

  identity p10 {
    base "certificate-request-format";
    description
      "Indicates that the SZTP-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 cmc {
    base "certificate-request-format";
    description
      "Indicates that the SZTP-client supports generating
       requests using a constrained version of the 'Full
       PKI Request' structure defined in RFC 5272.";
    reference
      "RFC 5272: Certificate Management over CMS (CMC)";
  }

  identity cmp {
    base "certificate-request-format";
    description
      "Indicates that the SZTP-client supports generating
       requests that contain a PKCS#10 Certificate Signing
       Request (p10cr) encapsulated in a Nested Message
       Content (nested), as defined in RFC 4210.";

       // FIXME: need to describe exactly what the structure
       // looks like when the origination-authentication
       // strategy uses an asymmetric-key vs a shared secret.
       //
       // e.g., see Sections D.4 and E.7 in RFC 4210

    reference
      "RFC 2986: PKCS #10: Certification Request Syntax
                 Specification Version 1.7
       RFC 4210: Internet X.509 Public Key Infrastructure
                 Certificate Management Protocol (CMP)";
  }


  // 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)";

    container csr-support {
      presence
        "Indicates that the SZTP-client is capable of sending CSRs.";
      description
        "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.

         When present, the SZTP-server MAY respond with the HTTP
         error 400 (Bad Request) with an 'ietf-restconf:errors'
         document having the 'error-tag' value 'missing-attribute'
         and the 'error-info' node containing the 'request-info'
         structure described in this module.";
      container key-generation {
        presence
          "Indicates that the SZTP-client is capable of
           generating a new asymmetric key pair.
           
           If this node is not present, the SZTP-server MAY
           request a CSR using the asymmetric key associated
           with the device's existing identity certificate
           (e.g., an LDevID from IEEE 802.1AR).";
        description
          "Specifies details for the SZTP-client's ability to
           generate a new asymmetric key pair.";
        container supported-algorithms {
          description
            "A list of public key algorithms supported by the
             SZTP-client for generating a new 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 SZTP-client's ability to
           generate a certificate signing requests.";
        container supported-formats {
          description
            "A list of certificate request formats supported
             by the SZTP-client for generating a new key.";
          leaf-list format-identifier {
            type identityref {
              base certificate-request-format;
            }
            min-elements 1;
            description
              "A certificate request format supported by the
               SZTP-client.";
          }
        }
      }
    }

    container csr {
      presence
        "Indicates that the SZTP-client has sent a CSR.";
      description
        "The 'csr' node enables the SZTP-client to convey
         a certificate signing request, using the encoding
         format selected by the SZT-server's 'request-info'
         response to the SZTP-client's previously sent
         'get-bootstrapping-data' request containing the
         'csr-support' node.

         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 'request-info', in
         which case the SZTP-client MUST invalidate the CSR
         sent in this node.";
      choice request-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 {
          leaf p10 {
            type ct:csr;
            description
              "A CertificationRequest structure, per RFC 2986.
               Please see 'csr' in RFC AAAA for encoding details.";
            reference
              "RFC 2986:
                 PKCS #10: Certification Request Syntax Specification
               RFC AAAA:
                 Common YANG Data Types for Cryptography";
          }
        }
        case cmc {
          leaf cmc {
            type binary;
            description
              "A constrained 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 IDevID's private key for the
               associated IDevID's public key, the PKIData contains
               one reqSequence element and no controlSequence,
               cmsSequence, or otherMsgSequence elements. The
               reqSequence is the TaggedRequest and it is the tcr
               CHOICE. The tcr is the TaggedCertificationRequest
               and it a bodyPartId and the certificateRequest
               elements. The certificateRequest is signed with
               the IDevID's private key. 

               For asymmetric key-based origin authentication
               based on the IDevID's private key that encapsulates
               a CSR signed by the LDevID's private key, the
               PKIData contains one cmsSequence element and no
               controlSequence, 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 controlSequence, cmsSequence, or
               otherMsgSequence elements. The reqSequence is
               the TaggedRequest and it is the tcr CHOICE. The
               tcr is the TaggedCertificationRequest and it a
               bodyPartId and the certificateRequest elements.
               The certificateRequest is signed with the LDevID's
               private key. 

               For shared secret-based origin authentication of
               a CSR signed by the LDevID's private key, the
               PKIData contains one cmsSequence element and no
               controlSequence, 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 controlSequence, cmsSequence, or
               otherMsgSequence elements. The reqSequence is the
               TaggedRequest and it is the tcr CHOICE. The tcr
               is the TaggedCertificationRequest and it a
               bodyPartId and the certificateRequest elements.
               The certificateRequest is signed with the LDevID's
               private key.";
            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 {
          leaf cmp {
            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.

               The PKIMessage structure contains a PKCS#10
               Certificate Signing Request (p10cr), as defined in
               RFC 2986, encapsulated in a Nested Message Content
               (nested) structure, as defined in RFC 4210.”;

               For asymmetric key-based origin authentication of
               a CSR based on the IDevID's private key for the
               associated IDevID's public key, PKIMessages contains
               one PKIMessage with one body element, a header
               element that is an empty sequence, and no protection
               or extraCerts elements. The body element contains a
               p10cr CHOICE.

               For asymmetric key-based origin authentication based
               on the IDevID's private key that encapsulates a CSR
               signed by the LDevID's private key, PKIMessages
               contains one PKIMessage with one header element,
               one body element, one protection element, and one
               extraCerts element.  The header element contains
               pvno, sender, recipient, and protectionAlg elements
               and no other elements. The body element contains the
               nested CHOICE. The nested element's PKIMessages
               contains one PKIMessage with one body element, one
               header element that is an empty sequence, and no
               protection or extraCerts elements. The nested
               element's body element contains a p10cr CHOICE. The
               protection element contains the digital signature
               generated with the IDevID's private key. The
               extraCerts element contains the IDevID certificate.

               For shared secret-based origin authentication of a
               CSR signed by the LDevID's private key, PKIMessages
               contains one PKIMessage with one header element,
               one body element, one protection element, and no
               extraCerts element. The header element contains
               pvno, sender, recipient, and protectionAlg elements
               and no other elements. The body element contains
               the nested CHOICE. The nested element's PKIMessages
               contains one PKIMessage with one body element, one
               header element that is an empty sequence, and no
               protection or extraCerts elements. The body element
               contains a p10cr CHOICE. The protection element
               contains the MAC value generated with the shared
               secret.";
            reference
              "RFC 2986:
                 PKCS #10: Certification Request Syntax
                 Specification Version 1.7
               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).";
          }
        }
      }
    }
  }

  sx:structure request-info {
    container key-generation {
      presence
        "Indicates that the SZTP-client is to generate a new
         asymmetric key.  If missing, then the SZTP-client
         MUST reuse the key associated with its existing
         identity certificate (e.g., IDevID).

         This leaf MUST only appear if the SZTP-clients
         'csr-support' included the 'key-generation' node.";
      description
        "Specifies details for the key that the SZTP-client
         is to generate.";
      container selected-algorithm {
        description
          "The key algorithm selected by the SZTP-server. The
           algorithm MUST be one of the algorithms specified
           by the 'supported-algorithms' node in the 
           SZTP-client's request message.";
        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 SZTP-client
         is to generate.";
      container selected-format {
        description 
          "The CSR format selected by the SZTP-server. The
           format MUST be one of the formats specified by
           the 'supported-formats' node in the SZTP-client's
           request message.";
        leaf format-identifier {
          type identityref {
            base certificate-request-format;
          }
          mandatory true;
          description
            "A certificate request format to be used by the
             SZTP-client.";
        }
      }
    }
    leaf cert-req-info {
      type binary;
      description
        "A CertificationRequestInfo structure, as defined in
         RFC 2986, encoded using ASN.1 distinguished encoding
         rules (DER), as specified in ITU-T X.690.
        
         Enables the SZTP-server to provide a fully-populated
         CertificationRequestInfo structure that the SZTP-client
         only needs to sign in order to generate the complete
         'CertificationRequest' structure to send to SZTP-server
         in its next 'get-bootstrapping-data' request message.
         
         When provided, the SZTP-client SHOULD use this
         structure to generate its CSR; failure to do so MAY
         result in another 400 (Bad Request) response.

         When not provided, the SZTP-client SHOULD generate a
         CSR using the same structure defined in its existing
         identity certificate (e.g., IDevID).

         It is an error if the 'AlgorithmIdentifier' field
         contained inside the 'SubjectPublicKeyInfo' field
         does not match the algorithm identified by the
         'selected-algorithm' node.";
      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).";
    }
  }
}
]]></artwork>
        <t keepWithPrevious="true" pn="section-2.3-4">&lt;CODE ENDS&gt;</t>
      </section>
      <!-- YANG Module -->
      </section>
    <section anchor="sec-con" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t pn="section-3-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 RFC 8572 apply here as well.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-sztp-client-considerations">SZTP-Client Considerations</name>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1.1">
          <name slugifiedName="name-ensuring-the-integrity-of-a">Ensuring the Integrity of Asymmetric Private Keys</name>
          <t pn="section-3.1.1-1">The private key the SZTP-client uses for the dynamically-generated
              identity certificate MUST be protected from inadvertent disclosure
              in order to prevent identity fraud.</t>
          <t pn="section-3.1.1-2">The security of this private key is essential in order to
              ensure the associated identity certificate can be used as a
              root of trust.</t>
          <t pn="section-3.1.1-3">It is RECOMMENDED that devices are manufactured with an HSM
              (hardware security module), such as a TPM (trusted platform
              module), to generate and forever contain the private key within
              the security perimeter of the HSM.  In such cases, the private
              key, and its associated certificates, MAY have long validity
              periods.</t>
          <t pn="section-3.1.1-4">In cases where the device does not possess an HSM, or otherwise
              is unable to use an HSM for the private key, it is RECOMMENDED
              to regenerate the private key (and associated identity
              certificates) periodically.  Details for how to generate a new
              private key and associate a new identity certificate are outside
              the scope of this document.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1.2">
          <name slugifiedName="name-reuse-of-a-manufacturer-gen">Reuse of a Manufacturer-generated Private Key</name>
          <t pn="section-3.1.2-1">It is RECOMMENDED in <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572"/> that devices are
              shipped from manufacturing with a secure device identity certificate
              (e.g., an IDevID, from <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/>).  It is
              also RECOMMENDED that the private key for these necessarily long-lived
              certificates be stored in an HSM, such as a TPM.  Lastly, per the
              previous consideration, when devices generate a new private key, it
              is also RECOMMENDED that the private key is protected by the HSM.</t>
          <t pn="section-3.1.2-2">However, it is understood that space on an HSM chip may be limited,
              potentially to the point of not being able to store an additional
              private key for the CSR described in this document, and that it
              may not be possible to store hardware-protected keys outside the
              TPM (e.g., a TPM-encrypted key stored in non-volatile memory).
              In such cases, it is RECOMMENDED to reuse the existing
              hardware-protected private key rather than generate a second
              private key outside of protection afforded by the hardware.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1.3">
          <name slugifiedName="name-replay-attack-protection">Replay Attack Protection</name>
          <t pn="section-3.1.3-1">This RFC enables an SZTP-client to announce an ability to
              generate new key to use for its CSR.</t>
          <t pn="section-3.1.3-2">When the SZTP-server responds with a request for the device
              to generate a new key, it is essential that the device actually
              generates a new key.</t>
          <t pn="section-3.1.3-3">Generating a new key each time enables the random bytes used
              to create the key to serve the dual-purpose of also acting like
              a "nonce" used in other mechanisms to detect replay attacks.</t>
          <t pn="section-3.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 pn="section-3.1.3-5">When a public/private key pair associated with the IDevID
              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.</t>
        </section>
        <section anchor="untrusted" numbered="true" toc="include" removeInRFC="false" pn="section-3.1.4">
          <name slugifiedName="name-connecting-to-an-untrusted-">Connecting to an Untrusted Bootstrap Server</name>
          <t pn="section-3.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 pn="section-3.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 MUST assert that the
              bootstrapping data returned is signed, if the SZTP-client
              is to trust it.</t>
          <t pn="section-3.1.4-3">However, the HTTP error message used in this document
              cannot be signed data, as described in RFC 8572.</t>
          <t pn="section-3.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 pn="section-3.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
              SHOULD NOT passed the "csr-support" input parameter
              to an untrusted SZTP-server.  SZTP-clients SHOULD
              pass instead 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-3.1.5">
          <name slugifiedName="name-selecting-the-best-origin-a">Selecting the Best Origin Authentication Mechanism</name>
          <t pn="section-3.1.5-1">When generating a new key, it is important that the client
              be able to provide additional proof to the CA that it was
              the entity that generated the key.</t>
          <t pn="section-3.1.5-2">All of the certificate request formats defined in this
              document (e.g., CMS, CMP, etc.), not including a raw PKCS#10,
              support origin authentication.</t>
          <t pn="section-3.1.5-3">These formats support origin authentication using both
              PKI and shared secret.</t>
          <t pn="section-3.1.5-4">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 pn="section-3.1.5-5">In the case the SZTP-client must choose between the
              asymmetric key option versus a shared secret for origin
              authentication, it is RECOMMENDED that the SZTP-client
              choose using the asymmetric key option.</t>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1.6">
          <name slugifiedName="name-clearing-the-private-key-an">Clearing the Private Key and Associated Certificate</name>
          <t pn="section-3.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 SHOULD be cleared
              whenever the device is reset to its factory default state,
              such as by the "factory-reset" RPC defined in
              <xref target="I-D.ietf-netmod-factory-default" format="default" sectionFormat="of" derivedContent="I-D.ietf-netmod-factory-default"/>.</t>
        </section>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-sztp-server-considerations">SZTP-Server Considerations</name>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2.1">
          <name slugifiedName="name-conveying-proof-of-possessi">Conveying Proof of Possession to a CA</name>
          <!--<t>FIXME: Note that RFC 4210 seems most similar! - E.7 and D.4?</t>-->
          </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2.2">
          <name slugifiedName="name-supporting-sztp-clients-tha">Supporting SZTP-Clients that don't trust the SZTP-Server</name>
          <t pn="section-3.2.2-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 pn="section-3.2.2-2">As is recommended in <xref target="untrusted" format="default" sectionFormat="of" derivedContent="Section 3.1.4"/> in this
              document, in such cases, SZTP-clients SHOULD pass the
              "signed-data-preferred" input parameter.</t>
          <t pn="section-3.2.2-3">The reciprocal of this statement is that SZTP-servers,
              wanting to support SZTP-clients that don't trust them,
              SHOULD 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 numbered="true" toc="include" removeInRFC="false" pn="section-3.2.3">
          <name slugifiedName="name-yang-module-considerations">YANG Module Considerations</name>
          <t pn="section-3.2.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, the module
              defined in this document 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" pn="section-3.2.3-2">
            <li pn="section-3.2.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-3.2.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>
    </section>
    <!-- end Security Considerations -->

      <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-the-ietf-xml-registry">The IETF XML Registry</name>
        <t pn="section-4.1-1">This document registers one URI in the "ns" subregistry 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/xml-registry.xhtml#ns" brackets="none"/>.  
            Following the format in <xref target="RFC3688" format="default" sectionFormat="of" derivedContent="RFC3688"/>, the following
            registration is requested:</t>
        <artwork name="" type="" align="left" alt="" pn="section-4.1-2"><![CDATA[
URI: urn:ietf:params:xml:ns:yang:ietf-sztp-csr
Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URI is an XML namespace.
]]></artwork>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-the-yang-module-names-regis">The YANG Module Names Registry</name>
        <t pn="section-4.2-1">This document registers one YANG module 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/yang-parameters.xhtml" brackets="none"/>.
            Following the format defined in <xref target="RFC6020" format="default" sectionFormat="of" derivedContent="RFC6020"/>, the below
            registration is requested:</t>
        <artwork name="" type="" align="left" alt="" pn="section-4.2-2"><![CDATA[
name:      ietf-sztp-csr
namespace: urn:ietf:params:xml:ns:yang:ietf-sztp-csr
prefix:    sztp-csr
reference: RFC XXXX
]]></artwork>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-5">
      <name slugifiedName="name-references">References</name>
      <references pn="section-5.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <!-- THE FOLLOWING LINE DOESN'T RESOLVE FOR SOME REASON:
             <?rfc include="_reference.ITU.X690.2015.xml"?> -->
        <!-- THE FOLLOWING IS COPIED FROM RFC 8366 -->
        <reference anchor="I-D.ietf-netconf-crypto-types" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-crypto-types.xml" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-netconf-crypto-types-15" derivedAnchor="I-D.ietf-netconf-crypto-types">
          <front>
            <title>Common YANG Data Types for Cryptography</title>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="May" day="20" year="2020"/>
            <abstract>
              <t>This document presents a YANG 1.1 (RFC 7950) module defining identities, typedefs, and groupings useful to cryptographic applications.  Editorial Note (To be removed by RFC Editor)  This draft contains placeholder values that need to be replaced with finalized values at the time of publication.  This note summarizes all of the substitutions that are needed.  No other RFC Editor instructions are specified elsewhere in this document.  Artwork in this document contains shorthand references to drafts in progress.  Please apply the following replacements:  o  "AAAA" --&gt; the assigned RFC value for this draft  Artwork in this document contains placeholder values for the date of publication of this draft.  Please apply the following replacement:  o  "2020-05-20" --&gt; the publication date of this draft  The following Appendix section is to be removed prior to publication:  o  Appendix B.  Change Log  Note to Reviewers (To be removed by RFC Editor)  This document presents a YANG module or modules that is/are part of a collection of drafts that work together to produce the ultimate goal of the NETCONF WG: to define configuration modules for NETCONF client and servers, and RESTCONF client and servers.  The relationship between the various drafts in the collection is presented in the below diagram.  crypto-types ^      ^ /        \ /          \ trust-anchors        keystore ^     ^              ^  ^ |     +---------+    |  | |               |    |  | |       +------------+  | tcp-client-server     |      /        |       | ^    ^        ssh-client-server    |       | |    |           ^            tls-client-server |    |           |              ^     ^        http-client-server |    |           |              |     |                 ^ |    |           |        +-----+     +---------+       | |    |           |        |                     |       | |    +-----------|--------|--------------+      |       | |                |        |              |      |       | +-----------+    |        |              |      |       | |    |        |              |      |       | |    |        |              |      |       | netconf-client-server       restconf-client-server   Full draft names and link to drafts:  o  draft-ietf-netconf-crypto-types (html [1])  o  draft-ietf-netconf-trust-anchors (html [2])  o  draft-ietf-netconf-keystore (html [3])  o  draft-ietf-netconf-tcp-client-server (html [4])  o  draft-ietf-netconf-ssh-client-server (html [5])  o  draft-ietf-netconf-tls-client-server (html [6])  o  draft-ietf-netconf-http-client-server (html [7])  o  draft-ietf-netconf-netconf-client-server (html [8])  o  draft-ietf-netconf-restconf-client-server (html [9])</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-crypto-types-15"/>
          <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-netconf-crypto-types-15.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="ITU.X690.2015" target="https://www.itu.int/rec/T-REC-X.690/" quoteTitle="true" derivedAnchor="ITU.X690.2015">
          <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 X.690," value="ISO/IEC 8825-1"/>
            <author>
              <organization showOnFrontPage="true">International Telecommunication Union</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="2119"/>
            <seriesInfo name="DOI" value="10.17487/RFC2119"/>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC2986" target="https://www.rfc-editor.org/info/rfc2986" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2986.xml" quoteTitle="true" derivedAnchor="RFC2986">
          <front>
            <title>PKCS #10: Certification Request Syntax Specification Version 1.7</title>
            <seriesInfo name="RFC" value="2986"/>
            <seriesInfo name="DOI" value="10.17487/RFC2986"/>
            <author initials="M." surname="Nystrom" fullname="M. Nystrom">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Kaliski" fullname="B. Kaliski">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2000" month="November"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml" quoteTitle="true" derivedAnchor="RFC6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <seriesInfo name="RFC" value="6020"/>
            <seriesInfo name="DOI" value="10.17487/RFC6020"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2010" month="October"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml" quoteTitle="true" derivedAnchor="RFC7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <seriesInfo name="RFC" value="7950"/>
            <seriesInfo name="DOI" value="10.17487/RFC7950"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <seriesInfo name="BCP" value="14"/>
            <seriesInfo name="RFC" value="8174"/>
            <seriesInfo name="DOI" value="10.17487/RFC8174"/>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
            </abstract>
          </front>
        </reference>
        <reference anchor="RFC8572" target="https://www.rfc-editor.org/info/rfc8572" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8572.xml" quoteTitle="true" derivedAnchor="RFC8572">
          <front>
            <title>Secure Zero Touch Provisioning (SZTP)</title>
            <seriesInfo name="RFC" value="8572"/>
            <seriesInfo name="DOI" value="10.17487/RFC8572"/>
            <author initials="K." surname="Watsen" fullname="K. Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="I." surname="Farrer" fullname="I. Farrer">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Abrahamsson" fullname="M. Abrahamsson">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="April"/>
            <abstract>
              <t>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>
        </reference>
      </references>
      <references pn="section-5.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="I-D.ietf-netconf-keystore" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-keystore.xml" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-netconf-keystore-17" derivedAnchor="I-D.ietf-netconf-keystore">
          <front>
            <title>A YANG Data Model for a Keystore</title>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="May" day="20" year="2020"/>
            <abstract>
              <t>This document defines a YANG 1.1 module called "ietf-keystore" that enables centralized configuration of both symmetric and asymmetric keys.  The secret value for both key types may be encrypted. Asymmetric keys may be associated with certificates.  Notifications are sent when certificates are about to expire.  Editorial Note (To be removed by RFC Editor)  This draft contains placeholder values that need to be replaced with finalized values at the time of publication.  This note summarizes all of the substitutions that are needed.  No other RFC Editor instructions are specified elsewhere in this document.  Artwork in this document contains shorthand references to drafts in progress.  Please apply the following replacements:  o  "AAAA" --&gt; the assigned RFC value for draft-ietf-netconf-crypto- types  o  "CCCC" --&gt; the assigned RFC value for this draft  Artwork in this document contains placeholder values for the date of publication of this draft.  Please apply the following replacement:  o  "2020-05-20" --&gt; the publication date of this draft  The following Appendix section is to be removed prior to publication:  o  Appendix A.  Change Log  Note to Reviewers (To be removed by RFC Editor)  This document presents a YANG module or modules that is/are part of a collection of drafts that work together to produce the ultimate goal of the NETCONF WG: to define configuration modules for NETCONF client and servers, and RESTCONF client and servers.  The relationship between the various drafts in the collection is presented in the below diagram.  crypto-types ^      ^ /        \ /          \ trust-anchors        keystore ^     ^              ^  ^ |     +---------+    |  | |               |    |  | |       +------------+  | tcp-client-server     |      /        |       | ^    ^        ssh-client-server    |       | |    |           ^            tls-client-server |    |           |              ^     ^        http-client-server |    |           |              |     |                 ^ |    |           |        +-----+     +---------+       | |    |           |        |                     |       | |    +-----------|--------|--------------+      |       | |                |        |              |      |       | +-----------+    |        |              |      |       | |    |        |              |      |       | |    |        |              |      |       | netconf-client-server       restconf-client-server   Full draft names and link to drafts:  o  draft-ietf-netconf-crypto-types (html [1])  o  draft-ietf-netconf-trust-anchors (html [2])  o  draft-ietf-netconf-keystore (html [3])  o  draft-ietf-netconf-tcp-client-server (html [4])  o  draft-ietf-netconf-ssh-client-server (html [5])  o  draft-ietf-netconf-tls-client-server (html [6])  o  draft-ietf-netconf-http-client-server (html [7])  o  draft-ietf-netconf-netconf-client-server (html [8])  o  draft-ietf-netconf-restconf-client-server (html [9])</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-keystore-17"/>
          <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-netconf-keystore-17.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-netconf-trust-anchors" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netconf-trust-anchors.xml" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-netconf-trust-anchors-10" derivedAnchor="I-D.ietf-netconf-trust-anchors">
          <front>
            <title>A YANG Data Model for a Truststore</title>
            <author initials="K" surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="May" day="20" year="2020"/>
            <abstract>
              <t>This document defines a YANG 1.1 data model for configuring globally- accessible bags of certificates and public keys that can be referenced by other data models for trust.  Editorial Note (To be removed by RFC Editor)  This draft contains placeholder values that need to be replaced with finalized values at the time of publication.  This note summarizes all of the substitutions that are needed.  No other RFC Editor instructions are specified elsewhere in this document.  Artwork in this document contains shorthand references to drafts in progress.  Please apply the following replacements:  o  "AAAA" --&gt; the assigned RFC value for draft-ietf-netconf-crypto- types  o  "BBBB" --&gt; the assigned RFC value for this draft  Artwork in this document contains placeholder values for the date of publication of this draft.  Please apply the following replacement:  o  "2020-05-20" --&gt; the publication date of this draft  The following Appendix section is to be removed prior to publication:  o  Appendix A.  Change Log  Note to Reviewers (To be removed by RFC Editor)  This document presents a YANG module or modules that is/are part of a collection of drafts that work together to produce the ultimate goal of the NETCONF WG: to define configuration modules for NETCONF client and servers, and RESTCONF client and servers.  The relationship between the various drafts in the collection is presented in the below diagram.  crypto-types ^      ^ /        \ /          \ trust-anchors        keystore ^     ^              ^  ^ |     +---------+    |  | |               |    |  | |       +------------+  | tcp-client-server     |      /        |       | ^    ^        ssh-client-server    |       | |    |           ^            tls-client-server |    |           |              ^     ^        http-client-server |    |           |              |     |                 ^ |    |           |        +-----+     +---------+       | |    |           |        |                     |       | |    +-----------|--------|--------------+      |       | |                |        |              |      |       | +-----------+    |        |              |      |       | |    |        |              |      |       | |    |        |              |      |       | netconf-client-server       restconf-client-server   Full draft names and link to drafts:  o  draft-ietf-netconf-crypto-types (html [1])  o  draft-ietf-netconf-trust-anchors (html [2])  o  draft-ietf-netconf-keystore (html [3])  o  draft-ietf-netconf-tcp-client-server (html [4])  o  draft-ietf-netconf-ssh-client-server (html [5])  o  draft-ietf-netconf-tls-client-server (html [6])  o  draft-ietf-netconf-http-client-server (html [7])  o  draft-ietf-netconf-netconf-client-server (html [8])  o  draft-ietf-netconf-restconf-client-server (html [9])</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-trust-anchors-10"/>
          <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-netconf-trust-anchors-10.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-netmod-factory-default" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-factory-default.xml" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-netmod-factory-default-15" derivedAnchor="I-D.ietf-netmod-factory-default">
          <front>
            <title>A YANG Data Model for Factory Default Settings</title>
            <author initials="Q" surname="WU" fullname="Qin WU">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B" surname="Lengyel" fullname="Balazs Lengyel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Y" surname="Niu" fullname="Ye Niu">
              <organization showOnFrontPage="true"/>
            </author>
            <date month="April" day="25" year="2020"/>
            <abstract>
              <t>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.  The YANG data model in this document conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netmod-factory-default-15"/>
          <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-netmod-factory-default-15.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml" quoteTitle="true" derivedAnchor="RFC3688">
          <front>
            <title>The IETF XML Registry</title>
            <seriesInfo name="BCP" value="81"/>
            <seriesInfo name="RFC" value="3688"/>
            <seriesInfo name="DOI" value="10.17487/RFC3688"/>
            <author initials="M." surname="Mealling" fullname="M. Mealling">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2004" month="January"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml" quoteTitle="true" derivedAnchor="RFC8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <seriesInfo name="BCP" value="215"/>
            <seriesInfo name="RFC" value="8340"/>
            <seriesInfo name="DOI" value="10.17487/RFC8340"/>
            <author initials="M." surname="Bjorklund" fullname="M. Bjorklund">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Berger" fullname="L. Berger" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="March"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="RFC8407" target="https://www.rfc-editor.org/info/rfc8407" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml" quoteTitle="true" derivedAnchor="RFC8407">
          <front>
            <title>Guidelines for Authors and Reviewers of Documents Containing YANG Data Models</title>
            <seriesInfo name="BCP" value="216"/>
            <seriesInfo name="RFC" value="8407"/>
            <seriesInfo name="DOI" value="10.17487/RFC8407"/>
            <author initials="A." surname="Bierman" fullname="A. Bierman">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="October"/>
            <abstract>
              <t>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>
        </reference>
        <reference anchor="Std-802.1AR-2018" target="http://standards.ieee.org/findstds/standard/802.1AR-2018.html" quoteTitle="true" derivedAnchor="Std-802.1AR-2018">
          <front>
            <title>IEEE Standard for Local and metropolitan area networks - Secure Device Identity</title>
            <author fullname="WG802.1 - Higher Layer LAN Protocols Working Group">
              <organization showOnFrontPage="true">IEEE SA-Standards Board</organization>
            </author>
            <date day="14" month="June" year="2018"/>
          </front>
        </reference>
      </references>
    </references>
    <!--
      <section title="Change Log">
        <section title="00 to 01">
          <t>
            <list style="symbols">
            </list>
            </t>
        </section>
      </section>
      -->

      <!--
      <section title="Acknowledgements" numbered="no">
        <t>The authors would like to thank for following for
        lively discussions on list and in the halls (ordered
        by last name):
        </t>
      </section>
      -->
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.a">
      <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 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>
