<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" submissionType="IETF" ipr="trust200902" docName="draft-ietf-netconf-keystore-35" number="9642" obsoletes="" updates="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" prepTime="2024-10-10T13:35:27" indexInclude="true" scripts="Common,Latin" tocDepth="3">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-netconf-keystore-35" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9642" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="A YANG Data Model for a Keystore">A YANG Data Model for a Keystore</title>
    <seriesInfo name="RFC" value="9642" 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>
    <date month="10" year="2024"/>
    <area>OPS</area>
    <workgroup>netconf</workgroup>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document presents a YANG module called "ietf-keystore"
          that enables centralized configuration of both symmetric and
          asymmetric keys.  The secret value for both key types may be
          encrypted or hidden.  Asymmetric keys may be associated with
          certificates.  Notifications are sent when certificates are
          about to expire.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9642" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2024 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-relation-to-other-rfcs">Relation to Other RFCs</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-specification-language">Specification Language</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.4">
                <t indent="0" pn="section-toc.1-1.1.2.4.1"><xref derivedContent="1.4" format="counter" sectionFormat="of" target="section-1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-adherence-to-the-nmda">Adherence to the NMDA</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.5">
                <t indent="0" pn="section-toc.1-1.1.2.5.1"><xref derivedContent="1.5" format="counter" sectionFormat="of" target="section-1.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions">Conventions</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-ietf-keystore-module">The "ietf-keystore" Module</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-data-model-overview">Data Model Overview</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example-usage">Example Usage</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-yang-module">YANG Module</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-support-for-built-in-keys">Support for Built-In Keys</xref></t>
          </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-encrypting-keys-in-configur">Encrypting Keys in Configuration</xref></t>
          </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-security-considerations">Security 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-security-of-data-at-rest-an">Security of Data at Rest and in Motion</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-unconstrained-private-key-u">Unconstrained Private Key Usage</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-security-considerations-for">Security Considerations for the "ietf-keystore" YANG Module</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>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-ietf-xml-registry">The IETF XML Registry</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-yang-module-names-regis">The YANG Module Names Registry</xref></t>
              </li>
            </ul>
          </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-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.7.2">
              <li pn="section-toc.1-1.7.2.1">
                <t indent="0" pn="section-toc.1-1.7.2.1.1"><xref derivedContent="7.1" format="counter" sectionFormat="of" target="section-7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.7.2.2">
                <t indent="0" pn="section-toc.1-1.7.2.2.1"><xref derivedContent="7.2" format="counter" sectionFormat="of" target="section-7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-address">Author's Address</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">This document presents a YANG 1.1 <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/>  module called
          "ietf-keystore" that enables centralized configuration of both symmetric
          and asymmetric keys.  The secret value for both key types may be
          encrypted or hidden (see <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>).
          Asymmetric keys may be associated with certificates.  Notifications are
          sent when certificates are about to expire.</t>
      <t indent="0" pn="section-1-2">The "ietf-keystore" module defines many "grouping" statements
          intended for use by other modules that may import it.  For instance,
          there are groupings that define enabling a key to be configured
          either inline (within the defining data model) or as a reference to a key
          in the central keystore.
      </t>
      <t indent="0" pn="section-1-3">Special consideration has been given for servers that have cryptographic
          hardware, such as a trusted platform module (TPM).  These servers are
          unique in that the cryptographic hardware hides the secret key values.
          Additionally, such hardware is commonly initialized when manufactured
          to protect a "built-in" asymmetric key for which its public half is
          conveyed in an identity certificate (e.g., an Initial Device Identifier (IDevID)
          <xref target="Std-802.1AR-2018" format="default" sectionFormat="of" derivedContent="Std-802.1AR-2018"/> certificate). See how built-in keys are
          supported in <xref target="built-ins" format="default" sectionFormat="of" derivedContent="Section 3"/>.</t>
      <t indent="0" pn="section-1-4">This document is intended to reflect existing practices that many
          server implementations support at the time of writing.  To simplify
          implementation, advanced key formats may be selectively implemented.</t>
      <t indent="0" pn="section-1-5">Implementations may utilize operating-system level
          keystore utilities (e.g., "Keychain Access" on MacOS) and/or cryptographic
          hardware (e.g., TPMs).</t>
      <section anchor="collective-effort" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-relation-to-other-rfcs">Relation to Other RFCs</name>
        <t indent="0" pn="section-1.1-1">This document presents a YANG module <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/>
            that is part of a collection of RFCs that work together
            to ultimately support the configuration of both the clients
            and servers of the Network Configuration Protocol (NETCONF) <xref target="RFC6241" format="default" sectionFormat="of" derivedContent="RFC6241"/> and
            RESTCONF <xref target="RFC8040" format="default" sectionFormat="of" derivedContent="RFC8040"/>.</t>
        <t indent="0" pn="section-1.1-2"> The dependency relationship between the primary YANG groupings
            defined in the various RFCs is presented in the diagram below.
            In some cases, a document may define secondary groupings that
            introduce dependencies not illustrated in the diagram.
            The labels in the diagram are shorthand names for the defining
            RFCs.  The citation references for the shorthand names are provided below
            the diagram.</t>
        <t indent="0" pn="section-1.1-3">Please note that the arrows in the diagram point from referencer
            to referenced.  For example, the "crypto-types" RFC does not
            have any dependencies, whilst the "keystore" RFC depends on the
            "crypto-types" RFC.</t>
        <artwork align="left" pn="section-1.1-4">
                               crypto-types
                                 ^      ^
                                /        \
                               /          \
                      truststore         keystore
                       ^     ^             ^  ^
                       |     +---------+   |  |
                       |               |   |  |
                       |      +------------+  |
tcp-client-server      |     /         |      |
   ^    ^        ssh-client-server     |      |
   |    |           ^            tls-client-server
   |    |           |              ^     ^        http-client-server
   |    |           |              |     |                 ^
   |    |           |        +-----+     +---------+       |
   |    |           |        |                     |       |
   |    +-----------|--------|--------------+      |       |
   |                |        |              |      |       |
   +-----------+    |        |              |      |       |
               |    |        |              |      |       |
               |    |        |              |      |       |
            netconf-client-server       restconf-client-server

</artwork>
        <table align="left" pn="table-1">
          <name slugifiedName="name-labels-in-diagram-to-rfc-ma">Labels in Diagram to RFC Mapping</name>
          <tbody>
            <tr>
              <th align="left" colspan="1" rowspan="1">Label in Diagram</th>
              <th align="left" colspan="1" rowspan="1">Originating RFC</th>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">crypto-types</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">truststore</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="RFC9641" format="default" sectionFormat="of" derivedContent="RFC9641"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">keystore</td>
              <td align="left" colspan="1" rowspan="1">
                RFC 9642</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">tcp-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="RFC9643" format="default" sectionFormat="of" derivedContent="RFC9643"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">ssh-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="RFC9644" format="default" sectionFormat="of" derivedContent="RFC9644"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">tls-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="RFC9645" format="default" sectionFormat="of" derivedContent="RFC9645"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">http-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="I-D.ietf-netconf-http-client-server" format="default" sectionFormat="of" derivedContent="HTTP-CLIENT-SERVER"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">netconf-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="I-D.ietf-netconf-netconf-client-server" format="default" sectionFormat="of" derivedContent="NETCONF-CLIENT-SERVER"/></td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">restconf-client-server</td>
              <td align="left" colspan="1" rowspan="1">
                <xref target="I-D.ietf-netconf-restconf-client-server" format="default" sectionFormat="of" derivedContent="RESTCONF-CLIENT-SERVER"/></td>
            </tr>
          </tbody>
        </table>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-specification-language">Specification Language</name>
        <t indent="0" pn="section-1.2-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>",
    "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be
    interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as
    shown here.
        </t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.3">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.3-1">The terms "client" and "server" are defined in <xref target="RFC6241" format="default" sectionFormat="of" derivedContent="RFC6241"/> and are not redefined here.</t>
        <t indent="0" pn="section-1.3-2">The term "keystore" is defined in this document as a mechanism that intends to safeguard secrets.</t>
        <t indent="0" pn="section-1.3-3">The nomenclatures "&lt;running&gt;" and "&lt;operational&gt;" are defined in <xref target="RFC8342" format="default" sectionFormat="of" derivedContent="RFC8342"/>.</t>
        <t indent="0" pn="section-1.3-4">The sentence fragments "augmented" and "augmented in" are used herein as the past tense verbified
            form of the "augment" statement defined in <xref target="RFC7950" sectionFormat="of" section="7.17" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7950#section-7.17" derivedContent="RFC7950"/>.</t>
        <t indent="0" pn="section-1.3-5">The term "key" may be used to mean one of three things in this document: 1) the YANG-defined
            "asymmetric-key" or "symmetric-key" node defined in this document, 2) the raw key data possessed by the aforementioned key nodes, or 3) the "key" of a YANG "list" statement.
	    This document qualifies types '2' and '3' using "raw key value" and
            "YANG list key" where needed.  In all other cases, an unqualified "key" refers to a YANG-defined
            "asymmetric-key" or "symmetric-key" node.</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.4">
        <name slugifiedName="name-adherence-to-the-nmda">Adherence to the NMDA</name>
        <t indent="0" pn="section-1.4-1">This document is compliant with Network Management Datastore Architecture
            (NMDA) <xref target="RFC8342" format="default" sectionFormat="of" derivedContent="RFC8342"/>.  For instance, keys and associated
            certificates installed during manufacturing (e.g., for an IDevID
            certificate) are expected to appear in &lt;operational&gt;
            (see <xref target="built-ins" format="default" sectionFormat="of" derivedContent="Section 3"/>).</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-1.5">
        <name slugifiedName="name-conventions">Conventions</name>
        <t indent="0" pn="section-1.5-1">Various examples in this document use "BASE64VALUE=" as a
            placeholder value for binary data that has been base64 encoded
            (per <xref target="RFC7950" sectionFormat="of" section="9.8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7950#section-9.8" derivedContent="RFC7950"/>).  This
            placeholder value is used because real base64-encoded structures
            are often many lines long and hence distracting to the example
        being presented.</t>
        <t indent="0" pn="section-1.5-2">
  Various examples in this document use the XML <xref target="W3C.REC-xml-20081126" format="default" sectionFormat="of" derivedContent="W3C.REC-xml-20081126"/> encoding.
Other encodings, such as JSON <xref target="RFC8259" format="default" sectionFormat="of" derivedContent="RFC8259"/>, could alternatively be used.
        </t>
        <t indent="0" pn="section-1.5-3">
  Various examples in this document contain long lines that may be folded,
  as described in <xref target="RFC8792" format="default" sectionFormat="of" derivedContent="RFC8792"/>.
        </t>
        <t indent="0" pn="section-1.5-4">This document uses the adjective "central" to the word "keystore"
            to refer to the top-level instance of the "keystore-grouping", when
            the "central-keystore-supported" feature is enabled.  Please be
            aware that consuming YANG modules <bcp14>MAY</bcp14> instantiate the "keystore-grouping"
            in other locations.  All such other instances are not the "central"
            instance.</t>
      </section>
    </section>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-the-ietf-keystore-module">The "ietf-keystore" Module</name>
      <t indent="0" pn="section-2-1">This section defines a YANG 1.1 <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/> module called
          "ietf-keystore".  A high-level overview of the module is provided in
          <xref target="overview" format="default" sectionFormat="of" derivedContent="Section 2.1"/>. Examples illustrating the module's use
          are provided in <xref target="examples" format="default" sectionFormat="of" derivedContent="Section 2.2"/>. The YANG module itself is
          defined in <xref target="keystore-yang-module" format="default" sectionFormat="of" derivedContent="Section 2.3"/>.</t>
      <section anchor="overview" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-data-model-overview">Data Model Overview</name>
        <t indent="0" pn="section-2.1-1">This section provides an overview of the "ietf-keystore" module
            in terms of its features, typedefs, groupings, and protocol-accessible
            nodes.</t>
        <section anchor="features" toc="exclude" numbered="true" removeInRFC="false" pn="section-2.1.1">
          <name slugifiedName="name-features">Features</name>
          <t indent="0" pn="section-2.1.1-1">The following diagram lists all the "feature" statements
              defined in the "ietf-keystore" module:</t>
          <sourcecode type="yangtree" markers="false" pn="section-2.1.1-2">
Features:
  +-- central-keystore-supported
  +-- inline-definitions-supported
  +-- asymmetric-keys
  +-- symmetric-keys
</sourcecode>
          <t indent="0" pn="section-2.1.1-3">The diagram above uses syntax that is similar to but not
                defined in <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/>.</t>
        </section>
        <section anchor="typedefs" toc="exclude" numbered="true" removeInRFC="false" pn="section-2.1.2">
          <name slugifiedName="name-typedefs">Typedefs</name>
          <t indent="0" pn="section-2.1.2-1">The following diagram lists the "typedef" statements defined in
              the "ietf-keystore" module:</t>
          <sourcecode type="yangtree" markers="false" pn="section-2.1.2-2">
Typedefs:
  leafref
    +-- central-symmetric-key-ref
    +-- central-asymmetric-key-ref
