draft-ietf-netconf-keystore-06.txt   draft-ietf-netconf-keystore-07.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Juniper Networks Internet-Draft Juniper Networks
Intended status: Standards Track September 20, 2018 Intended status: Standards Track October 22, 2018
Expires: March 24, 2019 Expires: April 25, 2019
YANG Data Model for a Centralized Keystore Mechanism YANG Data Model for a Centralized Keystore Mechanism
draft-ietf-netconf-keystore-06 draft-ietf-netconf-keystore-07
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 "2018-09-20" --> the publication date of this draft o "2018-10-22" --> 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 March 24, 2019. This Internet-Draft will expire on April 25, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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 34 skipping to change at page 2, line 34
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
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 . . . . . . . . . . . . . . . . . . . . 3 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3
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 . . . . . . . . . . . . . . . . . . . . . . . 9 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 11
4. Security Considerations . . . . . . . . . . . . . . . . . . . 19 4. Security Considerations . . . . . . . . . . . . . . . . . . . 16
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 21 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17
5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 21 5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 17
5.2. The YANG Module Names Registry . . . . . . . . . . . . . 21 5.2. The YANG Module Names Registry . . . . . . . . . . . . . 17
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 21 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.1. Normative References . . . . . . . . . . . . . . . . . . 21 6.1. Normative References . . . . . . . . . . . . . . . . . . 17
6.2. Informative References . . . . . . . . . . . . . . . . . 22 6.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 23 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 20
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 23 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 23 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 23 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 23 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 24 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 21
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 24 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 21
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 24 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 24 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 21 skipping to change at page 4, line 21
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?
| ct:key-algorithm-ref | asymmetric-key-encryption-algorithm-ref
+--rw public-key? binary +--rw public-key? binary
+--rw private-key? union +--rw private-key? union
+---x generate-hidden-key +---x generate-hidden-key
| +---w input | +---w input
| +---w algorithm ct:key-algorithm-ref | +---w algorithm
| asymmetric-key-encryption-algorithm-ref
+---x install-hidden-key +---x install-hidden-key
| +---w input | +---w input
| +---w algorithm ct:key-algorithm-ref | +---w algorithm
| | asymmetric-key-encryption-algorithm-ref
| +---w public-key? binary | +---w public-key? binary
| +---w private-key? binary | +---w private-key? binary
+--rw certificates +--rw certificates
| +--rw certificate* [name] | +--rw certificate* [name]
| +--rw name string | +--rw name string
| +--rw cert | +--rw cert? end-entity-cert-cms
| | ct: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-end-entity-cert-with-key-grouping
+-- (local-or-keystore)
+--:(local) {local-keys-supported}?
| +-- algorithm? ct:key-algorithm-ref
| +-- public-key? binary
| +-- private-key? union
| +---x generate-hidden-key
| | +---w input
| | +---w algorithm ct:key-algorithm-ref
| +---x install-hidden-key
| +---w input
| +---w algorithm ct:key-algorithm-ref
| +---w public-key? binary
| +---w private-key? binary
+--:(keystore) {keystore-supported}?
+-- reference? ks:asymmetric-key-ref
grouping local-or-keystore-end-entity-certificate-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-keys-supported}?
| +-- algorithm? ct:key-algorithm-ref | +-- algorithm?
| | asymmetric-key-encryption-algorithm-ref
| +-- public-key? binary | +-- public-key? binary
| +-- private-key? union | +-- private-key? union
| +---x generate-hidden-key | +---x generate-hidden-key
| | +---w input | | +---w input
| | +---w algorithm ct:key-algorithm-ref | | +---w algorithm
| | asymmetric-key-encryption-algorithm-ref
| +---x install-hidden-key | +---x install-hidden-key
| | +---w input | | +---w input
| | +---w algorithm ct:key-algorithm-ref | | +---w algorithm
| | | asymmetric-key-encryption-algorithm-ref
| | +---w public-key? binary | | +---w public-key? binary
| | +---w private-key? binary | | +---w private-key? binary
| +-- cert ct: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
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- reference? +-- reference?
ks:asymmetric-key-certificate-ref ks:asymmetric-key-certificate-ref
grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore)
+--:(local) {local-keys-supported}?
| +-- algorithm?
| | asymmetric-key-encryption-algorithm-ref
| +-- public-key? binary
| +-- private-key? union
| +---x generate-hidden-key
| | +---w input
| | +---w algorithm
| | asymmetric-key-encryption-algorithm-ref
| +---x install-hidden-key
| +---w input
| +---w algorithm
| | asymmetric-key-encryption-algorithm-ref
| +---w public-key? binary
| +---w private-key? binary
+--:(keystore) {keystore-supported}?
+-- 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-keys-supported}?
| +-- algorithm? | +-- algorithm?
| | ct:key-algorithm-ref | | asymmetric-key-encryption-algorithm-ref
| +-- public-key? binary | +-- public-key? binary
| +-- private-key? union | +-- private-key? union
| +---x generate-hidden-key | +---x generate-hidden-key
| | +---w input | | +---w input
| | +---w algorithm ct:key-algorithm-ref | | +---w algorithm
| | asymmetric-key-encryption-algorithm-ref
| +---x install-hidden-key | +---x install-hidden-key
| | +---w input | | +---w input
| | +---w algorithm ct:key-algorithm-ref | | +---w algorithm
| | | asymmetric-key-encryption-algorithm-ref
| | +---w public-key? binary | | +---w public-key? binary
| | +---w private-key? binary | | +---w private-key? binary
| +-- certificates | +-- certificates
| | +-- certificate* [name] | | +-- certificate* [name]
| | +-- name? string | | +-- name? string
| | +-- cert ct: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}?
+-- reference? +-- reference?
ks:asymmetric-key-ref ks:asymmetric-key-ref
skipping to change at page 6, line 37 skipping to change at page 6, line 46
[Note: '\' line wrapping for formatting only] [Note: '\' line wrapping for formatting only]
<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:rsa1024</algorithm> <algorithm>ct:rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-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> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-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>
-->
<asymmetric-key> <asymmetric-key>
<name>tpm-protected-key</name> <name>tpm-protected-key</name>
<algorithm or:origin="or:system">ct:rsa2048</algorithm> <algorithm or:origin="or:system">ct:rsa2048</algorithm>
<private-key or:origin="or:system">permanently-hidden</private\ <private-key or:origin="or:system">permanently-hidden</private\
-key> -key>
<public-key or:origin="or:system">base64encodedvalue==</public\ <public-key or:origin="or:system">base64encodedvalue==</public\
-key> -key>
<certificates> <certificates>
<certificate or:origin="or:system"> <certificate or:origin="or:system">
<name>builtin-idevid-cert</name> <name>builtin-idevid-cert</name>
<cert>base64encodedvalue==</cert> <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> <asymmetric-key>
<name>empty-key</name> <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-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 {
skipping to change at page 8, line 24 skipping to change at page 8, line 35
"RFC VVVV: YANG Data Model for a 'Keystore' Mechanism"; "RFC VVVV: YANG Data Model for a 'Keystore' Mechanism";
} }
organization organization
"Example Corporation"; "Example Corporation";
contact contact
"Author: YANG Designer <mailto:yang.designer@example.com>"; "Author: YANG Designer <mailto:yang.designer@example.com>";
description description
"This module illustrates the grouping defined in the keystore "This module illustrates the grouping in the keystore draft called
draft called 'local-or-keystore-asymmetric-key-grouping'."; 'local-or-keystore-asymmetric-key-with-certs-grouping'.";
revision "YYYY-MM-DD" { revision "YYYY-MM-DD" {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: YANG Data Model for a 'Keystore' Mechanism"; "RFC XXXX: YANG Data Model for a 'Keystore' Mechanism";
} }
container keys { container keystore-usage {
description description
"A container of keys."; "An illustration of the various keystore groupings.";
list key {
list just-a-key {
key name; key name;
leaf name { leaf name {
type string; type string;
description description
"An arbitrary name for this key."; "An arbitrary name for this key.";
} }
uses ks:local-or-keystore-asymmetric-key-grouping; uses ks:local-or-keystore-asymmetric-key-grouping;
description description
"A key which may be configured locally or be a reference to "An asymmetric key, with no certs, that may be configured
a key in the keystore."; 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 key-with-certs {
key name;
leaf name {
type string;
description
"An arbitrary name for this key.";
}
uses ks:local-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:local-or-keystore-end-entity-cert-with-key-grouping;
description
"An end-entity certificate, and its associated private key,
that may be configured locally or be a reference to a
specific certificate (and its associated private key) in
the keystore.";
} }
} }
} }
The following example illustrates what two configured keys, one local The following example illustrates what two configured keys, one local
and the other remote, might look like. This example consistent with and the other remote, might look like. This example consistent with
other examples above (i.e., the referenced key is in an example other examples above (i.e., the referenced key is in an example
above). above).
<keys xmlns="http://example.com/ns/example-keystore-usage"> [Note: '\' line wrapping for formatting only]
<key>
<name>locally-defined key</name> <keystore-usage xmlns="http://example.com/ns/example-keystore-usage">
<!-- ks:local-or-keystore-asymmetric-key-grouping -->
<just-a-key>
<name>a locally-defined key</name>
<algorithm <algorithm
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
ct:secp521r1 ct:rsa2048
</algorithm> </algorithm>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
</key> </just-a-key>
<key>
<name>keystore-defined key</name> <just-a-key>
<name>a keystore-defined key (and its associated certs)</name>
<reference>ex-rsa-key</reference> <reference>ex-rsa-key</reference>
</key> </just-a-key>
</keys>
<!-- ks:local-or-keystore-key-and-end-entity-cert-grouping -->
<key-with-certs>
<name>a locally-defined key with certs</name>
<algorithm
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
ct:rsa2048
</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<certificates>
<certificate>
<name>a locally-defined cert</name>
<cert>base64encodedvalue==</cert>
</certificate>
</certificates>
</key-with-certs>
<key-with-certs>
<name>a keystore-defined key (and its associated certs)</name>
<reference>ex-rsa-key</reference>
</key-with-certs>
<!-- ks:local-or-keystore-end-entity-cert-with-key-grouping -->
<end-entity-cert-with-key>
<name>a locally-defined end-entity cert with key</name>
<algorithm
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
ct:rsa2048
</algorithm>
<private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert>
</end-entity-cert-with-key>
<end-entity-cert-with-key>
<name>a keystore-defined certificate (and its associated key)</n\
ame>
<reference>ex-rsa-cert</reference>
</end-entity-cert-with-key>
</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@2018-09-20.yang" <CODE BEGINS> file "ietf-keystore@2018-10-22.yang"
[Note: '\' line wrapping for formatting only]
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 10, line 31 skipping to change at page 12, line 29
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
(http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC VVVV; see This version of this YANG module is part of RFC VVVV; see
the RFC itself for full legal notices."; the RFC itself for full legal notices.";
revision "2018-09-20" { revision "2018-10-22" {
description description
"Initial version"; "Initial version";
reference reference
"RFC VVVV: "RFC VVVV:
YANG Data Model for a Centralized Keystore Mechanism"; YANG Data Model for a Centralized Keystore Mechanism";
} }
// Features // Features
feature keystore-supported { feature keystore-supported {
skipping to change at page 11, line 4 skipping to change at page 12, line 49
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-keys-supported {
description description
"The 'local-keys-supported' feature indocates that the "The 'local-keys-supported' feature indocates 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";
require-instance false;
} }
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. The require to an asymmetric key stored in the keystore.";
instance attribute is false to enable the referencing of
asymmetric keys that exist only in <operational>.";
reference reference
"RFC 8342: Network Management Datastore Architecture (NMDA)"; "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";
require-instance false;
} }
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. The require instance attribute is stored in the keystore.";
false to enable the referencing of certificates that exist
only in <operational>.";
reference reference
"RFC 8342: Network Management Datastore Architecture (NMDA)"; "RFC 8342: Network Management Datastore Architecture (NMDA)";
} }
// Groupings // Groupings
// MOVED TO CRYPTO TYPES DRAFT? - OKAY TO REMOVE HERE NOW?
//
// grouping public-key-grouping {
// description
// "A public key.";
// leaf algorithm {
// type ct:key-algorithm-ref;
// description
// "Identifies the key's algorithm. More specifically,
// this leaf specifies how the 'public-key' binary leaf
// is encoded.";
// reference
// "RFC CCCC: Common YANG Data Types for Cryptography";
// }
// leaf public-key {
// type binary;
// description
// "A binary that contains the value of the public key. The
// interpretation of the content is defined by the key
// algorithm. For example, a DSA key is an integer, an RSA
// key is represented as RSAPublicKey as defined in
// RFC 3447, and an Elliptic Curve Cryptography (ECC) key
// is represented using the 'publicKey' described in
// RFC 5915.";
// reference
// "RFC 3447: Public-Key Cryptography Standards (PKCS) #1:
// RSA Cryptography Specifications Version 2.1.
// RFC 5915: Elliptic Curve Private Key Structure.";
// }
// }
//
// grouping asymmetric-key-pair-grouping {
// description
// "A private/public key pair.";
// uses ct:public-key-grouping;
// leaf private-key {
// nacm:default-deny-all;
// type union {
// type binary;
// type enumeration {
// enum "permanently-hidden" {
// description
// "The private key is inaccessible due to being
// protected by the system (e.g., a cryptographic
// hardware module). It is not possible to
// configure a permanently hidden key, as a real
// private key value must be set. Permanently
// hidden keys cannot be archived or backed up.";
// }
// }
// }
// description
// "A binary that contains the value of the private key. The
// interpretation of the content is defined by the key
// algorithm. For example, a DSA key is an integer, an RSA
// key is represented as RSAPrivateKey as defined in
// RFC 3447, and an Elliptic Curve Cryptography (ECC) key
// is represented as ECPrivateKey as defined in RFC 5915.";
// reference
// "RFC 3447: Public-Key Cryptography Standards (PKCS) #1:
// RSA Cryptography Specifications Version 2.1.
// RFC 5915: Elliptic Curve Private Key Structure.";
// }
// action generate-hidden-key {
// description
// "Requests the device to generate a hidden key using the
// specified asymmetric key algorithm. This action is
// used to request the system the generate a key that
// is 'permanently-hidden', perhaps protected by a
// cryptographic hardware module. The resulting
// asymmetric key values are considered operational
// state and hence present only in <operational>.";
// input {
// leaf algorithm {
// type ct:key-algorithm-ref;
// mandatory true;
// description
// "The algorithm to be used when generating the
// asymmetric key.";
// reference
// "RFC CCCC: Common YANG Data Types for Cryptography";
// }
// }
// } // end generate-hidden-key
// action install-hidden-key {
// description
// "Requests the device to load the specified values into
// a hidden key. The resulting asymmetric key values are
// considered operational state and hence present only in
// <operational>.";
// input {
// leaf algorithm {
// type ct:key-algorithm-ref;
// mandatory true;
// description
// "The algorithm to be used when generating the
// asymmetric key.";
// reference
// "RFC CCCC: Common YANG Data Types for Cryptography";
// }
// leaf public-key {
// type binary;
// description
// "A binary that contains the value of the public key.
// The interpretation of the content is defined by the key
// algorithm. For example, a DSA key is an integer, an
// RSA key is represented as RSAPublicKey as defined in
// RFC 3447, and an Elliptic Curve Cryptography (ECC) key
// is represented using the 'publicKey' described in
// RFC 5915.";
// reference
// "RFC 3447: Public-Key Cryptography Standards (PKCS) #1:
// RSA Cryptography Specifications Version 2.1.
// RFC 5915: Elliptic Curve Private Key Structure.";
// }
// leaf private-key {
// type binary;
// description
// "A binary that contains the value of the private key.
// The interpretation of the content is defined by the k\
ey
// algorithm. For example, a DSA key is an integer, an RSA
// key is represented as RSAPrivateKey as defined in
// RFC 3447, and an Elliptic Curve Cryptography (ECC) key
// is represented as ECPrivateKey as defined in RFC 5915.\
";
// reference
// "RFC 3447: Public-Key Cryptography Standards (PKCS) #1:
// RSA Cryptography Specifications Version 2.1.
// RFC 5915: Elliptic Curve Private Key Structure.";
// }
// }
// } // end install-hidden-key
// }
//
// grouping trust-anchor-cert-grouping {
// description
// "A certificate, and a notification for when it might expire.";
// leaf cert {
// type ct:trust-anchor-cert-cms;
// mandatory true;
// description
// "The binary certificate data for this certificate.";
// reference
// "RFC YYYY: Common YANG Data Types for Cryptography";
// }
// }
//
// grouping end-entity-cert-grouping {
// description
// "A certificate, and a notification for when it might expire.";
// leaf cert {
// type ct:end-entity-cert-cms;
// mandatory true;
// description
// "The binary certificate data for this certificate.";
// reference
// "RFC YYYY: Common YANG Data Types for Cryptography";
// }
// notification certificate-expiration {
// description
// "A notification indicating that the configured certificate
// is either about to expire or has already expired. When to
// send notifications is an implementation specific decision,
// but it is RECOMMENDED that a notification be sent once a
// month for 3 months, then once a week for four weeks, and
// then once a day thereafter until the issue is resolved.";
// leaf expiration-date {
// type yang:date-and-time;
// //mandatory true;
// description
// "Identifies the expiration date on the certificate.";
// }
// }
// }
//
// grouping asymmetric-key-pair-with-certs-grouping {
// description
// "A private/public key pair and associated certificates.";
// uses ct:asymmetric-key-pair-grouping;
// container certificates {
// description
// "Certificates associated with this asymmetric key.
// More than one certificate supports, for instance,
// a TPM-protected asymmetric key that has both IDevID
// and LDevID certificates associated.";
// list certificate {
// must "../../algorithm
// and ../../public-key
// and ../../private-key";
// key name;
// description
// "A certificate for this asymmetric key.";
// leaf name {
// type string;
// description
// "An arbitrary name for the certificate.";
// }
// uses ct:end-entity-cert-grouping;
// } // end certifcate
// } // end certificates
// action generate-certificate-signing-request {
// description
// "Generates a certificate signing request structure for
// the associated asymmetric key using the passed subject
// and attribute values. The specified assertions need
// to be appropriate for the certificate's use. For
// example, an entity certificate for a TLS server
// SHOULD have values that enable clients to satisfy
// RFC 6125 processing.";
// input {
// leaf subject {
// type binary;
// mandatory true;
// description
// "The 'subject' field per the CertificationRequestInfo
// structure as specified by RFC 2986, Section 4.1
// encoded using the ASN.1 distinguished encoding
// rules (DER), as specified in ITU-T X.690.";
// reference
// "RFC 2986:
// PKCS #10: Certification Request Syntaxi
// Specification Version 1.7.
// ITU-T X.690:
// Information technology - ASN.1 encoding rules:
// Specification of Basic Encoding Rules (BER),
// Canonical Encoding Rules (CER) and Distinguished
// Encoding Rules (DER).";
// }
// leaf attributes {
// type binary;
// description
// "The 'attributes' field from the structure
// CertificationRequestInfo as specified by RFC 2986,
// Section 4.1 encoded using the ASN.1 distinguished
// encoding rules (DER), as specified in ITU-T X.690.";
// reference
// "RFC 2986:
// PKCS #10: Certification Request Syntax
// Specification Version 1.7.
// ITU-T X.690:
// Information technology - ASN.1 encoding rules:
// Specification of Basic Encoding Rules (BER),
// Canonical Encoding Rules (CER) and Distinguished
// Encoding Rules (DER).";
// }
// }
// output {
// leaf certificate-signing-request {
// type binary;
// mandatory true;
// description
// "A CertificationRequest structure as specified by
// RFC 2986, Section 4.2 encoded using the ASN.1
// distinguished encoding rules (DER), as specified
// in ITU-T X.690.";
// reference
// "RFC 2986:
// PKCS #10: Certification Request Syntax
// Specification Version 1.7.
// ITU-T X.690:
// Information technology - ASN.1 encoding rules:
// Specification of Basic Encoding Rules (BER),
// Canonical Encoding Rules (CER) and Distinguished
// Encoding Rules (DER).";
//
// }
// } // end output
// } // end generate-certificate-signing-request
// }
//
// MOVED TO CRYPTO TYPES DRAFT? - OKAY TO REMOVE HERE NOW?
grouping local-or-keystore-asymmetric-key-grouping { grouping local-or-keystore-asymmetric-key-grouping {
description description
"A grouping that expands to allow the key to be either stored "A grouping that expands to allow the asymmetric key to be
locally within the using data model, or be a reference to an either stored locally, within the using data model, or be
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-keys-supported";
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 reference { leaf 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 that exists in
the keystore. The intent is to reference just the
asymmetric key, not any certificates that may also
be associated with the asymmetric key.";
} }
} }
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
"A grouping that expands to allow the key to be either stored "A grouping that expands to allow an asymmetric key and its
locally within the using data model, or be a reference to an associated certificates to be either stored locally, within
asymmetric key stored in the keystore."; the using data model, or be a reference to an asymmetric key
(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-keys-supported";
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 reference { leaf 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 a value that exists 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-certificate-grouping { grouping local-or-keystore-end-entity-cert-with-key-grouping {
description description
"A grouping that expands to allow the end-entity certificate "A grouping that expands to allow an end-entity certificate
(and the 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-keys-supported";
uses ct:asymmetric-key-pair-grouping; uses ct:asymmetric-key-pair-grouping;
uses ct:end-entity-cert-grouping; uses ct:end-entity-cert-grouping;
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf reference { leaf reference {
type ks:asymmetric-key-certificate-ref; type ks:asymmetric-key-certificate-ref;
description description
"A reference to a value that exists in the keystore."; "A reference to a specific certificate, and its
associated private key, stored 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.";
} }
} }
// protocol accessible nodes // protocol accessible nodes
skipping to change at page 19, line 28 skipping to change at page 15, line 38
"A list of asymmetric keys."; "A list of asymmetric keys.";
list asymmetric-key { list asymmetric-key {
must "(algorithm and public-key and private-key) must "(algorithm and public-key and private-key)
or not (algorithm or public-key or private-key)"; or not (algorithm or public-key or private-key)";
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."; "An arbitrary name for the asymmetric key. If the name
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;
} // end asymmetric-key } // end asymmetric-key
} // end asymmetric-keys } // end asymmetric-keys
} // end keystore } // end keystore
} }
<CODE ENDS> <CODE ENDS>
skipping to change at page 21, line 9 skipping to change at page 17, line 20
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. Note that "default-deny-all" has been set for this data node. Note that
this extension is inherited from the grouping in the this extension is inherited from the grouping in the
[I-D.ietf-netconf-crypto-types] module. [I-D.ietf-netconf-crypto-types] module.
5. IANA Considerations 5. IANA Considerations
5.1. The IETF XML Registry 5.1. The IETF XML Registry
This document registers one URI in the IETF XML registry [RFC3688]. This document registers one URI in the "ns" subregistry of the IETF
Following the format in [RFC3688], the following registration is XML Registry [RFC3688]. Following the format in [RFC3688], the
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 5.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:
skipping to change at page 21, line 34 skipping to change at page 17, line 45
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., "Common YANG Data Types for Cryptography", Watsen, K., "Common YANG Data Types for Cryptography",
draft-ietf-netconf-crypto-types-00 (work in progress), draft-ietf-netconf-crypto-types-01 (work in progress),
June 2018. September 2018.
[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 24, line 28 skipping to change at page 21, line 28
o Added nacm:default-deny-all and nacm:default-deny-write o Added nacm:default-deny-all and nacm:default-deny-write
o Renamed generate-asymmetric-key to generate-hidden-key o Renamed generate-asymmetric-key to generate-hidden-key
o Added an install-hidden-key action o Added an install-hidden-key action
o Moved actions inside fo the "asymmetric-key" container o Moved actions inside fo the "asymmetric-key" container
o Moved some groupings to draft-ietf-netconf-crypto-types o Moved some groupings to draft-ietf-netconf-crypto-types
A.7. 06 to 07
o Removed a "require-instance false"
o Clarified some description statements
o Improved the keystore-usage examples
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, Mehmet Ersue, Balazs Kovacs, David Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David
Lamparter, Alan Luchuk, Ladislav Lhotka, Mahesh Jethanandani, Radek Lamparter, Alan Luchuk, Ladislav Lhotka, Mahesh Jethanandani, Radek
Krejci, Reshad Rahman, Tom Petch, Juergen Schoenwaelder, Phil Shafer, Krejci, Reshad Rahman, Tom Petch, Juergen Schoenwaelder, Phil Shafer,
Sean Turner, Eric Voit, Bert Wijnen, and Liang Xia. Sean Turner, Eric Voit, Bert Wijnen, and Liang Xia.
Author's Address Author's Address
 End of changes. 57 change blocks. 
379 lines changed or deleted 218 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/