<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="info" consensus="true" docName="draft-ietf-opsawg-sdi-13" indexInclude="true" ipr="trust200902" number="8886" prepTime="2020-09-23T16:01:08" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-opsawg-sdi-13" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8886" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Secure Device Install">Secure Device Install</title>
    <seriesInfo name="RFC" value="8886" stream="IETF"/>
    <author fullname="Warren Kumari" initials="W." surname="Kumari">
      <organization showOnFrontPage="true">Google</organization>
      <address>
        <postal>
          <street>1600 Amphitheatre Parkway</street>
          <city>Mountain View</city>
          <region>CA</region>
          <code>94043</code>
          <country>United States of America</country>
        </postal>
        <email>warren@kumari.net</email>
      </address>
    </author>
    <author fullname="Colin Doyle" initials="C." surname="Doyle">
      <organization showOnFrontPage="true">Juniper Networks</organization>
      <address>
        <postal>
          <street>1133 Innovation Way</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089</code>
          <country>United States of America</country>
        </postal>
        <email>cdoyle@juniper.net</email>
      </address>
    </author>
    <date month="09" year="2020"/>
    <keyword>autoboot</keyword>
    <keyword>auto-boot</keyword>
    <keyword>autoinstall</keyword>
    <keyword>tftp</keyword>
    <keyword>install</keyword>
    <keyword>bunny</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">Deploying a new network device in a location where the operator has
      no staff of its own often requires that an employee physically travel to
      the location to perform the initial install and configuration, even in
      shared facilities with "remote-hands" (or similar) support. In many
      cases, this could be avoided if there were an easy way to transfer the
      initial configuration to a new device while still maintaining
      confidentiality of the configuration.</t>
      <t indent="0" pn="section-abstract-2">This document extends existing vendor proprietary auto-install
     to provide limited confidentiality to initial configuration during
     bootstrapping of the device.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for informational purposes.  
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by the
            Internet Engineering Steering Group (IESG).  Not all documents
            approved by the IESG are candidates for any level of Internet
            Standard; see Section 2 of RFC 7841. 
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8886" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include 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 indent="0" keepWithNext="true" 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>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" 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-overview">Overview</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" keepWithNext="true" 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-example-scenario">Example Scenario</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-vendor-role">Vendor Role</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-device-key-generation">Device Key Generation</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-directory-server">Directory Server</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operator-role">Operator Role</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-administrative">Administrative</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-technical">Technical</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example-initial-customer-bo">Example Initial Customer Boot</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-additional-considerations">Additional Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-storage">Key Storage</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-key-replacement">Key Replacement</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-device-reinstall">Device Reinstall</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-proof-of-concept">Proof of Concept</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-1-generating-the-certi">Step 1: Generating the Certificate</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.1.2">
                  <li pn="section-toc.1-1.9.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.1.1"><xref derivedContent="A.1.1" format="counter" sectionFormat="of" target="section-a.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-11-generate-the-privat">Step 1.1: Generate the Private Key</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.2.1"><xref derivedContent="A.1.2" format="counter" sectionFormat="of" target="section-a.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-12-generate-the-certif">Step 1.2: Generate the Certificate Signing Request</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.9.2.1.2.3.1"><xref derivedContent="A.1.3" format="counter" sectionFormat="of" target="section-a.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-13-generate-the-self-s">Step 1.3: Generate the (Self-Signed) Certificate Itself</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-2-generating-the-encry">Step 2: Generating the Encrypted Configuration</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.2.2">
                  <li pn="section-toc.1-1.9.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.2.2.1.1"><xref derivedContent="A.2.1" format="counter" sectionFormat="of" target="section-a.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-21-fetch-the-certifica">Step 2.1: Fetch the Certificate</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.2.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.2.2.2.1"><xref derivedContent="A.2.2" format="counter" sectionFormat="of" target="section-a.2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-22-encrypt-the-configu">Step 2.2: Encrypt the Configuration File</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.2.2.3">
                    <t indent="0" pn="section-toc.1-1.9.2.2.2.3.1"><xref derivedContent="A.2.3" format="counter" sectionFormat="of" target="section-a.2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-23-copy-configuration-">Step 2.3: Copy Configuration to the Configuration Server</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.9.2.3">
                <t indent="0" pn="section-toc.1-1.9.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-3-decrypting-and-using">Step 3: Decrypting and Using the Configuration</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2.3.2">
                  <li pn="section-toc.1-1.9.2.3.2.1">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.1.1"><xref derivedContent="A.3.1" format="counter" sectionFormat="of" target="section-a.3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-31-fetch-encrypted-con">Step 3.1: Fetch Encrypted Configuration File from Configuration Server</xref></t>
                  </li>
                  <li pn="section-toc.1-1.9.2.3.2.2">
                    <t indent="0" pn="section-toc.1-1.9.2.3.2.2.1"><xref derivedContent="A.3.2" format="counter" sectionFormat="of" target="section-a.3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-step-32-decrypt-and-use-the">Step 3.2: Decrypt and Use the Configuration</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">In a growing, global network, significant amounts of time and money
      are spent deploying new devices and "forklift" upgrading
      existing devices. In many cases, these devices are in shared
      facilities (for example, Internet Exchange Points (IXP) or
      "carrier-neutral data centers"), which have staff on hand that can be
      contracted to perform tasks including physical installs, device
      reboots, loading initial configurations, etc. There are also a
      number of (often proprietary) protocols to perform initial
      device installs and configurations. For example, many network
      devices will attempt to use DHCP <xref target="RFC2131" format="default" sectionFormat="of" derivedContent="RFC2131"/> or
      DHCPv6 <xref target="RFC8415" format="default" sectionFormat="of" derivedContent="RFC8415"/> to get
      an IP address and configuration server and then fetch and install
      a configuration when they are first powered on.</t>
      <t indent="0" pn="section-1-2">The configurations of network devices contain a significant amount of
      security-related and proprietary information (for example, RADIUS
      <xref target="RFC2865" format="default" sectionFormat="of" derivedContent="RFC2865"/> or TACACS+ <xref target="I-D.ietf-opsawg-tacacs" format="default" sectionFormat="of" derivedContent="TACACS"/>
      secrets). Exposing these to a third party to load onto a new device (or using
      an auto-install technique that fetches an unencrypted configuration file via
      TFTP <xref target="RFC1350" format="default" sectionFormat="of" derivedContent="RFC1350"/>) or something similar is an unacceptable
      security risk for many operators, and so they send employees to remote locations to
      perform the initial configuration work; this costs time and money.</t>
      <t indent="0" pn="section-1-3">There are some workarounds to this, such as asking the vendor to
      preconfigure the device before shipping it; asking the remote support to 
      install a terminal server; providing a minimal, unsecured
      configuration and using that to bootstrap to a complete
      configuration; etc. However, these are often clumsy and have security
      issues. As an example, in the terminal server case, the console port
      connection could be easily snooped.</t>
      <t indent="0" pn="section-1-4">An ideal solution in this space would protect both the
      confidentiality of device configuration in transit and the authenticity
      (and authorization status) of configuration to be used by the
      device. The mechanism described in this document only addresses the
      former and makes no effort to do the latter, with the device accepting
      any configuration file that comes its way and is encrypted to the
      device's key (or not encrypted, as the case may be).  Other solutions
      (such as <xref target="RFC8572" format="default" sectionFormat="of" derivedContent="RFC8572">Secure Zero Touch
      Provisioning (SZTP)</xref>, <xref target="I-D.ietf-anima-bootstrapping-keyinfra" format="default" sectionFormat="of" derivedContent="BRSKI">Bootstrapping Remote Secure Key Infrastructures (BRSKI)</xref>, and
      other voucher-based methods) are more fully featured but also require
      more complicated machinery.

      This document describes something much
      simpler, at the cost of only providing limited protection.</t>
      <t indent="0" pn="section-1-5">This document layers security onto existing auto-install solutions
      (one example of which is <xref target="Cisco_AutoInstall" format="default" sectionFormat="of" derivedContent="Cisco_AutoInstall"/>) to provide a method to initially configure new
      devices while maintaining (limited) confidentiality of the initial
      configuration. It is optimized for simplicity, for both the implementor
      and the operator. It is explicitly not intended to be a fully featured
      system for managing installed devices nor is it intended to solve all
      use cases; rather, it is a simple targeted solution to solve a common
      operational issue where the network device has been delivered, fiber has
      been laid (as appropriate), and there is no trusted member of the
      operator's staff to perform the initial configuration. This solution is
      only intended to increase confidentiality of the information in the
      configuration file and does not protect the device itself from loading a
      malicious configuration.</t>
      <t indent="0" pn="section-1-6">This document describes a concept and some example ways of implementing
      this concept. As devices have different capabilities and use different
      configuration paradigms, one method will not suit all, and so it is
      expected that vendors will differ in exactly how they implement this.</t>
      <t indent="0" pn="section-1-7">This solution is specifically designed to be a simple method on top
      of exiting device functionality. If devices do not support this new
      method, they can continue to use the existing functionality. In
      addition, operators can choose to use this to protect their
      configuration information or can continue to use the existing
      functionality.</t>
      <t indent="0" pn="section-1-8">The issue of securely installing devices is in no way a new issue
      nor is it limited to network devices; it occurs when deploying
      servers, PCs, Internet of Things (IoT) devices, and in many other situations. While the
      solution described in this document is obvious (encrypt the config,
      then decrypt it with a device key), this document only discusses the
      use for network devices, such as routers and switches.</t>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-overview">Overview</name>
      <t indent="0" pn="section-2-1">Most network devices already include some sort of initial
      bootstrapping logic (sometimes called 'autoboot' or 'autoinstall'). This
      generally works by having a newly installed, unconfigured device obtain
      an IP address for itself and discover the address of a configuration
      server (often called 'next-server', 'siaddr', or 'tftp-server-name')
      using DHCP or DHCPv6 (see <xref target="RFC2131" format="default" sectionFormat="of" derivedContent="RFC2131"/> and
      <xref target="RFC8415" format="default" sectionFormat="of" derivedContent="RFC8415"/>). The device then contacts
      this configuration server to download its initial configuration, which
      is often identified using the device's serial number, Media Access
      Control (MAC) address, or similar. This document extends this
      (vendor-specific) paradigm by allowing the configuration file to be
      encrypted.</t>
      <t indent="0" pn="section-2-2">This document uses the serial number of the device as a unique device
      identifier for simplicity; some vendors may not want to implement the
      system using the serial number as the identifier for business reasons (a
      competitor or similar could enumerate the serial numbers and determine
      how many devices have been manufactured). Implementors are free to
      choose some other way of generating identifiers (e.g., a Universally
      Unique Identifier (UUID) <xref target="RFC4122" format="default" sectionFormat="of" derivedContent="RFC4122"/>), but
      this will likely make it somewhat harder for 
      operators to use (the serial number is usually easy to find on a device).</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-example-scenario">Example Scenario</name>
        <t indent="0" pn="section-2.1-1">Operator_A needs another peering router, and so they
      order another router from Vendor_B to be drop-shipped to
      the facility. Vendor_B begins assembling the new
      device and tells Operator_A what the new device's serial number will be
      (SN:17894321). When Vendor_B first installs the firmware on the device and
      boots it, the device generates a public-private key pair, and Vendor_B
      publishes the public key on its key server (in a public key certificate, for
      ease of use).</t>
        <t indent="0" pn="section-2.1-2">While the device is being shipped, Operator_A generates the initial
      device configuration and fetches the certificate from Vendor_B key servers by
      providing the serial number of the new device. Operator_A then encrypts the
      device configuration and puts this encrypted configuration on a (local) TFTP
      server.</t>
        <t indent="0" pn="section-2.1-3">When the device arrives at the Point of Presence (POP), it gets
	installed in Operator_A's rack and cabled as instructed. The new
	device powers up and discovers that it has not yet been configured. It
	enters its autoboot state and begins the DHCP process. Operator_A's
	DHCP server provides it with an IP address and the address of the
	configuration server. The router uses TFTP to fetch its configuration
	file. Note that all of this is existing functionality. The device
	attempts to load the configuration file. As an added step, if the
	configuration file cannot be parsed, the device tries to use its
	private key to decrypt the file and, assuming it validates, proceeds
	to install the new, decrypted configuration.</t>
        <t indent="0" pn="section-2.1-4">Only the "correct" device will have the required private key and be
      able to decrypt and use the configuration file (see
      <xref target="security" format="default" sectionFormat="of" derivedContent="Section 7">Security Considerations</xref>).
      An attacker would be able to connect to the network and get an IP
      address. They would also be able to retrieve (encrypted) configuration files by
      guessing serial numbers (or perhaps the server would allow directory
      listing), but without the private keys, an attacker will not be able to
      decrypt the files.</t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-vendor-role">Vendor Role</name>
      <t indent="0" pn="section-3-1">This section describes the vendor's roles and
      provides an overview of what the device needs to do.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-device-key-generation">Device Key Generation</name>
        <t indent="0" pn="section-3.1-1">Each device requires a public-private key pair and for the
        public part to be published and retrievable by the operator. The
        cryptographic algorithm and key lengths to be used are out of the scope
        of this document. This section illustrates one method, but, as with
        much of this document, the exact mechanism may vary by vendor.


        Enrollment over Secure Transport <xref target="RFC7030" format="default" sectionFormat="of" derivedContent="RFC7030"/> and possibly the Simple Certificate Enrollment
        Protocol <xref target="RFC8894" format="default" sectionFormat="of" derivedContent="RFC8894"/> are
        methods that vendors may want to consider.</t>
        <t indent="0" pn="section-3.1-2">During the manufacturing stage, when the device is initially powered
        on, it will generate a public-private key pair. It will send its unique device
        identifier and the public key to the vendor's directory server
        <xref target="RFC5280" format="default" sectionFormat="of" derivedContent="RFC5280"/> to be published. The vendor's directory server
        should only accept certificates that are from the manufacturing
	facility and that match vendor-defined policies (for example, extended
	key usage and extensions).

	Note that some devices may be constrained and so may send
        the raw public key and unique device identifier to the certificate
        publication server, while more capable devices may generate and send
        self-signed certificates. 