</sourcecode>
          <t indent="0" pn="section-2.1.2-3">The diagram above uses syntax that is similar to but not
                defined in <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/>.</t>
          <t indent="0" pn="section-2.1.2-4">Comments:</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.2-5">
            <li pn="section-2.1.2-5.1">All the typedefs defined in the "ietf-keystore" module
                extend the base "leafref" type defined in <xref target="RFC7950" format="default" sectionFormat="of" derivedContent="RFC7950"/>.</li>
            <li pn="section-2.1.2-5.2">The leafrefs refer to symmetric and asymmetric keys in the
                central keystore when this module is implemented.</li>
            <li pn="section-2.1.2-5.3">These typedefs are provided as an aid to consuming
                modules that import the "ietf-keystore" module.</li>
          </ul>
        </section>
        <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.1.3">
          <name slugifiedName="name-groupings">Groupings</name>
          <t indent="0" pn="section-2.1.3-1">The "ietf-keystore" module defines the following "grouping" statements:</t>
          <ul spacing="compact" bare="false" empty="false" indent="3" pn="section-2.1.3-2">
            <li pn="section-2.1.3-2.1">encrypted-by-grouping</li>
            <li pn="section-2.1.3-2.2">central-asymmetric-key-certificate-ref-grouping</li>
            <li pn="section-2.1.3-2.3">inline-or-keystore-symmetric-key-grouping</li>
            <li pn="section-2.1.3-2.4">inline-or-keystore-asymmetric-key-grouping</li>
            <li pn="section-2.1.3-2.5">inline-or-keystore-asymmetric-key-with-certs-grouping</li>
            <li pn="section-2.1.3-2.6">inline-or-keystore-end-entity-cert-with-key-grouping</li>
            <li pn="section-2.1.3-2.7">keystore-grouping</li>
          </ul>
          <t indent="0" pn="section-2.1.3-3">Each of these groupings are presented in the following subsections.</t>
          <section anchor="encrypted-by-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.1">
            <name slugifiedName="name-the-encrypted-by-grouping-g">The "encrypted-by-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.1-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "encrypted-by-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.1-2">
  grouping encrypted-by-grouping:
    +-- (encrypted-by)
       +--:(central-symmetric-key-ref)
       |        {central-keystore-supported,symmetric-keys}?
       |  +-- symmetric-key-ref?    ks:central-symmetric-key-ref
       +--:(central-asymmetric-key-ref)
                {central-keystore-supported,asymmetric-keys}?
          +-- asymmetric-key-ref?   ks:central-asymmetric-key-ref
</sourcecode>
            <t indent="0" pn="section-2.1.3.1-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.1-4">
              <li pn="section-2.1.3.1-4.1">This grouping defines a "choice" statement with options to reference
                  either a symmetric or an asymmetric key configured in the keystore.</li>
              <li pn="section-2.1.3.1-4.2">This grouping is usable only when the keystore module is implemented.
                  Servers defining custom keystore locations <bcp14>MUST</bcp14> augment in alternate
                  "encrypted-by" references to the alternate locations.</li>
            </ul>
          </section>
          <section anchor="central-asymmetric-key-certificate-ref-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.2">
            <name slugifiedName="name-the-central-asymmetric-key-">The "central-asymmetric-key-certificate-ref-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.2-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "central-asymmetric-key-certificate-ref-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.2-2">
  grouping central-asymmetric-key-certificate-ref-grouping:
    +-- asymmetric-key?   ks:central-asymmetric-key-ref
    |       {central-keystore-supported,asymmetric-keys}?
    +-- certificate?      leafref
</sourcecode>
            <t indent="0" pn="section-2.1.3.2-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.2-4">
              <li pn="section-2.1.3.2-4.1">This grouping defines a reference to a certificate in two parts: the
                  first being the name of the asymmetric key the certificate is associated
                  with, and the second being the name of the certificate itself.</li>
              <li pn="section-2.1.3.2-4.2">This grouping is usable only when the keystore module is implemented.
                  Servers defining custom keystore locations can define an alternate grouping
                  for references to the alternate locations.</li>
            </ul>
          </section>
          <section anchor="inline-or-keystore-symmetric-key-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.3">
            <name slugifiedName="name-the-inline-or-keystore-symm">The "inline-or-keystore-symmetric-key-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.3-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "inline-or-keystore-symmetric-key-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.3-2">
  grouping inline-or-keystore-symmetric-key-grouping:
    +-- (inline-or-keystore)
       +--:(inline) {inline-definitions-supported}?
       |  +-- inline-definition
       |     +---u ct:symmetric-key-grouping
       +--:(central-keystore)
                {central-keystore-supported,symmetric-keys}?
          +-- central-keystore-reference?
                  ks:central-symmetric-key-ref
</sourcecode>
            <t indent="0" pn="section-2.1.3.3-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.3-4">
              <li pn="section-2.1.3.3-4.1">The "inline-or-keystore-symmetric-key-grouping" grouping is provided
                  solely as convenience to consuming modules that wish to offer
                  an option for a symmetric key that is defined either inline
                  or as a reference to a symmetric key in the keystore.</li>
              <li pn="section-2.1.3.3-4.2">A "choice" statement is used to expose the various options.
                  Each option is enabled by a "feature" statement.  Additional
                  "case" statements <bcp14>MAY</bcp14> be augmented in if, e.g., there is a
                  need to reference a symmetric key in an alternate location.</li>
              <li pn="section-2.1.3.3-4.3">For the "inline-definition" option, the definition uses the
                  "symmetric-key-grouping" grouping discussed in <xref target="RFC9640" sectionFormat="of" section="2.1.4.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.3" derivedContent="RFC9640"/>.</li>
              <li pn="section-2.1.3.3-4.4">For the "central-keystore" option, the "central-keystore-reference" is an
                  instance of the "symmetric-key-ref" discussed in <xref target="typedefs" format="default" sectionFormat="of" derivedContent="Section 2.1.2"/>.</li>
            </ul>
          </section>
          <section anchor="inline-or-keystore-asymmetric-key-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.4">
            <name slugifiedName="name-the-inline-or-keystore-asym">The "inline-or-keystore-asymmetric-key-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.4-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "inline-or-keystore-asymmetric-key-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.4-2">
  grouping inline-or-keystore-asymmetric-key-grouping:
    +-- (inline-or-keystore)
       +--:(inline) {inline-definitions-supported}?
       |  +-- inline-definition
       |     +---u ct:asymmetric-key-pair-grouping
       +--:(central-keystore)
                {central-keystore-supported,asymmetric-keys}?
          +-- central-keystore-reference?
                  ks:central-asymmetric-key-ref
</sourcecode>
            <t indent="0" pn="section-2.1.3.4-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.4-4">
              <li pn="section-2.1.3.4-4.1">The "inline-or-keystore-asymmetric-key-grouping" grouping is provided
                  solely as convenience to consuming modules that wish to offer
                  an option for an asymmetric key that is defined either inline
                  or as a reference to an asymmetric key in the keystore.</li>
              <li pn="section-2.1.3.4-4.2">A "choice" statement is used to expose the various options.
                  Each option is enabled by a "feature" statement.  Additional
                  "case" statements <bcp14>MAY</bcp14> be augmented in if, e.g., there is a
                  need to reference an asymmetric key in an alternate location.</li>
              <li pn="section-2.1.3.4-4.3">For the "inline-definition" option, the definition uses the
                  "asymmetric-key-pair-grouping" grouping discussed in <xref target="RFC9640" sectionFormat="of" section="2.1.4.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.6" derivedContent="RFC9640"/>.</li>
              <li pn="section-2.1.3.4-4.4">For the "central-keystore" option, the "central-keystore-reference" is an
                  instance of the "asymmetric-key-ref" typedef discussed in
                  <xref target="typedefs" format="default" sectionFormat="of" derivedContent="Section 2.1.2"/>.</li>
            </ul>
          </section>
          <section anchor="inline-or-keystore-asymmetric-key-with-certs-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.5">
            <name slugifiedName="name-the-inline-or-keystore-asymm">The "inline-or-keystore-asymmetric-key-with-certs-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.5-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "inline-or-keystore-asymmetric-key-with-certs-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.5-2">
  grouping inline-or-keystore-asymmetric-key-with-certs-grouping:
    +-- (inline-or-keystore)
       +--:(inline) {inline-definitions-supported}?
       |  +-- inline-definition
       |     +---u ct:asymmetric-key-pair-with-certs-grouping
       +--:(central-keystore)
                {central-keystore-supported,asymmetric-keys}?
          +-- central-keystore-reference?
                  ks:central-asymmetric-key-ref
</sourcecode>
            <t indent="0" pn="section-2.1.3.5-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.5-4">
              <li pn="section-2.1.3.5-4.1">The "inline-or-keystore-asymmetric-key-with-certs-grouping" grouping is provided
                  solely as convenience to consuming modules that wish to offer
                  an option for an asymmetric key that is defined either inline
                  or as a reference to an asymmetric key in the keystore.</li>
              <li pn="section-2.1.3.5-4.2">A "choice" statement is used to expose the various options.
                  Each option is enabled by a "feature" statement.  Additional
                  "case" statements <bcp14>MAY</bcp14> be augmented in if, e.g., there is a
                  need to reference an asymmetric key in an alternate location.</li>
              <li pn="section-2.1.3.5-4.3">For the "inline-definition" option, the definition uses the
                  "asymmetric-key-pair-with-certs-grouping" grouping discussed in <xref target="RFC9640" sectionFormat="of" section="2.1.4.12" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.12" derivedContent="RFC9640"/>.</li>
              <li pn="section-2.1.3.5-4.4">For the "central-keystore" option, the "central-keystore-reference" is an
                  instance of the "asymmetric-key-ref" typedef discussed in
                  <xref target="typedefs" format="default" sectionFormat="of" derivedContent="Section 2.1.2"/>.</li>
            </ul>
          </section>
          <section anchor="inline-or-keystore-end-entity-cert-with-key-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.6">
            <name slugifiedName="name-the-inline-or-keystore-end-">The "inline-or-keystore-end-entity-cert-with-key-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.6-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "inline-or-keystore-end-entity-cert-with-key-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.6-2">
  grouping inline-or-keystore-end-entity-cert-with-key-grouping:
    +-- (inline-or-keystore)
       +--:(inline) {inline-definitions-supported}?
       |  +-- inline-definition
       |     +---u ct:asymmetric-key-pair-with-cert-grouping
       +--:(central-keystore)
                {central-keystore-supported,asymmetric-keys}?
          +-- central-keystore-reference
             +---u central-asymmetric-key-certificate-ref-grouping
</sourcecode>
            <t indent="0" pn="section-2.1.3.6-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.6-4">
              <li pn="section-2.1.3.6-4.1">The "inline-or-keystore-end-entity-cert-with-key-grouping" grouping is provided
                  solely as convenience to consuming modules that wish to offer
                  an option for a symmetric key that is defined either inline
                  or as a reference to a symmetric key in the keystore.</li>
              <li pn="section-2.1.3.6-4.2">A "choice" statement is used to expose the various options.
                  Each option is enabled by a "feature" statement.  Additional
                  "case" statements <bcp14>MAY</bcp14> be augmented in if, e.g., there is a
                  need to reference a symmetric key in an alternate location.</li>
              <li pn="section-2.1.3.6-4.3">For the "inline-definition" option, the definition uses the
                  "asymmetric-key-pair-with-certs-grouping" grouping discussed in <xref target="RFC9640" sectionFormat="of" section="2.1.4.12" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.12" derivedContent="RFC9640"/>.</li>
              <li pn="section-2.1.3.6-4.4">For the "central-keystore" option, the "central-keystore-reference" uses the
                  "central-asymmetric-key-certificate-ref-grouping" grouping discussed in
                  <xref target="central-asymmetric-key-certificate-ref-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.2"/>.</li>
            </ul>
          </section>
          <section anchor="keystore-grouping" numbered="true" removeInRFC="false" toc="exclude" pn="section-2.1.3.7">
            <name slugifiedName="name-the-keystore-grouping-group">The "keystore-grouping" Grouping</name>
            <t indent="0" pn="section-2.1.3.7-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> illustrates the
                "keystore-grouping" grouping:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.1.3.7-2">
  grouping keystore-grouping:
    +-- asymmetric-keys {asymmetric-keys}?
    |  +-- asymmetric-key* [name]
    |     +-- name                                          string
    |     +---u ct:asymmetric-key-pair-with-certs-grouping
    +-- symmetric-keys {symmetric-keys}?
       +-- symmetric-key* [name]
          +-- name                         string
          +---u ct:symmetric-key-grouping
