draft-ietf-netconf-keystore-09.txt   draft-ietf-netconf-keystore-10.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Watsen Networks Internet-Draft Watsen Networks
Intended status: Standards Track April 29, 2019 Intended status: Standards Track June 7, 2019
Expires: October 31, 2019 Expires: December 9, 2019
YANG Data Model for a Centralized Keystore Mechanism A YANG Data Model for a Keystore
draft-ietf-netconf-keystore-09 draft-ietf-netconf-keystore-10
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 asymmetric keys and their enables centralized configuration of asymmetric keys and their
associated certificates, and notification for when configured associated certificates, and notification for when configured
certificates are about to expire. 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 33 skipping to change at page 1, line 33
Editor instructions are specified elsewhere in this document. Editor instructions are specified elsewhere in this document.
Artwork in this document contains shorthand references to drafts in Artwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements: progress. Please apply the following replacements:
o "VVVV" --> the assigned RFC value for this draft o "VVVV" --> 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-04-29" --> the publication date of this draft o "2019-06-07" --> 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 October 31, 2019. This Internet-Draft will expire on December 9, 2019.
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 35 skipping to change at page 2, line 35
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
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 . . . . . . . . . . . . . . . . . . . . . . 6 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 6
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 11 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 11
4. Security Considerations . . . . . . . . . . . . . . . . . . . 17 4. Security Considerations . . . . . . . . . . . . . . . . . . . 16
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 18 5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 17
5.2. The YANG Module Names Registry . . . . . . . . . . . . . 18 5.2. The YANG Module Names Registry . . . . . . . . . . . . . 17
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.1. Normative References . . . . . . . . . . . . . . . . . . 18 6.1. Normative References . . . . . . . . . . . . . . . . . . 17
6.2. Informative References . . . . . . . . . . . . . . . . . 19 6.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 20 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 19
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 19
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 19
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 19
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 19
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 20
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 22 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 22
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21
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 asymmetric keys keystore" that enables centralized configuration of asymmetric keys
and their associated certificates, and notification for when and their associated certificates, and notification for when
configured certificates are about to expire. configured certificates are about to expire.
This module also defines Six groupings designed for maximum reuse. This module also defines Six groupings designed for maximum reuse.
These groupings include one for the public half of an asymmetric key, These groupings include one for the public half of an asymmetric key,
skipping to change at page 4, line 26 skipping to change at page 4, line 26
This section provides a tree diagrams [RFC8340] for the "ietf- This section provides a tree diagrams [RFC8340] for the "ietf-
keystore" module that presents both the protocol-accessible keystore" module that presents both the protocol-accessible
"keystore" as well the all the groupings intended for external usage. "keystore" as well the all the groupings intended for external usage.
module: ietf-keystore module: ietf-keystore
+--rw keystore +--rw keystore
+--rw asymmetric-keys +--rw asymmetric-keys
+--rw asymmetric-key* [name] +--rw asymmetric-key* [name]
+--rw name string +--rw name string
+--rw algorithm? +--rw algorithm
| asymmetric-key-algorithm-ref | asymmetric-key-algorithm-ref
+--rw public-key? binary +--rw public-key binary
+--rw private-key? union +--rw private-key union
+---x generate-hidden-key
| +---w input
| +---w algorithm asymmetric-key-algorithm-ref
+---x install-hidden-key
| +---w input
| +---w algorithm asymmetric-key-algorithm-ref
| +---w public-key? binary
| +---w private-key? binary
+--rw certificates +--rw certificates
| +--rw certificate* [name] | +--rw certificate* [name]
| +--rw name string | +--rw name string
| +--rw cert? end-entity-cert-cms | +--rw cert? end-entity-cert-cms
| +---n certificate-expiration | +---n certificate-expiration
| +-- 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 local-or-keystore-asymmetric-key-grouping grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm? asymmetric-key-algorithm-ref | +-- algorithm asymmetric-key-algorithm-ref
| +-- public-key? binary | +-- public-key binary
| +-- private-key? union | +-- private-key union
| +---x generate-hidden-key
| | +---w input
| | +---w algorithm asymmetric-key-algorithm-ref
| +---x install-hidden-key
| +---w input
| +---w algorithm asymmetric-key-algorithm-ref
| +---w public-key? binary
| +---w private-key? binary
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- keystore-reference? ks:asymmetric-key-ref +-- keystore-reference? ks:asymmetric-key-ref
grouping local-or-keystore-asymmetric-key-with-certs-grouping grouping local-or-keystore-asymmetric-key-with-certs-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm? | +-- algorithm
| | asymmetric-key-algorithm-ref | | asymmetric-key-algorithm-ref
| +-- public-key? binary | +-- public-key binary
| +-- private-key? union | +-- private-key union
| +---x generate-hidden-key
| | +---w input
| | +---w algorithm asymmetric-key-algorithm-ref
| +---x install-hidden-key
| | +---w input
| | +---w algorithm asymmetric-key-algorithm-ref
| | +---w public-key? binary
| | +---w private-key? binary
| +-- certificates | +-- certificates
| | +-- certificate* [name] | | +-- certificate* [name]
| | +-- name? string | | +-- name? string
| | +-- cert? end-entity-cert-cms | | +-- cert? end-entity-cert-cms
| | +---n certificate-expiration | | +---n certificate-expiration
| | +-- 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
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- keystore-reference? ks:asymmetric-key-ref +-- keystore-reference? ks:asymmetric-key-ref
grouping local-or-keystore-end-entity-cert-with-key-grouping grouping local-or-keystore-end-entity-cert-with-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm? | +-- algorithm
| | asymmetric-key-algorithm-ref | | asymmetric-key-algorithm-ref
| +-- public-key? binary | +-- public-key binary
| +-- private-key? union | +-- private-key union
| +---x generate-hidden-key | +-- cert?
| | +---w input | | end-entity-cert-cms
| | +---w algorithm asymmetric-key-algorithm-ref
| +---x install-hidden-key
| | +---w input
| | +---w algorithm asymmetric-key-algorithm-ref
| | +---w public-key? binary
| | +---w private-key? binary
| +-- cert? end-entity-cert-cms
| +---n certificate-expiration | +---n certificate-expiration
| +-- expiration-date yang:date-and-time | | +-- expiration-date yang:date-and-time
| +---x generate-certificate-signing-request
| +---w input
| | +---w subject binary
| | +---w attributes? binary
| +--ro output
| +--ro certificate-signing-request binary
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- keystore-reference? ks:asymmetric-key-certificate-ref +-- keystore-reference? ks:asymmetric-key-certificate-ref
grouping keystore-grouping
+-- asymmetric-keys
+-- asymmetric-key* [name]
+-- name? string
+-- algorithm
| asymmetric-key-algorithm-ref
+-- public-key binary
+-- private-key union
+-- certificates
| +-- certificate* [name]
| +-- name? string
| +-- cert? end-entity-cert-cms
| +---n certificate-expiration
| +-- expiration-date yang:date-and-time
+---x generate-certificate-signing-request
+---w input
| +---w subject binary
| +---w attributes? binary
+--ro output
+--ro certificate-signing-request binary
3.2. Example Usage 3.2. Example Usage
The following example illustrates what a fully configured keystore The following example illustrates what a fully configured keystore
might look like in <operational>, as described by Section 5.3 in might look like in <operational>, as described by Section 5.3 in
[RFC8342]. This datastore view illustrates data set by the [RFC8342]. This datastore view illustrates data set by the
manufacturing process alongside conventional configuration. This manufacturing process alongside conventional configuration. This
keystore instance has four keys, two having one associated keystore instance has four keys, two having one associated
certificate, one having two associated certificates, and one empty certificate, one having two associated certificates, and one empty
key. key.
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore" <keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin" xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types" xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"
or:origin="or:intended"> or:origin="or:intended">
<asymmetric-keys> <asymmetric-keys>
<asymmetric-key> <asymmetric-key>
<name>ex-rsa-key</name> <name>ex-rsa-key</name>
<algorithm>ct:rsa2048</algorithm> <algorithm>ct:rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
<name>ex-rsa-cert</name> <name>ex-rsa-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
<!-- waiting for Haiguang fix...
<asymmetric-key> <asymmetric-key>
<name>tls-ec-key</name> <name>tls-ec-key</name>
<algorithm>ct:secp256r1</algorithm> <algorithm>ct:secp256r1</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
<name>tls-ec-cert</name> <name>tls-ec-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
-->
<!-- all except 'my-ldevid-cert' copied from <operational> -->
<asymmetric-key> <asymmetric-key>
<name>tpm-protected-key</name> <name>tpm-protected-key</name>
<algorithm or:origin="or:system">ct:rsa2048</algorithm> <algorithm>ct:rsa2048</algorithm>
<private-key or:origin="or:system">permanently-hidden</private\ <public-key>base64encodedvalue==</public-key>
-key> <private-key>permanently-hidden</private-key>
<public-key or:origin="or:system">base64encodedvalue==</public\
-key>
<certificates> <certificates>
<certificate or:origin="or:system"> <certificate>
<name>builtin-idevid-cert</name> <name>builtin-idevid-cert</name>
<cert or:origin="or:system">base64encodedvalue==</cert>
</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>
<name>tpm-protected-key2</name>
<certificates>
<certificate>
<name>builtin-idevid-cert2</name>
</certificate>
<certificate>
<name>my-ldevid-cert2</name>
<cert>base64encodedvalue==</cert>
</certificate>
</certificates>
</asymmetric-key>
</asymmetric-keys> </asymmetric-keys>
</keystore> </keystore>
The following example module has been constructed to illustrate the The following example module has been constructed to illustrate the
"local-or-keystore-asymmetric-key-grouping" grouping defined in the "local-or-keystore-asymmetric-key-grouping" grouping defined in the
"ietf-keystore" module. "ietf-keystore" module.
module ex-keystore-usage { module ex-keystore-usage {
yang-version 1.1; yang-version 1.1;
skipping to change at page 11, line 31 skipping to change at page 11, line 11
</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-04-29.yang" <CODE BEGINS> file "ietf-keystore@2019-06-07.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-crypto-types { import ietf-crypto-types {
prefix ct; prefix ct;
reference reference
"RFC CCCC: Common YANG Data Types for Cryptography"; "RFC CCCC: Common YANG Data Types for Cryptography";
} }
skipping to change at page 12, line 35 skipping to change at page 12, line 13
(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-04-29 { revision 2019-06-07 {
description description
"Initial version"; "Initial version";
reference reference
"RFC VVVV: "RFC VVVV: A YANG Data Model for a Keystore";
YANG Data Model for a Centralized Keystore Mechanism";
} }
/****************/ /****************/
/* Features */ /* Features */
/****************/ /****************/
feature keystore-supported { feature keystore-supported {
description description
"The 'keystore-supported' feature indicates that the server "The 'keystore-supported' feature indicates that the server
supports the keystore."; supports the keystore.";
} }
feature local-keys-supported {
feature local-definitions-supported {
description description
"The 'local-keys-supported' feature indicates that the "The 'local-definitions-supported' feature indicates that the
server supports locally-defined keys."; server supports locally-defined keys.";
} }
/****************/ /****************/
/* Typedefs */ /* Typedefs */
/****************/ /****************/
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.";
reference
"RFC 8342: Network Management Datastore Architecture (NMDA)";
} }
typedef asymmetric-key-certificate-ref { typedef asymmetric-key-certificate-ref {
type leafref { type leafref {
path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key" path "/ks:keystore/ks:asymmetric-keys/ks:asymmetric-key"
+ "/ks:certificates/ks:certificate/ks:name"; + "/ks:certificates/ks:certificate/ks:name";
} }
description description
"This typedef enables modules to easily define a reference "This typedef enables modules to easily define a reference
to a specific certificate associated with an asymmetric key to a specific certificate associated with an asymmetric key
stored in the keystore."; stored in the keystore.";
reference
"RFC 8342: Network Management Datastore Architecture (NMDA)";
} }
/*****************/ /*****************/
/* Groupings */ /* Groupings */
/*****************/ /*****************/
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-keys-supported"; if-feature "local-definitions-supported";
container local-definition { container local-definition {
must '(algorithm and public-key and private-key)
or not (algorithm or public-key or private-key)' {
description
"These descendent nodes are not mandatory because they
MAY be defined in <operational>. Implementations MUST
assert that these values are either configured or that
they exist in <operational>.";
}
description description
"Container to hold the local key definition."; "Container to hold the local key definition.";
uses ct:asymmetric-key-pair-grouping; uses ct: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
skipping to change at page 14, line 44 skipping to change at page 14, line 10
grouping local-or-keystore-asymmetric-key-with-certs-grouping { grouping local-or-keystore-asymmetric-key-with-certs-grouping {
description description
"A grouping that expands to allow an asymmetric key and its "A grouping that expands to allow an asymmetric key and its
associated certificates to be either stored locally, within associated certificates to be either stored locally, within
the using data model, or be a reference to an asymmetric key the using data model, or be a reference to an asymmetric key
(and its associated certificates) stored in the keystore."; (and its associated certificates) stored in the keystore.";
choice local-or-keystore { choice local-or-keystore {
mandatory true; mandatory true;
case local { case local {
if-feature "local-keys-supported"; if-feature "local-definitions-supported";
container local-definition { container local-definition {
must '(algorithm and public-key and private-key)
or not (algorithm or public-key or private-key)' {
description
"These descendent nodes are not mandatory because they
MAY be defined in <operational>. Implementations MUST
assert that these values are either configured or that
they exist in <operational>.";
}
description description
"Container to hold the local key definition."; "Container to hold the local key definition.";
uses ct:asymmetric-key-pair-with-certs-grouping; uses ct:asymmetric-key-pair-with-certs-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 a value that exists in the keystore."; "A reference to an asymmetric-key (and all of its
associated certificates) in the keystore.";
} }
} }
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-end-entity-cert-with-key-grouping { grouping local-or-keystore-end-entity-cert-with-key-grouping {
description description
"A grouping that expands to allow an end-entity certificate "A grouping that expands to allow an end-entity certificate
(and its associated private key) to be either stored locally, (and its associated private key) to be either stored locally,
within the using data model, or be a reference to a specific within the using data model, or be a reference to a specific
certificate in the keystore."; certificate in the keystore.";
choice local-or-keystore { choice local-or-keystore {
mandatory true; mandatory true;
case local { case local {
if-feature "local-keys-supported"; if-feature "local-definitions-supported";
container local-definition { container local-definition {
must '(algorithm and public-key and private-key)
or not (algorithm or public-key or private-key)' {
description
"These descendent nodes are not mandatory because they
MAY be defined in <operational>. Implementations MUST
assert that these values are either configured or that
they exist in <operational>.";
}
description description
"Container to hold the local key definition."; "Container to hold the local key definition.";
uses ct:asymmetric-key-pair-grouping; uses ct:asymmetric-key-pair-with-cert-grouping;
uses ct:end-entity-cert-grouping;
} }
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf keystore-reference { leaf keystore-reference {
type ks:asymmetric-key-certificate-ref; type ks:asymmetric-key-certificate-ref;
description description
"A reference to a specific certificate, and its "A reference to a specific certificate (and its
associated private key, stored in the keystore."; associated private key) in the keystore.";
} }
} }
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 keystore-grouping {
/* Protocol accessible nodes */
/*********************************/
container keystore {
nacm:default-deny-write;
description description
"The keystore contains a list of keys."; "Grouping definition enables use in other contexts. If ever
done, implementations SHOULD augment new 'case' statements
into local-or-keystore 'choice' statements to supply leafrefs
to the new location.";
container asymmetric-keys { container asymmetric-keys {
description description
"A list of asymmetric keys."; "A list of asymmetric keys.";
list asymmetric-key { list asymmetric-key {
must '(algorithm and public-key and private-key)
or not (algorithm or public-key or private-key)' {
description
"These descendent nodes are not mandatory because they
MAY be defined in <operational>. Implementations MUST
assert that these values are either configured or that
they exist in <operational>.";
}
key "name"; key "name";
description description
"An asymmetric key."; "An asymmetric key.";
leaf name { leaf name {
type string; type string;
description description
"An arbitrary name for the asymmetric key. If the name "An arbitrary name for the asymmetric key.";
matches the name of a key that exists independently in
<operational> (i.e., a 'permanently-hidden' key), then
the 'algorithm', 'public-key', and 'private-key' nodes
MUST NOT be configured.";
} }
uses ct:asymmetric-key-pair-with-certs-grouping; uses ct:asymmetric-key-pair-with-certs-grouping;
} }
} }
} }
/*********************************/
/* Protocol accessible nodes */
/*********************************/
container keystore {
nacm:default-deny-write;
description
"The keystore contains a list of keys.";
uses keystore-grouping;
}
} }
<CODE ENDS> <CODE ENDS>
4. Security Considerations 4. 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.
skipping to change at page 18, line 44 skipping to change at page 17, line 41
namespace: urn:ietf:params:xml:ns:yang:ietf-keystore namespace: urn:ietf:params:xml:ns:yang:ietf-keystore
prefix: ks prefix: ks
reference: RFC VVVV reference: RFC VVVV
6. References 6. References
6.1. Normative References 6.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-05 (work in Cryptography", draft-ietf-netconf-crypto-types-06 (work in
progress), March 2019. progress), April 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>.
skipping to change at page 22, line 10 skipping to change at page 21, line 10
asymmetric-key node explaining that the descendent values may asymmetric-key node explaining that the descendent values may
exist in <operational> only, and that implementation MUST assert exist in <operational> only, and that implementation MUST assert
that the values are either configured or that they exist in that the values are either configured or that they exist in
<operational>. <operational>.
o Copied above 'must' statement (and description) into the local-or- o Copied above 'must' statement (and description) into the local-or-
keystore-asymmetric-key-grouping, local-or-keystore-asymmetric- keystore-asymmetric-key-grouping, local-or-keystore-asymmetric-
key-with-certs-grouping, and local-or-keystore-end-entity-cert- key-with-certs-grouping, and local-or-keystore-end-entity-cert-
with-key-grouping statements. with-key-grouping statements.
A.10. 09 to 10
o Updated draft title to match new truststore draft title
o Moved everything under a top-level 'grouping' to enable use in
other contexts.
o Renamed feature from 'local-keys-supported' to 'local-definitions-
supported' (same name used in truststore)
o Removed the either-all-or-none 'must' expressions for the key's
3-tuple values (since the values are now 'mandatory true' in
crypto-types)
o Example updated to reflect 'mandatory true' change in crypto-types
draft
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 last name): Andy Bierman, Martin on list and in the halls (ordered by last name): Andy Bierman, Martin
Bjorklund, Benoit Claise, Ramkumar Dhanapal, Mehmet Ersue, Balazs Bjorklund, Benoit Claise, Ramkumar Dhanapal, Mehmet Ersue, Balazs
Kovacs, David Lamparter, Ladislav Lhotka, Alan Luchuk, Mahesh Kovacs, David Lamparter, Ladislav Lhotka, Alan Luchuk, Mahesh
Jethanandani, Radek Krejci, Reshad Rahman, Tom Petch, Juergen Jethanandani, Radek Krejci, Reshad Rahman, Tom Petch, Juergen
Schoenwaelder, Phil Shafer, Sean Turner, Eric Voit, Bert Wijnen, and Schoenwaelder, Phil Shafer, Sean Turner, Eric Voit, Bert Wijnen, and
Liang Xia. Liang Xia.
 End of changes. 54 change blocks. 
166 lines changed or deleted 129 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/