draft-ietf-netconf-keystore-14.txt   draft-ietf-netconf-keystore-15.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Watsen Networks Internet-Draft Watsen Networks
Intended status: Standards Track November 1, 2019 Intended status: Standards Track November 20, 2019
Expires: May 4, 2020 Expires: May 23, 2020
A YANG Data Model for a Keystore A YANG Data Model for a Keystore
draft-ietf-netconf-keystore-14 draft-ietf-netconf-keystore-15
Abstract Abstract
This document defines a YANG 1.1 module called "ietf-keystore" that This document defines a YANG 1.1 module called "ietf-keystore" that
enables centralized configuration of both symmetric and asymmetric enables centralized configuration of both symmetric and asymmetric
keys. The secret value for both key types may be encrypted. keys. The secret value for both key types may be encrypted.
Asymmetric keys may be associated with certificates. Notifications Asymmetric keys may be associated with certificates. Notifications
are sent when certificates are about to expire. are sent when certificates are about to expire.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 1, line 37 skipping to change at page 1, line 37
progress. Please apply the following replacements: progress. Please apply the following replacements:
o "AAAA" --> the assigned RFC value for o "AAAA" --> the assigned RFC value for
[I-D.ietf-netconf-crypto-types]. [I-D.ietf-netconf-crypto-types].
o "XXXX" --> the assigned RFC value for this draft o "XXXX" --> the assigned RFC value for this draft
Artwork in this document contains placeholder values for the date of Artwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: publication of this draft. Please apply the following replacement:
o "2019-11-02" --> the publication date of this draft o "2019-11-20" --> the publication date of this draft
The following Appendix section is to be removed prior to publication: The following Appendix section is to be removed prior to publication:
o Appendix A. Change Log o Appendix A. Change Log
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 4, 2020. This Internet-Draft will expire on May 23, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 41 skipping to change at page 2, line 41
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Requirements Language . . . . . . . . . . . . . . . . . . . . 4 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 4
3. The Keystore Model . . . . . . . . . . . . . . . . . . . . . 4 3. The Keystore Model . . . . . . . . . . . . . . . . . . . . . 4
3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 14 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 14 3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 14
3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 16 3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 16
3.2.3. The "generate-asymmetric-key" RPC . . . . . . . . . . 17 3.2.3. The "generate-asymmetric-key" RPC . . . . . . . . . . 17
3.2.4. Notable Keystore Groupings . . . . . . . . . . . . . 18 3.2.4. Notable Keystore Groupings . . . . . . . . . . . . . 18
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 22 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 22
4. Security Considerations . . . . . . . . . . . . . . . . . . . 32 4. Support for Built-in Keys . . . . . . . . . . . . . . . . . . 33
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 5. Security Considerations . . . . . . . . . . . . . . . . . . . 34
5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 33 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
5.2. The YANG Module Names Registry . . . . . . . . . . . . . 33 6.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 35
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 6.2. The YANG Module Names Registry . . . . . . . . . . . . . 35
6.1. Normative References . . . . . . . . . . . . . . . . . . 33 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.2. Informative References . . . . . . . . . . . . . . . . . 34 7.1. Normative References . . . . . . . . . . . . . . . . . . 35
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 35 7.2. Informative References . . . . . . . . . . . . . . . . . 36
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 35 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 37
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 35 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 35 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 35 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 36 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 36 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 36 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 36 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 36 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.14. 13 to 14 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 40
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 38 A.14. 13 to 14 . . . . . . . . . . . . . . . . . . . . . . . . 40
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 38 A.15. 14 to 15 . . . . . . . . . . . . . . . . . . . . . . . . 40
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 40
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 40
1. Introduction 1. Introduction
This document defines a YANG 1.1 [RFC7950] module called "ietf- This document defines a YANG 1.1 [RFC7950] module called "ietf-
keystore" that enables centralized configuration of both symmetric keystore" that enables centralized configuration of both symmetric
and asymmetric keys. The secret value for both key types may be and asymmetric keys. The secret value for both key types may be
encrypted. Asymmetric keys may be associated with certificates. encrypted. Asymmetric keys may be associated with certificates.
Notifications are sent when certificates are about to expire. Notifications are sent when certificates are about to expire.
The "ietf-keystore" module defines many "grouping" statements The "ietf-keystore" module defines many "grouping" statements
skipping to change at page 3, line 45 skipping to change at page 3, line 47
secret key values. To support such hardware, symmetric keys may have secret key values. To support such hardware, symmetric keys may have
the value "hidden-key" and asymmetric keys may have the value the value "hidden-key" and asymmetric keys may have the value
"hidden-private-key". While how such keys are created or destroyed "hidden-private-key". While how such keys are created or destroyed
is outside the scope of this document, the keystore can contain is outside the scope of this document, the keystore can contain
entries for such keys, enabling them to be reference by other entries for such keys, enabling them to be reference by other
configuration elements. configuration elements.
This document in compliant with Network Management Datastore This document in compliant with Network Management Datastore
Architecture (NMDA) [RFC8342]. For instance, keys and associated Architecture (NMDA) [RFC8342]. For instance, keys and associated
certificates installed during manufacturing (e.g., for a IDevID certificates installed during manufacturing (e.g., for a IDevID
[Std-802.1AR-2009] certificate), it is expected that such data may [Std-802.1AR-2009] certificate), are expected to appear in
appear only in <operational>. <operational> (see Section 4).
It is not required that a system has an operating system level It is not required that a system has an operating system level
keystore utility to implement this module. keystore utility to implement this module.
2. Requirements Language 2. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
skipping to change at page 9, line 25 skipping to change at page 9, line 25
| +-- expiration-date yang:date-and-time | +-- expiration-date yang:date-and-time
+---x generate-certificate-signing-request +---x generate-certificate-signing-request
+---w input +---w input
| +---w subject binary | +---w subject binary
| +---w attributes? binary | +---w attributes? binary
+--ro output +--ro output
+--ro certificate-signing-request binary +--ro certificate-signing-request binary
grouping asymmetric-key-certificate-ref-grouping grouping asymmetric-key-certificate-ref-grouping
+-- asymmetric-key? ks:asymmetric-key-ref +-- asymmetric-key? ks:asymmetric-key-ref
+-- certificate? leafref +-- certificate? leafref
grouping local-or-keystore-symmetric-key-grouping
+-- (local-or-keystore)
+--:(local) {local-definitions-supported}?
| +-- local-definition
| +-- algorithm isa:symmetric-algorithm-type
| +-- key-format? identityref
| +-- (key-type)
| +--:(key)
| | +-- key? binary
| +--:(hidden-key)
| | +-- hidden-key? empty
| +--:(encrypted-key)
| +-- encrypted-key
| +-- (key-type)
| | +--:(symmetric-key-ref)
| | | +-- symmetric-key-ref? leafref
| | | {keystore-supported}?
| | +--:(asymmetric-key-ref)
| | +-- asymmetric-key-ref? leafref
| | {keystore-supported}?
| +-- value? binary
+--:(keystore) {keystore-supported}?
+-- keystore-reference? ks:symmetric-key-ref
grouping local-or-keystore-asymmetric-key-grouping grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-definitions-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm | +-- algorithm
| | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| +-- public-key-format? identityref | +-- public-key-format? identityref
| +-- public-key binary | +-- public-key binary
| +-- private-key-format? identityref | +-- private-key-format? identityref
| +-- (private-key-type) | +-- (private-key-type)
skipping to change at page 14, line 10 skipping to change at page 14, line 33
| | {keystore-supported}? | | {keystore-supported}?
| +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| +--ro asymmetric-key-ref? leafref | +--ro asymmetric-key-ref? leafref
| {keystore-supported}? | {keystore-supported}?
+--ro value? binary +--ro value? binary
3.2. Example Usage 3.2. Example Usage
3.2.1. A Keystore Instance 3.2.1. A Keystore Instance
The following example illustrates what a fully configured keystore The following example illustrates keys in <intended>. Please see
might look like in <operational>, as described by Section 5.3 in Section 4 for an example illustrating built-in values in
[RFC8342]. This datastore view illustrates data set by the <operational>.
manufacturing process alongside conventional configuration. This
keystore instance has four keys, two having one associated
certificate, one having two associated certificates, and one empty
key.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore" <keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<symmetric-keys> <symmetric-keys>
<symmetric-key> <symmetric-key>
<name>cleartext-symmetric-key</name> <name>cleartext-symmetric-key</name>
<algorithm>aes-256-cbc</algorithm> <algorithm>aes-256-cbc</algorithm>
skipping to change at page 14, line 40 skipping to change at page 15, line 11
<symmetric-key> <symmetric-key>
<name>hidden-symmetric-key</name> <name>hidden-symmetric-key</name>
<algorithm>aes-256-cbc</algorithm> <algorithm>aes-256-cbc</algorithm>
<hidden-key/> <hidden-key/>
</symmetric-key> </symmetric-key>
<symmetric-key> <symmetric-key>
<name>encrypted-symmetric-key</name> <!-- operator's key --> <name>encrypted-symmetric-key</name> <!-- operator's key -->
<algorithm>aes-256-cbc</algorithm> <algorithm>aes-256-cbc</algorithm>
<key-format>ct:encrypted-one-symmetric-key-format</key-format>
<encrypted-key> <encrypted-key>
<asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-re\ <asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-re\
f> f>
<value>base64encodedvalue==</value> <value>base64encodedvalue==</value>
</encrypted-key> </encrypted-key>
</symmetric-key> </symmetric-key>
</symmetric-keys> </symmetric-keys>
<asymmetric-keys> <asymmetric-keys>
skipping to change at page 16, line 4 skipping to change at page 16, line 25
<hidden-private-key/> <!-- e.g., TPM protected --> <hidden-private-key/> <!-- e.g., TPM protected -->
<certificates> <certificates>
<certificate> <certificate>
<name>builtin-idevid-cert</name> <name>builtin-idevid-cert</name>
</certificate> </certificate>
<certificate> <certificate>
<name>my-ldevid-cert</name> <name>my-ldevid-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
<asymmetric-key> <asymmetric-key>
<name>encrypted-asymmetric-key</name> <name>encrypted-asymmetric-key</name>
<algorithm>secp256r1</algorithm> <algorithm>secp256r1</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\ <public-key-format>ct:subject-public-key-info-format</public-k\
ey-format> ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:encrypted-one-asymmetric-key-format</pr\
ivate-key-format>
<encrypted-private-key> <encrypted-private-key>
<symmetric-key-ref>encrypted-symmetric-key</symmetric-key-re\ <symmetric-key-ref>encrypted-symmetric-key</symmetric-key-re\
f> f>
<value>base64encodedvalue==</value> <value>base64encodedvalue==</value>
</encrypted-private-key> </encrypted-private-key>
</asymmetric-key> </asymmetric-key>
</asymmetric-keys> </asymmetric-keys>
</keystore> </keystore>
skipping to change at page 17, line 9 skipping to change at page 17, line 30
</keystore> </keystore>
</action> </action>
</rpc> </rpc>
Following is the complimentary RPC-reply. Following is the complimentary RPC-reply.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc-reply message-id="101" <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"> xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<!--<data> yanglint validation fails --> <!--<data> yanglint validation fails -->
<ks:algorithm>aes-256-cbc</ks:algorithm> <ks:algorithm>aes-256-cbc</ks:algorithm>
<ks:key-format>ct:encrypted-one-symmetric-key-format</ks:key-for\
mat>
<ks:encrypted-key> <ks:encrypted-key>
<ks:asymmetric-key-ref>hidden-asymmetric-key</ks:asymmetric-ke\ <ks:asymmetric-key-ref>hidden-asymmetric-key</ks:asymmetric-ke\
y-ref> y-ref>
<ks:value>base64encodedvalue==</ks:value> <ks:value>base64encodedvalue==</ks:value>
</ks:encrypted-key> </ks:encrypted-key>
<!--</data> yanglint validation fails --> <!--</data> yanglint validation fails -->
</rpc-reply> </rpc-reply>
3.2.3. The "generate-asymmetric-key" RPC 3.2.3. The "generate-asymmetric-key" RPC
skipping to change at page 18, line 9 skipping to change at page 18, line 30
</keystore> </keystore>
</action> </action>
</rpc> </rpc>
Following is the complimentary RPC-reply. Following is the complimentary RPC-reply.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc-reply message-id="101" <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types" xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"> xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<!--<data> yanglint validation fails --> <!--<data> yanglint validation fails -->
<ks:algorithm>secp256r1</ks:algorithm> <ks:algorithm>secp256r1</ks:algorithm>
<ks:public-key-format>ct:subject-public-key-info-format</ks:publ\ <ks:public-key-format>ct:subject-public-key-info-format</ks:publ\
ic-key-format> ic-key-format>
<ks:public-key>base64encodedvalue==</ks:public-key> <ks:public-key>base64encodedvalue==</ks:public-key>
<ks:private-key-format>ct:encrypted-one-asymmetric-key-format</k\
s:private-key-format>
<ks:encrypted-private-key> <ks:encrypted-private-key>
<ks:symmetric-key-ref>encrypted-symmetric-key</ks:symmetric-ke\ <ks:symmetric-key-ref>encrypted-symmetric-key</ks:symmetric-ke\
y-ref> y-ref>
<ks:value>base64encodedvalue==</ks:value> <ks:value>base64encodedvalue==</ks:value>
</ks:encrypted-private-key> </ks:encrypted-private-key>
<!--</data> yanglint validation fails --> <!--</data> yanglint validation fails -->
</rpc-reply> </rpc-reply>
3.2.4. Notable Keystore Groupings 3.2.4. Notable Keystore Groupings
skipping to change at page 22, line 11 skipping to change at page 22, line 29
</end-entity-cert-with-key> </end-entity-cert-with-key>
</keystore-usage> </keystore-usage>
3.3. YANG Module 3.3. YANG Module
This YANG module has normative references to [RFC8341] and This YANG module has normative references to [RFC8341] and
[I-D.ietf-netconf-crypto-types], and an informative reference to [I-D.ietf-netconf-crypto-types], and an informative reference to
[RFC8342]. [RFC8342].
<CODE BEGINS> file "ietf-keystore@2019-11-02.yang" <CODE BEGINS> file "ietf-keystore@2019-11-20.yang"
module ietf-keystore { module ietf-keystore {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-keystore"; namespace "urn:ietf:params:xml:ns:yang:ietf-keystore";
prefix ks; prefix ks;
import ietf-netconf-acm { import ietf-netconf-acm {
prefix nacm; prefix nacm;
reference reference
"RFC 8341: Network Configuration Access Control Model"; "RFC 8341: Network Configuration Access Control Model";
skipping to change at page 23, line 23 skipping to change at page 23, line 42
Redistribution and use in source and binary forms, with Redistribution and use in source and binary forms, with
or without modification, is permitted pursuant to, and or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents Legal Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info). (https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX This version of this YANG module is part of RFC XXXX
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.; itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision 2019-11-02 { revision 2019-11-20 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: A YANG Data Model for a Keystore"; "RFC XXXX: A YANG Data Model for a Keystore";
} }
/****************/ /****************/
/* Features */ /* Features */
/****************/ /****************/
skipping to change at page 24, line 19 skipping to change at page 24, line 38
"Indicates that the server supports the actions related to "Indicates that the server supports the actions related to
the life cycling keys in <operational>. To be used by the life cycling keys in <operational>. To be used by
configuration, keys in <operational> must be copied to configuration, keys in <operational> must be copied to
<running>."; <running>.";
} }
/****************/ /****************/
/* Typedefs */ /* Typedefs */
/****************/ /****************/
typedef 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 keystore.";
}
typedef asymmetric-key-ref { typedef asymmetric-key-ref {
type leafref { type leafref {
path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
+ "/ks:name"; + "/ks:name";
} }
description description
"This typedef enables modules to easily define a reference "This typedef enables modules to easily define a reference
to an asymmetric key stored in the keystore."; to an asymmetric key stored in the keystore.";
} }
/*****************/ /*****************/
/* Groupings */ /* Groupings */
/*****************/ /*****************/
skipping to change at page 25, line 31 skipping to change at page 26, line 12
leaf value { leaf value {
type binary; type binary;
description description
"The private key, encrypted using the specified symmetric "The private key, encrypted using the specified symmetric
or asymmetric key."; or asymmetric key.";
} }
} }
grouping symmetric-key-grouping { grouping symmetric-key-grouping {
description description
"This grouping is identical to the one in ietf-crypt-types "This grouping is identical to the one in ietf-crypto-types
except that it adds a couple case statements enabling the except that it adds a case statement enabling the key
key value to be encrypted by a symmetric or an asymmetric value to be encrypted by a symmetric or an asymmetric
key known to the keystore."; key known to the keystore.";
uses ct:symmetric-key-grouping { uses ct:symmetric-key-grouping {
augment "key-type" { augment "key-type" {
description description
"Augments a new 'case' statement into the 'choice' "Augments a new 'case' statement into the 'choice'
statement defined by the ietf-crypto-types module."; statement defined by the ietf-crypto-types module.";
container encrypted-key { container encrypted-key {
must "../key-format";
description description
"A container for the encrypted symmetric key value."; "A container for the encrypted symmetric key value.";
uses encrypted-value-grouping; uses encrypted-value-grouping;
} }
} }
} }
} }
grouping asymmetric-key-pair-grouping { grouping asymmetric-key-pair-grouping {
description description
"This grouping is identical to the one in ietf-crypt-types "This grouping is identical to the one in ietf-crypto-types
except that it adds a couple case statements enabling the except that it adds a case statement enabling the key
key value to be encrypted by a symmetric or an asymmetric value to be encrypted by a symmetric or an asymmetric
key known to the keystore."; key known to the keystore.";
uses ct:asymmetric-key-pair-grouping { uses ct:asymmetric-key-pair-grouping {
augment "private-key-type" { augment "private-key-type" {
description description
"Augments a new 'case' statement into the 'choice' "Augments a new 'case' statement into the 'choice'
statement defined by the ietf-crypto-types module."; statement defined by the ietf-crypto-types module.";
container encrypted-private-key { container encrypted-private-key {
must "../private-key-format";
description description
"A container for the encrypted asymmetric private "A container for the encrypted asymmetric private
key value."; key value.";
uses encrypted-value-grouping; uses encrypted-value-grouping;
} }
} }
} }
} }
grouping asymmetric-key-pair-with-cert-grouping { grouping asymmetric-key-pair-with-cert-grouping {
description description
"This grouping is identical to the one in ietf-crypt-types "This grouping is identical to the one in ietf-crypto-types
except that it adds a couple case statements enabling the except that it adds a case statement enabling the key
key value to be encrypted by a symmetric or an asymmetric value to be encrypted by a symmetric or an asymmetric
key known to the keystore."; key known to the keystore.";
uses ct:asymmetric-key-pair-with-cert-grouping { uses ct:asymmetric-key-pair-with-cert-grouping {
augment "private-key-type" { augment "private-key-type" {
description description
"Augments a new 'case' statement into the 'choice' "Augments a new 'case' statement into the 'choice'
statement defined by the ietf-crypto-types module."; statement defined by the ietf-crypto-types module.";
container encrypted-private-key { container encrypted-private-key {
must "../private-key-format";
description description
"A container for the encrypted asymmetric private "A container for the encrypted asymmetric private
key value."; key value.";
uses encrypted-value-grouping; uses encrypted-value-grouping;
} }
} }
} }
} }
grouping asymmetric-key-pair-with-certs-grouping { grouping asymmetric-key-pair-with-certs-grouping {
description description
"This grouping is identical to the one in ietf-crypt-types "This grouping is identical to the one in ietf-crypto-types
except that it adds a couple case statements enabling the except that it adds a case statement enabling the key
key value to be encrypted by a symmetric or an asymmetric value to be encrypted by a symmetric or an asymmetric
key known to the keystore."; key known to the keystore.";
uses ct:asymmetric-key-pair-with-certs-grouping { uses ct:asymmetric-key-pair-with-certs-grouping {
augment "private-key-type" { augment "private-key-type" {
description description
"Augments a new 'case' statement into the 'choice' "Augments a new 'case' statement into the 'choice'
statement defined by the ietf-crypto-types module."; statement defined by the ietf-crypto-types module.";
container encrypted-private-key { container encrypted-private-key {
must "../private-key-format";
description description
"A container for the encrypted asymmetric private "A container for the encrypted asymmetric private
key value."; key value.";
uses encrypted-value-grouping; uses encrypted-value-grouping;
} }
} }
} }
} }
grouping asymmetric-key-certificate-ref-grouping { grouping asymmetric-key-certificate-ref-grouping {
skipping to change at page 27, line 39 skipping to change at page 28, line 23
must '../asymmetric-key'; must '../asymmetric-key';
description description
"A reference to a specific certificate of the "A reference to a specific certificate of the
asymmetric key in the keystore."; asymmetric key in the keystore.";
} }
description description
"This grouping defines a reference to a specific certificate "This grouping defines a reference to a specific certificate
associated with an asymmetric key stored in the keystore."; associated with an asymmetric key stored in the keystore.";
} }
// local-or-keystore-* groupings
grouping local-or-keystore-symmetric-key-grouping {
description
"A grouping that expands to allow the symmetric key to be
either stored locally, within the using data model, or be
a reference to an symmetric key stored in the keystore.";
choice local-or-keystore {
mandatory true;
case local {
if-feature "local-definitions-supported";
container local-definition {
description
"Container to hold the local key definition.";
uses symmetric-key-grouping;
}
}
case keystore {
if-feature "keystore-supported";
leaf keystore-reference {
type ks:symmetric-key-ref;
description
"A reference to an symmetric key that exists in
the keystore.";
}
}
description
"A choice between an inlined definition and a definition
that exists in the keystore.";
}
}
grouping local-or-keystore-asymmetric-key-grouping { grouping local-or-keystore-asymmetric-key-grouping {
description description
"A grouping that expands to allow the asymmetric key to be "A grouping that expands to allow the asymmetric key to be
either stored locally, within the using data model, or be either stored locally, within the using data model, or be
a reference to an asymmetric key stored in the keystore."; a reference to an asymmetric key stored in the keystore.";
choice local-or-keystore { choice local-or-keystore {
mandatory true; mandatory true;
case local { case local {
if-feature "local-definitions-supported"; if-feature "local-definitions-supported";
container local-definition { container local-definition {
skipping to change at page 28, line 4 skipping to change at page 29, line 21
either stored locally, within the using data model, or be either stored locally, within the using data model, or be
a reference to an asymmetric key stored in the keystore."; a reference to an asymmetric key stored in the keystore.";
choice local-or-keystore { choice local-or-keystore {
mandatory true; mandatory true;
case local { case local {
if-feature "local-definitions-supported"; if-feature "local-definitions-supported";
container local-definition { container local-definition {
description description
"Container to hold the local key definition."; "Container to hold the local key definition.";
uses asymmetric-key-pair-grouping; uses asymmetric-key-pair-grouping;
} }
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf keystore-reference { leaf keystore-reference {
type ks:asymmetric-key-ref; type ks:asymmetric-key-ref;
description description
"A reference to an asymmetric key that exists in "A reference to an asymmetric key that exists in
the keystore. The intent is to reference just the the keystore. The intent is to reference just the
asymmetric key, not any certificates that may also asymmetric key without any regard for any certificates
be associated with the asymmetric key."; that may be associated with it.";
} }
} }
description description
"A choice between an inlined definition and a definition "A choice between an inlined definition and a definition
that exists in the keystore."; that exists in the keystore.";
} }
} }
grouping local-or-keystore-asymmetric-key-with-certs-grouping { grouping local-or-keystore-asymmetric-key-with-certs-grouping {
description description
skipping to change at page 32, line 9 skipping to change at page 33, line 25
nacm:default-deny-write; nacm:default-deny-write;
description description
"The keystore contains a list of keys."; "The keystore contains a list of keys.";
uses keystore-grouping; uses keystore-grouping;
} }
} }
<CODE ENDS> <CODE ENDS>
4. Security Considerations 4. Support for Built-in Keys
In some implementations, a device's hardware may define some built-in
keys set during the manufacturing process, and/or the operating
system the device runs may dynamically generate some "hidden" keys
upon first boot. As an example, a built-in key may exist in
conjunction with a secure device identity certificate (e.g., an
IDevID certificate).
Built-in keys are expected to be set by a vendor-specific process.
Any ability for operators to modify the built-in keys is outside the
scope of this docuemnt.
As built-in keys are provided by the system (not configuration), they
are present in <operational>. The following example illustrates
built-in keys in <operational>.
(FIXME: add illustration with origin="system" here)
In order for the built-in keys to be referenced by configuration,
they must first be copied into <intended> as the example in
Section 3.2 illustrates for the built-in keys above. Note that this
strategy is chosen, rather then setting "require-instance false" for
the various leafrefs, as built-in keys are relatively few in number
and hence not worth relaxing the validation for.
5. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module defined in this document is designed to be accessed
via YANG based management protocols, such as NETCONF [RFC6241] and via YANG based management protocols, such as NETCONF [RFC6241] and
RESTCONF [RFC8040]. Both of these protocols have mandatory-to- RESTCONF [RFC8040]. Both of these protocols have mandatory-to-
implement secure transport layers (e.g., SSH, TLS) with mutual implement secure transport layers (e.g., SSH, TLS) with mutual
authentication. authentication.
The NETCONF access control model (NACM) [RFC8341] provides the means The NETCONF access control model (NACM) [RFC8341] provides the means
to restrict access for particular users to a pre-configured subset of to restrict access for particular users to a pre-configured subset of
all available protocol operations and content. all available protocol operations and content.
skipping to change at page 33, line 14 skipping to change at page 35, line 12
notification) to these data nodes. These are the subtrees and data notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability: nodes and their sensitivity/vulnerability:
/keystore/asymmetric-keys/asymmetric-key/private-key: This node /keystore/asymmetric-keys/asymmetric-key/private-key: This node
is additionally sensitive to read operations such that, in is additionally sensitive to read operations such that, in
normal use cases, it should never be returned to a client. The normal use cases, it should never be returned to a client. The
best reason for returning this node is to support backup/ best reason for returning this node is to support backup/
restore type workflows. For this reason, the NACM extension restore type workflows. For this reason, the NACM extension
"default-deny-all" has been set for this data node. "default-deny-all" has been set for this data node.
5. IANA Considerations 6. IANA Considerations
5.1. The IETF XML Registry 6.1. The IETF XML Registry
This document registers one URI in the "ns" subregistry of the IETF This document registers one URI in the "ns" subregistry of the IETF
XML Registry [RFC3688]. Following the format in [RFC3688], the XML Registry [RFC3688]. Following the format in [RFC3688], the
following registration is requested: following registration is requested:
URI: urn:ietf:params:xml:ns:yang:ietf-keystore URI: urn:ietf:params:xml:ns:yang:ietf-keystore
Registrant Contact: The NETCONF WG of the IETF. Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
5.2. The YANG Module Names Registry 6.2. The YANG Module Names Registry
This document registers one YANG module in the YANG Module Names This document registers one YANG module in the YANG Module Names
registry [RFC6020]. Following the format in [RFC6020], the the registry [RFC6020]. Following the format in [RFC6020], the the
following registration is requested: following registration is requested:
name: ietf-keystore name: ietf-keystore
namespace: urn:ietf:params:xml:ns:yang:ietf-keystore namespace: urn:ietf:params:xml:ns:yang:ietf-keystore
prefix: ks prefix: ks
reference: RFC XXXX reference: RFC XXXX
6. References 7. References
6.1. Normative References 7.1. Normative References
[I-D.ietf-netconf-crypto-types] [I-D.ietf-netconf-crypto-types]
Watsen, K. and H. Wang, "Common YANG Data Types for Watsen, K. and H. Wang, "Common YANG Data Types for
Cryptography", draft-ietf-netconf-crypto-types-11 (work in Cryptography", draft-ietf-netconf-crypto-types-12 (work in
progress), October 2019. progress), November 2019.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>. <https://www.rfc-editor.org/info/rfc6020>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341, Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018, DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>. <https://www.rfc-editor.org/info/rfc8341>.
6.2. Informative References 7.2. Informative References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
skipping to change at page 38, line 21 skipping to change at page 40, line 21
o Updated examples to incorporate new "key-format" identities. o Updated examples to incorporate new "key-format" identities.
o Made the two "generate-*-key" RPCs be "action" statements instead. o Made the two "generate-*-key" RPCs be "action" statements instead.
A.14. 13 to 14 A.14. 13 to 14
o Updated YANG module and examples to incorporate the new o Updated YANG module and examples to incorporate the new
iana-*-algorithm modules in the crypto-types draft.. iana-*-algorithm modules in the crypto-types draft..
A.15. 14 to 15
o Added new "Support for Built-in Trust Anchors" section.
o Added 'must' expressions asserting that the 'key-format' leaf
whenever an encrypted key is specified.
Acknowledgements Acknowledgements
The authors would like to thank for following for lively discussions The authors would like to thank for following for lively discussions
on list and in the halls (ordered by first name): Alan Luchuk, Andy on list and in the halls (ordered by first name): Alan Luchuk, Andy
Bierman, Benoit Claise, Bert Wijnen, Balazs Kovacs, David Lamparter, Bierman, Benoit Claise, Bert Wijnen, Balazs Kovacs, David Lamparter,
Eric Voit, Ladislav Lhotka, Liang Xia, Juergen Schoenwaelder, Mahesh Eric Voit, Ladislav Lhotka, Liang Xia, Juergen Schoenwaelder, Mahesh
Jethanandani, Martin Bjorklund, Mehmet Ersue, Phil Shafer, Radek Jethanandani, Martin Bjorklund, Mehmet Ersue, Phil Shafer, Radek
Krejci, Ramkumar Dhanapal, Reshad Rahman, Sean Turner, and Tom Petch. Krejci, Ramkumar Dhanapal, Reshad Rahman, Sean Turner, and Tom Petch.
Author's Address Author's Address
 End of changes. 41 change blocks. 
70 lines changed or deleted 176 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/