</sourcecode>
            <t indent="0" pn="section-2.1.3.7-3">Comments:</t>
            <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.3.7-4">
              <li pn="section-2.1.3.7-4.1">The "keystore-grouping" grouping defines a keystore instance
                  as being composed of symmetric and asymmetric keys.  The structure
                  for the symmetric and asymmetric keys is essentially the same:
                  a "list" inside a "container".</li>
              <li pn="section-2.1.3.7-4.2">For asymmetric keys, each "asymmetric-key" uses the
                  "asymmetric-key-pair-with-certs-grouping" grouping discussed in
              <xref target="RFC9640" sectionFormat="of" section="2.1.4.12" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.12" derivedContent="RFC9640"/>.</li>
              <li pn="section-2.1.3.7-4.3">For symmetric keys, each "symmetric-key" uses the
                  "symmetric-key-grouping" grouping discussed in
                  <xref target="RFC9640" sectionFormat="of" section="2.1.4.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.3" derivedContent="RFC9640"/>.</li>
            </ul>
          </section>
        </section>
        <section anchor="proto-access-nodes" toc="exclude" numbered="true" removeInRFC="false" pn="section-2.1.4">
          <name slugifiedName="name-protocol-accessible-nodes">Protocol-Accessible Nodes</name>
          <t indent="0" pn="section-2.1.4-1">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> lists all the
              protocol-accessible nodes defined in the "ietf-keystore" module without
              expanding the "grouping" statements:</t>
          <sourcecode type="yangtree" markers="false" pn="section-2.1.4-2">
module: ietf-keystore
  +--rw keystore {central-keystore-supported}?
     +---u keystore-grouping
</sourcecode>
          <t indent="0" pn="section-2.1.4-3">The following tree diagram <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/> lists all the
              protocol-accessible nodes defined in the "ietf-keystore" module, with
              all "grouping" statements expanded, enabling the keystore's full
          structure to be seen.</t>
          <sourcecode type="yangtree" markers="false" pn="section-2.1.4-4">
=============== NOTE: '\' line wrapping per RFC 8792 ================

module: ietf-keystore
  +--rw keystore {central-keystore-supported}?
     +--rw asymmetric-keys {asymmetric-keys}?
     |  +--rw asymmetric-key* [name]
     |     +--rw name                           string
     |     +--rw public-key-format?             identityref
     |     +--rw public-key?                    binary
     |     +--rw private-key-format?            identityref
     |     +--rw (private-key-type)
     |     |  +--:(cleartext-private-key) {cleartext-private-keys}?
     |     |  |  +--rw cleartext-private-key?   binary
     |     |  +--:(hidden-private-key) {hidden-private-keys}?
     |     |  |  +--rw hidden-private-key?      empty
     |     |  +--:(encrypted-private-key) {encrypted-private-keys}?
     |     |     +--rw encrypted-private-key
     |     |        +--rw encrypted-by
     |     |        |  +--rw (encrypted-by)
     |     |        |     +--:(central-symmetric-key-ref)
     |     |        |     |        {central-keystore-supported,symme\
tric-keys}?
     |     |        |     |  +--rw symmetric-key-ref?
     |     |        |     |          ks:central-symmetric-key-ref
     |     |        |     +--:(central-asymmetric-key-ref)
     |     |        |              {central-keystore-supported,asymm\
etric-keys}?
     |     |        |        +--rw asymmetric-key-ref?
     |     |        |                ks:central-asymmetric-key-ref
     |     |        +--rw encrypted-value-format    identityref
     |     |        +--rw encrypted-value           binary
     |     +--rw certificates
     |     |  +--rw certificate* [name]
     |     |     +--rw name                      string
     |     |     +--rw cert-data                 end-entity-cert-cms
     |     |     +---n certificate-expiration
     |     |             {certificate-expiration-notification}?
     |     |        +-- expiration-date    yang:date-and-time
     |     +---x generate-csr {csr-generation}?
     |        +---w input
     |        |  +---w csr-format    identityref
     |        |  +---w csr-info      csr-info
     |        +--ro output
     |           +--ro (csr-type)
     |              +--:(p10-csr)
     |                 +--ro p10-csr?   p10-csr
     +--rw symmetric-keys {symmetric-keys}?
        +--rw symmetric-key* [name]
           +--rw name                             string
           +--rw key-format?                      identityref
           +--rw (key-type)
              +--:(cleartext-symmetric-key)
              |  +--rw cleartext-symmetric-key?   binary
              |          {cleartext-symmetric-keys}?
              +--:(hidden-symmetric-key) {hidden-symmetric-keys}?
              |  +--rw hidden-symmetric-key?      empty
              +--:(encrypted-symmetric-key)
                       {encrypted-symmetric-keys}?
                 +--rw encrypted-symmetric-key
                    +--rw encrypted-by
                    |  +--rw (encrypted-by)
                    |     +--:(central-symmetric-key-ref)
                    |     |        {central-keystore-supported,symme\
tric-keys}?
                    |     |  +--rw symmetric-key-ref?
                    |     |          ks:central-symmetric-key-ref
                    |     +--:(central-asymmetric-key-ref)
                    |              {central-keystore-supported,asymm\
etric-keys}?
                    |        +--rw asymmetric-key-ref?
                    |                ks:central-asymmetric-key-ref
                    +--rw encrypted-value-format    identityref
                    +--rw encrypted-value           binary
</sourcecode>
          <t indent="0" pn="section-2.1.4-5">Comments:</t>
          <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-2.1.4-6">
            <li pn="section-2.1.4-6.1">Protocol-accessible nodes are those nodes that are accessible
                when the module is "implemented", as described in <xref target="RFC7950" sectionFormat="of" section="5.6.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7950#section-5.6.5" derivedContent="RFC7950"/>.</li>
            <li pn="section-2.1.4-6.2">The protocol-accessible nodes for the "ietf-keystore" module
                are instances of the "keystore-grouping" grouping discussed in
                <xref target="keystore-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.7"/>.
              </li>
            <li pn="section-2.1.4-6.3">The top-level node "keystore" is additionally constrained
                by the feature "central-keystore-supported".</li>
            <li pn="section-2.1.4-6.4">The "keystore-grouping" grouping is discussed in
                <xref target="keystore-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.7"/>.</li>
            <li pn="section-2.1.4-6.5">The reason for why "keystore-grouping" exists separate from
                the protocol-accessible nodes definition is to enable
                instances of the keystore to be instantiated in other
                locations, as may be needed or desired by some modules.</li>
          </ul>
        </section>
      </section>
      <section anchor="examples" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-example-usage">Example Usage</name>
        <t indent="0" pn="section-2.2-1">The examples in this section are encoded using XML, such as might
        be the case when using the NETCONF protocol.
	Other encodings <bcp14>MAY</bcp14>
            be used, such as JSON when using the RESTCONF protocol.</t>
        <section anchor="ks-inst" toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.1">
          <name slugifiedName="name-a-keystore-instance">A Keystore Instance</name>
          <t indent="0" pn="section-2.2.1-1">The following example illustrates keys in &lt;running&gt;.
              Please see <xref target="built-ins" format="default" sectionFormat="of" derivedContent="Section 3"/> for an example illustrating
              built-in values in &lt;operational&gt;.</t>
          <sourcecode type="xml" markers="false" pn="section-2.2.1-2">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;keystore
   xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
   xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"&gt;

   &lt;symmetric-keys&gt;
      &lt;symmetric-key&gt;
         &lt;name&gt;cleartext-symmetric-key&lt;/name&gt;
         &lt;key-format&gt;ct:octet-string-key-format&lt;/key-format&gt;
         &lt;cleartext-symmetric-key&gt;BASE64VALUE=&lt;/cleartext-symmetric-\
key&gt;
      &lt;/symmetric-key&gt;
      &lt;symmetric-key&gt;
         &lt;name&gt;hidden-symmetric-key&lt;/name&gt;
         &lt;hidden-symmetric-key/&gt;
      &lt;/symmetric-key&gt;
      &lt;symmetric-key&gt;
         &lt;name&gt;encrypted-symmetric-key&lt;/name&gt;
         &lt;key-format&gt;ct:one-symmetric-key-format&lt;/key-format&gt;
         &lt;encrypted-symmetric-key&gt;
           &lt;encrypted-by&gt;
             &lt;asymmetric-key-ref&gt;hidden-asymmetric-key&lt;/asymmetric-k\
ey-ref&gt;
           &lt;/encrypted-by&gt;
           &lt;encrypted-value-format&gt;ct:cms-enveloped-data-format&lt;/enc\
rypted-value-format&gt;
           &lt;encrypted-value&gt;BASE64VALUE=&lt;/encrypted-value&gt;
         &lt;/encrypted-symmetric-key&gt;
      &lt;/symmetric-key&gt;
   &lt;/symmetric-keys&gt;

   &lt;asymmetric-keys&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;ssh-rsa-key&lt;/name&gt;
         &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-\
format&gt;
         &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;ssh-rsa-key-with-cert&lt;/name&gt;
         &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-\
format&gt;
         &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
         &lt;certificates&gt;
            &lt;certificate&gt;
               &lt;name&gt;ex-rsa-cert2&lt;/name&gt;
               &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
            &lt;/certificate&gt;
         &lt;/certificates&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;raw-private-key&lt;/name&gt;
         &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-\
format&gt;
         &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;rsa-asymmetric-key&lt;/name&gt;
         &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-\
format&gt;
         &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
         &lt;certificates&gt;
            &lt;certificate&gt;
               &lt;name&gt;ex-rsa-cert&lt;/name&gt;
               &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
            &lt;/certificate&gt;
         &lt;/certificates&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;ec-asymmetric-key&lt;/name&gt;
         &lt;private-key-format&gt;ct:ec-private-key-format&lt;/private-key-f\
ormat&gt;
         &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
         &lt;certificates&gt;
            &lt;certificate&gt;
               &lt;name&gt;ex-ec-cert&lt;/name&gt;
               &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
            &lt;/certificate&gt;
         &lt;/certificates&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;hidden-asymmetric-key&lt;/name&gt;
         &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/publi\
c-key-format&gt;
         &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
         &lt;hidden-private-key/&gt;
         &lt;certificates&gt;
            &lt;certificate&gt;
               &lt;name&gt;builtin-idevid-cert&lt;/name&gt;
               &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
            &lt;/certificate&gt;
            &lt;certificate&gt;
               &lt;name&gt;my-ldevid-cert&lt;/name&gt;
               &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
            &lt;/certificate&gt;
         &lt;/certificates&gt;
      &lt;/asymmetric-key&gt;
      &lt;asymmetric-key&gt;
         &lt;name&gt;encrypted-asymmetric-key&lt;/name&gt;
         &lt;private-key-format&gt;ct:one-asymmetric-key-format&lt;/private-k\
ey-format&gt;
         &lt;encrypted-private-key&gt;
           &lt;encrypted-by&gt;
             &lt;symmetric-key-ref&gt;encrypted-symmetric-key&lt;/symmetric-k\
ey-ref&gt;
           &lt;/encrypted-by&gt;
           &lt;encrypted-value-format&gt;ct:cms-encrypted-data-format&lt;/enc\
rypted-value-format&gt;
           &lt;encrypted-value&gt;BASE64VALUE=&lt;/encrypted-value&gt;
         &lt;/encrypted-private-key&gt;
      &lt;/asymmetric-key&gt;
   &lt;/asymmetric-keys&gt;
&lt;/keystore&gt;
</sourcecode>
        </section>
        <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.2">
          <name slugifiedName="name-a-certificate-expiration-no">A Certificate Expiration Notification</name>
          <t indent="0" pn="section-2.2.2-1">The following example illustrates a "certificate-expiration"
              notification for a certificate associated with an asymmetric
              key configured in the keystore.</t>
          <sourcecode type="xml" markers="false" pn="section-2.2.2-2">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;notification
  xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"&gt;
  &lt;eventTime&gt;2018-05-25T00:01:00Z&lt;/eventTime&gt;
  &lt;keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"&gt;
    &lt;asymmetric-keys&gt;
      &lt;asymmetric-key&gt;
        &lt;name&gt;hidden-asymmetric-key&lt;/name&gt;
        &lt;certificates&gt;
          &lt;certificate&gt;
            &lt;name&gt;my-ldevid-cert&lt;/name&gt;
            &lt;certificate-expiration&gt;
              &lt;expiration-date&gt;2018-08-05T14:18:53-05:00&lt;/expiration\
-date&gt;
            &lt;/certificate-expiration&gt;
          &lt;/certificate&gt;
        &lt;/certificates&gt;
      &lt;/asymmetric-key&gt;
    &lt;/asymmetric-keys&gt;
  &lt;/keystore&gt;
&lt;/notification&gt;
</sourcecode>
        </section>
        <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.3">
          <name slugifiedName="name-the-inline-or-keystore-grou">The "Inline or Keystore" Groupings</name>
          <t indent="0" pn="section-2.2.3-1">This section illustrates the various "inline-or-keystore" groupings
              defined in the "ietf-keystore" module, specifically the
              "inline-or-keystore-symmetric-key-grouping"
              (<xref target="inline-or-keystore-symmetric-key-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.3"/>),
              "inline-or-keystore-asymmetric-key-grouping"
              (<xref target="inline-or-keystore-asymmetric-key-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.4"/>),
              "inline-or-keystore-asymmetric-key-with-certs-grouping"
              (<xref target="inline-or-keystore-asymmetric-key-with-certs-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.5"/>), and
              "inline-or-keystore-end-entity-cert-with-key-grouping"
              (<xref target="inline-or-keystore-end-entity-cert-with-key-grouping" format="default" sectionFormat="of" derivedContent="Section 2.1.3.6"/>) groupings.</t>
          <t indent="0" pn="section-2.2.3-2">These examples assume the existence of an example module called "ex-keystore-usage"
              that has the namespace "https://example.com/ns/example-keystore-usage".</t>
          <t indent="0" pn="section-2.2.3-3">The ex-keystore-usage module is first presented using tree diagrams
              <xref target="RFC8340" format="default" sectionFormat="of" derivedContent="RFC8340"/>, followed by an instance example illustrating
              all the "inline-or-keystore" groupings in use, followed by the YANG
              module itself.</t>
          <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.3.1">
            <name slugifiedName="name-tree-diagrams-for-the-ex-ke">Tree Diagrams for the "ex-keystore-usage" Module</name>
            <t indent="0" pn="section-2.2.3.1-1">The following tree diagram illustrates "ex-keystore-usage" without
                expanding the "grouping" statements:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.2.3.1-2">