This communication with the directory server should be integrity protected and
should occur in a controlled environment.</t>
        <t indent="0" pn="section-3.1-3">This reference architecture needs a serialization format for the
        key material.  Due to the prevalence of tooling support for it on
        network devices, X.509 certificates are a convenient format to
        exchange public keys. 

However, most of the metadata that would be used for revocation and aging will
not be used and should be ignored by both the client and server. In such
cases, the signature on the certificate conveys no value, and the consumer of
the certificate is expected to pin the end-entity key fingerprint (versus
using a PKI and signature chain).</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-directory-server">Directory Server</name>
        <t indent="0" pn="section-3.2-1">The directory server contains a database of
        certificates. If newly manufactured devices upload certificates, the
        directory server can simply publish these; if the
        devices provide the raw public keys and unique device identifier,
        the directory server will need to wrap these in a
        certificate.</t>
        <t indent="0" pn="section-3.2-2">The customers (e.g., Operator_A) query this server with
        the serial number (or other provided unique identifier) of a device
        and retrieve the associated certificate. It is expected that operators
        will receive the unique device identifier (serial number) of devices when
        they purchase them and will download and store the
        certificate. This means that there is not a hard requirement on the
        reachability of the directory server.</t>
        <figure align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-initial-certificate-generat">Initial Certificate Generation and Publication</name>
          <artwork name="" type="" align="left" alt="" pn="section-3.2-3.1">
                      +------------+
     +------+         |            |
     |Device|         | Directory  |
     +------+         |   Server   |
                      +------------+
