draft-ietf-netconf-keystore-07.txt   draft-ietf-netconf-keystore-08.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Juniper Networks Internet-Draft Watsen Networks
Intended status: Standards Track October 22, 2018 Intended status: Standards Track March 9, 2019
Expires: April 25, 2019 Expires: September 10, 2019
YANG Data Model for a Centralized Keystore Mechanism YANG Data Model for a Centralized Keystore Mechanism
draft-ietf-netconf-keystore-07 draft-ietf-netconf-keystore-08
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-10-22" --> the publication date of this draft o "2019-03-09" --> 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 April 25, 2019. This Internet-Draft will expire on September 10, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 50 skipping to change at page 2, line 50
6.1. Normative References . . . . . . . . . . . . . . . . . . 17 6.1. Normative References . . . . . . . . . . . . . . . . . . 17
6.2. Informative References . . . . . . . . . . . . . . . . . 18 6.2. Informative References . . . . . . . . . . . . . . . . . 18
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 20 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 20
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 20 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 20
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 21
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 21
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 21 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 21
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 21
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 21 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 21
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 22
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?
| asymmetric-key-encryption-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 +---x generate-hidden-key
| +---w input | +---w input
| +---w algorithm | +---w algorithm asymmetric-key-algorithm-ref
| asymmetric-key-encryption-algorithm-ref
+---x install-hidden-key +---x install-hidden-key
| +---w input | +---w input
| +---w algorithm | +---w algorithm asymmetric-key-algorithm-ref
| | 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? 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-end-entity-cert-with-key-grouping grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-keys-supported}?
| +-- algorithm? | +-- local-definition
| | asymmetric-key-encryption-algorithm-ref | +-- algorithm? asymmetric-key-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 | | +---w algorithm asymmetric-key-algorithm-ref
| | asymmetric-key-encryption-algorithm-ref | +---x install-hidden-key
| +---x install-hidden-key | +---w input
| | +---w input | +---w algorithm asymmetric-key-algorithm-ref
| | +---w algorithm | +---w public-key? binary
| | | asymmetric-key-encryption-algorithm-ref | +---w private-key? binary
| | +---w public-key? binary
| | +---w private-key? binary
| +-- cert? end-entity-cert-cms
| +---n certificate-expiration
| +-- expiration-date yang:date-and-time
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- reference? +-- keystore-reference? ks:asymmetric-key-ref
ks:asymmetric-key-certificate-ref grouping local-or-keystore-asymmetric-key-with-certs-grouping
grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-keys-supported}?
| +-- algorithm? | +-- local-definition
| | asymmetric-key-encryption-algorithm-ref | +-- algorithm?
| +-- public-key? binary | | asymmetric-key-algorithm-ref
| +-- private-key? union | +-- public-key? binary
| +---x generate-hidden-key | +-- private-key? union
| | +---w input | +---x generate-hidden-key
| | +---w algorithm | | +---w input
| | asymmetric-key-encryption-algorithm-ref | | +---w algorithm asymmetric-key-algorithm-ref
| +---x install-hidden-key | +---x install-hidden-key
| +---w input | | +---w input
| +---w algorithm | | +---w algorithm asymmetric-key-algorithm-ref
| | asymmetric-key-encryption-algorithm-ref | | +---w public-key? binary
| +---w public-key? binary | | +---w private-key? binary
| +---w private-key? binary | +-- 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
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- reference? ks:asymmetric-key-ref +-- keystore-reference? ks:asymmetric-key-ref
grouping local-or-keystore-asymmetric-key-with-certs-grouping grouping local-or-keystore-end-entity-cert-with-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-keys-supported}? +--:(local) {local-keys-supported}?
| +-- algorithm? | +-- local-definition
| | asymmetric-key-encryption-algorithm-ref | +-- algorithm?
| +-- public-key? binary | | asymmetric-key-algorithm-ref
| +-- private-key? union | +-- public-key? binary
| +---x generate-hidden-key | +-- private-key? union
| | +---w input | +---x generate-hidden-key
| | +---w algorithm | | +---w input
| | asymmetric-key-encryption-algorithm-ref | | +---w algorithm asymmetric-key-algorithm-ref
| +---x install-hidden-key | +---x install-hidden-key
| | +---w input | | +---w input
| | +---w algorithm | | +---w algorithm asymmetric-key-algorithm-ref
| | | asymmetric-key-encryption-algorithm-ref | | +---w public-key? binary
| | +---w public-key? binary | | +---w private-key? binary
| | +---w private-key? binary | +-- cert? end-entity-cert-cms
| +-- certificates | +---n certificate-expiration
| | +-- certificate* [name] | +-- expiration-date yang:date-and-time
| | +-- 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
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- reference? +-- keystore-reference? ks:asymmetric-key-certificate-ref
ks:asymmetric-key-ref
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 for formatting only] ========== 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>
skipping to change at page 7, line 29 skipping to change at page 7, line 20
<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 or:origin="or:system">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>
skipping to change at page 10, line 7 skipping to change at page 9, line 46
} }
} }
} }
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).
[Note: '\' line wrapping for formatting only] ========== NOTE: '\\' line wrapping per BCP XX (RFC XXXX) ===========
<keystore-usage xmlns="http://example.com/ns/example-keystore-usage"> <keystore-usage xmlns="http://example.com/ns/example-keystore-usage">
<!-- ks:local-or-keystore-asymmetric-key-grouping --> <!-- ks:local-or-keystore-asymmetric-key-grouping -->
<just-a-key> <just-a-key>
<name>a locally-defined key</name> <name>a locally-defined key</name>
<algorithm <local-definition>
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> <algorithm
ct:rsa2048 xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
</algorithm> ct:rsa2048
<private-key>base64encodedvalue==</private-key> </algorithm>
<public-key>base64encodedvalue==</public-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key>
</local-definition>
</just-a-key> </just-a-key>
<just-a-key> <just-a-key>
<name>a keystore-defined key (and its associated certs)</name> <name>a keystore-defined key (and its associated certs)</name>
<reference>ex-rsa-key</reference> <keystore-reference>ex-rsa-key</keystore-reference>
</just-a-key> </just-a-key>
<!-- ks:local-or-keystore-key-and-end-entity-cert-grouping --> <!-- ks:local-or-keystore-key-and-end-entity-cert-grouping -->
<key-with-certs> <key-with-certs>
<name>a locally-defined key with certs</name> <name>a locally-defined key with certs</name>
<algorithm <local-definition>
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> <algorithm
ct:rsa2048 xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
</algorithm> ct:rsa2048
<private-key>base64encodedvalue==</private-key> </algorithm>
<public-key>base64encodedvalue==</public-key> <private-key>base64encodedvalue==</private-key>
<certificates> <public-key>base64encodedvalue==</public-key>
<certificate> <certificates>
<name>a locally-defined cert</name> <certificate>
<cert>base64encodedvalue==</cert> <name>a locally-defined cert</name>
</certificate> <cert>base64encodedvalue==</cert>
</certificates> </certificate>
</certificates>
</local-definition>
</key-with-certs> </key-with-certs>
<key-with-certs> <key-with-certs>
<name>a keystore-defined key (and its associated certs)</name> <name>a keystore-defined key (and its associated certs)</name>
<reference>ex-rsa-key</reference> <keystore-reference>ex-rsa-key</keystore-reference>
</key-with-certs> </key-with-certs>
<!-- ks:local-or-keystore-end-entity-cert-with-key-grouping --> <!-- ks:local-or-keystore-end-entity-cert-with-key-grouping -->
<end-entity-cert-with-key> <end-entity-cert-with-key>
<name>a locally-defined end-entity cert with key</name> <name>a locally-defined end-entity cert with key</name>
<algorithm <local-definition>
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> <algorithm
ct:rsa2048 xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
</algorithm> ct:rsa2048
<private-key>base64encodedvalue==</private-key> </algorithm>
<public-key>base64encodedvalue==</public-key> <private-key>base64encodedvalue==</private-key>
<cert>base64encodedvalue==</cert> <public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert>
</local-definition>
</end-entity-cert-with-key> </end-entity-cert-with-key>
<end-entity-cert-with-key> <end-entity-cert-with-key>
<name>a keystore-defined certificate (and its associated key)</n\ <name>a keystore-defined certificate (and its associated key)</n\
ame> \ame>
<reference>ex-rsa-cert</reference> <keystore-reference>ex-rsa-cert</keystore-reference>
</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@2018-10-22.yang" <CODE BEGINS> file "ietf-keystore@2019-03-09.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";
} }
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";
} }
organization organization
"IETF NETCONF (Network Configuration) Working Group"; "IETF NETCONF (Network Configuration) Working Group";
contact contact
"WG Web: <http://datatracker.ietf.org/wg/netconf/> "WG Web: <http://datatracker.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org> WG List: <mailto:netconf@ietf.org>
Author: Kent Watsen <mailto:kent+ietf@watsen.net>";
Author: Kent Watsen
<mailto:kwatsen@juniper.net>";
description description
"This module defines a keystore to centralize management "This module defines a keystore to centralize management
of security credentials. of security credentials.
Copyright (c) 2018 IETF Trust and the persons identified The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
as authors of the code. All rights reserved. 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 [RFC2119]
[RFC8174] when, and only when, they appear in all
capitals, as shown here.
Redistribution and use in source and binary forms, with Copyright (c) 2019 IETF Trust and the persons identified
or without modification, is permitted pursuant to, and as authors of the code. All rights reserved.
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC VVVV; see Redistribution and use in source and binary forms, with
the RFC itself for full legal notices."; or without modification, is permitted pursuant to, and
subject to the license terms contained in, the Simplified
BSD License set forth in Section 4.c of the IETF Trust's
Legal Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
revision "2018-10-22" { This version of this YANG module is part of RFC VVVV; see
the RFC itself for full legal notices.";
revision 2019-03-09 {
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 {
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 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 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";
} }
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 reference
"RFC 8342: Network Management Datastore Architecture (NMDA)"; "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-keys-supported";
uses ct:asymmetric-key-pair-grouping; container local-definition {
description
"Container to hold the local key definition.";
uses ct:asymmetric-key-pair-grouping;
}
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf 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, not any certificates that may also
be associated with the asymmetric key."; 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
skipping to change at page 14, line 23 skipping to change at page 14, line 25
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-keys-supported";
uses ct:asymmetric-key-pair-with-certs-grouping; container local-definition {
description
"Container to hold the local key definition.";
uses ct:asymmetric-key-pair-with-certs-grouping;
}
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf 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 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.";
} }
} }
skipping to change at page 14, line 49 skipping to change at page 15, line 7
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-keys-supported";
uses ct:asymmetric-key-pair-grouping; container local-definition {
uses ct:end-entity-cert-grouping; description
"Container to hold the local key definition.";
uses ct:asymmetric-key-pair-grouping;
uses ct:end-entity-cert-grouping;
}
} }
case keystore { case keystore {
if-feature "keystore-supported"; if-feature "keystore-supported";
leaf 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, 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.";
} }
skipping to change at page 15, line 22 skipping to change at page 15, line 33
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
container keystore { container keystore {
nacm:default-deny-write; nacm:default-deny-write;
description description
"The keystore contains a list of keys."; "The keystore contains a list of keys.";
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) 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. If the name "An arbitrary name for the asymmetric key. If the name
matches the name of a key that exists independently in matches the name of a key that exists independently in
<operational> (i.e., a 'permanently-hidden' key), then <operational> (i.e., a 'permanently-hidden' key), then
the 'algorithm', 'public-key', and 'private-key' nodes the 'algorithm', 'public-key', and 'private-key' nodes
MUST NOT be configured."; MUST NOT be configured.";
skipping to change at page 15, line 43 skipping to change at page 16, line 4
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. If the name
matches the name of a key that exists independently in matches the name of a key that exists independently in
<operational> (i.e., a 'permanently-hidden' key), then <operational> (i.e., a 'permanently-hidden' key), then
the 'algorithm', 'public-key', and 'private-key' nodes the 'algorithm', 'public-key', and 'private-key' nodes
MUST NOT be configured."; 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-keys }
} // end keystore
} }
<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 17, line 44 skipping to change at page 17, line 48
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 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. and H. Wang, "Common YANG Data Types for
draft-ietf-netconf-crypto-types-01 (work in progress), Cryptography", draft-ietf-netconf-crypto-types-02 (work in
September 2018. progress), October 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 19, line 6 skipping to change at page 19, line 6
[RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
<https://www.rfc-editor.org/info/rfc8340>. <https://www.rfc-editor.org/info/rfc8340>.
[RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture and R. Wilton, "Network Management Datastore Architecture
(NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
<https://www.rfc-editor.org/info/rfc8342>. <https://www.rfc-editor.org/info/rfc8342>.
[Std-802.1AR-2009] [Std-802.1AR-2009]
IEEE SA-Standards Board, "IEEE Standard for Local and Group, W. -. H. L. L. P. W., "IEEE Standard for Local and
metropolitan area networks - Secure Device Identity", metropolitan area networks - Secure Device Identity",
December 2009, <http://standards.ieee.org/findstds/ December 2009, <http://standards.ieee.org/findstds/
standard/802.1AR-2009.html>. standard/802.1AR-2009.html>.
Appendix A. Change Log Appendix A. Change Log
A.1. 00 to 01 A.1. 00 to 01
o Replaced the 'certificate-chain' structures with PKCS#7 o Replaced the 'certificate-chain' structures with PKCS#7
structures. (Issue #1) structures. (Issue #1)
skipping to change at page 21, line 36 skipping to change at page 21, line 36
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 A.7. 06 to 07
o Removed a "require-instance false" o Removed a "require-instance false"
o Clarified some description statements o Clarified some description statements
o Improved the keystore-usage examples o Improved the keystore-usage examples
A.8. 07 to 08
o Added "local-definition" containers to avoid posibility of the
action/notification statements being under a "case" statement.
o Updated copyright date, boilerplate template, affiliation, folding
algorithm, and reformatted the YANG module.
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, Ramkumar Dhanapal, Mehmet Ersue, Balazs
Lamparter, Alan Luchuk, Ladislav Lhotka, Mahesh Jethanandani, Radek Kovacs, David Lamparter, Alan Luchuk, Ladislav Lhotka, Mahesh
Krejci, Reshad Rahman, Tom Petch, Juergen Schoenwaelder, Phil Shafer, Jethanandani, Radek Krejci, Reshad Rahman, Tom Petch, Juergen
Sean Turner, Eric Voit, Bert Wijnen, and Liang Xia. Schoenwaelder, Phil Shafer, Sean Turner, Eric Voit, Bert Wijnen, and
Liang Xia.
Author's Address Author's Address
Kent Watsen Kent Watsen
Juniper Networks Watsen Networks
EMail: kwatsen@juniper.net EMail: kent+ietf@watsen.net
 End of changes. 63 change blocks. 
169 lines changed or deleted 189 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/