=============== NOTE: '\' line wrapping per RFC 8792 ================

module: ex-keystore-usage
  +--rw keystore-usage
     +--rw symmetric-key* [name]
     |  +--rw name                                            string
     |  +---u ks:inline-or-keystore-symmetric-key-grouping
     +--rw asymmetric-key* [name]
     |  +--rw name                                             string
     |  +---u ks:inline-or-keystore-asymmetric-key-grouping
     +--rw asymmetric-key-with-certs* [name]
     |  +--rw name
     |  |       string
     |  +---u ks:inline-or-keystore-asymmetric-key-with-certs-groupi\
ng
     +--rw end-entity-cert-with-key* [name]
        +--rw name
        |       string
        +---u ks:inline-or-keystore-end-entity-cert-with-key-grouping
</sourcecode>
            <t indent="0" pn="section-2.2.3.1-3">The following tree diagram illustrates the "ex-keystore-usage"
                module with all "grouping" statements expanded, enabling the
                usage's full structure to be seen:</t>
            <sourcecode type="yangtree" markers="false" pn="section-2.2.3.1-4">
=============== NOTE: '\' line wrapping per RFC 8792 ================

module: ex-keystore-usage
  +--rw keystore-usage
     +--rw symmetric-key* [name]
     |  +--rw name                                string
     |  +--rw (inline-or-keystore)
     |     +--:(inline) {inline-definitions-supported}?
     |     |  +--rw inline-definition
     |     |     +--rw key-format?                      identityref
     |     |     +--rw (key-type)
     |     |        +--:(cleartext-symmetric-key)
     |     |        |  +--rw cleartext-symmetric-key?   binary
     |     |        |          {cleartext-symmetric-keys}?
     |     |        +--:(hidden-symmetric-key)
     |     |        |        {hidden-symmetric-keys}?
     |     |        |  +--rw hidden-symmetric-key?      empty
     |     |        +--:(encrypted-symmetric-key)
     |     |                 {encrypted-symmetric-keys}?
     |     |           +--rw encrypted-symmetric-key
     |     |              +--rw encrypted-by
     |     |              +--rw encrypted-value-format    identityref
     |     |              +--rw encrypted-value           binary
     |     +--:(central-keystore)
     |              {central-keystore-supported,symmetric-keys}?
     |        +--rw central-keystore-reference?
     |                ks:central-symmetric-key-ref
     +--rw asymmetric-key* [name]
     |  +--rw name                                string
     |  +--rw (inline-or-keystore)
     |     +--:(inline) {inline-definitions-supported}?
     |     |  +--rw inline-definition
     |     |     +--rw public-key-format?             identityref
     |     |     +--rw public-key?                    binary
     |     |     +--rw private-key-format?            identityref
     |     |     +--rw (private-key-type)
     |     |        +--:(cleartext-private-key)
     |     |        |        {cleartext-private-keys}?
     |     |        |  +--rw cleartext-private-key?   binary
     |     |        +--:(hidden-private-key) {hidden-private-keys}?
     |     |        |  +--rw hidden-private-key?      empty
     |     |        +--:(encrypted-private-key)
     |     |                 {encrypted-private-keys}?
     |     |           +--rw encrypted-private-key
     |     |              +--rw encrypted-by
     |     |              +--rw encrypted-value-format    identityref
     |     |              +--rw encrypted-value           binary
     |     +--:(central-keystore)
     |              {central-keystore-supported,asymmetric-keys}?
     |        +--rw central-keystore-reference?
     |                ks:central-asymmetric-key-ref
     +--rw asymmetric-key-with-certs* [name]
     |  +--rw name                                string
     |  +--rw (inline-or-keystore)
     |     +--:(inline) {inline-definitions-supported}?
     |     |  +--rw inline-definition
     |     |     +--rw public-key-format?             identityref
     |     |     +--rw public-key?                    binary
     |     |     +--rw private-key-format?            identityref
     |     |     +--rw (private-key-type)
     |     |     |  +--:(cleartext-private-key)
     |     |     |  |        {cleartext-private-keys}?
     |     |     |  |  +--rw cleartext-private-key?   binary
     |     |     |  +--:(hidden-private-key) {hidden-private-keys}?
     |     |     |  |  +--rw hidden-private-key?      empty
     |     |     |  +--:(encrypted-private-key)
     |     |     |           {encrypted-private-keys}?
     |     |     |     +--rw encrypted-private-key
     |     |     |        +--rw encrypted-by
     |     |     |        +--rw encrypted-value-format    identityref
     |     |     |        +--rw encrypted-value           binary
     |     |     +--rw certificates
     |     |     |  +--rw certificate* [name]
     |     |     |     +--rw name                      string
     |     |     |     +--rw cert-data
     |     |     |     |       end-entity-cert-cms
     |     |     |     +---n certificate-expiration
     |     |     |             {certificate-expiration-notification}?
     |     |     |        +-- expiration-date    yang:date-and-time
     |     |     +---x generate-csr {csr-generation}?
     |     |        +---w input
     |     |        |  +---w csr-format    identityref
     |     |        |  +---w csr-info      csr-info
     |     |        +--ro output
     |     |           +--ro (csr-type)
     |     |              +--:(p10-csr)
     |     |                 +--ro p10-csr?   p10-csr
     |     +--:(central-keystore)
     |              {central-keystore-supported,asymmetric-keys}?
     |        +--rw central-keystore-reference?
     |                ks:central-asymmetric-key-ref
     +--rw end-entity-cert-with-key* [name]
        +--rw name                                string
        +--rw (inline-or-keystore)
           +--:(inline) {inline-definitions-supported}?
           |  +--rw inline-definition
           |     +--rw public-key-format?             identityref
           |     +--rw public-key?                    binary
           |     +--rw private-key-format?            identityref
           |     +--rw (private-key-type)
           |     |  +--:(cleartext-private-key)
           |     |  |        {cleartext-private-keys}?
           |     |  |  +--rw cleartext-private-key?   binary
           |     |  +--:(hidden-private-key) {hidden-private-keys}?
           |     |  |  +--rw hidden-private-key?      empty
           |     |  +--:(encrypted-private-key)
           |     |           {encrypted-private-keys}?
           |     |     +--rw encrypted-private-key
           |     |        +--rw encrypted-by
           |     |        +--rw encrypted-value-format    identityref
           |     |        +--rw encrypted-value           binary
           |     +--rw cert-data?
           |     |       end-entity-cert-cms
           |     +---n certificate-expiration
           |     |       {certificate-expiration-notification}?
           |     |  +-- expiration-date    yang:date-and-time
           |     +---x generate-csr {csr-generation}?
           |        +---w input
           |        |  +---w csr-format    identityref
           |        |  +---w csr-info      csr-info
           |        +--ro output
           |           +--ro (csr-type)
           |              +--:(p10-csr)
           |                 +--ro p10-csr?   p10-csr
           +--:(central-keystore)
                    {central-keystore-supported,asymmetric-keys}?
              +--rw central-keystore-reference
                 +--rw asymmetric-key?
                 |       ks:central-asymmetric-key-ref
                 |       {central-keystore-supported,asymmetric-keys\
}?
                 +--rw certificate?      leafref
</sourcecode>
          </section>
          <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.3.2">
            <name slugifiedName="name-example-usage-for-the-ex-ke">Example Usage for the "ex-keystore-usage" Module</name>
            <t indent="0" pn="section-2.2.3.2-1">The following example provides two equivalent instances of
                each grouping, the first being a reference to a keystore
                and the second being inlined.  The instance having
                a reference to a keystore is consistent with the keystore
                defined in <xref target="ks-inst" format="default" sectionFormat="of" derivedContent="Section 2.2.1"/>.  The two instances are
                equivalent, as the inlined instance example contains
                the same values defined by the keystore instance referenced
            by its sibling example.</t>
            <sourcecode type="xml" markers="false" pn="section-2.2.3.2-2">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;keystore-usage
  xmlns="https://example.com/ns/example-keystore-usage"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"&gt;

  &lt;!-- The following two equivalent examples illustrate the  --&gt;
  &lt;!-- "inline-or-keystore-symmetric-key-grouping" grouping: --&gt;

  &lt;symmetric-key&gt;
    &lt;name&gt;example 1a&lt;/name&gt;
    &lt;central-keystore-reference&gt;cleartext-symmetric-key&lt;/central-key\
store-reference&gt;
  &lt;/symmetric-key&gt;

  &lt;symmetric-key&gt;
    &lt;name&gt;example 1b&lt;/name&gt;
    &lt;inline-definition&gt;
      &lt;key-format&gt;ct:octet-string-key-format&lt;/key-format&gt;
      &lt;cleartext-symmetric-key&gt;BASE64VALUE=&lt;/cleartext-symmetric-key&gt;
    &lt;/inline-definition&gt;
  &lt;/symmetric-key&gt;


  &lt;!-- The following two equivalent examples illustrate the   --&gt;
  &lt;!-- "inline-or-keystore-asymmetric-key-grouping" grouping: --&gt;

  &lt;asymmetric-key&gt;
    &lt;name&gt;example 2a&lt;/name&gt;
    &lt;central-keystore-reference&gt;rsa-asymmetric-key&lt;/central-keystore\
-reference&gt;
  &lt;/asymmetric-key&gt;

  &lt;asymmetric-key&gt;
    &lt;name&gt;example 2b&lt;/name&gt;
    &lt;inline-definition&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-for\
mat&gt;
      &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
    &lt;/inline-definition&gt;
  &lt;/asymmetric-key&gt;


  &lt;!-- The following two equivalent examples illustrate the     --&gt;
  &lt;!-- "inline-or-keystore-asymmetric-key-with-certs-grouping"  --&gt;
  &lt;!-- grouping:                                                --&gt;

  &lt;asymmetric-key-with-certs&gt;
    &lt;name&gt;example 3a&lt;/name&gt;
    &lt;central-keystore-reference&gt;rsa-asymmetric-key&lt;/central-keystore\
-reference&gt;
  &lt;/asymmetric-key-with-certs&gt;

  &lt;asymmetric-key-with-certs&gt;
    &lt;name&gt;example 3b&lt;/name&gt;
    &lt;inline-definition&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-for\
mat&gt;
      &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
      &lt;certificates&gt;
        &lt;certificate&gt;
          &lt;name&gt;a locally defined cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
      &lt;/certificates&gt;
    &lt;/inline-definition&gt;
  &lt;/asymmetric-key-with-certs&gt;


  &lt;!-- The following two equivalent examples illustrate the    --&gt;
  &lt;!-- "inline-or-keystore-end-entity-cert-with-key-grouping"  --&gt;
  &lt;!-- grouping:                                               --&gt;
  &lt;end-entity-cert-with-key&gt;
    &lt;name&gt;example 4a&lt;/name&gt;
    &lt;central-keystore-reference&gt;
      &lt;asymmetric-key&gt;rsa-asymmetric-key&lt;/asymmetric-key&gt;
      &lt;certificate&gt;ex-rsa-cert&lt;/certificate&gt;
    &lt;/central-keystore-reference&gt;
  &lt;/end-entity-cert-with-key&gt;

  &lt;end-entity-cert-with-key&gt;
    &lt;name&gt;example 4b&lt;/name&gt;
    &lt;inline-definition&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;private-key-format&gt;ct:rsa-private-key-format&lt;/private-key-for\
mat&gt;
      &lt;cleartext-private-key&gt;BASE64VALUE=&lt;/cleartext-private-key&gt;
      &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
    &lt;/inline-definition&gt;
  &lt;/end-entity-cert-with-key&gt;

&lt;/keystore-usage&gt;
</sourcecode>
          </section>
          <section toc="exclude" numbered="true" removeInRFC="false" pn="section-2.2.3.3">
            <name slugifiedName="name-the-ex-keystore-usage-yang-">The "ex-keystore-usage" YANG Module</name>
            <t indent="0" pn="section-2.2.3.3-1">Following is the "ex-keystore-usage" module's YANG definition:</t>
            <sourcecode type="yang" markers="false" pn="section-2.2.3.3-2">
module ex-keystore-usage {
  yang-version 1.1;
  namespace "https://example.com/ns/example-keystore-usage";
  prefix ex-keystore-usage;

  import ietf-keystore {
    prefix ks;
    reference
      "RFC 9642: A YANG Data Model for a Keystore";
  }

  organization
    "Example Corporation";

  contact
    "Author: YANG Designer &lt;mailto:yang.designer@example.com&gt;";

  description
    "This example module illustrates notable groupings defined
     in the 'ietf-keystore' module.";