+----------------+   +--------------+
|   +---------+  |   |              |
|   | Initial |  |   |              |
|   |  boot?  |  |   |              |
|   +----+----+  |   |              |
|        |       |   |              |
| +------v-----+ |   |              |
| |  Generate  | |   |              |
| |Self-signed | |   |              |
| |Certificate | |   |              |
| +------------+ |   |              |
|        |       |   |   +-------+  |
|        +-------|---|--&gt;|Receive|  |
|                |   |   +---+---+  |
|                |   |       |      |
|                |   |   +---v---+  |
|                |   |   |Publish|  |
|                |   |   +-------+  |
|                |   |              |
+----------------+   +--------------+
</artwork>
        </figure>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-operator-role">Operator Role</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-administrative">Administrative</name>
        <t indent="0" pn="section-4.1-1">When purchasing a new device, the accounting department will need
        to get the unique device identifier (e.g., serial number) of the new
        device and communicate it to the operations group.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-technical">Technical</name>
        <t indent="0" pn="section-4.2-1">The operator will contact the vendor's publication server and
        download the certificate (by providing the unique device identifier of
        the device). The operator fetches the certificate using a secure
        transport that authenticates the source of the certificate,
        such as HTTPS (confidentiality protection can provide some privacy
        and metadata-leakage benefit but is not key to the primary
        mechanism of this document). The operator will then encrypt the initial
        configuration (for example, using S/MIME <xref target="RFC8551" format="default" sectionFormat="of" derivedContent="RFC8551"/>)
        using the key in the certificate and place it on their
        configuration server.</t>
        <t indent="0" pn="section-4.2-2">See <xref target="proof" format="default" sectionFormat="of" derivedContent="Appendix A"/> for examples.</t>
        <figure align="left" suppress-title="false" pn="figure-2">
          <name slugifiedName="name-fetching-the-certificate-en">Fetching the Certificate, Encrypting the Configuration, and Publishing
