draft-ietf-netconf-keystore-12.txt   draft-ietf-netconf-keystore-13.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Watsen Networks Internet-Draft Watsen Networks
Intended status: Standards Track July 2, 2019 Intended status: Standards Track October 18, 2019
Expires: January 3, 2020 Expires: April 20, 2020
A YANG Data Model for a Keystore A YANG Data Model for a Keystore
draft-ietf-netconf-keystore-12 draft-ietf-netconf-keystore-13
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 34 skipping to change at page 1, line 34
Editor instructions are specified elsewhere in this document. Editor instructions are specified elsewhere in this document.
Artwork in this document contains shorthand references to drafts in Artwork in this document contains shorthand references to drafts in
progress. Please apply the following replacements: progress. Please apply the following replacements:
o "VVVV" --> the assigned RFC value for this draft o "VVVV" --> the assigned RFC value for this draft
Artwork in this document contains placeholder values for the date of Artwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: publication of this draft. Please apply the following replacement:
o "2019-07-02" --> the publication date of this draft o "2019-10-18" --> 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 January 3, 2020. This Internet-Draft will expire on April 20, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 33 skipping to change at page 2, line 33
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 . . . . . . . . . . . . . . . . . . . . 3 2. Requirements Language . . . . . . . . . . . . . . . . . . . . 3
3. The Keystore Model . . . . . . . . . . . . . . . . . . . . . 4 3. The Keystore Model . . . . . . . . . . . . . . . . . . . . . 4
3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 12 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 13
3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 12 3.2.1. A Keystore Instance . . . . . . . . . . . . . . . . . 14
3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 14 3.2.2. The "generate-symmetric-key" RPC . . . . . . . . . . 16
3.2.3. Notable Keystore Groupings . . . . . . . . . . . . . 14 3.2.3. The "generate-asymmetric-key" RPC . . . . . . . . . . 17
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.4. Notable Keystore Groupings . . . . . . . . . . . . . 18
4. Security Considerations . . . . . . . . . . . . . . . . . . . 27 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 22
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 4. Security Considerations . . . . . . . . . . . . . . . . . . . 31
5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 29 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32
5.2. The YANG Module Names Registry . . . . . . . . . . . . . 29 5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 33
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.2. The YANG Module Names Registry . . . . . . . . . . . . . 33
6.1. Normative References . . . . . . . . . . . . . . . . . . 29 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33
6.2. Informative References . . . . . . . . . . . . . . . . . 30 6.1. Normative References . . . . . . . . . . . . . . . . . . 33
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 31 6.2. Informative References . . . . . . . . . . . . . . . . . 34
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 31 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 35
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 31 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 35
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 31 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 35
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 31 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 35
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 32 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 35
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 32 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 32 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 32 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 32 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 33 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 36
A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 33 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 37
A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 33 A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 37
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 34 A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 37
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 34 A.13. 12 to 13 . . . . . . . . . . . . . . . . . . . . . . . . 38
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 38
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 38
1. Introduction 1. Introduction
This document defines a YANG 1.1 [RFC7950] module called "ietf- This document defines a YANG 1.1 [RFC7950] module called "ietf-
keystore" that enables centralized configuration of both symmetric keystore" that enables centralized configuration of both symmetric
and asymmetric keys. The secret value for both key types may be and asymmetric keys. The secret value for both key types may be
encrypted. Asymmetric keys may be associated with certificates. encrypted. Asymmetric keys may be associated with certificates.
Notifications are sent when certificates are about to expire. Notifications are sent when certificates are about to expire.
The "ietf-keystore" module defines many "grouping" statements The "ietf-keystore" module defines many "grouping" statements
skipping to change at page 4, line 17 skipping to change at page 4, line 19
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
| | asymmetric-key-algorithm-t | | | asymmetric-key-algorithm-t
| +--rw public-key binary | | +--rw public-key-format? identityref
| +--rw (private-key-type) | | +--rw public-key binary
| | +--:(private-key) | | +--rw private-key-format? identityref
| | | +--rw private-key? binary | | +--rw (private-key-type)
| | +--:(hidden-private-key) | | | +--:(private-key)
| | | +--rw hidden-private-key? empty | | | | +--rw private-key? binary
| | +--:(encrypted-private-key) | | | +--:(hidden-private-key)
| | +--rw encrypted-private-key | | | | +--rw hidden-private-key? empty
| | +--rw (key-type) | | | +--:(encrypted-private-key)
| | | +--:(symmetric-key-ref) | | | +--rw encrypted-private-key
| | | | +--rw symmetric-key-ref? leafref | | | +--rw (key-type)
| | | | {keystore-supported}? | | | | +--:(symmetric-key-ref)
| | | +--:(asymmetric-key-ref) | | | | | +--rw symmetric-key-ref? leafref
| | | +--rw asymmetric-key-ref? leafref | | | | | {keystore-supported}?
| | | {keystore-supported}? | | | | +--:(asymmetric-key-ref)
| | +--rw value? binary | | | | +--rw asymmetric-key-ref? leafref
| +--rw certificates | | | | {keystore-supported}?
| | +--rw certificate* [name] | | | +--rw value? binary
| | +--rw name string | | +--rw certificates
| | +--rw cert? end-entity-cert-cms | | | +--rw certificate* [name]
| | +---n certificate-expiration | | | +--rw name string
| | +-- expiration-date yang:date-and-time | | | +--rw cert? end-entity-cert-cms
| +---x generate-certificate-signing-request | | | +---n certificate-expiration
| +---w input | | | +-- expiration-date yang:date-and-time
| | +---w subject binary | | +---x generate-certificate-signing-request
| | +---w attributes? binary | | +---w input
| +--ro output | | | +---w subject binary
| +--ro certificate-signing-request binary | | | +---w attributes? binary
| | +--ro output
| | +--ro certificate-signing-request binary
| +---x generate-asymmetric-key
| +---w input
| | +---w algorithm ct:asymmetric-key-algorithm-t
| | +---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
| | asymmetric-key-algorithm-t
| +--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 encryption-algorithm-t | +--rw algorithm encryption-algorithm-t
+--rw (key-type) | +--rw key-format? identityref
+--:(key) | +--rw (key-type)
| +--rw key? binary | +--:(key)
+--:(hidden-key) | | +--rw key? binary
| +--rw hidden-key? empty | +--:(hidden-key)
+--:(encrypted-key) | | +--rw hidden-key? empty
+--rw encrypted-key | +--:(encrypted-key)
+--rw (key-type) | +--rw encrypted-key
| +--:(symmetric-key-ref) | +--rw (key-type)
| | +--rw symmetric-key-ref? leafref | | +--:(symmetric-key-ref)
| | {keystore-supported}? | | | +--rw symmetric-key-ref? leafref
| +--:(asymmetric-key-ref) | | | {keystore-supported}?
| +--rw asymmetric-key-ref? leafref | | +--:(asymmetric-key-ref)
| {keystore-supported}? | | +--rw asymmetric-key-ref? leafref
+--rw value? binary | | {keystore-supported}?
| +--rw value? binary
rpcs: +---x generate-symmetric-key
+---x generate-symmetric-key +---w input
| +---w input | +---w algorithm ct:encryption-algorithm-t
| | +---w algorithm ct:encryption-algorithm-t | +---w encrypt-with!
| | +---w encrypt-with! | +---w (key-type)
| | +---w (key-type) | +--:(symmetric-key-ref)
| | +--:(symmetric-key-ref) | | +---w symmetric-key-ref? leafref
| | | +---w symmetric-key-ref? leafref | | {keystore-supported}?
| | | {keystore-supported}? | +--:(asymmetric-key-ref)
| | +--:(asymmetric-key-ref) | +---w asymmetric-key-ref? leafref
| | +---w asymmetric-key-ref? leafref | {keystore-supported}?
| | {keystore-supported}? +--ro output
| +--ro output +--ro algorithm encryption-algorithm-t
| +--ro algorithm encryption-algorithm-t +--ro key-format? identityref
| +--ro (key-type) +--ro (key-type)
| +--:(key) +--:(key)
| | +--ro key? binary | +--ro key? binary
| +--:(hidden-key) +--:(hidden-key)
| | +--ro hidden-key? empty | +--ro hidden-key? empty
| +--:(encrypted-key) +--:(encrypted-key)
| +--ro encrypted-key +--ro encrypted-key
| +--ro (key-type) +--ro (key-type)
| | +--:(symmetric-key-ref) | +--:(symmetric-key-ref)
| | | +--ro symmetric-key-ref? leafref | | +--ro symmetric-key-ref? leafref
| | | {keystore-supported}? | | {keystore-supported}?
| | +--:(asymmetric-key-ref) | +--:(asymmetric-key-ref)
| | +--ro asymmetric-key-ref? leafref | +--ro asymmetric-key-ref? leafref
| | {keystore-supported}? | {keystore-supported}?
| +--ro value? binary +--ro value? binary
+---x generate-asymmetric-key
+---w input
| +---w algorithm ct:asymmetric-key-algorithm-t
| +---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
| asymmetric-key-algorithm-t
+--ro public-key binary
+--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
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 4 skipping to change at page 7, line 11
+-- (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
| {keystore-supported}? | {keystore-supported}?
+-- value? binary +-- value? binary
grouping symmetric-key-grouping grouping symmetric-key-grouping
+-- algorithm encryption-algorithm-t +-- algorithm encryption-algorithm-t
+-- 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
grouping asymmetric-key-pair-grouping grouping asymmetric-key-pair-grouping
+-- algorithm asymmetric-key-algorithm-t +-- algorithm asymmetric-key-algorithm-t
+-- public-key-format? identityref
+-- public-key binary +-- public-key binary
+-- 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
| asymmetric-key-algorithm-t | asymmetric-key-algorithm-t
+-- public-key-format? identityref
+-- public-key binary +-- public-key binary
+-- 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
skipping to change at page 8, line 22 skipping to change at page 8, line 34
| +-- 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
| asymmetric-key-algorithm-t | asymmetric-key-algorithm-t
+-- public-key-format? identityref
+-- public-key binary +-- public-key binary
+-- 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
skipping to change at page 9, line 11 skipping to change at page 9, line 25
+--ro certificate-signing-request binary +--ro certificate-signing-request binary
grouping asymmetric-key-certificate-ref-grouping grouping asymmetric-key-certificate-ref-grouping
+-- asymmetric-key? ks:asymmetric-key-ref +-- asymmetric-key? ks:asymmetric-key-ref
+-- certificate? leafref +-- certificate? leafref
grouping local-or-keystore-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
| | asymmetric-key-algorithm-t | | asymmetric-key-algorithm-t
| +-- public-key-format? identityref
| +-- public-key binary | +-- public-key binary
| +-- 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
skipping to change at page 9, line 35 skipping to change at page 9, line 51
| | {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
| | asymmetric-key-algorithm-t | | asymmetric-key-algorithm-t
| +-- public-key-format? identityref
| +-- public-key binary | +-- public-key binary
| +-- 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
skipping to change at page 10, line 23 skipping to change at page 10, line 41
| +--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
| | asymmetric-key-algorithm-t | | asymmetric-key-algorithm-t
| +-- public-key-format? identityref
| +-- public-key binary | +-- public-key binary
| +-- 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
skipping to change at page 11, line 8 skipping to change at page 11, line 28
| | +---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
| | asymmetric-key-algorithm-t | | | asymmetric-key-algorithm-t
| +-- public-key binary | | +-- public-key-format? identityref
| +-- (private-key-type) | | +-- public-key binary
| | +--:(private-key) | | +-- private-key-format? identityref
| | | +-- private-key? binary | | +-- (private-key-type)
| | +--:(hidden-private-key) | | | +--:(private-key)
| | | +-- hidden-private-key? empty | | | | +-- private-key? binary
| | +--:(encrypted-private-key) | | | +--:(hidden-private-key)
| | +-- encrypted-private-key | | | | +-- hidden-private-key? empty
| | +-- (key-type) | | | +--:(encrypted-private-key)
| | | +--:(symmetric-key-ref) | | | +-- encrypted-private-key
| | | | +-- symmetric-key-ref? leafref | | | +-- (key-type)
| | | | {keystore-supported}? | | | | +--:(symmetric-key-ref)
| | | +--:(asymmetric-key-ref) | | | | | +-- symmetric-key-ref? leafref
| | | +-- asymmetric-key-ref? leafref | | | | | {keystore-supported}?
| | | {keystore-supported}? | | | | +--:(asymmetric-key-ref)
| | +-- value? binary | | | | +-- asymmetric-key-ref? leafref
| +-- certificates | | | | {keystore-supported}?
| | +-- certificate* [name] | | | +-- value? binary
| | +-- name? string | | +-- certificates
| | +-- cert? end-entity-cert-cms | | | +-- certificate* [name]
| | +---n certificate-expiration | | | +-- name? string
| | +-- expiration-date yang:date-and-time | | | +-- cert? end-entity-cert-cms
| +---x generate-certificate-signing-request | | | +---n certificate-expiration
| +---w input | | | +-- expiration-date yang:date-and-time
| | +---w subject binary | | +---x generate-certificate-signing-request
| | +---w attributes? binary | | +---w input
| +--ro output | | | +---w subject binary
| +--ro certificate-signing-request binary | | | +---w attributes? binary
| | +--ro output
| | +--ro certificate-signing-request binary
| +---x generate-asymmetric-key
| +---w input
| | +---w algorithm ct:asymmetric-key-algorithm-t
| | +---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
| | asymmetric-key-algorithm-t
| +--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 encryption-algorithm-t | +-- algorithm encryption-algorithm-t
+-- (key-type) | +-- key-format? identityref
+--:(key) | +-- (key-type)
| +-- key? binary | +--:(key)
+--:(hidden-key) | | +-- key? binary
| +-- hidden-key? empty | +--:(hidden-key)
+--:(encrypted-key) | | +-- hidden-key? empty
+-- encrypted-key | +--:(encrypted-key)
+-- (key-type) | +-- encrypted-key
| +--:(symmetric-key-ref) | +-- (key-type)
| | +-- symmetric-key-ref? leafref | | +--:(symmetric-key-ref)
| | {keystore-supported}? | | | +-- symmetric-key-ref? leafref
| +--:(asymmetric-key-ref) | | | {keystore-supported}?
| +-- asymmetric-key-ref? leafref | | +--:(asymmetric-key-ref)
| {keystore-supported}? | | +-- asymmetric-key-ref? leafref
+-- value? binary | | {keystore-supported}?
| +-- value? binary
+---x generate-symmetric-key
+---w input
| +---w algorithm ct:encryption-algorithm-t
| +---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 encryption-algorithm-t
+--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 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.
skipping to change at page 12, line 23 skipping to change at page 14, line 14
3.2.1. A Keystore Instance 3.2.1. A Keystore Instance
The following example illustrates what a fully configured keystore The following example illustrates what a fully configured keystore
might look like in <operational>, as described by Section 5.3 in might look like in <operational>, as described by Section 5.3 in
[RFC8342]. This datastore view illustrates data set by the [RFC8342]. This datastore view illustrates data set by the
manufacturing process alongside conventional configuration. This manufacturing process alongside conventional configuration. This
keystore instance has four keys, two having one associated keystore instance has four keys, two having one associated
certificate, one having two associated certificates, and one empty certificate, one having two associated certificates, and one empty
key. key.
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore" <keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"
xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin" xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
or:origin="or:intended"> <symmetric-keys>
<!-- Asymmetric Keys --> <symmetric-key>
<name>cleartext-symmetric-key</name>
<algorithm>aes-256-cbc</algorithm>
<key-format>ct:octet-string-key-format</key-format>
<key>base64encodedvalue==</key>
</symmetric-key>
<symmetric-key>
<name>hidden-symmetric-key</name>
<algorithm>aes-256-cbc</algorithm>
<hidden-key/>
</symmetric-key>
<symmetric-key>
<name>encrypted-symmetric-key</name> <!-- operator's key -->
<algorithm>aes-256-cbc</algorithm>
<encrypted-key>
<asymmetric-key-ref>hidden-asymmetric-key</asymmetric-key-re\
f>
<value>base64encodedvalue==</value>
</encrypted-key>
</symmetric-key>
</symmetric-keys>
<asymmetric-keys> <asymmetric-keys>
<asymmetric-key> <asymmetric-key>
<name>ex-rsa-key</name> <name>rsa-asymmetric-key</name>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
<name>ex-rsa-cert</name> <name>ex-rsa-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
<asymmetric-key> <asymmetric-key>
<name>tls-ec-key</name> <name>ec-asymmetric-key</name>
<algorithm>secp256r1</algorithm> <algorithm>secp256r1</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:ec-private-key-format</private-key-form\
at>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
<name>tls-ec-cert</name> <name>ex-ec-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
<asymmetric-key> <asymmetric-key>
<name>tpm-protected-key</name> <name>hidden-asymmetric-key</name>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<hidden-private-key/> <hidden-private-key/> <!-- e.g., TPM protected -->
<certificates> <certificates>
<certificate> <certificate>
<name>builtin-idevid-cert</name> <name>builtin-idevid-cert</name>
</certificate> </certificate>
<certificate> <certificate>
<name>my-ldevid-cert</name> <name>my-ldevid-cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</asymmetric-key> </asymmetric-key>
<asymmetric-key> <asymmetric-key>
<name>encrypted-key</name> <name>encrypted-asymmetric-key</name>
<algorithm>secp256r1</algorithm> <algorithm>secp256r1</algorithm>
<public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<encrypted-private-key> <encrypted-private-key>
<symmetric-key-ref>operators-encrypted-key</symmetric-key-re\ <symmetric-key-ref>encrypted-symmetric-key</symmetric-key-re\
f> f>
<value>base64encodedvalue==</value> <value>base64encodedvalue==</value>
</encrypted-private-key> </encrypted-private-key>
</asymmetric-key> </asymmetric-key>
</asymmetric-keys> </asymmetric-keys>
<!-- Symmetric Keys -->
<symmetric-keys>
<symmetric-key>
<name>operators-encrypted-key</name>
<algorithm>aes-256-cbc</algorithm>
<encrypted-key>
<asymmetric-key-ref>tpm-protected-key</asymmetric-key-ref>
<value>base64encodedvalue==</value>
</encrypted-key>
</symmetric-key>
</symmetric-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 the "generate-symmetric-key" RPC.
The key being referenced is defined in the keystore example above. The key being referenced is defined in the keystore example above.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<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">
<generate-symmetric-key <action xmlns="urn:ietf:params:xml:ns:yang:1">
xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"> <keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore">
<algorithm>aes-256-cbc</algorithm> <symmetric-keys>
<encrypt-with> <generate-symmetric-key>
<asymmetric-key-ref>tpm-protected-key</asymmetric-key-ref> <algorithm>aes-256-cbc</algorithm>
</encrypt-with> <encrypt-with>
</generate-symmetric-key> <asymmetric-key-ref>hidden-asymmetric-key</asymmetric-ke\
y-ref>
</encrypt-with>
</generate-symmetric-key>
</symmetric-keys>
</keystore>
</action>
</rpc> </rpc>
Following is the complimentary RPC-reply. Following is the complimentary RPC-reply.
=========== NOTE: '\' line wrapping per BCP XX (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">
<!--<data> yanglint validation fails --> <!--<data> yanglint validation fails -->
<ks:algorithm>aes-256-cbc</ks:algorithm> <ks:algorithm>aes-256-cbc</ks:algorithm>
<ks:encrypted-key> <ks:encrypted-key>
<ks:asymmetric-key-ref>tpm-protected-key</ks:asymmetric-key-re\ <ks:asymmetric-key-ref>hidden-asymmetric-key</ks:asymmetric-ke\
f> 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. Notable Keystore Groupings 3.2.3. The "generate-asymmetric-key" RPC
The following example illustrates the "generate-asymmetric-key" RPC.
The key being referenced is defined in the keystore example above.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<action xmlns="urn:ietf:params:xml:ns:yang:1">
<keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore">
<asymmetric-keys>
<generate-asymmetric-key>
<algorithm>secp256r1</algorithm>
<encrypt-with>
<symmetric-key-ref>encrypted-symmetric-key</symmetric-ke\
y-ref>
</encrypt-with>
</generate-asymmetric-key>
</asymmetric-keys>
</keystore>
</action>
</rpc>
Following is the complimentary RPC-reply.
========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types"
xmlns:ks="urn:ietf:params:xml:ns:yang:ietf-keystore">
<!--<data> yanglint validation fails -->
<ks:algorithm>secp256r1</ks:algorithm>
<ks:public-key-format>ct:subject-public-key-info-format</ks:publ\
ic-key-format>
<ks:public-key>base64encodedvalue==</ks:public-key>
<ks:encrypted-private-key>
<ks:symmetric-key-ref>encrypted-symmetric-key</ks:symmetric-ke\
y-ref>
<ks:value>base64encodedvalue==</ks:value>
</ks:encrypted-private-key>
<!--</data> yanglint validation fails -->
</rpc-reply>
3.2.4. Notable Keystore Groupings
The following non-normative module is used by subsequent examples to The following non-normative module is used by subsequent examples to
illustrate groupings defined in the ietf-crypto-types module. illustrate groupings defined in the ietf-crypto-types module.
module ex-keystore-usage { module ex-keystore-usage {
yang-version 1.1; yang-version 1.1;
namespace "http://example.com/ns/example-keystore-usage"; namespace "http://example.com/ns/example-keystore-usage";
prefix "eku"; prefix "eku";
skipping to change at page 16, line 36 skipping to change at page 20, line 18
} }
} }
} }
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 per BCP XX (RFC XXXX) =========== ========== NOTE: '\' line wrapping per BCP XXX (RFC XXXX) ===========
<keystore-usage xmlns="http://example.com/ns/example-keystore-usage"> <keystore-usage xmlns="http://example.com/ns/example-keystore-usage"
xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-types">
<!-- 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>
<local-definition> <local-definition>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
</local-definition> </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>
<keystore-reference>ex-rsa-key</keystore-reference> <keystore-reference>rsa-asymmetric-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>
<local-definition> <local-definition>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
<certificates> <certificates>
<certificate> <certificate>
<name>a locally-defined cert</name> <name>a locally-defined cert</name>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</certificate> </certificate>
</certificates> </certificates>
</local-definition> </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>
<keystore-reference>ex-rsa-key</keystore-reference> <keystore-reference>rsa-asymmetric-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>
<local-definition> <local-definition>
<algorithm>rsa2048</algorithm> <algorithm>rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <public-key-format>ct:subject-public-key-info-format</public-k\
ey-format>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<private-key-format>ct:rsa-private-key-format</private-key-for\
mat>
<private-key>base64encodedvalue==</private-key>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</local-definition> </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>
<keystore-reference> <keystore-reference>
<asymmetric-key>ex-rsa-key</asymmetric-key> <asymmetric-key>rsa-asymmetric-key</asymmetric-key>
<certificate>ex-rsa-cert</certificate> <certificate>ex-rsa-cert</certificate>
</keystore-reference> </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@2019-07-02.yang" <CODE BEGINS> file "ietf-keystore@2019-10-18.yang"
module ietf-keystore { module ietf-keystore {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-keystore"; namespace "urn:ietf:params:xml:ns:yang:ietf-keystore";
prefix ks; prefix ks;
import ietf-crypto-types { import ietf-crypto-types {
prefix ct; prefix ct;
reference reference
"RFC CCCC: Common YANG Data Types for Cryptography"; "RFC CCCC: Common YANG Data Types for Cryptography";
skipping to change at page 19, line 14 skipping to change at page 23, line 14
(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-07-02 { revision 2019-10-18 {
description description
"Initial version"; "Initial version";
reference reference
"RFC VVVV: A YANG Data Model for a Keystore"; "RFC VVVV: A YANG Data Model for a Keystore";
} }
/****************/ /****************/
/* Features */ /* Features */
/****************/ /****************/
skipping to change at page 25, line 38 skipping to change at page 29, line 38
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 ct:asymmetric-key-algorithm-t;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC CCCC: 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;
skipping to change at page 26, line 4 skipping to change at page 30, line 35
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 ct:encryption-algorithm-t;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC CCCC: 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
/*********************************/ /*********************************/
/* 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;
} }
rpc 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 ct:encryption-algorithm-t;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC CCCC: 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
rpc 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 ct:asymmetric-key-algorithm-t;
mandatory true;
description
"The algorithm to be used when generating the key.";
reference
"RFC CCCC: 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
} }
<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
skipping to change at page 29, line 31 skipping to change at page 33, line 31
namespace: urn:ietf:params:xml:ns:yang:ietf-keystore namespace: urn:ietf:params:xml:ns:yang:ietf-keystore
prefix: ks prefix: ks
reference: RFC VVVV reference: RFC VVVV
6. References 6. References
6.1. Normative References 6.1. Normative References
[I-D.ietf-netconf-crypto-types] [I-D.ietf-netconf-crypto-types]
Watsen, K. and H. Wang, "Common YANG Data Types for Watsen, K. and H. Wang, "Common YANG Data Types for
Cryptography", draft-ietf-netconf-crypto-types-09 (work in Cryptography", draft-ietf-netconf-crypto-types-10 (work in
progress), June 2019. progress), July 2019.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010,
<https://www.rfc-editor.org/info/rfc6020>. <https://www.rfc-editor.org/info/rfc6020>.
skipping to change at page 34, line 10 skipping to change at page 38, line 10
A.12. 11 to 12 A.12. 11 to 12
o Updated to reflect crypto-type's draft using enumerations over o Updated to reflect crypto-type's draft using enumerations over
identities. identities.
o Added examples for the 'generate-symmetric-key' and 'generate- o Added examples for the 'generate-symmetric-key' and 'generate-
asymmetric-key' RPCs. asymmetric-key' RPCs.
o Updated the Introduction section. o Updated the Introduction section.
A.13. 12 to 13
o Updated examples to incorporate new "key-format" identities.
o Made the two "generate-*-key" RPCs be "action" statements instead.
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. 65 change blocks. 
303 lines changed or deleted 474 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/