  revision 2024-10-10 {
    description
      "Initial version";
    reference
      "RFC 9642: A YANG Data Model for a Keystore";
  }

  container keystore-usage {
    description
      "An illustration of the various keystore groupings.";
    list symmetric-key {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ks:inline-or-keystore-symmetric-key-grouping;
      description
        "An symmetric key that may be configured locally or be a
         reference to a symmetric key in the keystore.";
    }
    list asymmetric-key {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ks:inline-or-keystore-asymmetric-key-grouping;
      description
        "An asymmetric key, with no certs, that may be configured
         locally or be a reference to an asymmetric key in the
         keystore.  The intent is to reference just the asymmetric
         key, not any certificates that may also be associated
         with the asymmetric key.";
    }
    list asymmetric-key-with-certs {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ks:inline-or-keystore-asymmetric-key-with-certs-grouping;
      description
        "An asymmetric key and its associated certs that may be
         configured locally or be a reference to an asymmetric
         key (and its associated certs) in the keystore.";
    }
    list end-entity-cert-with-key {
      key "name";
      leaf name {
        type string;
        description
          "An arbitrary name for this key.";
      }
      uses ks:inline-or-keystore-end-entity-cert-with-key-grouping;
      description
        "An end-entity certificate and its associated asymmetric
         key that may be configured locally or be a reference
         to another certificate (and its associated asymmetric
         key) in the keystore.";
    }
  }
}
</sourcecode>
          </section>
        </section>
      </section>
      <section anchor="keystore-yang-module" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-yang-module">YANG Module</name>
        <t indent="0" pn="section-2.3-1">This YANG module has normative references to <xref target="RFC8341" format="default" sectionFormat="of" derivedContent="RFC8341"/>
          and <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>.</t>
        <sourcecode type="yang" name="ietf-keystore@2024-10-10.yang" markers="true" pn="section-2.3-2">
module ietf-keystore {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-keystore";
  prefix ks;

  import ietf-netconf-acm {
    prefix nacm;
    reference
      "RFC 8341: Network Configuration Access Control Model";
  }

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

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

  contact
    "WG Web:   https://datatracker.ietf.org/wg/netconf
     WG List:  NETCONF WG list &lt;mailto:netconf@ietf.org&gt;
     Author:   Kent Watsen &lt;mailto:kent+ietf@watsen.net&gt;";

  description
    "This module defines a 'keystore' to centralize management
     of security credentials.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

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

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

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

  revision 2024-10-10 {
    description
      "Initial version";
    reference
      "RFC 9642: A YANG Data Model for a Keystore";
  }

  /****************/
  /*   Features   */
  /****************/

  feature central-keystore-supported {
    description
      "The 'central-keystore-supported' feature indicates that
       the server supports the central keystore (i.e., fully
       implements the 'ietf-keystore' module).";
  }

  feature inline-definitions-supported {
    description
      "The 'inline-definitions-supported' feature indicates that
       the server supports locally defined keys.";
  }

  feature asymmetric-keys {
    description
      "The 'asymmetric-keys' feature indicates that the server
       implements the /keystore/asymmetric-keys subtree.";

  }

  feature symmetric-keys {
    description
      "The 'symmetric-keys' feature indicates that the server
       implements the /keystore/symmetric-keys subtree.";
  }

  /****************/
  /*   Typedefs   */
  /****************/

  typedef central-symmetric-key-ref {
    type leafref {
      path "/ks:keystore/ks:symmetric-keys/ks:symmetric-key"
         + "/ks:name";
    }
    description
      "This typedef enables modules to easily define a reference
       to a symmetric key stored in the central keystore.";
  }

  typedef central-asymmetric-key-ref {
    type leafref {
      path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
         + "/ks:name";
    }
    description
      "This typedef enables modules to easily define a reference
       to an asymmetric key stored in the central keystore.";
  }

  /*****************/
  /*   Groupings   */
  /*****************/

  grouping encrypted-by-grouping {
    description
      "A grouping that defines a 'choice' statement that can be
       augmented into the 'encrypted-by' node, present in the
       'symmetric-key-grouping' and 'asymmetric-key-pair-grouping'
       groupings defined in RFC 9640, enabling references to keys
       in the central keystore.";
    choice encrypted-by {
      nacm:default-deny-write;
      mandatory true;
      description
        "A choice amongst other symmetric or asymmetric keys.";
      case central-symmetric-key-ref {
        if-feature "central-keystore-supported";
        if-feature "symmetric-keys";
        leaf symmetric-key-ref {
          type ks:central-symmetric-key-ref;
          description
            "Identifies the symmetric key used to encrypt the
             associated key.";
        }
      }
      case central-asymmetric-key-ref {
        if-feature "central-keystore-supported";
        if-feature "asymmetric-keys";
        leaf asymmetric-key-ref {
          type ks:central-asymmetric-key-ref;
          description
            "Identifies the asymmetric key whose public key
             encrypted the associated key.";
        }
      }
    }
  }

  // *-ref groupings

  grouping central-asymmetric-key-certificate-ref-grouping {
    description
      "A grouping for the reference to a certificate associated
       with an asymmetric key stored in the central keystore.";
    leaf asymmetric-key {
      nacm:default-deny-write;
      if-feature "central-keystore-supported";
      if-feature "asymmetric-keys";
      type ks:central-asymmetric-key-ref;
      must '../certificate';
      description
        "A reference to an asymmetric key in the keystore.";
    }
    leaf certificate {
      nacm:default-deny-write;
      type leafref {
        path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
           + "[ks:name = current()/../asymmetric-key]/"
           + "ks:certificates/ks:certificate/ks:name";
      }
      must '../asymmetric-key';
      description
        "A reference to a specific certificate of the
         asymmetric key in the keystore.";
    }
  }

  // inline-or-keystore-* groupings

  grouping inline-or-keystore-symmetric-key-grouping {
    description
      "A grouping for the configuration of a symmetric key.  The
       symmetric key may be defined inline or as a reference to
       a symmetric key stored in the central keystore.

       Servers that wish to define alternate keystore locations
       SHOULD augment in custom 'case' statements enabling
       references to those alternate keystore locations.";
    choice inline-or-keystore {
      nacm:default-deny-write;
      mandatory true;
      description
        "A choice between an inlined definition and a definition
         that exists in the keystore.";
      case inline {
        if-feature "inline-definitions-supported";
        container inline-definition {
          description
            "A container to hold the local key definition.";
          uses ct:symmetric-key-grouping;
        }
      }
      case central-keystore {
        if-feature "central-keystore-supported";
        if-feature "symmetric-keys";
        leaf central-keystore-reference {
          type ks:central-symmetric-key-ref;
          description
            "A reference to a symmetric key that exists in
             the central keystore.";
        }
      }
    }
  }

  grouping inline-or-keystore-asymmetric-key-grouping {
    description
      "A grouping for the configuration of an asymmetric key.  The
       asymmetric key may be defined inline or as a reference to
       an asymmetric key stored in the central keystore.

       Servers that wish to define alternate keystore locations
       SHOULD augment in custom 'case' statements enabling
       references to those alternate keystore locations.";
    choice inline-or-keystore {
      nacm:default-deny-write;
      mandatory true;
      description
        "A choice between an inlined definition and a definition
         that exists in the keystore.";
      case inline {
        if-feature "inline-definitions-supported";
        container inline-definition {
          description
            "A container to hold the local key definition.";
          uses ct:asymmetric-key-pair-grouping;
        }
      }
      case central-keystore {
        if-feature "central-keystore-supported";
        if-feature "asymmetric-keys";
        leaf central-keystore-reference {
          type ks:central-asymmetric-key-ref;
          description
            "A reference to an asymmetric key that exists in
             the central keystore.  The intent is to reference
             just the asymmetric key without any regard for
             any certificates that may be associated with it.";
        }
      }
    }
  }

  grouping inline-or-keystore-asymmetric-key-with-certs-grouping {
    description
      "A grouping for the configuration of an asymmetric key and
       its associated certificates.  The asymmetric key and its
       associated certificates may be defined inline or as a
       reference to an asymmetric key (and its associated
       certificates) in the central keystore.

       Servers that wish to define alternate keystore locations
       SHOULD augment in custom 'case' statements enabling
       references to those alternate keystore locations.";
    choice inline-or-keystore {
      nacm:default-deny-write;
      mandatory true;
      description
        "A choice between an inlined definition and a definition
         that exists in the keystore.";
      case inline {
        if-feature "inline-definitions-supported";
        container inline-definition {
          description
            "A container to hold the local key definition.";
          uses ct:asymmetric-key-pair-with-certs-grouping;
        }
      }
      case central-keystore {
        if-feature "central-keystore-supported";
        if-feature "asymmetric-keys";
        leaf central-keystore-reference {
          type ks:central-asymmetric-key-ref;
          description
            "A reference to an asymmetric key (and all of its
             associated certificates) in the keystore, when
             this module is implemented.";
        }
      }
    }
  }

  grouping inline-or-keystore-end-entity-cert-with-key-grouping {
    description
      "A grouping for the configuration of an asymmetric key and
       its associated end-entity certificate.  The asymmetric key
       and its associated end-entity certificate may be defined
       inline or as a reference to an asymmetric key (and its
       associated end-entity certificate) in the central keystore.

       Servers that wish to define alternate keystore locations
       SHOULD augment in custom 'case' statements enabling
       references to those alternate keystore locations.";
    choice inline-or-keystore {
      nacm:default-deny-write;
      mandatory true;
      description
        "A choice between an inlined definition and a definition
         that exists in the keystore.";
      case inline {
        if-feature "inline-definitions-supported";
        container inline-definition {
          description
            "A container to hold the local key definition.";
          uses ct:asymmetric-key-pair-with-cert-grouping;
        }
      }
      case central-keystore {
        if-feature "central-keystore-supported";
        if-feature "asymmetric-keys";
        container central-keystore-reference {
          uses central-asymmetric-key-certificate-ref-grouping;
          description
            "A reference to a specific certificate associated with
             an asymmetric key stored in the central keystore.";
        }
      }
    }
  }

  // the keystore grouping

  grouping keystore-grouping {
    description
      "A grouping definition enables use in other contexts.  If ever
       done, implementations MUST augment new 'case' statements
       into the various inline-or-keystore 'choice' statements to
       supply leafrefs to the model-specific location(s).";
    container asymmetric-keys {
      nacm:default-deny-write;
      if-feature "asymmetric-keys";
      description
        "A list of asymmetric keys.";
      list asymmetric-key {
        key "name";
        description
          "An asymmetric key.";
        leaf name {
          type string;
          description
            "An arbitrary name for the asymmetric key.";
        }
        uses ct:asymmetric-key-pair-with-certs-grouping;
      }
    }
    container symmetric-keys {
      nacm:default-deny-write;
      if-feature "symmetric-keys";
      description
        "A list of symmetric keys.";
      list symmetric-key {
        key "name";
        description
          "A symmetric key.";
        leaf name {
          type string;
          description
            "An arbitrary name for the symmetric key.";
        }
        uses ct:symmetric-key-grouping;
      }
    }
  }

  /*********************************/
  /*   Protocol accessible nodes   */
  /*********************************/

  container keystore {
    if-feature "central-keystore-supported";
    description
      "A central keystore containing a list of symmetric keys and
       a list of asymmetric keys.";
    nacm:default-deny-write;
    uses keystore-grouping {
      augment "symmetric-keys/symmetric-key/key-type/encrypted-"
            + "symmetric-key/encrypted-symmetric-key/encrypted-by" {
        description
          "Augments in a choice statement enabling the encrypting
           key to be any other symmetric or asymmetric key in the
           central keystore.";
        uses encrypted-by-grouping;
      }
      augment "asymmetric-keys/asymmetric-key/private-key-type/"
            + "encrypted-private-key/encrypted-private-key/"
            + "encrypted-by" {
        description
          "Augments in a choice statement enabling the encrypting
           key to be any other symmetric or asymmetric key in the
           central keystore.";
        uses encrypted-by-grouping;
      }
    }
  }
}
</sourcecode>
      </section>
    </section>
    <section anchor="built-ins" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-support-for-built-in-keys">Support for Built-In Keys</name>
      <t indent="0" pn="section-3-1">In some implementations, a server may support keys built into the server.
          Built-in keys <bcp14>MAY</bcp14> be set during the manufacturing process or be dynamically
          generated the first time the server is booted or a particular service
          (e.g., Secure Shell (SSH)) is enabled.</t>
      <t indent="0" pn="section-3-2">Built-in keys are "hidden" keys expected to be set by a vendor-specific process.
          Any ability for operators to set and/or modify built-in keys is outside the
      scope of this document.</t>
      <t indent="0" pn="section-3-3">The primary characteristic of the built-in keys is that they are provided
          by the server, as opposed to being configured.  As such, they are present in
          &lt;operational&gt; (<xref target="RFC8342" sectionFormat="of" section="5.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8342#section-5.3" derivedContent="RFC8342"/>) and &lt;system&gt;
          <xref target="I-D.ietf-netmod-system-config" format="default" sectionFormat="of" derivedContent="NETMOD-SYSTEM-CONFIG"/>, if implemented.</t>
      <t indent="0" pn="section-3-4">The example below illustrates what the keystore in &lt;operational&gt;
          might look like for a server in its factory default state.  Note that the
      built-in keys have the "or:origin" annotation value "or:system".</t>
      <sourcecode type="xml" markers="false" pn="section-3-5">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"
  xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
  or:origin="or:intended"&gt;
  &lt;asymmetric-keys&gt;
    &lt;asymmetric-key or:origin="or:system"&gt;
      &lt;name&gt;Manufacturer-Generated Hidden Key&lt;/name&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;hidden-private-key/&gt;
      &lt;certificates&gt;
        &lt;certificate&gt;
          &lt;name&gt;Manufacturer-Generated IDevID Cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
      &lt;/certificates&gt;
    &lt;/asymmetric-key&gt;
  &lt;/asymmetric-keys&gt;