the Encrypted Configuration</name>
          <artwork name="" type="" align="left" alt="" pn="section-4.2-3.1">
                      +------------+
   +--------+         |            |
   |Operator|         | Directory  |
   +--------+         |   Server   |
                      +------------+
+----------------+  +----------------+
| +-----------+  |  |  +-----------+ |
| |   Fetch   |  |  |  |           | |
| |  Device   |&lt;------&gt;|Certificate| |
| |Certificate|  |  |  |           | |
| +-----+-----+  |  |  +-----------+ |
|       |        |  |                |
| +-----v------+ |  |                |
| |  Encrypt   | |  |                |
| |   Device   | |  |                |
| |   Config   | |  |                |
| +-----+------+ |  |                |
|       |        |  |                |
| +-----v------+ |  |                |
| |  Publish   | |  |                |
| |    TFTP    | |  |                |
| |   Server   | |  |                |
| +------------+ |  |                |
|                |  |                |
+----------------+  +----------------+
</artwork>
        </figure>
      </section>
      <section anchor="initial_cust_boot" numbered="true" toc="include" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-example-initial-customer-bo">Example Initial Customer Boot</name>
        <t indent="0" pn="section-4.3-1">When the device is first booted by the customer (and on subsequent
        boots), if the device does not have a valid configuration, it will use
        existing auto-install functionality. As an example, it performs DHCP
        Discovery until it gets a DHCP offer including DHCP option 66
        (Server-Name) or 150 (TFTP server address), contacts the server
        listed in these DHCP options, and downloads its configuration file. Note that this
        is existing functionality (for example, Cisco devices fetch the config
        file named by the Bootfile-Name DHCP option (67)).</t>
        <t indent="0" pn="section-4.3-2">After retrieving the configuration file, the device needs to determine if it is
        encrypted or not. If it is not encrypted, the existing behavior is used.
        If the configuration is encrypted, the process continues as described in this
        document. If the device has been configured to only support encrypted configuration
        and determines that the configuration file is not encrypted, it should abort.
        The method used to determine if the configuration is encrypted or not is
        implementation dependent; there are a number of (obvious) options, including
        having a magic string in the file header, using a file name extension
        (e.g., config.enc), or using specific DHCP options.</t>
        <t indent="0" pn="section-4.3-3">If the file is encrypted, the device will attempt to
        decrypt and parse the file. If able, it will install the configuration and
        start using it. If it cannot decrypt the file or if parsing the configuration fails,
        the device will either abort the auto-install process or repeat this
        process until it succeeds. When retrying, care should be taken to not
        overwhelm the server hosting the encrypted configuration files. It is suggested
        that the device retry every 5 minutes for the first hour and then every hour after
        that. As it is expected that devices may be installed well before the
        configuration file is ready, a maximum number of retries is not specified.</t>
        <t indent="0" pn="section-4.3-4">Note that the device only needs to be able to download the
        configuration file; after the initial power on in the factory, it never needs
        to access the Internet, vendor, or directory server. The device
        (and only the device) has the private key and so has the ability to decrypt
        the configuration file.</t>
        <figure align="left" suppress-title="false" pn="figure-3">
          <name slugifiedName="name-device-boot-fetch-and-insta">Device Boot, Fetch, and Install Configuration File</name>
          <artwork name="" type="" align="left" alt="" pn="section-4.3-5.1">
          +--------+                +--------------+
          | Device |                |Config server |
          +--------+                |(e.g., TFTP)  |
                                    +--------------+
