draft-ietf-netconf-keystore-15.txt   draft-ietf-netconf-keystore-16.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Watsen Networks Internet-Draft Watsen Networks
Intended status: Standards Track November 20, 2019 Intended status: Standards Track March 8, 2020
Expires: May 23, 2020 Expires: September 9, 2020
A YANG Data Model for a Keystore A YANG Data Model for a Keystore
draft-ietf-netconf-keystore-15 draft-ietf-netconf-keystore-16
Abstract Abstract
This document defines a YANG 1.1 module called "ietf-keystore" that This document defines a YANG 1.1 module called "ietf-keystore" that
enables centralized configuration of both symmetric and asymmetric enables centralized configuration of both symmetric and asymmetric
keys. The secret value for both key types may be encrypted. keys. The secret value for both key types may be encrypted.
Asymmetric keys may be associated with certificates. Notifications Asymmetric keys may be associated with certificates. Notifications
are sent when certificates are about to expire. are sent when certificates are about to expire.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 1, line 37 skipping to change at page 1, line 37
progress. Please apply the following replacements: progress. Please apply the following replacements:
o "AAAA" --> the assigned RFC value for o "AAAA" --> the assigned RFC value for
[I-D.ietf-netconf-crypto-types]. [I-D.ietf-netconf-crypto-types].
o "XXXX" --> the assigned RFC value for this draft o "XXXX" --> the assigned RFC value for this draft
Artwork in this document contains placeholder values for the date of Artwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: publication of this draft. Please apply the following replacement:
o "2019-11-20" --> the publication date of this draft o "2020-03-08" --> the publication date of this draft
The following Appendix section is to be removed prior to publication: The following Appendix section is to be removed prior to publication:
o Appendix A. Change Log o Appendix A. Change Log
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 23, 2020. This Internet-Draft will expire on September 9, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2020 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
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 . . . . . . . . . . . . . . . . . . . . . . 14 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 14 3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 13
3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 16 3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 16
3.2.3. The "generate-asymmetric-key" RPC . . . . . . . . . . 17 3.2.3. The "generate-asymmetric-key" RPC . . . . . . . . . . 17
3.2.4. Notable Keystore Groupings . . . . . . . . . . . . . 18 3.2.4. Notable Keystore Groupings . . . . . . . . . . . . . 18
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 22 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 21
4. Support for Built-in Keys . . . . . . . . . . . . . . . . . . 33 4. Support for Built-in Keys . . . . . . . . . . . . . . . . . . 32
5. Security Considerations . . . . . . . . . . . . . . . . . . . 34 5. Support for RMAs . . . . . . . . . . . . . . . . . . . . . . 32
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 6. Security Considerations . . . . . . . . . . . . . . . . . . . 32
6.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 35 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34
6.2. The YANG Module Names Registry . . . . . . . . . . . . . 35 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 34
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 34
7.1. Normative References . . . . . . . . . . . . . . . . . . 35 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2. Informative References . . . . . . . . . . . . . . . . . 36 8.1. Normative References . . . . . . . . . . . . . . . . . . 34
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 37 8.2. Informative References . . . . . . . . . . . . . . . . . 35
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 37 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 36
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 37 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 38 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 39 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 39 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 39 A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 40 A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 38
A.14. 13 to 14 . . . . . . . . . . . . . . . . . . . . . . . . 40 A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.15. 14 to 15 . . . . . . . . . . . . . . . . . . . . . . . . 40 A.14. 13 to 14 . . . . . . . . . . . . . . . . . . . . . . . . 39
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 40 A.15. 14 to 15 . . . . . . . . . . . . . . . . . . . . . . . . 39
A.16. 15 to 16 . . . . . . . . . . . . . . . . . . . . . . . . 39
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 39
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 40 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 40
1. Introduction 1. Introduction
This document defines a YANG 1.1 [RFC7950] module called "ietf- This document defines a YANG 1.1 [RFC7950] module called "ietf-
keystore" that enables centralized configuration of both symmetric keystore" that enables centralized configuration of both symmetric
and asymmetric keys. The secret value for both key types may be and asymmetric keys. The secret value for both key types may be
encrypted. Asymmetric keys may be associated with certificates. encrypted. Asymmetric keys may be associated with certificates.
Notifications are sent when certificates are about to expire. Notifications are sent when certificates are about to expire.
skipping to change at page 4, line 25 skipping to change at page 4, line 28
3.1. Tree Diagram 3.1. Tree Diagram
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
| | | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| | +--rw public-key-format? identityref | +--rw public-key-format identityref
| | +--rw public-key binary | +--rw public-key binary
| | +--rw private-key-format? identityref | +--rw private-key-format? identityref
| | +--rw (private-key-type) | +--rw (private-key-type)
| | | +--:(private-key) | | +--:(private-key)
| | | | +--rw private-key? binary | | | +--rw private-key? binary
| | | +--:(hidden-private-key) | | +--:(hidden-private-key)
| | | | +--rw hidden-private-key? empty | | | +--rw hidden-private-key? empty
| | | +--:(encrypted-private-key) | | +--:(encrypted-private-key)
| | | +--rw encrypted-private-key | | +--rw encrypted-private-key
| | | +--rw (key-type) | | +--rw (key-type)
| | | | +--:(symmetric-key-ref) | | | +--:(symmetric-key-ref)
| | | | | +--rw symmetric-key-ref? leafref | | | | +--rw symmetric-key-ref? leafref
| | | | | {keystore-supported}? | | | | {keystore-supported}?
| | | | +--:(asymmetric-key-ref) | | | +--:(asymmetric-key-ref)
| | | | +--rw asymmetric-key-ref? leafref | | | +--rw asymmetric-key-ref? leafref
| | | | {keystore-supported}? | | | {keystore-supported}?
| | | +--rw value? binary | | +--rw value? 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
| +---x generate-asymmetric-key
| +---w input
| | +---w algorithm iasa:asymmetric-algorithm-type
| | +---w encrypt-with!
| | +---w (key-type)
| | +--:(symmetric-key-ref)
| | | +---w symmetric-key-ref? leafref
| | | {keystore-supported}?
| | +--:(asymmetric-key-ref)
| | +---w asymmetric-key-ref? leafref
| | {keystore-supported}?
| +--ro output
| +--ro algorithm
| | iasa:asymmetric-algorithm-type
| +--ro public-key-format? identityref
| +--ro public-key binary
| +--ro private-key-format? identityref
| +--ro (private-key-type)
| +--:(private-key)
| | +--ro private-key? binary
| +--:(hidden-private-key)
| | +--ro hidden-private-key? empty
| +--:(encrypted-private-key)
| +--ro encrypted-private-key
| +--ro (key-type)
| | +--:(symmetric-key-ref)
| | | +--ro symmetric-key-ref? leafref
| | | {keystore-supported}?
| | +--:(asymmetric-key-ref)
| | +--ro asymmetric-key-ref? leafref
| | {keystore-supported}?
| +--ro value? binary
+--rw symmetric-keys +--rw symmetric-keys
+--rw symmetric-key* [name] +--rw symmetric-key* [name]
| +--rw name string +--rw name string
| +--rw algorithm isa:symmetric-algorithm-type +--rw algorithm isa:symmetric-algorithm-type
| +--rw key-format? identityref +--rw key-format? identityref
| +--rw (key-type) +--rw (key-type)
| +--:(key) +--:(key)
| | +--rw key? binary | +--rw key? binary
| +--:(hidden-key) +--:(hidden-key)
| | +--rw hidden-key? empty | +--rw hidden-key? empty
| +--:(encrypted-key) +--:(encrypted-key)
| +--rw encrypted-key +--rw encrypted-key
| +--rw (key-type) +--rw (key-type)
| | +--:(symmetric-key-ref) | +--:(symmetric-key-ref)
| | | +--rw symmetric-key-ref? leafref | | +--rw symmetric-key-ref? leafref
| | | {keystore-supported}? | | {keystore-supported}?
| | +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| | +--rw asymmetric-key-ref? leafref | +--rw asymmetric-key-ref? leafref
| | {keystore-supported}? | {keystore-supported}?
| +--rw value? binary +--rw value? binary
+---x generate-symmetric-key
+---w input augment /ct:generate-symmetric-key/ct:input:
| +---w algorithm isa:symmetric-algorithm-type +---w encrypt-with!
| +---w encrypt-with! +---w (key-type)
| +---w (key-type) +--:(symmetric-key-ref)
| +--:(symmetric-key-ref) | +---w symmetric-key-ref?
| | +---w symmetric-key-ref? leafref | -> /keystore/symmetric-keys/symmetric-key/name
| | {keystore-supported}? | {keystore-supported}?
| +--:(asymmetric-key-ref) +--:(asymmetric-key-ref)
| +---w asymmetric-key-ref? leafref +---w asymmetric-key-ref?
| {keystore-supported}? -> /keystore/asymmetric-keys/asymmetric-key/name
+--ro output {keystore-supported}?
+--ro algorithm augment /ct:generate-symmetric-key/ct:output/ct:key-type:
| isa:symmetric-algorithm-type +-- encrypted-key
+--ro key-format? identityref +-- (key-type)
+--ro (key-type) | +--:(symmetric-key-ref)
+--:(key) | | +-- symmetric-key-ref?
| +--ro key? binary | | -> /keystore/symmetric-keys/symmetric-key/name
+--:(hidden-key) | | {keystore-supported}?
| +--ro hidden-key? empty | +--:(asymmetric-key-ref)
+--:(encrypted-key) | +-- asymmetric-key-ref?
+--ro encrypted-key | -> /keystore/asymmetric-keys/asymmetric-key/name
+--ro (key-type) | {keystore-supported}?
| +--:(symmetric-key-ref) +-- value? binary
| | +--ro symmetric-key-ref? leafref augment /ct:generate-asymmetric-key/ct:input:
| | {keystore-supported}? +---w encrypt-with!
| +--:(asymmetric-key-ref) +---w (key-type)
| +--ro asymmetric-key-ref? leafref +--:(symmetric-key-ref)
| {keystore-supported}? | +---w symmetric-key-ref?
+--ro value? binary | -> /keystore/symmetric-keys/symmetric-key/name
| {keystore-supported}?
+--:(asymmetric-key-ref)
+---w asymmetric-key-ref?
-> /keystore/asymmetric-keys/asymmetric-key/name
{keystore-supported}?
augment /ct:generate-asymmetric-key/ct:output/ct:private-key-type:
+-- encrypted-private-key
+-- (key-type)
| +--:(symmetric-key-ref)
| | +-- symmetric-key-ref?
| | -> /keystore/symmetric-keys/symmetric-key/name
| | {keystore-supported}?
| +--:(asymmetric-key-ref)
| +-- asymmetric-key-ref?
| -> /keystore/asymmetric-keys/asymmetric-key/name
| {keystore-supported}?
+-- value? binary
grouping key-reference-type-grouping grouping key-reference-type-grouping
+-- (key-type) +-- (key-type)
+--:(symmetric-key-ref) +--:(symmetric-key-ref)
| +-- symmetric-key-ref? | +-- symmetric-key-ref?
| -> /keystore/symmetric-keys/symmetric-key/name | -> /keystore/symmetric-keys/symmetric-key/name
| {keystore-supported}? | {keystore-supported}?
+--:(asymmetric-key-ref) +--:(asymmetric-key-ref)
+-- asymmetric-key-ref? +-- asymmetric-key-ref?
-> /keystore/asymmetric-keys/asymmetric-key/name -> /keystore/asymmetric-keys/asymmetric-key/name
skipping to change at page 7, line 37 skipping to change at page 7, line 25
+-- (key-type) +-- (key-type)
| +--:(symmetric-key-ref) | +--:(symmetric-key-ref)
| | +-- symmetric-key-ref? leafref | | +-- symmetric-key-ref? leafref
| | {keystore-supported}? | | {keystore-supported}?
| +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| +-- asymmetric-key-ref? leafref | +-- asymmetric-key-ref? leafref
| {keystore-supported}? | {keystore-supported}?
+-- value? binary +-- value? binary
grouping asymmetric-key-pair-grouping grouping asymmetric-key-pair-grouping
+-- algorithm iasa:asymmetric-algorithm-type +-- algorithm iasa:asymmetric-algorithm-type
+-- public-key-format? identityref +-- public-key-format identityref
+-- public-key binary +-- public-key binary
+-- private-key-format? identityref +-- private-key-format? identityref
+-- (private-key-type) +-- (private-key-type)
+--:(private-key) +--:(private-key)
| +-- private-key? binary | +-- private-key? binary
+--:(hidden-private-key) +--:(hidden-private-key)
| +-- hidden-private-key? empty | +-- hidden-private-key? empty
+--:(encrypted-private-key) +--:(encrypted-private-key)
+-- encrypted-private-key +-- encrypted-private-key
+-- (key-type) +-- (key-type)
| +--:(symmetric-key-ref) | +--:(symmetric-key-ref)
| | +-- symmetric-key-ref? leafref | | +-- symmetric-key-ref? leafref
| | {keystore-supported}? | | {keystore-supported}?
| +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| +-- asymmetric-key-ref? leafref | +-- asymmetric-key-ref? leafref
| {keystore-supported}? | {keystore-supported}?
+-- value? binary +-- value? binary
grouping asymmetric-key-pair-with-cert-grouping grouping asymmetric-key-pair-with-cert-grouping
+-- algorithm +-- algorithm
| iasa:asymmetric-algorithm-type | iasa:asymmetric-algorithm-type
+-- public-key-format? identityref +-- public-key-format identityref
+-- public-key binary +-- public-key binary
+-- private-key-format? identityref +-- private-key-format? identityref
+-- (private-key-type) +-- (private-key-type)
| +--:(private-key) | +--:(private-key)
| | +-- private-key? binary | | +-- private-key? binary
| +--:(hidden-private-key) | +--:(hidden-private-key)
| | +-- hidden-private-key? empty | | +-- hidden-private-key? empty
| +--:(encrypted-private-key) | +--:(encrypted-private-key)
| +-- encrypted-private-key | +-- encrypted-private-key
| +-- (key-type) | +-- (key-type)
skipping to change at page 8, line 40 skipping to change at page 8, line 28
| +-- expiration-date yang:date-and-time | +-- expiration-date yang:date-and-time
+---x generate-certificate-signing-request +---x generate-certificate-signing-request
+---w input +---w input
| +---w subject binary | +---w subject binary
| +---w attributes? binary | +---w attributes? binary
+--ro output +--ro output
+--ro certificate-signing-request binary +--ro certificate-signing-request binary
grouping asymmetric-key-pair-with-certs-grouping grouping asymmetric-key-pair-with-certs-grouping
+-- algorithm +-- algorithm
| iasa:asymmetric-algorithm-type | iasa:asymmetric-algorithm-type
+-- public-key-format? identityref +-- public-key-format identityref
+-- public-key binary +-- public-key binary
+-- private-key-format? identityref +-- private-key-format? identityref
+-- (private-key-type) +-- (private-key-type)
| +--:(private-key) | +--:(private-key)
| | +-- private-key? binary | | +-- private-key? binary
| +--:(hidden-private-key) | +--:(hidden-private-key)
| | +-- hidden-private-key? empty | | +-- hidden-private-key? empty
| +--:(encrypted-private-key) | +--:(encrypted-private-key)
| +-- encrypted-private-key | +-- encrypted-private-key
| +-- (key-type) | +-- (key-type)
skipping to change at page 10, line 6 skipping to change at page 9, line 42
| | {keystore-supported}? | | {keystore-supported}?
| +-- value? binary | +-- value? binary
+--:(keystore) {keystore-supported}? +--:(keystore) {keystore-supported}?
+-- keystore-reference? ks:symmetric-key-ref +-- keystore-reference? ks:symmetric-key-ref
grouping local-or-keystore-asymmetric-key-grouping grouping local-or-keystore-asymmetric-key-grouping
+-- (local-or-keystore) +-- (local-or-keystore)
+--:(local) {local-definitions-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm | +-- algorithm
| | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| +-- public-key-format? identityref | +-- public-key-format identityref
| +-- public-key binary | +-- public-key binary
| +-- private-key-format? identityref | +-- private-key-format? identityref
| +-- (private-key-type) | +-- (private-key-type)
| +--:(private-key) | +--:(private-key)
| | +-- private-key? binary | | +-- private-key? binary
| +--:(hidden-private-key) | +--:(hidden-private-key)
| | +-- hidden-private-key? empty | | +-- hidden-private-key? empty
| +--:(encrypted-private-key) | +--:(encrypted-private-key)
| +-- encrypted-private-key | +-- encrypted-private-key
| +-- (key-type) | +-- (key-type)
skipping to change at page 10, line 32 skipping to change at page 10, line 20
| | {keystore-supported}? | | {keystore-supported}?
| +-- value? binary | +-- value? 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-definitions-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm | +-- algorithm
| | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| +-- public-key-format? identityref | +-- public-key-format identityref
| +-- public-key binary | +-- public-key binary
| +-- private-key-format? identityref | +-- private-key-format? identityref
| +-- (private-key-type) | +-- (private-key-type)
| | +--:(private-key) | | +--:(private-key)
| | | +-- private-key? binary | | | +-- private-key? binary
| | +--:(hidden-private-key) | | +--:(hidden-private-key)
| | | +-- hidden-private-key? empty | | | +-- hidden-private-key? empty
| | +--:(encrypted-private-key) | | +--:(encrypted-private-key)
| | +-- encrypted-private-key | | +-- encrypted-private-key
| | +-- (key-type) | | +-- (key-type)
skipping to change at page 11, line 16 skipping to change at page 11, line 4
| | +---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-definitions-supported}? +--:(local) {local-definitions-supported}?
| +-- local-definition | +-- local-definition
| +-- algorithm | +-- algorithm
| | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| +-- public-key-format? identityref | +-- public-key-format identityref
| +-- public-key binary | +-- public-key binary
| +-- private-key-format? identityref | +-- private-key-format? identityref
| +-- (private-key-type) | +-- (private-key-type)
| | +--:(private-key) | | +--:(private-key)
| | | +-- private-key? binary | | | +-- private-key? binary
| | +--:(hidden-private-key) | | +--:(hidden-private-key)
| | | +-- hidden-private-key? empty | | | +-- hidden-private-key? empty
| | +--:(encrypted-private-key) | | +--:(encrypted-private-key)
| | +-- encrypted-private-key | | +-- encrypted-private-key
| | +-- (key-type) | | +-- (key-type)
skipping to change at page 12, line 9 skipping to change at page 11, line 46
| | +---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 +-- keystore-reference
+-- asymmetric-key? ks:asymmetric-key-ref +-- asymmetric-key? ks:asymmetric-key-ref
+-- certificate? leafref +-- certificate? leafref
grouping keystore-grouping grouping keystore-grouping
+-- asymmetric-keys +-- asymmetric-keys
| +-- asymmetric-key* [name] | +-- asymmetric-key* [name]
| | +-- name? string | +-- name? string
| | +-- algorithm | +-- algorithm
| | | iasa:asymmetric-algorithm-type | | iasa:asymmetric-algorithm-type
| | +-- public-key-format? identityref | +-- public-key-format identityref
| | +-- public-key binary | +-- public-key binary
| | +-- private-key-format? identityref | +-- private-key-format? identityref
| | +-- (private-key-type) | +-- (private-key-type)
| | | +--:(private-key) | | +--:(private-key)
| | | | +-- private-key? binary | | | +-- private-key? binary
| | | +--:(hidden-private-key) | | +--:(hidden-private-key)
| | | | +-- hidden-private-key? empty | | | +-- hidden-private-key? empty
| | | +--:(encrypted-private-key) | | +--:(encrypted-private-key)
| | | +-- encrypted-private-key | | +-- encrypted-private-key
| | | +-- (key-type) | | +-- (key-type)
| | | | +--:(symmetric-key-ref) | | | +--:(symmetric-key-ref)
| | | | | +-- symmetric-key-ref? leafref | | | | +-- symmetric-key-ref? leafref
| | | | | {keystore-supported}? | | | | {keystore-supported}?
| | | | +--:(asymmetric-key-ref) | | | +--:(asymmetric-key-ref)
| | | | +-- asymmetric-key-ref? leafref | | | +-- asymmetric-key-ref? leafref
| | | | {keystore-supported}? | | | {keystore-supported}?
| | | +-- value? binary | | +-- value? 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
| +---x generate-asymmetric-key
| +---w input
| | +---w algorithm iasa:asymmetric-algorithm-type
| | +---w encrypt-with!
| | +---w (key-type)
| | +--:(symmetric-key-ref)
| | | +---w symmetric-key-ref? leafref
| | | {keystore-supported}?
| | +--:(asymmetric-key-ref)
| | +---w asymmetric-key-ref? leafref
| | {keystore-supported}?
| +--ro output
| +--ro algorithm
| | iasa:asymmetric-algorithm-type
| +--ro public-key-format? identityref
| +--ro public-key binary
| +--ro private-key-format? identityref
| +--ro (private-key-type)
| +--:(private-key)
| | +--ro private-key? binary
| +--:(hidden-private-key)
| | +--ro hidden-private-key? empty
| +--:(encrypted-private-key)
| +--ro encrypted-private-key
| +--ro (key-type)
| | +--:(symmetric-key-ref)
| | | +--ro symmetric-key-ref? leafref
| | | {keystore-supported}?
| | +--:(asymmetric-key-ref)
| | +--ro asymmetric-key-ref? leafref
| | {keystore-supported}?
| +--ro value? binary
+-- symmetric-keys +-- symmetric-keys
+-- symmetric-key* [name] +-- symmetric-key* [name]
| +-- name? string +-- name? string
| +-- algorithm isa:symmetric-algorithm-type +-- algorithm isa:symmetric-algorithm-type
| +-- key-format? identityref +-- key-format? identityref
| +-- (key-type) +-- (key-type)
| +--:(key) +--:(key)
| | +-- key? binary | +-- key? binary
| +--:(hidden-key) +--:(hidden-key)
| | +-- hidden-key? empty | +-- hidden-key? empty
| +--:(encrypted-key) +--:(encrypted-key)
| +-- encrypted-key +-- encrypted-key
| +-- (key-type) +-- (key-type)
| | +--:(symmetric-key-ref) | +--:(symmetric-key-ref)
| | | +-- symmetric-key-ref? leafref | | +-- symmetric-key-ref? leafref
| | | {keystore-supported}? | | {keystore-supported}?
| | +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| | +-- asymmetric-key-ref? leafref | +-- asymmetric-key-ref? leafref
| | {keystore-supported}? | {keystore-supported}?
| +-- value? binary +-- value? binary
+---x generate-symmetric-key
+---w input
| +---w algorithm isa:symmetric-algorithm-type
| +---w encrypt-with!
| +---w (key-type)
| +--:(symmetric-key-ref)
| | +---w symmetric-key-ref? leafref
| | {keystore-supported}?
| +--:(asymmetric-key-ref)
| +---w asymmetric-key-ref? leafref
| {keystore-supported}?
+--ro output
+--ro algorithm
| isa:symmetric-algorithm-type
+--ro key-format? identityref
+--ro (key-type)
+--:(key)
| +--ro key? binary
+--:(hidden-key)
| +--ro hidden-key? empty
+--:(encrypted-key)
+--ro encrypted-key
+--ro (key-type)
| +--:(symmetric-key-ref)
| | +--ro symmetric-key-ref? leafref
| | {keystore-supported}?
| +--:(asymmetric-key-ref)
| +--ro asymmetric-key-ref? leafref
| {keystore-supported}?
+--ro value? binary
3.2. Example Usage 3.2. Example Usage
3.2.1. A Keystore Instance 3.2.1. A Keystore Instance
The following example illustrates keys in <intended>. Please see The following example illustrates keys in <intended>. Please see
Section 4 for an example illustrating built-in values in Section 4 for an example illustrating built-in values in
<operational>. <operational>.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
skipping to change at page 15, line 23 skipping to change at page 13, line 47
<asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-re\ <asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-re\
f> f>
<value>base64encodedvalue==</value> <value>base64encodedvalue==</value>
</encrypted-key> </encrypted-key>
</symmetric-key> </symmetric-key>
</symmetric-keys> </symmetric-keys>
<asymmetric-keys> <asymmetric-keys>
<asymmetric-key> <asymmetric-key>
<name>ssh-rsa-key</name>
<algorithm>rsa2048</algorithm>
<public-key-format>ct:ssh-public-key-format</public-key-format>
<public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
</asymmetric-key>
<asymmetric-key>
<name>ssh-rsa-key-with-cert</name>
<algorithm>rsa2048</algorithm>
<public-key-format>ct:ssh-public-key-format</public-key-format>
<public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
<certificates>
<certificate>
<name>ex-rsa-cert2</name>
<cert>base64encodedvalue==</cert>
</certificate>
</certificates>
</asymmetric-key>
<asymmetric-key>
<name>raw-private-key</name>
<algorithm>rsa2048</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
</asymmetric-key>
<asymmetric-key>
<name>rsa-asymmetric-key</name> <name>rsa-asymmetric-key</name>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\ <public-key-format>ct:subject-public-key-info-format</public-k\
ey-format> ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\ <private-key-format>ct:rsa-private-key-format</private-key-for\
mat> mat>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
skipping to change at page 16, line 47 skipping to change at page 16, line 10
f> f>
<value>base64encodedvalue==</value> <value>base64encodedvalue==</value>
</encrypted-private-key> </encrypted-private-key>
</asymmetric-key> </asymmetric-key>
</asymmetric-keys> </asymmetric-keys>
</keystore> </keystore>
3.2.2. The "generate-symmetric-key" RPC 3.2.2. The "generate-symmetric-key" RPC
The following example illustrates the "generate-symmetric-key" RPC. The following example illustrates how the "generate-symmetric-key"
The key being referenced is defined in the keystore example above. RPC defined in "ietf-crypto-types" module
[I-D.ietf-netconf-crypto-types] has been augmented to encrypt the
generated symmetric key.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== This example references the key defined in the keystore example in
Section 3.2.1.
<rpc message-id="101" <rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<action xmlns="urn:ietf:params:xml:ns:yang:1"> <generate-symmetric-key
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"> xmlns="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<symmetric-keys> <algorithm>aes-256-cbc</algorithm>
<generate-symmetric-key> <encrypt-with
<algorithm>aes-256-cbc</algorithm> xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore">
<encrypt-with> <asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-ref>
<asymmetric-key-ref>hidden-asymmetric-key</asymmetric-ke\ </encrypt-with>
y-ref> </generate-symmetric-key>
</encrypt-with>
</generate-symmetric-key>
</symmetric-keys>
</keystore>
</action>
</rpc> </rpc>
Following is the complimentary RPC-reply. Following is the RPC-reply.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc-reply message-id="101" <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore" xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<!--<data> yanglint validation fails --> <!--<data> yanglint validation fails -->
<ks:algorithm>aes-256-cbc</ks:algorithm> <ct:algorithm>aes-256-cbc</ct:algorithm>
<ks:key-format>ct:encrypted-one-symmetric-key-format</ks:key-for\ <ct:key-format>ct:encrypted-one-symmetric-key-format</ct:key-for\
mat> mat>
<ks:encrypted-key> <ks:encrypted-key>
<ks:asymmetric-key-ref>hidden-asymmetric-key</ks:asymmetric-ke\ <ks:asymmetric-key-ref>hidden-asymmetric-key</ks:asymmetric-ke\
y-ref> y-ref>
<ks:value>base64encodedvalue==</ks:value> <ks:value>base64encodedvalue==</ks:value>
</ks:encrypted-key> </ks:encrypted-key>
<!--</data> yanglint validation fails --> <!--</data> yanglint validation fails -->
</rpc-reply> </rpc-reply>
3.2.3. The "generate-asymmetric-key" RPC 3.2.3. The "generate-asymmetric-key" RPC
The following example illustrates the "generate-asymmetric-key" RPC. The following example illustrates how the "generate-asymmetric-key"
The key being referenced is defined in the keystore example above. RPC defined in "ietf-crypto-types" module
[I-D.ietf-netconf-crypto-types] has been augmented to encrypt the
generated asymmetric key.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== This example references the key defined in the keystore example in
Section 3.2.1.
<rpc message-id="101" <rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<action xmlns="urn:ietf:params:xml:ns:yang:1"> <generate-asymmetric-key
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"> xmlns="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<asymmetric-keys> <algorithm>secp256r1</algorithm>
<generate-asymmetric-key> <encrypt-with
<algorithm>secp256r1</algorithm> xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore">
<encrypt-with> <symmetric-key-ref>encrypted-symmetric-key</symmetric-key-ref>
<symmetric-key-ref>encrypted-symmetric-key</symmetric-ke\ </encrypt-with>
y-ref> </generate-asymmetric-key>
</encrypt-with>
</generate-asymmetric-key>
</asymmetric-keys>
</keystore>
</action>
</rpc> </rpc>
Following is the complimentary RPC-reply. Following is the RPC-reply.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc-reply message-id="101" <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore" xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"> xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<!--<data> yanglint validation fails --> <!--<data> yanglint validation fails -->
<ks:algorithm>secp256r1</ks:algorithm> <ct:algorithm>secp256r1</ct:algorithm>
<ks:public-key-format>ct:subject-public-key-info-format</ks:publ\ <ct:public-key-format>ct:subject-public-key-info-format</ct:publ\
ic-key-format> ic-key-format>
<ks:public-key>base64encodedvalue==</ks:public-key> <ct:public-key>base64encodedvalue==</ct:public-key>
<ks:private-key-format>ct:encrypted-one-asymmetric-key-format</k\ <ct:private-key-format>ct:encrypted-one-asymmetric-key-format</c\
s:private-key-format> t:private-key-format>
<ks:encrypted-private-key> <ks:encrypted-private-key>
<ks:symmetric-key-ref>encrypted-symmetric-key</ks:symmetric-ke\ <ks:symmetric-key-ref>encrypted-symmetric-key</ks:symmetric-ke\
y-ref> y-ref>
<ks:value>base64encodedvalue==</ks:value> <ks:value>base64encodedvalue==</ks:value>
</ks:encrypted-private-key> </ks:encrypted-private-key>
<!--</data> yanglint validation fails --> <!--</data> yanglint validation fails -->
</rpc-reply> </rpc-reply>
3.2.4. Notable Keystore Groupings 3.2.4. Notable Keystore Groupings
skipping to change at page 22, line 29 skipping to change at page 21, line 35
</end-entity-cert-with-key> </end-entity-cert-with-key>
</keystore-usage> </keystore-usage>
3.3. YANG Module 3.3. YANG Module
This YANG module has normative references to [RFC8341] and This YANG module has normative references to [RFC8341] and
[I-D.ietf-netconf-crypto-types], and an informative reference to [I-D.ietf-netconf-crypto-types], and an informative reference to
[RFC8342]. [RFC8342].
<CODE BEGINS> file "ietf-keystore@2019-11-20.yang" <CODE BEGINS> file "ietf-keystore@2020-03-08.yang"
module ietf-keystore { module ietf-keystore {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-keystore"; namespace "urn:ietf:params:xml:ns:yang:ietf-keystore";
prefix ks; prefix ks;
import ietf-netconf-acm { import ietf-netconf-acm {
prefix nacm; prefix nacm;
reference reference
"RFC 8341: Network Configuration Access Control Model"; "RFC 8341: Network Configuration Access Control Model";
} }
import ietf-crypto-types { import ietf-crypto-types {
prefix ct; prefix ct;
reference reference
"RFC AAAA: Common YANG Data Types for Cryptography"; "RFC AAAA: Common YANG Data Types for Cryptography";
}
//import iana-hash-algs {
// prefix iha;
// reference
// "RFC AAAA: Common YANG Data Types for Cryptography";
//}
import iana-symmetric-algs {
prefix isa;
reference
"RFC AAAA: Common YANG Data Types for Cryptography";
}
import iana-asymmetric-algs {
prefix iasa;
reference
"RFC AAAA: Common YANG Data Types for Cryptography";
} }
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:kent+ietf@watsen.net>";
skipping to change at page 23, line 51 skipping to change at page 22, line 40
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices. itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision 2019-11-20 { revision 2020-03-08 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: A YANG Data Model for a Keystore"; "RFC XXXX: A YANG Data Model for a Keystore";
} }
/****************/ /****************/
/* Features */ /* Features */
/****************/ /****************/
skipping to change at page 24, line 26 skipping to change at page 23, line 14
"The 'keystore-supported' feature indicates that the server "The 'keystore-supported' feature indicates that the server
supports the keystore."; supports the keystore.";
} }
feature local-definitions-supported { feature local-definitions-supported {
description description
"The 'local-definitions-supported' feature indicates that the "The 'local-definitions-supported' feature indicates that the
server supports locally-defined keys."; server supports locally-defined keys.";
} }
feature key-generation {
description
"Indicates that the server supports the actions related to
the life cycling keys in <operational>. To be used by
configuration, keys in <operational> must be copied to
<running>.";
}
/****************/ /****************/
/* Typedefs */ /* Typedefs */
/****************/ /****************/
typedef symmetric-key-ref { typedef symmetric-key-ref {
type leafref { type leafref {
path "/ks:keystore/ks:symmetric-keys/ks:symmetric-key" path "/ks:keystore/ks:symmetric-keys/ks:symmetric-key"
+ "/ks:name"; + "/ks:name";
} }
description description
skipping to change at page 31, line 27 skipping to change at page 30, line 6
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.";
} }
uses ks:asymmetric-key-pair-with-certs-grouping; uses ks:asymmetric-key-pair-with-certs-grouping;
} }
action generate-asymmetric-key {
//nacm:default-deny-all;
description
"Requests the device to generate an asymmetric key using
the specified key algorithm, optionally encrypted using
a key in the keystore. The output is this RPC can be
used as input to a subsequent configuration request.";
input {
leaf algorithm {
type iasa:asymmetric-algorithm-type;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC AAAA: Common YANG Data Types for Cryptography";
}
container encrypt-with {
presence
"Indicates that the key should be encrypted using
the specified symmetric or asymmetric key. If not
specified, then the private key is not encrypted
when returned.";
description
"A container for the 'key-type' choice.";
uses key-reference-type-grouping;
}
}
output {
uses ks:asymmetric-key-pair-grouping;
}
} // end generate-asymmetric-key
} }
container symmetric-keys { container symmetric-keys {
description description
"A list of symmetric keys."; "A list of symmetric keys.";
list symmetric-key { list symmetric-key {
key "name"; key "name";
description description
"A symmetric key."; "A symmetric key.";
leaf name { leaf name {
type string; type string;
description description
"An arbitrary name for the symmetric key."; "An arbitrary name for the symmetric key.";
} }
uses ks:symmetric-key-grouping; uses ks:symmetric-key-grouping;
} }
action generate-symmetric-key {
//nacm:default-deny-all;
description
"Requests the device to generate an symmetric key using
the specified key algorithm, optionally encrypted using
a key in the keystore. The output is this RPC can be
used as input to a subsequent configuration request.";
input {
leaf algorithm {
type isa:symmetric-algorithm-type;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC AAAA: Common YANG Data Types for Cryptography";
}
container encrypt-with {
presence
"Indicates that the key should be encrypted using
the specified symmetric or asymmetric key. If not
specified, then the private key is not encrypted
when returned.";
description
"A container for the 'key-type' choice.";
uses key-reference-type-grouping;
}
}
output {
uses ks:symmetric-key-grouping;
}
} // end generate-symmetric-key
} }
} // grouping keystore-grouping } // grouping keystore-grouping
/****************/
/* Augments */
/****************/
augment "/ct:generate-symmetric-key/ct:input" {
description
"This augmentation adds an input parameter to the
'generate-symmetric-key' RPC to specify another key
that is to be used to encypt the generated key
before it is returned in the RPC-reply.";
container encrypt-with {
presence
"Indicates that the key should be encrypted using
the specified symmetric or asymmetric key. If not
specified, then the private key is not encrypted
when returned.";
description
"A container for the 'key-type' choice.";
uses key-reference-type-grouping;
}
}
augment "/ct:generate-symmetric-key/ct:output/ct:key-type" {
description
"This augmentation extends the 'generate-symmetric-key'
RPC-reply to encode an encrypted key.";
container encrypted-key {
must "../ct:key-format";
description
"A container for the encrypted symmetric key value.";
uses encrypted-value-grouping;
}
}
augment "/ct:generate-asymmetric-key/ct:input" {
description
"This augmentation adds an input parameter to the
'generate-asymmetric-key' RPC to specify another key
that is to be used to encypt the generated key
before it is returned in the RPC-reply.";
container encrypt-with {
presence
"Indicates that the key should be encrypted using
the specified symmetric or asymmetric key. If not
specified, then the private key is not encrypted
when returned.";
description
"A container for the 'key-type' choice.";
uses key-reference-type-grouping;
}
}
augment
"/ct:generate-asymmetric-key/ct:output/ct:private-key-type" {
description
"This augmentation extends the 'generate-asymmetric-key'
RPC-reply to encode an encrypted key.";
container encrypted-private-key {
must "../ct:private-key-format";
description
"A container for the encrypted asymmetric private
key value.";
uses encrypted-value-grouping;
}
}
/*********************************/ /*********************************/
/* 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.";
uses keystore-grouping; uses keystore-grouping;
} }
} }
<CODE ENDS> <CODE ENDS>
4. Support for Built-in Keys 4. Support for Built-in Keys
In some implementations, a device's hardware may define some built-in In some implementations, a device's hardware may define some built-in
skipping to change at page 34, line 5 skipping to change at page 32, line 38
(FIXME: add illustration with origin="system" here) (FIXME: add illustration with origin="system" here)
In order for the built-in keys to be referenced by configuration, In order for the built-in keys to be referenced by configuration,
they must first be copied into <intended> as the example in they must first be copied into <intended> as the example in
Section 3.2 illustrates for the built-in keys above. Note that this Section 3.2 illustrates for the built-in keys above. Note that this
strategy is chosen, rather then setting "require-instance false" for strategy is chosen, rather then setting "require-instance false" for
the various leafrefs, as built-in keys are relatively few in number the various leafrefs, as built-in keys are relatively few in number
and hence not worth relaxing the validation for. and hence not worth relaxing the validation for.
5. Security Considerations 5. Support for RMAs
FIXME: https://mailarchive.ietf.org/arch/msg/netconf/
pn0LucnWx3Xz0rfBRqB31BVg-Bk
6. Security Considerations
The YANG module defined in this document is designed to be accessed The YANG module defined in this document is designed to be accessed
via YANG based management protocols, such as NETCONF [RFC6241] and via YANG based management protocols, such as NETCONF [RFC6241] and
RESTCONF [RFC8040]. Both of these protocols have mandatory-to- RESTCONF [RFC8040]. Both of these protocols have mandatory-to-
implement secure transport layers (e.g., SSH, TLS) with mutual implement secure transport layers (e.g., SSH, TLS) with mutual
authentication. authentication.
The NETCONF access control model (NACM) [RFC8341] provides the means The NETCONF access control model (NACM) [RFC8341] provides the means
to restrict access for particular users to a pre-configured subset of to restrict access for particular users to a pre-configured subset of
all available protocol operations and content. all available protocol operations and content.
skipping to change at page 35, line 12 skipping to change at page 34, line 5
notification) to these data nodes. These are the subtrees and data notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability: nodes and their sensitivity/vulnerability:
/keystore/asymmetric-keys/asymmetric-key/private-key: This node /keystore/asymmetric-keys/asymmetric-key/private-key: This node
is additionally sensitive to read operations such that, in is additionally sensitive to read operations such that, in
normal use cases, it should never be returned to a client. The normal use cases, it should never be returned to a client. The
best reason for returning this node is to support backup/ best reason for returning this node is to support backup/
restore type workflows. For this reason, the NACM extension restore type workflows. For this reason, the NACM extension
"default-deny-all" has been set for this data node. "default-deny-all" has been set for this data node.
6. IANA Considerations 7. IANA Considerations
6.1. The IETF XML Registry 7.1. The IETF XML Registry
This document registers one URI in the "ns" subregistry of the IETF This document registers one URI in the "ns" subregistry of the IETF
XML Registry [RFC3688]. Following the format in [RFC3688], the XML Registry [RFC3688]. Following the format in [RFC3688], the
following registration is requested: following registration is requested:
URI: urn:ietf:params:xml:ns:yang:ietf-keystore URI: urn:ietf:params:xml:ns:yang:ietf-keystore
Registrant Contact: The NETCONF WG of the IETF. Registrant Contact: The NETCONF WG of the IETF.
XML: N/A, the requested URI is an XML namespace. XML: N/A, the requested URI is an XML namespace.
6.2. The YANG Module Names Registry 7.2. The YANG Module Names Registry
This document registers one YANG module in the YANG Module Names This document registers one YANG module in the YANG Module Names
registry [RFC6020]. Following the format in [RFC6020], the the registry [RFC6020]. Following the format in [RFC6020], the the
following registration is requested: following registration is requested:
name: ietf-keystore name: ietf-keystore
namespace: urn:ietf:params:xml:ns:yang:ietf-keystore namespace: urn:ietf:params:xml:ns:yang:ietf-keystore
prefix: ks prefix: ks
reference: RFC XXXX reference: RFC XXXX
7. References 8. References
7.1. Normative References 8.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-12 (work in Cryptography", draft-ietf-netconf-crypto-types-13 (work in
progress), November 2019. progress), November 2019.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010,
skipping to change at page 36, line 19 skipping to change at page 35, line 10
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<https://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, RFC 8341, Access Control Model", STD 91, RFC 8341,
DOI 10.17487/RFC8341, March 2018, DOI 10.17487/RFC8341, March 2018,
<https://www.rfc-editor.org/info/rfc8341>. <https://www.rfc-editor.org/info/rfc8341>.
7.2. Informative References 8.2. Informative References
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004,
<https://www.rfc-editor.org/info/rfc3688>. <https://www.rfc-editor.org/info/rfc3688>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<https://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
skipping to change at page 40, line 28 skipping to change at page 39, line 28
o Updated YANG module and examples to incorporate the new o Updated YANG module and examples to incorporate the new
iana-*-algorithm modules in the crypto-types draft.. iana-*-algorithm modules in the crypto-types draft..
A.15. 14 to 15 A.15. 14 to 15
o Added new "Support for Built-in Trust Anchors" section. o Added new "Support for Built-in Trust Anchors" section.
o Added 'must' expressions asserting that the 'key-format' leaf o Added 'must' expressions asserting that the 'key-format' leaf
whenever an encrypted key is specified. whenever an encrypted key is specified.
o Added local-or-keystore-symmetric-key-grouping for PSK support.
A.16. 15 to 16
o Moved the generate key actions to ietf-crypt-types as RPCs, which
are augmented by ietf-keystore to support encrypted keys.
Examples updated accordingly.
o Added a SSH certificate-based key (RFC 6187) and a raw private key
to the example instance document (partly so they could be
referenced by examples in the SSH and TLS client/server drafts.
Acknowledgements Acknowledgements
The authors would like to thank for following for lively discussions The authors would like to thank for following for lively discussions
on list and in the halls (ordered by first name): Alan Luchuk, Andy on list and in the halls (ordered by first name): Alan Luchuk, Andy
Bierman, Benoit Claise, Bert Wijnen, Balazs Kovacs, David Lamparter, Bierman, Benoit Claise, Bert Wijnen, Balazs Kovacs, David Lamparter,
Eric Voit, Ladislav Lhotka, Liang Xia, Juergen Schoenwaelder, Mahesh Eric Voit, Ladislav Lhotka, Liang Xia, Juergen Schoenwaelder, Mahesh
Jethanandani, Martin Bjorklund, Mehmet Ersue, Phil Shafer, Radek Jethanandani, Martin Bjorklund, Mehmet Ersue, Phil Shafer, Radek
Krejci, Ramkumar Dhanapal, Reshad Rahman, Sean Turner, and Tom Petch. Krejci, Ramkumar Dhanapal, Reshad Rahman, Sean Turner, and Tom Petch.
Author's Address Author's Address
 End of changes. 48 change blocks. 
405 lines changed or deleted 360 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/