&lt;/keystore&gt;
</sourcecode>
      <t indent="0" pn="section-3-6">The following example illustrates how a single built-in key definition
          from the previous example has been propagated to &lt;running&gt;:</t>
      <sourcecode type="xml" markers="false" pn="section-3-7">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"&gt;
  &lt;asymmetric-keys&gt;
    &lt;asymmetric-key&gt;
      &lt;name&gt;Manufacturer-Generated Hidden Key&lt;/name&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;hidden-private-key/&gt;
      &lt;certificates&gt;
        &lt;certificate&gt;
          &lt;name&gt;Manufacturer-Generated IDevID Cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
        &lt;certificate&gt;
          &lt;name&gt;Deployment-Specific LDevID Cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
      &lt;/certificates&gt;
    &lt;/asymmetric-key&gt;
  &lt;/asymmetric-keys&gt;
&lt;/keystore&gt;
</sourcecode>
      <t indent="0" pn="section-3-8">After the above configuration is applied, &lt;operational&gt; should appear
          as follows:</t>
      <sourcecode type="xml" markers="false" pn="section-3-9">
=============== NOTE: '\' line wrapping per RFC 8792 ================

&lt;keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
  xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"
  xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
  or:origin="or:intended"&gt;
  &lt;asymmetric-keys&gt;
    &lt;asymmetric-key or:origin="or:system"&gt;
      &lt;name&gt;Manufacturer-Generated Hidden Key&lt;/name&gt;
      &lt;public-key-format&gt;ct:subject-public-key-info-format&lt;/public-k\
ey-format&gt;
      &lt;public-key&gt;BASE64VALUE=&lt;/public-key&gt;
      &lt;hidden-private-key/&gt;
      &lt;certificates&gt;
        &lt;certificate&gt;
          &lt;name&gt;Manufacturer-Generated IDevID Cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
        &lt;certificate or:origin="or:intended"&gt;
          &lt;name&gt;Deployment-Specific LDevID Cert&lt;/name&gt;
          &lt;cert-data&gt;BASE64VALUE=&lt;/cert-data&gt;
        &lt;/certificate&gt;
      &lt;/certificates&gt;
    &lt;/asymmetric-key&gt;
  &lt;/asymmetric-keys&gt;