+---------------------------+    +------------------+
| +-----------+             |    |                  |
| |           |             |    |                  |
| |   DHCP    |             |    |                  |
| |           |             |    |                  |
| +-----+-----+             |    |                  |
|       |                   |    |                  |
| +-----v------+            |    |  +-----------+   |
| |            |            |    |  | Encrypted |   |
| |Fetch config|&lt;------------------&gt;|  config   |   |
| |            |            |    |  |   file    |   |
| +-----+------+            |    |  +-----------+   |
|       |                   |    |                  |
|       X                   |    |                  |
|      / \                  |    |                  |
|     /   \ N    +--------+ |    |                  |
|    | Enc?|----&gt;|Install,| |    |                  |
|     \   /      |  Boot  | |    |                  |
|      \ /       +--------+ |    |                  |
|       V                   |    |                  |
|       |Y                  |    |                  |
|       |                   |    |                  |
| +-----v------+            |    |                  |
| |Decrypt with|            |    |                  |
| |private key |            |    |                  |
| +-----+------+            |    |                  |
|       |                   |    |                  |
|       v                   |    |                  |
|      / \                  |    |                  |
|     /   \ Y    +--------+ |    |                  |
|    |Sane?|----&gt;|Install,| |    |                  |
|     \   /      |  Boot  | |    |                  |
|      \ /       +--------+ |    |                  |
|       V                   |    |                  |
|       |N                  |    |                  |
|       |                   |    |                  |
|  +----v---+               |    |                  |
|  |Retry or|               |    |                  |
|  | abort  |               |    |                  |
|  +--------+               |    |                  |
|                           |    |                  |
+---------------------------+    +------------------+
</artwork>
        </figure>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-additional-considerations">Additional Considerations</name>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-key-storage">Key Storage</name>
        <t indent="0" pn="section-5.1-1">Ideally, the key pair would be stored in a Trusted Platform Module
        (TPM) on something that is identified as the "router"
        -- for example, the chassis/backplane. This is so that a key pair
        is bound to what humans think of as the "device" and
        not, for example, (redundant) routing engines. Devices that
        implement IEEE 802.1AR <xref target="IEEE802-1AR" format="default" sectionFormat="of" derivedContent="IEEE802-1AR"/>
        could choose to use the Initial Device Identifier (IDevID) for this
        purpose.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-key-replacement">Key Replacement</name>
        <t indent="0" pn="section-5.2-1">It is anticipated that some operator may want to replace the
        (vendor-provided) keys after installing the device. There are two
        options when implementing this: a vendor could allow the operator's
        key to completely replace the initial device-generated key (which
        means that, if the device is ever sold, the new owner couldn't use
        this technique to install the device), or the device could prefer the
        operator's installed key. This is an implementation decision left to
        the vendor.</t>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-5.3">
        <name slugifiedName="name-device-reinstall">Device Reinstall</name>
        <t indent="0" pn="section-5.3-1">Increasingly, operations are moving towards an automated model of
        device management, whereby portions of the configuration (or the entire configuration) are
        programmatically generated. This means that operators may want to
        generate an entire configuration after the device has been initially
        installed and ask the device to load and use this new configuration.


        It is expected (but not defined in this document, as it is vendor
        specific) that vendors will allow the operator to copy a new,
        encrypted configuration (or part of a configuration) onto a device and
        then request that the device decrypt and install it (e.g., 'load
        replace &lt;filename&gt; encrypted'). The operator could also choose to
        reset the device to factory defaults and allow the device to act as
        though it were the initial boot (see <xref target="initial_cust_boot" format="default" sectionFormat="of" derivedContent="Section 4.3"/>).</t>
      </section>
    </section>
    <section numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-6-1">This document has no IANA actions.</t>
    </section>
    <section anchor="security" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-7-1">This reference architecture is intended to incrementally improve
      upon commonly accepted "auto-install" practices used today that may
      transmit configurations unencrypted (e.g., unencrypted configuration files
      that can be downloaded connecting to unprotected ports in data centers,
      mailing initial configuration files on flash drives, or emailing configuration files
      and asking a third party to copy and paste them over a serial terminal)
      or allow unrestricted access to these configurations.</t>
      <t indent="0" pn="section-7-2">This document describes an object-level security design to provide
      confidentiality assurances for the configuration stored at rest on the
      configuration server and for configuration while it is in transit
      between the configuration server and the unprovisioned device, even if
      the underlying transport does not provide this security service.</t>
      <t indent="0" pn="section-7-3">The architecture provides no assurances about the source of
      the encrypted configuration or protect against theft and
      reuse of devices.</t>
      <t indent="0" pn="section-7-4">An attacker (e.g., a malicious data center employee, person in the
      supply chain, etc.) who has physical
      access to the device before it is connected to the network or who
      manages to exploit it once installed
      may be able to extract the device private key (especially if it is not
      stored in a TPM), pretend to be the device when connecting to the
      network, and download and extract the (encrypted) configuration file.</t>
      <t indent="0" pn="section-7-5">An attacker with access to the configuration server (or the
      ability to route traffic to configuration server under their control)
      and the device's public key could return a configuration of the
      attacker's choosing to the unprovisioned device.</t>
      <t indent="0" pn="section-7-6">This mechanism does not protect against a malicious vendor. While
      the key pair should be generated on the device and the private key
      should be securely stored, the mechanism cannot detect or protect
      against a vendor who claims to do this but instead generates the
      key pair off device and keeps a copy of the private key. It is largely
      understood in the operator community that a malicious vendor or attacker
      with physical access to the device is largely a "Game Over"
      situation.</t>
      <t indent="0" pn="section-7-7">Even when using a secure bootstrap mechanism, security-conscious
      operators may wish to bootstrap devices with a minimal or less-sensitive
      configuration and then replace this with a more complete one after
      install.</t>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-anima-bootstrapping-keyinfra" to="BRSKI"/>
    <displayreference target="I-D.ietf-opsawg-tacacs" to="TACACS"/>
    <references pn="section-8">
      <name slugifiedName="name-informative-references">Informative References</name>
      <reference anchor="I-D.ietf-anima-bootstrapping-keyinfra" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-anima-bootstrapping-keyinfra-44" derivedAnchor="BRSKI">
        <front>
          <title>Bootstrapping Remote Secure Key Infrastructures (BRSKI)</title>
          <author initials="M" surname="Pritikin" fullname="Max Pritikin">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M" surname="Richardson" fullname="Michael Richardson">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="T" surname="Eckert" fullname="Toerless Eckert">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M" surname="Behringer" fullname="Michael Behringer">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="K" surname="Watsen" fullname="Kent Watsen">
            <organization showOnFrontPage="true"/>
          </author>
          <date month="September" day="21" year="2020"/>
          <abstract>
            <t indent="0">This document specifies automated bootstrapping of an Autonomic Control Plane.  To do this a Secure Key Infrastructure is bootstrapped.  This is done using manufacturer-installed X.509 certificates, in combination with a manufacturer's authorizing service, both online and offline.  We call this process the Bootstrapping Remote Secure Key Infrastructure (BRSKI) protocol. Bootstrapping a new device can occur using a routable address and a cloud service, or using only link-local connectivity, or on limited/ disconnected networks.  Support for deployment models with less stringent security requirements is included.  Bootstrapping is complete when the cryptographic identity of the new key infrastructure is successfully deployed to the device.  The established secure connection can be used to deploy a locally issued certificate to the device as well.</t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-anima-bootstrapping-keyinfra-44"/>
        <format type="TXT" target="http://www.ietf.org/internet-drafts/draft-ietf-anima-bootstrapping-keyinfra-44.txt"/>
        <refcontent>Work in Progress</refcontent>
      </reference>
      <reference anchor="Cisco_AutoInstall" target="https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/configuration/15mt/fundamentals-15-mt-book/cf-autoinstall.html" quoteTitle="true" derivedAnchor="Cisco_AutoInstall">
        <front>
          <title>Using AutoInstall to Remotely Configure Cisco Networking Devices</title>
          <author>
            <organization showOnFrontPage="true">Cisco Systems, Inc.</organization>
          </author>
          <date month="January" year="2018"/>
        </front>
        <refcontent>Configuration Fundamentals Configuration Guide, Cisco IOS
	Release 15M&amp;T</refcontent>
      </reference>
      <reference anchor="IEEE802-1AR" target="https://standards.ieee.org/standard/802_1AR-2018.html" quoteTitle="true" derivedAnchor="IEEE802-1AR">
        <front>
          <title>IEEE Standard for Local and Metropolitan Area Networks - Secure Device Identity</title>
          <author>
            <organization showOnFrontPage="true">IEEE</organization>
          </author>
          <date month="June" year="2018"/>
        </front>
        <seriesInfo name="IEEE Std" value="802-1AR"/>
      </reference>
      <reference anchor="RFC1350" target="https://www.rfc-editor.org/info/rfc1350" quoteTitle="true" derivedAnchor="RFC1350">
        <front>
          <title>The TFTP Protocol (Revision 2)</title>
          <author initials="K." surname="Sollins" fullname="K. Sollins">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="1992" month="July"/>
          <abstract>
            <t indent="0">TFTP is a very simple protocol used to transfer files.  It is from this that its name comes, Trivial File Transfer Protocol or TFTP.  Each nonterminal packet is acknowledged separately.  This document describes the protocol and its types of packets.  The document also explains the reasons behind some of the design decisions.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="33"/>
        <seriesInfo name="RFC" value="1350"/>
        <seriesInfo name="DOI" value="10.17487/RFC1350"/>
      </reference>
      <reference anchor="RFC2131" target="https://www.rfc-editor.org/info/rfc2131" quoteTitle="true" derivedAnchor="RFC2131">
        <front>
          <title>Dynamic Host Configuration Protocol</title>
          <author initials="R." surname="Droms" fullname="R. Droms">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t indent="0">The Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCPIP network.  DHCP is based on the Bootstrap Protocol (BOOTP), adding the capability of automatic allocation of reusable network addresses and additional configuration options.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="2131"/>
        <seriesInfo name="DOI" value="10.17487/RFC2131"/>
      </reference>
      <reference anchor="RFC2865" target="https://www.rfc-editor.org/info/rfc2865" quoteTitle="true" derivedAnchor="RFC2865">
        <front>
          <title>Remote Authentication Dial In User Service (RADIUS)</title>
          <author initials="C." surname="Rigney" fullname="C. Rigney">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Willens" fullname="S. Willens">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A." surname="Rubens" fullname="A. Rubens">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="W." surname="Simpson" fullname="W. Simpson">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2000" month="June"/>
          <abstract>
            <t indent="0">This document describes a protocol for carrying authentication, authorization, and configuration information between a Network Access Server which desires to authenticate its links and a shared Authentication Server.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="2865"/>
        <seriesInfo name="DOI" value="10.17487/RFC2865"/>
      </reference>
      <reference anchor="RFC4122" target="https://www.rfc-editor.org/info/rfc4122" quoteTitle="true" derivedAnchor="RFC4122">
        <front>
          <title>A Universally Unique IDentifier (UUID) URN Namespace</title>
          <author initials="P." surname="Leach" fullname="P. Leach">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M." surname="Mealling" fullname="M. Mealling">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="R." surname="Salz" fullname="R. Salz">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2005" month="July"/>
          <abstract>
            <t indent="0">This specification defines a Uniform Resource Name namespace for UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDentifier).  A UUID is 128 bits long, and can guarantee uniqueness across space and time.  UUIDs were originally used in the Apollo Network Computing System and later in the Open Software Foundation\'s (OSF) Distributed Computing Environment (DCE), and then in Microsoft Windows platforms.</t>
            <t indent="0">This specification is derived from the DCE specification with the kind permission of the OSF (now known as The Open Group).  Information from earlier versions of the DCE specification have been incorporated into this document.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4122"/>
        <seriesInfo name="DOI" value="10.17487/RFC4122"/>
      </reference>
      <reference anchor="RFC5280" target="https://www.rfc-editor.org/info/rfc5280" quoteTitle="true" derivedAnchor="RFC5280">
        <front>
          <title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
          <author initials="D." surname="Cooper" fullname="D. Cooper">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Santesson" fullname="S. Santesson">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Farrell" fullname="S. Farrell">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Boeyen" fullname="S. Boeyen">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="R." surname="Housley" fullname="R. Housley">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="W." surname="Polk" fullname="W. Polk">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2008" month="May"/>
          <abstract>
            <t indent="0">This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5280"/>
        <seriesInfo name="DOI" value="10.17487/RFC5280"/>
      </reference>
      <reference anchor="RFC7030" target="https://www.rfc-editor.org/info/rfc7030" quoteTitle="true" derivedAnchor="RFC7030">
        <front>
          <title>Enrollment over Secure Transport</title>
          <author initials="M." surname="Pritikin" fullname="M. Pritikin" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="P." surname="Yee" fullname="P. Yee" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="D." surname="Harkins" fullname="D. Harkins" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2013" month="October"/>
          <abstract>
            <t indent="0">This document profiles certificate enrollment for clients using Certificate Management over CMS (CMC) messages over a secure transport.  This profile, called Enrollment over Secure Transport (EST), describes a simple, yet functional, certificate management protocol targeting Public Key Infrastructure (PKI) clients that need to acquire client certificates and associated Certification Authority (CA) certificates.  It also supports client-generated public/private key pairs as well as key pairs generated by the CA.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7030"/>
        <seriesInfo name="DOI" value="10.17487/RFC7030"/>
      </reference>
      <reference anchor="RFC8415" target="https://www.rfc-editor.org/info/rfc8415" quoteTitle="true" derivedAnchor="RFC8415">
        <front>
          <title>Dynamic Host Configuration Protocol for IPv6 (DHCPv6)</title>
          <author initials="T." surname="Mrugalski" fullname="T. Mrugalski">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M." surname="Siodelski" fullname="M. Siodelski">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="B." surname="Volz" fullname="B. Volz">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A." surname="Yourtchenko" fullname="A. Yourtchenko">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M." surname="Richardson" fullname="M. Richardson">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Jiang" fullname="S. Jiang">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="T." surname="Lemon" fullname="T. Lemon">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="T." surname="Winters" fullname="T. Winters">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2018" month="November"/>
          <abstract>
            <t indent="0">This document describes the Dynamic Host Configuration Protocol for IPv6 (DHCPv6): an extensible mechanism for configuring nodes with network configuration parameters, IP addresses, and prefixes. Parameters can be provided statelessly, or in combination with stateful assignment of one or more IPv6 addresses and/or IPv6 prefixes.  DHCPv6 can operate either in place of or in addition to stateless address autoconfiguration (SLAAC).</t>
            <t indent="0">This document updates the text from RFC 3315 (the original DHCPv6 specification) and incorporates prefix delegation (RFC 3633), stateless DHCPv6 (RFC 3736), an option to specify an upper bound for how long a client should wait before refreshing information (RFC 4242), a mechanism for throttling DHCPv6 clients when DHCPv6 service is not available (RFC 7083), and relay agent handling of unknown messages (RFC 7283).  In addition, this document clarifies the interactions between models of operation (RFC 7550).  As such, this document obsoletes RFC 3315, RFC 3633, RFC 3736, RFC 4242, RFC 7083, RFC 7283, and RFC 7550.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8415"/>
        <seriesInfo name="DOI" value="10.17487/RFC8415"/>
      </reference>
      <reference anchor="RFC8551" target="https://www.rfc-editor.org/info/rfc8551" quoteTitle="true" derivedAnchor="RFC8551">
        <front>
          <title>Secure/Multipurpose Internet Mail Extensions (S/MIME) Version 4.0 Message Specification</title>
          <author initials="J." surname="Schaad" fullname="J. Schaad">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="B." surname="Ramsdell" fullname="B. Ramsdell">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="S." surname="Turner" fullname="S. Turner">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2019" month="April"/>
          <abstract>
            <t indent="0">This document defines Secure/Multipurpose Internet Mail Extensions (S/MIME) version 4.0.  S/MIME provides a consistent way to send and receive secure MIME data.  Digital signatures provide authentication, message integrity, and non-repudiation with proof of origin. Encryption provides data confidentiality.  Compression can be used to reduce data size.  This document obsoletes RFC 5751.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8551"/>
        <seriesInfo name="DOI" value="10.17487/RFC8551"/>
      </reference>
      <reference anchor="RFC8572" target="https://www.rfc-editor.org/info/rfc8572" quoteTitle="true" derivedAnchor="RFC8572">
        <front>
          <title>Secure Zero Touch Provisioning (SZTP)</title>
          <author 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 indent="0">This document presents a technique to securely provision a networking device when it is booting in a factory-default state.  Variations in the solution enable it to be used on both public and private networks.  The provisioning steps are able to update the boot image, commit an initial configuration, and execute arbitrary scripts to address auxiliary needs.  The updated device is subsequently able to establish secure connections with other systems.  For instance, a device may establish NETCONF (RFC 6241) and/or RESTCONF (RFC 8040) connections with deployment-specific network management systems.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8572"/>
        <seriesInfo name="DOI" value="10.17487/RFC8572"/>
      </reference>
      <reference anchor="RFC8894" target="https://www.rfc-editor.org/info/rfc8894" quoteTitle="true" derivedAnchor="RFC8894">
        <front>
          <title>Simple Certificate Enrolment Protocol</title>
          <author initials="P." surname="Gutmann" fullname="P. Gutmann">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2020" month="September"/>
          <abstract>
            <t indent="0">This document specifies the Simple Certificate Enrolment Protocol (SCEP), a PKI protocol that leverages existing technology by using Cryptographic Message Syntax (CMS, formerly known as PKCS #7) and PKCS #10 over HTTP.  SCEP is the evolution of the enrolment protocol sponsored by Cisco Systems, which enjoys wide support in both client and server implementations, as well as being relied upon by numerous other industry standards that work with certificates.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8894"/>
        <seriesInfo name="DOI" value="10.17487/RFC8894"/>
      </reference>
      <reference anchor="I-D.ietf-opsawg-tacacs" quoteTitle="true" target="https://tools.ietf.org/html/draft-ietf-opsawg-tacacs-18" derivedAnchor="TACACS">
        <front>
          <title>The TACACS+ Protocol</title>
          <author initials="T" surname="Dahm" fullname="Thorsten Dahm">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A" surname="Ota" fullname="Andrej Ota">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="D." surname="Medway Gash" fullname="Douglas C. Medway Gash">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="D" surname="Carrel" fullname="David Carrel">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="L" surname="Grant" fullname="Lol Grant">
            <organization showOnFrontPage="true"/>
          </author>
          <date month="March" day="20" year="2020"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-opsawg-tacacs-18"/>
        <refcontent>Work in Progress</refcontent>
      </reference>
    </references>
    <section anchor="proof" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-proof-of-concept">Proof of Concept</name>
      <t indent="0" pn="section-appendix.a-1">This section contains a proof of concept of the system.
      It is only intended for illustration and is not intended to be used
      in production.</t>
      <t indent="0" pn="section-appendix.a-2">It uses OpenSSL from the command line. In production, something more
      automated would be used. In this example, the unique device identifier is the
      serial number of the router, SN19842256.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-a.1">
        <name slugifiedName="name-step-1-generating-the-certi">Step 1: Generating the Certificate</name>
        <t indent="0" pn="section-a.1-1">This step is performed by the router. It generates a key, then a
        Certificate Signing Request (CSR), and then a self-signed certificate.</t>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.1.1">
          <name slugifiedName="name-step-11-generate-the-privat">Step 1.1: Generate the Private Key</name>
          <sourcecode name="" type="" markers="false" pn="section-a.1.1-1">
$ openssl ecparam -out privatekey.key -name prime256v1 -genkey
$
</sourcecode>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.1.2">
          <name slugifiedName="name-step-12-generate-the-certif">Step 1.2: Generate the Certificate Signing Request</name>
          <sourcecode name="" type="" markers="false" pn="section-a.1.2-1">
$ openssl req -new -key key.pem -out SN19842256.csr
Common Name (e.g., server FQDN or YOUR name) []:SN19842256
</sourcecode>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.1.3">
          <name slugifiedName="name-step-13-generate-the-self-s">Step 1.3: Generate the (Self-Signed) Certificate Itself</name>
          <sourcecode name="" type="" markers="false" pn="section-a.1.3-1">
$ openssl req -x509 -days 36500 -key key.pem -in SN19842256.csr
-out SN19842256.crt
</sourcecode>
          <t indent="0" pn="section-a.1.3-2">The router then sends the key to the vendor's key server for
          publication (not shown).</t>
        </section>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-a.2">
        <name slugifiedName="name-step-2-generating-the-encry">Step 2: Generating the Encrypted Configuration</name>
        <t indent="0" pn="section-a.2-1">The operator now wants to deploy the new router.</t>
        <t indent="0" pn="section-a.2-2">They generate the initial configuration (using whatever magic tool
        generates router configs!), fetch the router's certificate, and
        encrypt the configuration file to that key. This is done by the operator.</t>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.2.1">
          <name slugifiedName="name-step-21-fetch-the-certifica">Step 2.1: Fetch the Certificate</name>
          <sourcecode name="" type="" markers="false" pn="section-a.2.1-1">
$ wget http://keyserv.example.net/certificates/SN19842256.crt
</sourcecode>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.2.2">
          <name slugifiedName="name-step-22-encrypt-the-configu">Step 2.2: Encrypt the Configuration File</name>
          <t indent="0" pn="section-a.2.2-1">S/MIME is used here because it is simple to demonstrate. This is
          almost definitely not the best way to do this.</t>
          <sourcecode name="" type="" markers="false" pn="section-a.2.2-2">
$ openssl smime -encrypt -aes-256-cbc -in SN19842256.cfg\
   -out SN19842256.enc -outform PEM SN19842256.crt
$ more SN19842256.enc
-----BEGIN PKCS7-----
MIICigYJKoZIhvcNAQcDoIICezCCAncCAQAxggE+MIIBOgIBADAiMBUxEzARBgNV
BAMMClNOMTk4NDIyNTYCCQDJVuBlaTOb1DANBgkqhkiG9w0BAQEFAASCAQBABvM3
...
LZoq08jqlWhZZWhTKs4XPGHUdmnZRYIP8KXyEtHt
-----END PKCS7-----
</sourcecode>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.2.3">
          <name slugifiedName="name-step-23-copy-configuration-">Step 2.3: Copy Configuration to the Configuration Server</name>
          <sourcecode name="" type="" markers="false" pn="section-a.2.3-1">
$ scp SN19842256.enc config.example.com:/tftpboot
</sourcecode>
        </section>
      </section>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-a.3">
        <name slugifiedName="name-step-3-decrypting-and-using">Step 3: Decrypting and Using the Configuration</name>
        <t indent="0" pn="section-a.3-1">When the router connects to the operator's network, it will detect
        that it does not have a valid configuration file and will start the
        "autoboot" process. This is a well-documented process, but
        the high-level overview is that it will use DHCP to obtain an IP
        address and configuration server. It will then use TFTP to download a
        configuration file, based upon its serial number (this document
        modifies the solution to fetch an encrypted configuration file (ending in
        .enc)). It will then decrypt the configuration file and install it.</t>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.3.1">
          <name slugifiedName="name-step-31-fetch-encrypted-con">Step 3.1: Fetch Encrypted Configuration File from Configuration Server</name>
          <sourcecode name="" type="" markers="false" pn="section-a.3.1-1">
$ tftp 2001:0db8::23 -c get SN19842256.enc
</sourcecode>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-a.3.2">
          <name slugifiedName="name-step-32-decrypt-and-use-the">Step 3.2: Decrypt and Use the Configuration</name>
          <sourcecode name="" type="" markers="false" pn="section-a.3.2-1">
$ openssl smime -decrypt -in SN19842256.enc -inform pkcs7\
   -out config.cfg -inkey key.pem
</sourcecode>
          <t indent="0" pn="section-a.3.2-2">If an attacker does not have the correct key, they will not be
          able to decrypt the configuration file:</t>
          <sourcecode name="" type="" markers="false" pn="section-a.3.2-3">
$ openssl smime -decrypt -in SN19842256.enc -inform pkcs7\
   -out config.cfg -inkey wrongkey.pem
Error decrypting PKCS#7 structure
140352450692760:error:06065064:digital envelope
 routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:592:
$ echo $?
4</sourcecode>
        </section>
      </section>
    </section>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.b-1">The authors wish to thank everyone who contributed, including
      <contact fullname="Benoit Claise"/>, <contact fullname="Francis       Dupont"/>, <contact fullname="Mirja Kuehlewind"/>, <contact fullname="Sam Ribeiro"/>, <contact fullname="Michael Richardson"/>,
      <contact fullname="Sean Turner"/>, and <contact fullname="Kent       Watsen"/>. <contact fullname="Joe Clarke"/> also provided significant
      comments and review, and <contact fullname="Tom Petch"/> provided
      significant editorial contributions to better describe the use cases
      and clarify the scope.</t>
      <t indent="0" pn="section-appendix.b-2"><contact fullname="Roman Danyliw"/> and <contact fullname="Benjamin       Kaduk"/> also provided helpful text, especially around the certificate
      usage and security considerations.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.c">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author fullname="Warren Kumari" initials="W." surname="Kumari">
        <organization showOnFrontPage="true">Google</organization>
        <address>
          <postal>
            <street>1600 Amphitheatre Parkway</street>
            <city>Mountain View</city>
            <region>CA</region>
            <code>94043</code>
            <country>United States of America</country>
          </postal>
          <email>warren@kumari.net</email>
        </address>
      </author>
      <author fullname="Colin Doyle" initials="C." surname="Doyle">
        <organization showOnFrontPage="true">Juniper Networks</organization>
        <address>
          <postal>
            <street>1133 Innovation Way</street>
            <city>Sunnyvale</city>
            <region>CA</region>
            <code>94089</code>
            <country>United States of America</country>
          </postal>
          <email>cdoyle@juniper.net</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