&lt;/keystore&gt;
</sourcecode>
    </section>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-encrypting-keys-in-configur">Encrypting Keys in Configuration</name>
      <t indent="0" pn="section-4-1">This section describes an approach that enables both the symmetric
          and asymmetric keys on a server to be encrypted, such that
          backup/restore procedures can be used without concern for raw key
          data being compromised when in transit.</t>
      <t indent="0" pn="section-4-2">The approach presented in this section is not normative.  This section
          answers how a configuration containing secrets that are encrypted by a
          built-in key (<xref target="built-ins" format="default" sectionFormat="of" derivedContent="Section 3"/>) can be backed up from one server
          and restored on a different server when each server has unique primary keys.
          The API defined by the "ietf-keystore" YANG module presented in this
          document is sufficient to support the workflow described in this section.</t>
      <section toc="exclude" numbered="true" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-key-encryption-key">Key Encryption Key</name>
        <t indent="0" pn="section-4.1-1">The ability to encrypt configured keys is predicated on the
            existence of a key encryption key (KEK).  There may be any
            number of KEKs in a server.  A KEK, by its namesake, is a key
            that is used to encrypt other keys. A KEK <bcp14>MAY</bcp14> be either a
            symmetric key or an asymmetric key.</t>
        <t indent="0" pn="section-4.1-2">If a KEK is a symmetric key, then the server <bcp14>MUST</bcp14> provide an API for
            administrators to encrypt other keys without needing to know
            the symmetric key's value.  If the KEK is an asymmetric key, then
            the server <bcp14>SHOULD</bcp14> provide an API enabling the encryption of other
            keys or, alternatively, assume the administrators can do so themselves
            using the asymmetric key's public half.</t>
        <t indent="0" pn="section-4.1-3">A server <bcp14>MUST</bcp14> possess access to the KEK, or an API using the KEK,
            so that it can decrypt the other keys in the configuration at runtime.</t>
      </section>
      <section toc="exclude" numbered="true" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-configuring-encrypted-keys">Configuring Encrypted Keys</name>
        <t indent="0" pn="section-4.2-1">Each time a new key is configured, it <bcp14>SHOULD</bcp14> be encrypted by
        a KEK.</t>
        <t indent="0" pn="section-4.2-2">In the "ietf-crypto-types" module <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>,
            the format for encrypted values is described by identity statements
            derived from the "symmetrically-encrypted-value-format" and
            "asymmetrically-encrypted-value-format" identity statements.</t>
        <t indent="0" pn="section-4.2-3">Implementations of servers implementing the "ietf-keystore" module 
            <bcp14>SHOULD</bcp14> provide an API that simultaneously generates a key and encrypts
            the generated key using a KEK.  Thus, the cleartext value of the newly
            generated key may never be known to the administrators generating the keys.
            Such an API is defined in the "ietf-ssh-common" and "ietf-tls-common"
            YANG modules defined in <xref target="RFC9644" format="default" sectionFormat="of" derivedContent="RFC9644"/>
            and <xref target="RFC9645" format="default" sectionFormat="of" derivedContent="RFC9645"/>, respectively.</t>
        <t indent="0" pn="section-4.2-4">In case the server implementation does not provide such an API, then
            the generating and encrypting steps <bcp14>MAY</bcp14> be performed outside the
            server, e.g., by an administrator with special access control rights (such as an organization's crypto officer).</t>
        <t indent="0" pn="section-4.2-5">In either case, the encrypted key can be configured into the keystore
            using either the "encrypted-symmetric-key" (for symmetric keys) or the
            "encrypted-private-key" (for asymmetric keys) nodes.  These two nodes
            contain both the encrypted raw key value as well as a reference to
            the KEK that encrypted the key.</t>
      </section>
      <section toc="exclude" numbered="true" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-migrating-configuration-to-">Migrating Configuration to Another Server</name>
        <t indent="0" pn="section-4.3-1">When a KEK is used to encrypt other keys, migrating the configuration
            to another server is only possible if the second server has the same KEK.
            How the second server comes to have the same KEK is discussed in this
            section.</t>
        <t indent="0" pn="section-4.3-2">In some deployments, mechanisms outside the scope of this document
            may be used to migrate a KEK from one server to another.  That said,
            beware that the ability to do so typically entails having access to
            the first server; however, in some scenarios, the first server may no
            longer be operational.</t>
        <t indent="0" pn="section-4.3-3">In other deployments, an organization's crypto officer, possessing a
            KEK's cleartext value, configures the same KEK on the second server,
            presumably as a hidden key or a key protected by access control, so
            that the cleartext value is not
            disclosed to regular administrators.  However, this approach creates
            high coupling to and dependency on the crypto officers that does not
            scale in production environments.</t>
        <t indent="0" pn="section-4.3-4">In order to decouple the crypto officers from the regular administrators,
            a special KEK, called the "primary key" (PK), may be used.</t>
        <t indent="0" pn="section-4.3-5">A PK is commonly a globally unique built-in (see <xref target="built-ins" format="default" sectionFormat="of" derivedContent="Section 3"/>)
            asymmetric key. The private raw key value, due to its long lifetime, is hidden
            (i.e., "hidden-private-key"; see <xref target="RFC9640" sectionFormat="of" section="2.1.4.5." format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-2.1.4.5." derivedContent="RFC9640"/>). The raw public key value is often
            contained in an identity certificate (e.g., IDevID).  How to
            configure a PK during the manufacturing process is outside the
            scope of this document.</t>
        <t indent="0" pn="section-4.3-6">Assuming the server has a PK, the PK can be used to encrypt a
            "shared KEK", which is then used to encrypt the keys configured
            by regular administrators.</t>
        <t indent="0" pn="section-4.3-7">With this extra level of indirection, it is possible for a
            crypto officer to encrypt the same KEK for a multiplicity of
            servers offline using the public key contained in their identity
            certificates.  The crypto officer can then safely hand off
            the encrypted KEKs to regular administrators responsible for
            server installations, including migrations.</t>
        <t indent="0" pn="section-4.3-8">In order to migrate the configuration from a first server, an
            administrator would need to make just a single modification to
            the configuration before loading it onto a second server, which
            is to replace the encrypted KEK keystore entry from the first
            server with the encrypted KEK for the second server.  Upon doing
            this, the configuration (containing many encrypted keys) can be
            loaded into the second server while enabling the second server
            to decrypt all the encrypted keys in the configuration.</t>
        <t indent="0" pn="section-4.3-9">The following diagram illustrates this idea:</t>
        <artwork align="left" pn="section-4.3-10">
 +-------------+                                 +-------------+
 | shared KEK  |                                 | shared KEK  |
 |(unencrypted)|-------------------------------&gt; | (encrypted) |
 +-------------+     encrypts offline using      +-------------+
        ^            each server's PK                |            
        |                                            |            
        |                                            |            
        |  possesses    \o                           |            
        +--------------  |\                          |            
                        / \         shares with      |            
                      crypto    +--------------------+            
                      officer   |                                 
                                |                                 
                                |                                 
+----------------------+        |         +----------------------+
|       server-1       |        |         |       server-2       |
|    configuration     |        |         |    configuration     |
|                      |        |         |                      |
|                      |        |         |                      |
|  +----------------+  |        |         |  +----------------+  |
|  |      PK-1      |  |        |         |  |      PK-2      |  |
|  |    (hidden)    |  |        |         |  |    (hidden)    |  |
|  +----------------+  |        |         |  +----------------+  |
|      ^               |        |         |      ^               |
|      |               |        |         |      |               |
|      |               |        |         |      |               |
|      |  encrypted    |        |         |      |  encrypted    |
|      |  by           |        |         |      |  by           |
|      |               |        |         |      |               |
|      |               |        |         |      |               |
|  +----------------+  |        |         |  +----------------+  |
|  |  shared KEK    |  |        |         |  |  shared KEK    |  |
|  |  (encrypted)   |  |        v         |  |  (encrypted)   |  |
|  +----------------+  |                  |  +----------------+  |
|      ^               |     regular      |      ^               |
|      |               |      admin       |      |               |
|      |               |                  |      |               |
|      |  encrypted    |       \o         |      |  encrypted    |
|      |  by           |        |\        |      |  by           |
|      |               |       / \        |      |               |
|      |               |                  |      |               |
|  +----------------+  |-----------------&gt;|  +----------------+  |
|  | all other keys |  |     migrate      |  | all other keys |  |
|  |  (encrypted)   |  |  configuration   |  |  (encrypted)   |  |
|  +----------------+  |                  |  +----------------+  |
|                      |                  |                      |
+----------------------+                  +----------------------+
</artwork>
      </section>
    </section>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-5.1">
        <name slugifiedName="name-security-of-data-at-rest-an">Security of Data at Rest and in Motion</name>
        <t indent="0" pn="section-5.1-1">The YANG module defined in this document defines a mechanism called a
            "keystore" that intends to protect its contents from unauthorized
            disclosure and modification.</t>
        <t indent="0" pn="section-5.1-2">In order to satisfy the expectations of a keystore, it
            is <bcp14>RECOMMENDED</bcp14> that server implementations ensure that the keystore
            contents are encrypted when persisted to non-volatile memory 
            and that the keystore contents that have been decrypted
        in volatile memory are zeroized when not in use.</t>
        <t indent="0" pn="section-5.1-3">The keystore contents may be encrypted by either encrypting
            the contents individually (e.g., using the "encrypted" value
            formats) or using persistence-layer-level encryption. If storing cleartext values (which is <bcp14>NOT RECOMMENDED</bcp14> per <xref target="RFC9640" sectionFormat="of" section="3.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9640#section-3.5" derivedContent="RFC9640"/>), then persistence-layer-level encryption <bcp14>SHOULD</bcp14> be used to protect the data at rest.</t>
        <t indent="0" pn="section-5.1-4">If the keystore contents are not encrypted when persisted,
            then server implementations <bcp14>MUST</bcp14> ensure the persisted storage
            is inaccessible.</t>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-5.2">
        <name slugifiedName="name-unconstrained-private-key-u">Unconstrained Private Key Usage</name>
        <t indent="0" pn="section-5.2-1">This module enables the configuration of private keys without
            constraints on their usage, e.g., what operations the key is
            allowed to be used for (such as signature, decryption, or both).</t>
        <t indent="0" pn="section-5.2-2">This module also does not constrain the usage of the associated
            public keys other than in the context of a configured certificate
            (e.g., an identity certificate), in which case the key usage is
            constrained by the certificate.</t>
      </section>
      <section anchor="sec-mod" numbered="true" removeInRFC="false" toc="include" pn="section-5.3">
        <name slugifiedName="name-security-considerations-for">Security Considerations for the "ietf-keystore" YANG Module</name>
        <t indent="0" pn="section-5.3-1">This section is modeled after the template defined in <xref target="RFC8407" sectionFormat="of" section="3.7.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8407#section-3.7.1" derivedContent="RFC8407"/>.</t>
        <t indent="0" pn="section-5.3-2">The ietf-keystore YANG module defines a data model that is designed to be accessed via YANG-based management protocols, such as NETCONF <xref target="RFC6241" format="default" sectionFormat="of" derivedContent="RFC6241"/> and RESTCONF <xref target="RFC8040" format="default" sectionFormat="of" derivedContent="RFC8040"/>. These protocols have mandatory-to-implement secure transport layers (e.g., SSH <xref target="RFC4252" format="default" sectionFormat="of" derivedContent="RFC4252"/>, TLS <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>, and QUIC <xref target="RFC9000" format="default" sectionFormat="of" derivedContent="RFC9000"/>) and mandatory-to-implement mutual authentication.
</t>
        <t indent="0" pn="section-5.3-3">The Network Configuration Access Control Model (NACM) <xref target="RFC8341" format="default" sectionFormat="of" derivedContent="RFC8341"/> provides the means to restrict access for
        particular users to a preconfigured subset
        of all available protocol operations and
        content.</t>
        <t indent="0" pn="section-5.3-4">Please be aware that this YANG module uses groupings from
            other YANG modules that define nodes that may be considered
            sensitive or vulnerable in network environments.  Please
            review the Security Considerations for dependent YANG modules
            for information as to which nodes may be considered sensitive
            or vulnerable in network environments.</t>
        <t indent="0" pn="section-5.3-5">Some of the readable data nodes in this YANG module
            may be considered sensitive or vulnerable in some network
            environments. It is thus important to control read access
            (e.g., via get, get-config, or notification) to these
            data nodes. These are the subtrees and data nodes and their
            sensitivity/vulnerability:
        </t>
        <dl spacing="normal" newline="true" indent="3" pn="section-5.3-6">
          <dt pn="section-5.3-6.1">The "cleartext-symmetric-key" node:</dt>
          <dd pn="section-5.3-6.2">This node, imported from the "symmetric-key-grouping"
                    grouping defined in <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>, is
                    additionally sensitive to read operations such that,
                    in normal use cases, it should never be returned to a client.
                    For this reason, the NACM extension "default-deny-all" was 
                    applied to it in <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>.</dd>
          <dt pn="section-5.3-6.3">The "cleartext-private-key" node:</dt>
          <dd pn="section-5.3-6.4">This node, defined in the "asymmetric-key-pair-grouping"
                    grouping in <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>, is
                    additionally sensitive to read operations such that, in
                    normal use cases, it should never be returned to a client.  For this
                    reason, the NACM extension "default-deny-all" is applied
                    to it in <xref target="RFC9640" format="default" sectionFormat="of" derivedContent="RFC9640"/>.</dd>
        </dl>
        <t indent="0" pn="section-5.3-7">All the writable data nodes defined by this YANG module, both in the
            "grouping" statements as well as the protocol-accessible "keystore"
            instance, may be considered sensitive or vulnerable in some network
            environments. For instance, any modification to a key or reference
            to a key may dramatically alter the implemented security policy.
            For this reason, the NACM extension "default-deny-write" has been
            set for all data nodes defined in this module.</t>
        <t indent="0" pn="section-5.3-8">This YANG module does not define any "rpc" or "action" statements, and
            thus the security considerations for such is not provided here.</t>
        <t indent="0" pn="section-5.3-9">Built-in key types <bcp14>SHOULD</bcp14> be hidden and/or encrypted (not
            cleartext).  If this is not possible, access control mechanisms
            like NACM <bcp14>SHOULD</bcp14> be used to limit access to the key's secret data
            to only the most trusted authorized clients (e.g., belonging to
            an organization's crypto officer).</t>
      </section>
    </section>
    <section numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-the-ietf-xml-registry">The IETF XML Registry</name>
        <t indent="0" pn="section-6.1-1">IANA has registered the following URI in the "ns" registry of
  the "IETF XML Registry" <xref target="RFC3688" format="default" sectionFormat="of" derivedContent="RFC3688"/>.</t>
        <dl spacing="compact" indent="3" newline="false" pn="section-6.1-2">
          <dt pn="section-6.1-2.1">URI:</dt>
          <dd pn="section-6.1-2.2"> urn:ietf:params:xml:ns:yang:ietf-keystore</dd>
          <dt pn="section-6.1-2.3">Registrant Contact:</dt>
          <dd pn="section-6.1-2.4"> The IESG</dd>
          <dt pn="section-6.1-2.5">XML:</dt>
          <dd pn="section-6.1-2.6">N/A; the requested URI is an XML namespace.</dd>
        </dl>
      </section>
      <section numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-the-yang-module-names-regis">The YANG Module Names Registry</name>
        <t indent="0" pn="section-6.2-1">IANA has registered the following YANG module in the
          "YANG Module Names" registry defined in <xref target="RFC6020" format="default" sectionFormat="of" derivedContent="RFC6020"/>.
        </t>
        <dl spacing="compact" indent="3" newline="false" pn="section-6.2-2">
          <dt pn="section-6.2-2.1">Name:</dt>
          <dd pn="section-6.2-2.2">ietf-keystore</dd>
          <dt pn="section-6.2-2.3">Maintained by IANA:</dt>
          <dd pn="section-6.2-2.4">N</dd>
          <dt pn="section-6.2-2.5">Namespace:</dt>
          <dd pn="section-6.2-2.6">urn:ietf:params:xml:ns:yang:ietf-keystore</dd>
          <dt pn="section-6.2-2.7">Prefix:</dt>
          <dd pn="section-6.2-2.8">ks</dd>
          <dt pn="section-6.2-2.9">Reference:</dt>
          <dd pn="section-6.2-2.10">RFC 9642</dd>
        </dl>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-netmod-system-config" to="NETMOD-SYSTEM-CONFIG"/>
    <displayreference target="I-D.ietf-netconf-http-client-server" to="HTTP-CLIENT-SERVER"/>
    <displayreference target="I-D.ietf-netconf-netconf-client-server" to="NETCONF-CLIENT-SERVER"/>
    <displayreference target="I-D.ietf-netconf-restconf-client-server" to="RESTCONF-CLIENT-SERVER"/>
    <references pn="section-7">
      <name slugifiedName="name-references">References</name>
      <references pn="section-7.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC4252" target="https://www.rfc-editor.org/info/rfc4252" quoteTitle="true" derivedAnchor="RFC4252">
          <front>
            <title>The Secure Shell (SSH) Authentication Protocol</title>
            <author fullname="T. Ylonen" initials="T." surname="Ylonen"/>
            <author fullname="C. Lonvick" initials="C." role="editor" surname="Lonvick"/>
            <date month="January" year="2006"/>
            <abstract>
              <t indent="0">The Secure Shell Protocol (SSH) is a protocol for secure remote login and other secure network services over an insecure network. This document describes the SSH authentication protocol framework and public key, password, and host-based client authentication methods. Additional authentication methods are described in separate documents. The SSH authentication protocol runs on top of the SSH transport layer protocol and provides a single authenticated tunnel for the SSH connection protocol. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4252"/>
          <seriesInfo name="DOI" value="10.17487/RFC4252"/>
        </reference>
        <reference anchor="RFC6020" target="https://www.rfc-editor.org/info/rfc6020" quoteTitle="true" derivedAnchor="RFC6020">
          <front>
            <title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="October" year="2010"/>
            <abstract>
              <t indent="0">YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6020"/>
          <seriesInfo name="DOI" value="10.17487/RFC6020"/>
        </reference>
        <reference anchor="RFC6241" target="https://www.rfc-editor.org/info/rfc6241" quoteTitle="true" derivedAnchor="RFC6241">
          <front>
            <title>Network Configuration Protocol (NETCONF)</title>
            <author fullname="R. Enns" initials="R." role="editor" surname="Enns"/>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." role="editor" surname="Schoenwaelder"/>
            <author fullname="A. Bierman" initials="A." role="editor" surname="Bierman"/>
            <date month="June" year="2011"/>
            <abstract>
              <t indent="0">The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices. It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages. The NETCONF protocol operations are realized as remote procedure calls (RPCs). This document obsoletes RFC 4741. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6241"/>
          <seriesInfo name="DOI" value="10.17487/RFC6241"/>
        </reference>
        <reference anchor="RFC7950" target="https://www.rfc-editor.org/info/rfc7950" quoteTitle="true" derivedAnchor="RFC7950">
          <front>
            <title>The YANG 1.1 Data Modeling Language</title>
            <author fullname="M. Bjorklund" initials="M." role="editor" surname="Bjorklund"/>
            <date month="August" year="2016"/>
            <abstract>
              <t indent="0">YANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7950"/>
          <seriesInfo name="DOI" value="10.17487/RFC7950"/>
        </reference>
        <reference anchor="RFC8040" target="https://www.rfc-editor.org/info/rfc8040" quoteTitle="true" derivedAnchor="RFC8040">
          <front>
            <title>RESTCONF Protocol</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <date month="January" year="2017"/>
            <abstract>
              <t indent="0">This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8040"/>
          <seriesInfo name="DOI" value="10.17487/RFC8040"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC8341" target="https://www.rfc-editor.org/info/rfc8341" quoteTitle="true" derivedAnchor="RFC8341">
          <front>
            <title>Network Configuration Access Control Model</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <date month="March" year="2018"/>
            <abstract>
              <t indent="0">The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability. There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content. This document defines such an access control model.</t>
              <t indent="0">This document obsoletes RFC 6536.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="91"/>
          <seriesInfo name="RFC" value="8341"/>
          <seriesInfo name="DOI" value="10.17487/RFC8341"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="E. Rescorla" initials="E." surname="Rescorla"/>
            <date month="August" year="2018"/>
            <abstract>
              <t indent="0">This document specifies version 1.3 of the Transport Layer Security (TLS) protocol. TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t indent="0">This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961. This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="RFC9000" target="https://www.rfc-editor.org/info/rfc9000" quoteTitle="true" derivedAnchor="RFC9000">
          <front>
            <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
            <author fullname="J. Iyengar" initials="J." role="editor" surname="Iyengar"/>
            <author fullname="M. Thomson" initials="M." role="editor" surname="Thomson"/>
            <date month="May" year="2021"/>
            <abstract>
              <t indent="0">This document defines the core of the QUIC transport protocol. QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances. Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9000"/>
          <seriesInfo name="DOI" value="10.17487/RFC9000"/>
        </reference>
        <reference anchor="RFC9640" target="https://www.rfc-editor.org/info/rfc9640" quoteTitle="true" derivedAnchor="RFC9640">
          <front>
            <title>YANG Data Types and Groupings for Cryptography</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9640"/>
          <seriesInfo name="DOI" value="10.17487/RFC9640"/>
        </reference>
      </references>
      <references pn="section-7.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="I-D.ietf-netconf-http-client-server" target="https://datatracker.ietf.org/doc/html/draft-ietf-netconf-http-client-server-23" quoteTitle="true" derivedAnchor="HTTP-CLIENT-SERVER">
          <front>
            <title>YANG Groupings for HTTP Clients and HTTP Servers</title>
            <author fullname="Kent Watsen" initials="K." surname="Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date day="15" month="August" year="2024"/>
            <abstract>
              <t indent="0">This document presents two YANG modules: the first defines a minimal grouping for configuring an HTTP client, and the second defines a minimal grouping for configuring an HTTP server. It is intended that these groupings will be used to help define the configuration for simple HTTP-based protocols (not for complete web servers or browsers). Support is provided for HTTP/1.1, HTTP/2, and HTTP/3.</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-http-client-server-23"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-netconf-netconf-client-server" target="https://datatracker.ietf.org/doc/html/draft-ietf-netconf-netconf-client-server-37" quoteTitle="true" derivedAnchor="NETCONF-CLIENT-SERVER">
          <front>
            <title>NETCONF Client and Server Models</title>
            <author fullname="Kent Watsen" initials="K." surname="Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date day="14" month="August" year="2024"/>
            <abstract>
              <t indent="0">This document presents two YANG modules, one module to configure a NETCONF client and the other module to configure a NETCONF server. Both modules support both the SSH and TLS transport protocols, and support both standard NETCONF and NETCONF Call Home connections. 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 (note: not all may be present): * AAAA --&gt; the assigned RFC value for draft-ietf-netconf-crypto- types * BBBB --&gt; the assigned RFC value for draft-ietf-netconf-trust- anchors * CCCC --&gt; the assigned RFC value for draft-ietf-netconf-keystore * DDDD --&gt; the assigned RFC value for draft-ietf-netconf-tcp-client- server * EEEE --&gt; the assigned RFC value for draft-ietf-netconf-ssh-client- server * FFFF --&gt; the assigned RFC value for draft-ietf-netconf-tls-client- server * GGGG --&gt; the assigned RFC value for draft-ietf-netconf-http- client-server * HHHH --&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: * 2024-08-14 --&gt; the publication date of this draft The "Relation to other RFCs" section Section 1.1 contains the text "one or more YANG modules" and, later, "modules". This text is sourced from a file in a context where it is unknown how many modules a draft defines. The text is not wrong as is, but it may be improved by stating more directly how many modules are defined. The "Relation to other RFCs" section Section 1.1 contains a self- reference to this draft, along with a corresponding reference in the Appendix. Please replace the self-reference in this section with "This RFC" (or similar) and remove the self-reference in the "Normative/Informative References" section, whichever it is in. Tree-diagrams in this draft may use the '\' line-folding mode defined in RFC 8792. However, nicer-to-the-eye is when the '\\' line-folding mode is used. The AD suggested suggested putting a request here for the RFC Editor to help convert "ugly" '\' folded examples to use the '\\' folding mode. "Help convert" may be interpreted as, identify what looks ugly and ask the authors to make the adjustment. The following Appendix section is to be removed prior to publication: * Appendix A. Change Log</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-netconf-client-server-37"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-netmod-system-config" target="https://datatracker.ietf.org/doc/html/draft-ietf-netmod-system-config-09" quoteTitle="true" derivedAnchor="NETMOD-SYSTEM-CONFIG">
          <front>
            <title>System-defined Configuration</title>
            <author fullname="Qiufang Ma" initials="Q." surname="Ma" role="editor">
              <organization showOnFrontPage="true">Huawei</organization>
            </author>
            <author fullname="Qin Wu" initials="Q." surname="Wu">
              <organization showOnFrontPage="true">Huawei</organization>
            </author>
            <author fullname="Chong Feng" initials="C." surname="Feng"/>
            <date day="29" month="September" year="2024"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netmod-system-config-09"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-netconf-restconf-client-server" target="https://datatracker.ietf.org/doc/html/draft-ietf-netconf-restconf-client-server-38" quoteTitle="true" derivedAnchor="RESTCONF-CLIENT-SERVER">
          <front>
            <title>RESTCONF Client and Server Models</title>
            <author fullname="Kent Watsen" initials="K." surname="Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date day="14" month="August" year="2024"/>
            <abstract>
              <t indent="0">This document presents two YANG modules, one module to configure a RESTCONF client and the other module to configure a RESTCONF server. Both modules support the TLS transport protocol with both standard RESTCONF and RESTCONF Call Home connections. 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 (note: not all may be present): * AAAA --&gt; the assigned RFC value for draft-ietf-netconf-crypto- types * BBBB --&gt; the assigned RFC value for draft-ietf-netconf-trust- anchors * CCCC --&gt; the assigned RFC value for draft-ietf-netconf-keystore * DDDD --&gt; the assigned RFC value for draft-ietf-netconf-tcp-client- server * EEEE --&gt; the assigned RFC value for draft-ietf-netconf-ssh-client- server * FFFF --&gt; the assigned RFC value for draft-ietf-netconf-tls-client- server * GGGG --&gt; the assigned RFC value for draft-ietf-netconf-http- client-server * HHHH --&gt; the assigned RFC value for draft-ietf-netconf-netconf- client-server * IIII --&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: * 2024-08-14 --&gt; the publication date of this draft The "Relation to other RFCs" section Section 1.1 contains the text "one or more YANG modules" and, later, "modules". This text is sourced from a file in a context where it is unknown how many modules a draft defines. The text is not wrong as is, but it may be improved by stating more directly how many modules are defined. The "Relation to other RFCs" section Section 1.1 contains a self- reference to this draft, along with a corresponding reference in the Appendix. Please replace the self-reference in this section with "This RFC" (or similar) and remove the self-reference in the "Normative/Informative References" section, whichever it is in. Tree-diagrams in this draft may use the '\' line-folding mode defined in RFC 8792. However, nicer-to-the-eye is when the '\\' line-folding mode is used. The AD suggested suggested putting a request here for the RFC Editor to help convert "ugly" '\' folded examples to use the '\\' folding mode. "Help convert" may be interpreted as, identify what looks ugly and ask the authors to make the adjustment. The following Appendix section is to be removed prior to publication: * Appendix A. Change Log</t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-netconf-restconf-client-server-38"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="RFC3688" target="https://www.rfc-editor.org/info/rfc3688" quoteTitle="true" derivedAnchor="RFC3688">
          <front>
            <title>The IETF XML Registry</title>
            <author fullname="M. Mealling" initials="M." surname="Mealling"/>
            <date month="January" year="2004"/>
            <abstract>
              <t indent="0">This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="81"/>
          <seriesInfo name="RFC" value="3688"/>
          <seriesInfo name="DOI" value="10.17487/RFC3688"/>
        </reference>
        <reference anchor="RFC8259" target="https://www.rfc-editor.org/info/rfc8259" quoteTitle="true" derivedAnchor="RFC8259">
          <front>
            <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
            <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
            <date month="December" year="2017"/>
            <abstract>
              <t indent="0">JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
              <t indent="0">This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="90"/>
          <seriesInfo name="RFC" value="8259"/>
          <seriesInfo name="DOI" value="10.17487/RFC8259"/>
        </reference>
        <reference anchor="RFC8340" target="https://www.rfc-editor.org/info/rfc8340" quoteTitle="true" derivedAnchor="RFC8340">
          <front>
            <title>YANG Tree Diagrams</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="L. Berger" initials="L." role="editor" surname="Berger"/>
            <date month="March" year="2018"/>
            <abstract>
              <t indent="0">This document captures the current syntax used in YANG module tree diagrams. The purpose of this document is to provide a single location for this definition. This syntax may be updated from time to time based on the evolution of the YANG language.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="215"/>
          <seriesInfo name="RFC" value="8340"/>
          <seriesInfo name="DOI" value="10.17487/RFC8340"/>
        </reference>
        <reference anchor="RFC8342" target="https://www.rfc-editor.org/info/rfc8342" quoteTitle="true" derivedAnchor="RFC8342">
          <front>
            <title>Network Management Datastore Architecture (NMDA)</title>
            <author fullname="M. Bjorklund" initials="M." surname="Bjorklund"/>
            <author fullname="J. Schoenwaelder" initials="J." surname="Schoenwaelder"/>
            <author fullname="P. Shafer" initials="P." surname="Shafer"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="R. Wilton" initials="R." surname="Wilton"/>
            <date month="March" year="2018"/>
            <abstract>
              <t indent="0">Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model. This document updates RFC 7950.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8342"/>
          <seriesInfo name="DOI" value="10.17487/RFC8342"/>
        </reference>
        <reference anchor="RFC8407" target="https://www.rfc-editor.org/info/rfc8407" quoteTitle="true" derivedAnchor="RFC8407">
          <front>
            <title>Guidelines for Authors and Reviewers of Documents Containing YANG Data Models</title>
            <author fullname="A. Bierman" initials="A." surname="Bierman"/>
            <date month="October" year="2018"/>
            <abstract>
              <t indent="0">This memo provides guidelines for authors and reviewers of specifications containing YANG modules. Recommendations and procedures are defined, which are intended to increase interoperability and usability of Network Configuration Protocol (NETCONF) and RESTCONF protocol implementations that utilize YANG modules. This document obsoletes RFC 6087.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="216"/>
          <seriesInfo name="RFC" value="8407"/>
          <seriesInfo name="DOI" value="10.17487/RFC8407"/>
        </reference>
        <reference anchor="RFC8792" target="https://www.rfc-editor.org/info/rfc8792" quoteTitle="true" derivedAnchor="RFC8792">
          <front>
            <title>Handling Long Lines in Content of Internet-Drafts and RFCs</title>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <author fullname="E. Auerswald" initials="E." surname="Auerswald"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <author fullname="Q. Wu" initials="Q." surname="Wu"/>
            <date month="June" year="2020"/>
            <abstract>
              <t indent="0">This document defines two strategies for handling long lines in width-bounded text content. One strategy, called the "single backslash" strategy, is based on the historical use of a single backslash ('\') character to indicate where line-folding has occurred, with the continuation occurring with the first character that is not a space character (' ') on the next line. The second strategy, called the "double backslash" strategy, extends the first strategy by adding a second backslash character to identify where the continuation begins and is thereby able to handle cases not supported by the first strategy. Both strategies use a self-describing header enabling automated reconstitution of the original content.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8792"/>
          <seriesInfo name="DOI" value="10.17487/RFC8792"/>
        </reference>
        <reference anchor="RFC9641" target="https://www.rfc-editor.org/info/rfc9641" quoteTitle="true" derivedAnchor="RFC9641">
          <front>
            <title>A YANG Data Model for a Truststore</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9641"/>
          <seriesInfo name="DOI" value="10.17487/RFC9641"/>
        </reference>
        <reference anchor="RFC9643" target="https://www.rfc-editor.org/info/rfc9643" quoteTitle="true" derivedAnchor="RFC9643">
          <front>
            <title>YANG Groupings for TCP Clients and TCP Servers</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <author initials="M." surname="Scharf" fullname="Michael Scharf">
              <organization showOnFrontPage="true">Hochschule Esslingen - University of Applied Sciences</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9643"/>
          <seriesInfo name="DOI" value="10.17487/RFC9643"/>
        </reference>
        <reference anchor="RFC9644" target="https://www.rfc-editor.org/info/rfc9644" quoteTitle="true" derivedAnchor="RFC9644">
          <front>
            <title>YANG Groupings for SSH Clients and SSH Servers</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9644"/>
          <seriesInfo name="DOI" value="10.17487/RFC9644"/>
        </reference>
        <reference anchor="RFC9645" target="https://www.rfc-editor.org/info/rfc9645" quoteTitle="true" derivedAnchor="RFC9645">
          <front>
            <title>YANG Groupings for TLS Clients and TLS Servers</title>
            <author initials="K." surname="Watsen" fullname="Kent Watsen">
              <organization showOnFrontPage="true">Watsen Networks</organization>
            </author>
            <date month="October" year="2024"/>
          </front>
          <seriesInfo name="RFC" value="9645"/>
          <seriesInfo name="DOI" value="10.17487/RFC9645"/>
        </reference>
        <reference anchor="Std-802.1AR-2018" target="https://standards.ieee.org/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>
              <organization showOnFrontPage="true">IEEE</organization>
            </author>
            <date month="August" year="2018"/>
          </front>
          <seriesInfo name="IEEE Std" value="802.1AR-2018"/>
          <seriesInfo name="DOI" value="10.1109/IEEESTD.2018.8423794"/>
        </reference>
        <reference anchor="W3C.REC-xml-20081126" target="https://www.w3.org/TR/xml/" quoteTitle="true" derivedAnchor="W3C.REC-xml-20081126">
          <front>
            <title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
            <author initials="T." surname="Bray"/>
            <author initials="J." surname="Paoli"/>
            <author initials="C. M." surname="Sperberg-McQueen"/>
            <author initials="E." surname="Maler"/>
            <author initials="F." surname="Yergeau"/>
            <date month="November" year="2008"/>
          </front>
          <refcontent>W3C Recommendation REC-xml-20081126</refcontent>
        </reference>
      </references>
    </references>
    <section numbered="false" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.a-1">The authors would like to thank the following for
        lively discussions on list and in the halls (ordered
        by first name):
	      <contact fullname="Alan Luchuk"/>,
              <contact fullname="Andy Bierman"/>,
	       <contact fullname="Balázs Kovács"/>,
        <contact fullname="Benoit Claise"/>,
	    <contact fullname="Bert Wijnen"/>,
	    <contact fullname="David Lamparter"/>,
        <contact fullname="Eric Voit"/>,
       <contact fullname="Éric Vyncke"/>,
       <contact fullname="Francesca Palombini"/>,
        <contact fullname="Jürgen Schönwälder"/>,
	    <contact fullname="Ladislav Lhotka"/>,
	    <contact fullname="Liang Xia"/>,
	    <contact fullname="Magnus Nyström"/>,
     <contact fullname="Mahesh Jethanandani"/>,
     <contact fullname="Martin Björklund"/>,
     <contact fullname="Mehmet Ersue"/>,
     <contact fullname="Murray Kucherawy"/>,
     <contact fullname="Paul Wouters"/>,
     <contact fullname="Phil Shafer"/>,
     <contact fullname="Qin Wu"/>,
	    <contact fullname="Radek Krejci"/>,
      <contact fullname="Ramkumar Dhanapal"/>,
      <contact fullname="Reese Enghardt"/>,
     <contact fullname="Reshad Rahman"/>,
      <contact fullname="Rob Wilton"/>,
      <contact fullname="Roman Danyliw"/>,
     <contact fullname="Sandra Murphy"/>,
     <contact fullname="Sean Turner"/>,
      <contact fullname="Tom Petch"/>,
      <contact fullname="Warren Kumari"/>,
        and <contact fullname="Zaheduzzaman Sarker"/>.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-address">Author's Address</name>
      <author initials="K." surname="Watsen" fullname="Kent Watsen">
        <organization showOnFrontPage="true">Watsen Networks</organization>
        <address>
          <email>kent+ietf@watsen.net</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
