draft-ietf-netconf-tls-client-server-11.txt   draft-ietf-netconf-tls-client-server-12.txt 
NETCONF Working Group K. Watsen NETCONF Working Group K. Watsen
Internet-Draft Watsen Networks Internet-Draft Watsen Networks
Intended status: Standards Track G. Wu Intended status: Standards Track G. Wu
Expires: October 9, 2019 Cisco Systems Expires: October 31, 2019 Cisco Systems
L. Xia L. Xia
Huawei Huawei
April 7, 2019 April 29, 2019
YANG Groupings for TLS Clients and TLS Servers YANG Groupings for TLS Clients and TLS Servers
draft-ietf-netconf-tls-client-server-11 draft-ietf-netconf-tls-client-server-12
Abstract Abstract
This document defines three YANG modules: the first defines groupings This document defines three YANG modules: the first defines groupings
for a generic TLS client, the second defines groupings for a generic for a generic TLS client, the second defines groupings for a generic
TLS server, and the third defines common identities and groupings TLS server, and the third defines common identities and groupings
used by both the client and the server. It is intended that these used by both the client and the server. It is intended that these
groupings will be used by applications using the TLS protocol. groupings will be used by applications using the TLS protocol.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 2, line 5 skipping to change at page 2, line 5
o "XXXX" --> the assigned RFC value for this draft o "XXXX" --> the assigned RFC value for this draft
o "YYYY" --> the assigned RFC value for I-D.ietf-netconf-trust- o "YYYY" --> the assigned RFC value for I-D.ietf-netconf-trust-
anchors anchors
o "ZZZZ" --> the assigned RFC value for I-D.ietf-netconf-keystore o "ZZZZ" --> the assigned RFC value for I-D.ietf-netconf-keystore
Artwork in this document contains placeholder values for the date of Artwork in this document contains placeholder values for the date of
publication of this draft. Please apply the following replacement: publication of this draft. Please apply the following replacement:
o "2019-04-07" --> the publication date of this draft o "2019-04-29" --> the publication date of this draft
The following Appendix section is to be removed prior to publication: The following Appendix section is to be removed prior to publication:
o Appendix A. Change Log o Appendix A. Change Log
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 9, 2019. This Internet-Draft will expire on October 31, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 49 skipping to change at page 2, line 49
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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. The TLS Client Model . . . . . . . . . . . . . . . . . . . . 4 3. The TLS Client Model . . . . . . . . . . . . . . . . . . . . 4
3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 4 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 5
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 6 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 6
4. The TLS Server Model . . . . . . . . . . . . . . . . . . . . 10 4. The TLS Server Model . . . . . . . . . . . . . . . . . . . . 10
4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 10 4.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 10
4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 11 4.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 11
4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 13 4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 13
5. The TLS Common Model . . . . . . . . . . . . . . . . . . . . 17 5. The TLS Common Model . . . . . . . . . . . . . . . . . . . . 18
5.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 26 5.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 27
5.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 26 5.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 27
5.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 26 5.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 27
6. Security Considerations . . . . . . . . . . . . . . . . . . . 35 6. Security Considerations . . . . . . . . . . . . . . . . . . . 36
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37
7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 36 7.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 37
7.2. The YANG Module Names Registry . . . . . . . . . . . . . 37 7.2. The YANG Module Names Registry . . . . . . . . . . . . . 38
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 37 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.1. Normative References . . . . . . . . . . . . . . . . . . 37 8.1. Normative References . . . . . . . . . . . . . . . . . . 38
8.2. Informative References . . . . . . . . . . . . . . . . . 39 8.2. Informative References . . . . . . . . . . . . . . . . . 40
Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 41 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 42
A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 41 A.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 42
A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 41 A.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 42
A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 41 A.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 42
A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 41 A.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 42
A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 42 A.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 43
A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 43 A.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 44
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 43 A.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 44
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 43 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 44
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 45
1. Introduction 1. Introduction
This document defines three YANG 1.1 [RFC7950] modules: the first This document defines three YANG 1.1 [RFC7950] modules: the first
defines a grouping for a generic TLS client, the second defines a defines a grouping for a generic TLS client, the second defines a
grouping for a generic TLS server, and the third defines identities grouping for a generic TLS server, and the third defines identities
and groupings common to both the client and the server (TLS is and groupings common to both the client and the server (TLS is
defined in [RFC5246]). It is intended that these groupings will be defined in [RFC5246]). It is intended that these groupings will be
used by applications using the TLS protocol. For instance, these used by applications using the TLS protocol. For instance, these
groupings could be used to help define the data model for an HTTPS groupings could be used to help define the data model for an HTTPS
skipping to change at page 4, line 29 skipping to change at page 4, line 31
3.1. Tree Diagram 3.1. Tree Diagram
This section provides a tree diagram [RFC8340] for the "ietf-tls- This section provides a tree diagram [RFC8340] for the "ietf-tls-
client" module that does not have groupings expanded. client" module that does not have groupings expanded.
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
module: ietf-tls-client module: ietf-tls-client
grouping tls-client-grouping grouping tls-client-grouping
+-- tls-client-parameters +-- client-identity
+-- client-identity | +-- (auth-type)?
| +-- (auth-type)? | +--:(certificate)
| +--:(certificate) | +-- certificate
| +-- certificate | +---u ks:local-or-keystore-end-entity-cert-with-key-\
| +---u ks:local-or-keystore-end-entity-cert-with-k\ grouping
ey-grouping +-- server-authentication
+-- server-authentication | +-- pinned-ca-certs? ta:pinned-certificates-ref
| +-- pinned-ca-certs? ta:pinned-certificates-ref | | {ta:x509-certificates}?
| | {ta:x509-certificates}? | +-- pinned-server-certs? ta:pinned-certificates-ref
| +-- pinned-server-certs? ta:pinned-certificates-ref | {ta:x509-certificates}?
| {ta:x509-certificates}? +-- hello-params {tls-client-hello-params-config}?
+-- hello-params {tls-client-hello-params-config}? | +---u tlscmn:hello-params-grouping
| +---u tlscmn:hello-params-grouping +-- keepalives! {tls-client-keepalives}?
+-- keepalives! {tls-client-keepalives}? +-- max-wait? uint16
+-- max-wait? uint16 +-- max-attempts? uint8
+-- max-attempts? uint8
3.2. Example Usage 3.2. Example Usage
This section presents two examples showing the tls-client-grouping This section presents two examples showing the tls-client-grouping
populated with some data. These examples are effectively the same populated with some data. These examples are effectively the same
except the first configures the client identity using a local key except the first configures the client identity using a local key
while the second uses a key configured in a keystore. Both examples while the second uses a key configured in a keystore. Both examples
are consistent with the examples presented in Section 3 of are consistent with the examples presented in Section 2 of
[I-D.ietf-netconf-trust-anchors] and Section 3.2 of [I-D.ietf-netconf-trust-anchors] and Section 3.2 of
[I-D.ietf-netconf-keystore]. [I-D.ietf-netconf-keystore].
The following example configures the client identity using a local The following example configures the client identity using a local
key: key:
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
<tls-client xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-client"> <tls-client xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-client">
<tls-client-parameters>
<!-- how this client will authenticate itself to the server --> <!-- how this client will authenticate itself to the server -->
<client-identity> <client-identity>
<certificate> <certificate>
<local-definition> <local-definition>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-cryp\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto\
to-types">ct:rsa2048</algorithm> -types">ct:rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</local-definition> </local-definition>
</certificate> </certificate>
</client-identity> </client-identity>
<!-- which certificates will this client trust --> <!-- which certificates will this client trust -->
<server-authentication> <server-authentication>
<pinned-ca-certs>explicitly-trusted-server-ca-certs</pinned-ca\ <pinned-ca-certs>explicitly-trusted-server-ca-certs</pinned-ca-c\
-certs> erts>
<pinned-server-certs>explicitly-trusted-server-certs</pinned-s\ <pinned-server-certs>explicitly-trusted-server-certs</pinned-ser\
erver-certs> ver-certs>
</server-authentication> </server-authentication>
<keepalives> <keepalives>
<max-wait>30</max-wait> <max-wait>30</max-wait>
<max-attempts>3</max-attempts> <max-attempts>3</max-attempts>
</keepalives> </keepalives>
</tls-client-parameters>
</tls-client> </tls-client>
The following example configures the client identity using a key from The following example configures the client identity using a key from
the keystore: the keystore:
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
<tls-client xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-client"> <tls-client xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-client">
<tls-client-parameters>
<!-- how this client will authenticate itself to the server --> <!-- how this client will authenticate itself to the server -->
<client-identity> <client-identity>
<certificate> <certificate>
<keystore-reference>ex-rsa-cert</keystore-reference> <keystore-reference>ex-rsa-cert</keystore-reference>
</certificate> </certificate>
</client-identity> </client-identity>
<!-- which certificates will this client trust --> <!-- which certificates will this client trust -->
<server-authentication> <server-authentication>
<pinned-ca-certs>explicitly-trusted-server-ca-certs</pinned-ca\ <pinned-ca-certs>explicitly-trusted-server-ca-certs</pinned-ca-c\
-certs> erts>
<pinned-server-certs>explicitly-trusted-server-certs</pinned-s\ <pinned-server-certs>explicitly-trusted-server-certs</pinned-ser\
erver-certs> ver-certs>
</server-authentication> </server-authentication>
<keepalives> <keepalives>
<max-wait>30</max-wait> <max-wait>30</max-wait>
<max-attempts>3</max-attempts> <max-attempts>3</max-attempts>
</keepalives> </keepalives>
</tls-client-parameters>
</tls-client> </tls-client>
3.3. YANG Module 3.3. YANG Module
This YANG module has normative references to This YANG module has normative references to
[I-D.ietf-netconf-trust-anchors] and [I-D.ietf-netconf-keystore]. [I-D.ietf-netconf-trust-anchors] and [I-D.ietf-netconf-keystore].
<CODE BEGINS> file "ietf-tls-client@2019-04-07.yang" <CODE BEGINS> file "ietf-tls-client@2019-04-29.yang"
module ietf-tls-client { module ietf-tls-client {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-tls-client"; namespace "urn:ietf:params:xml:ns:yang:ietf-tls-client";
prefix tlsc; prefix tlsc;
import ietf-tls-common { import ietf-tls-common {
prefix tlscmn; prefix tlscmn;
revision-date 2019-04-07; // stable grouping definitions revision-date 2019-04-29; // stable grouping definitions
reference reference
"RFC XXXX: YANG Groupings for TLS Clients and TLS Servers"; "RFC XXXX: YANG Groupings for TLS Clients and TLS Servers";
} }
import ietf-trust-anchors { import ietf-trust-anchors {
prefix ta; prefix ta;
reference reference
"RFC YYYY: YANG Data Model for Global Trust Anchors"; "RFC YYYY: YANG Data Model for Global Trust Anchors";
} }
import ietf-keystore { import ietf-keystore {
prefix ks; prefix ks;
reference reference
"RFC ZZZZ: YANG Data Model for a 'Keystore' Mechanism"; "RFC ZZZZ: YANG Data Model for a 'Keystore' Mechanism";
} }
import ietf-netconf-acm { import ietf-netconf-acm {
prefix nacm; prefix nacm;
skipping to change at page 8, line 6 skipping to change at page 8, line 5
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.; itself for full legal notices.;
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision 2019-04-07 { revision 2019-04-29 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: YANG Groupings for TLS Clients and TLS Servers"; "RFC XXXX: YANG Groupings for TLS Clients and TLS Servers";
} }
// Features // Features
feature tls-client-hello-params-config { feature tls-client-hello-params-config {
description description
skipping to change at page 8, line 33 skipping to change at page 8, line 32
"Per socket TLS keepalive parameters are configurable for "Per socket TLS keepalive parameters are configurable for
TLS clients on the server implementing this feature."; TLS clients on the server implementing this feature.";
} }
// Groupings // Groupings
grouping tls-client-grouping { grouping tls-client-grouping {
description description
"A reusable grouping for configuring a TLS client without "A reusable grouping for configuring a TLS client without
any consideration for how an underlying TCP session is any consideration for how an underlying TCP session is
established."; established.
container tls-client-parameters { Note that this grouping uses fairly typical descendent
nacm:default-deny-write; node names such that a stack of 'uses' statements will
have name conflicts. It is intended that the consuming
data model will resolve the issue (e.g., by wrapping
the 'uses' statement in a container called
'tls-client-parameters'). This model purposely does
not do this itself so as to provide maximum flexibility
to consuming models.";
container client-identity {
nacm:default-deny-write;
description description
"A container to hold TLS client configuration."; "The credentials used by the client to authenticate to
the TLS server.";
container client-identity { choice auth-type {
description description
"The credentials used by the client to authenticate to "The authentication type.";
the TLS server."; container certificate {
choice auth-type { uses
ks:local-or-keystore-end-entity-cert-with-key-grouping;
description description
"The authentication type."; "A locally-defined or referenced certificate
container certificate { to be used for client authentication.";
uses reference
ks:local-or-keystore-end-entity-cert-with-key-grouping; "RFC ZZZZ: YANG Data Model for a 'Keystore' Mechanism";
description
"A locally-defined or referenced certificate
to be used for client authentication.";
reference
"RFC ZZZZ: YANG Data Model for a 'Keystore' Mechanism";
}
} }
} // container client-identity }
} // container client-identity
container server-authentication { container server-authentication {
must 'pinned-ca-certs or pinned-server-certs'; nacm:default-deny-write;
must 'pinned-ca-certs or pinned-server-certs';
description
"Trusted server identities.";
leaf pinned-ca-certs {
if-feature "ta:x509-certificates";
type ta:pinned-certificates-ref;
description description
"Trusted server identities."; "A reference to a list of certificate authority (CA)
leaf pinned-ca-certs { certificates used by the TLS client to authenticate
if-feature "ta:x509-certificates"; TLS server certificates. A server certificate is
type ta:pinned-certificates-ref; authenticated if it has a valid chain of trust to
description a configured pinned CA certificate.";
"A reference to a list of certificate authority (CA) }
certificates used by the TLS client to authenticate leaf pinned-server-certs {
TLS server certificates. A server certificate is if-feature "ta:x509-certificates";
authenticated if it has a valid chain of trust to type ta:pinned-certificates-ref;
a configured pinned CA certificate.";
}
leaf pinned-server-certs {
if-feature "ta:x509-certificates";
type ta:pinned-certificates-ref;
description
"A reference to a list of server certificates used by
the TLS client to authenticate TLS server certificates.
A server certificate is authenticated if it is an
exact match to a configured pinned server certificate.";
}
} // container server-authentication
container hello-params {
if-feature "tls-client-hello-params-config";
uses tlscmn:hello-params-grouping;
description description
"Configurable parameters for the TLS hello message."; "A reference to a list of server certificates used by
} // container hello-params the TLS client to authenticate TLS server certificates.
A server certificate is authenticated if it is an
exact match to a configured pinned server certificate.";
}
} // container server-authentication
container keepalives { container hello-params {
if-feature "tls-client-keepalives"; nacm:default-deny-write;
presence "Indicates that keepalives are enabled."; if-feature "tls-client-hello-params-config";
description uses tlscmn:hello-params-grouping;
"Configures the keep-alive policy, to proactively test description
the aliveness of the TLS server. An unresponsive "Configurable parameters for the TLS hello message.";
TLS server is dropped after approximately max-wait } // container hello-params
* max-attempts seconds.";
leaf max-wait { container keepalives {
type uint16 { nacm:default-deny-write;
range "1..max"; if-feature "tls-client-keepalives";
} presence "Indicates that keepalives are enabled.";
units "seconds"; description
default "30"; "Configures the keep-alive policy, to proactively test
description the aliveness of the TLS server. An unresponsive
"Sets the amount of time in seconds after which if TLS server is dropped after approximately max-wait
no data has been received from the TLS server, a * max-attempts seconds.";
TLS-level message will be sent to test the leaf max-wait {
aliveness of the TLS server."; type uint16 {
} range "1..max";
leaf max-attempts {
type uint8;
default "3";
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the TLS server before assuming the TLS server is
no longer alive.";
} }
} // container keepalives units "seconds";
} // container tls-client-parameters default "30";
description
"Sets the amount of time in seconds after which if
no data has been received from the TLS server, a
TLS-level message will be sent to test the
aliveness of the TLS server.";
}
leaf max-attempts {
type uint8;
default "3";
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the TLS server before assuming the TLS server is
no longer alive.";
}
} // container keepalives
} // grouping tls-client-grouping } // grouping tls-client-grouping
} }
<CODE ENDS> <CODE ENDS>
4. The TLS Server Model 4. The TLS Server Model
4.1. Tree Diagram 4.1. Tree Diagram
This section provides a tree diagram [RFC8340] for the "ietf-tls- This section provides a tree diagram [RFC8340] for the "ietf-tls-
server" module that does not have groupings expanded. server" module that does not have groupings expanded.
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
module: ietf-tls-server module: ietf-tls-server
grouping tls-server-grouping grouping tls-server-grouping
+-- tls-server-parameters +-- server-identity
+-- server-identity | +---u ks:local-or-keystore-end-entity-cert-with-key-grouping
| +---u ks:local-or-keystore-end-entity-cert-with-key-groupi\ +-- client-authentication!
ng | +-- (required-or-optional)
+-- client-authentication | | +--:(required)
| +-- pinned-ca-certs? ta:pinned-certificates-ref | | | +-- required? empty
| | {ta:x509-certificates}? | | +--:(optional)
| +-- pinned-client-certs? ta:pinned-certificates-ref | | +-- optional? empty
| {ta:x509-certificates}? | +-- (local-or-external)
+-- hello-params {tls-server-hello-params-config}? | +--:(local) {local-client-auth-supported}?
| +---u tlscmn:hello-params-grouping | | +-- pinned-ca-certs?
+-- keepalives! {tls-server-keepalives}? | | | ta:pinned-certificates-ref
+-- max-wait? uint16 | | | {ta:x509-certificates}?
+-- max-attempts? uint8 | | +-- pinned-client-certs?
| | ta:pinned-certificates-ref
| | {ta:x509-certificates}?
| +--:(external) {external-client-auth-supported}?
| +-- client-auth-defined-elsewhere? empty
+-- hello-params {tls-server-hello-params-config}?
| +---u tlscmn:hello-params-grouping
+-- keepalives! {tls-server-keepalives}?
+-- max-wait? uint16
+-- max-attempts? uint8
4.2. Example Usage 4.2. Example Usage
This section presents two examples showing the tls-server-grouping This section presents two examples showing the tls-server-grouping
populated with some data. These examples are effectively the same populated with some data. These examples are effectively the same
except the first configures the server identity using a local key except the first configures the server identity using a local key
while the second uses a key configured in a keystore. Both examples while the second uses a key configured in a keystore. Both examples
are consistent with the examples presented in Section 3 of are consistent with the examples presented in Section 2 of
[I-D.ietf-netconf-trust-anchors] and Section 3.2 of [I-D.ietf-netconf-trust-anchors] and Section 3.2 of
[I-D.ietf-netconf-keystore]. [I-D.ietf-netconf-keystore].
The following example configures the server identity using a local The following example configures the server identity using a local
key: key:
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
<tls-server xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-server"> <tls-server xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-server">
<tls-server-parameters>
<!-- how this server will authenticate itself to the client --> <!-- how this server will authenticate itself to the client -->
<server-identity> <server-identity>
<local-definition> <local-definition>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-crypto-t\
-types">ct:rsa2048</algorithm> ypes">ct:rsa2048</algorithm>
<private-key>base64encodedvalue==</private-key> <private-key>base64encodedvalue==</private-key>
<public-key>base64encodedvalue==</public-key> <public-key>base64encodedvalue==</public-key>
<cert>base64encodedvalue==</cert> <cert>base64encodedvalue==</cert>
</local-definition> </local-definition>
</server-identity> </server-identity>
<!-- which certificates will this server trust --> <!-- which certificates will this server trust -->
<client-authentication> <client-authentication>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</pinned-ca\ <required/>
-certs> <pinned-ca-certs>explicitly-trusted-client-ca-certs</pinned-ca-c\
<pinned-client-certs>explicitly-trusted-client-certs</pinned-c\ erts>
lient-certs> <pinned-client-certs>explicitly-trusted-client-certs</pinned-cli\
</client-authentication> ent-certs>
</client-authentication>
</tls-server-parameters>
</tls-server> </tls-server>
The following example configures the server identity using a key from The following example configures the server identity using a key from
the keystore: the keystore:
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
<tls-server xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-server"> <tls-server xmlns="urn:ietf:params:xml:ns:yang:ietf-tls-server">
<tls-server-parameters>
<!-- how this server will authenticate itself to the client --> <!-- how this server will authenticate itself to the client -->
<server-identity> <server-identity>
<keystore-reference>ex-rsa-cert</keystore-reference> <keystore-reference>ex-rsa-cert</keystore-reference>
</server-identity> </server-identity>
<!-- which certificates will this server trust --> <!-- which certificates will this server trust -->
<client-authentication> <client-authentication>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</pinned-ca\ <required/>
-certs> <pinned-ca-certs>explicitly-trusted-client-ca-certs</pinned-ca-c\
<pinned-client-certs>explicitly-trusted-client-certs</pinned-c\ erts>
lient-certs> <pinned-client-certs>explicitly-trusted-client-certs</pinned-cli\
</client-authentication> ent-certs>
</client-authentication>
</tls-server-parameters>
</tls-server> </tls-server>
4.3. YANG Module 4.3. YANG Module
This YANG module has a normative references to [RFC5246], This YANG module has a normative references to [RFC5246],
[I-D.ietf-netconf-trust-anchors] and [I-D.ietf-netconf-keystore]. [I-D.ietf-netconf-trust-anchors] and [I-D.ietf-netconf-keystore].
<CODE BEGINS> file "ietf-tls-server@2019-04-07.yang" <CODE BEGINS> file "ietf-tls-server@2019-04-29.yang"
module ietf-tls-server { module ietf-tls-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-tls-server"; namespace "urn:ietf:params:xml:ns:yang:ietf-tls-server";
prefix tlss; prefix tlss;
import ietf-tls-common { import ietf-tls-common {
prefix tlscmn; prefix tlscmn;
revision-date 2019-04-07; // stable grouping definitions revision-date 2019-04-29; // stable grouping definitions
reference reference
"RFC XXXX: YANG Groupings for TLS Clients and TLS Servers"; "RFC XXXX: YANG Groupings for TLS Clients and TLS Servers";
} }
import ietf-trust-anchors { import ietf-trust-anchors {
prefix ta; prefix ta;
reference reference
"RFC YYYY: YANG Data Model for Global Trust Anchors"; "RFC YYYY: YANG Data Model for Global Trust Anchors";
} }
skipping to change at page 14, line 47 skipping to change at page 14, line 26
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.; itself for full legal notices.;
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision 2019-04-07 { revision 2019-04-29 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: YANG Groupings for TLS Clients and TLS Servers"; "RFC XXXX: YANG Groupings for TLS Clients and TLS Servers";
} }
// Features // Features
feature tls-server-hello-params-config { feature tls-server-hello-params-config {
description description
"TLS hello message parameters are configurable on a TLS "TLS hello message parameters are configurable on a TLS
server."; server.";
} }
skipping to change at page 15, line 21 skipping to change at page 14, line 47
"TLS hello message parameters are configurable on a TLS "TLS hello message parameters are configurable on a TLS
server."; server.";
} }
feature tls-server-keepalives { feature tls-server-keepalives {
description description
"Per socket TLS keepalive parameters are configurable for "Per socket TLS keepalive parameters are configurable for
TLS servers on the server implementing this feature."; TLS servers on the server implementing this feature.";
} }
feature local-client-auth-supported {
description
"Indicates that the TLS server supports local
configuration of client credentials.";
}
feature external-client-auth-supported {
description
"Indicates that the TLS server supports external
configuration of client credentials.";
}
// Groupings // Groupings
grouping tls-server-grouping { grouping tls-server-grouping {
description description
"A reusable grouping for configuring a TLS server without "A reusable grouping for configuring a TLS server without
any consideration for how underlying TCP sessions are any consideration for how underlying TCP sessions are
established."; established.
container tls-server-parameters { Note that this grouping uses fairly typical descendent
nacm:default-deny-write; node names such that a stack of 'uses' statements will
have name conflicts. It is intended that the consuming
data model will resolve the issue (e.g., by wrapping
the 'uses' statement in a container called
'tls-server-parameters'). This model purposely does
not do this itself so as to provide maximum flexibility
to consuming models.";
container server-identity { // FIXME: what about PSKs?
nacm:default-deny-write;
description description
"A container to hold TLS server configuration."; "A locally-defined or referenced end-entity certificate,
including any configured intermediate certificates, the
TLS server will present when establishing a TLS connection
in its Certificate message, as defined in Section 7.4.2
in RFC 5246.";
reference
"RFC 5246:
The Transport Layer Security (TLS) Protocol Version 1.2
RFC ZZZZ:
YANG Data Model for a 'Keystore' Mechanism";
uses ks:local-or-keystore-end-entity-cert-with-key-grouping;
} // container server-identity
container server-identity { container client-authentication { // FIXME: what about PSKs?
description nacm:default-deny-write;
"A locally-defined or referenced end-entity certificate, presence
including any configured intermediate certificates, the "Indicates that certificate based client authentication
TLS server will present when establishing a TLS connection is supported (i.e., the server will request that the
in its Certificate message, as defined in Section 7.4.2 client send a certificate).";
in RFC 5246.";
reference
"RFC 5246:
The Transport Layer Security (TLS) Protocol Version 1.2
RFC ZZZZ:
YANG Data Model for a 'Keystore' Mechanism";
uses ks:local-or-keystore-end-entity-cert-with-key-grouping;
} // container server-identity
container client-authentication { description
"Specifies if TLS client authentication is required or
optional, and specifies if the certificates needed to
authenticate the TLS client are configured locally or
externally. If configured locally, the data model
enables both trust anchors and end-entity certificate
to be set.";
choice required-or-optional {
mandatory true; // or default to 'required' ?
description description
"A reference to a list of pinned certificate authority (CA) "Indicates if TLS-level client authentication is required
certificates and a reference to a list of pinned client or optional. This is necessary for some protocols (e.g.,
certificates."; RESTCONF) the may optionally authenticate a client via
leaf pinned-ca-certs { TLS-level authentication, HTTP-level authentication, or
if-feature "ta:x509-certificates"; both simultaneously).";
type ta:pinned-certificates-ref; leaf required {
type empty;
description
"Indicates that TLS-level client authentication is
required.";
}
leaf optional {
type empty;
description
"Indicates that TLS-level client authentication is
optional.";
}
}
choice local-or-external {
mandatory true;
description
"Indicates if the certificates needed to authenticate
the client are configured locally or externally. The
need to support external configuration for client
authentication stems from the desire to support
consuming data models that prefer to place client
authentication with client definitions, rather then
in a data model principally concerned with configuring
the transport.";
case local {
if-feature "local-client-auth-supported";
description description
"A reference to a list of certificate authority (CA) "The certificates needed to authenticate the clients
certificates used by the TLS server to authenticate are configured locally.";
TLS client certificates. A client certificate is leaf pinned-ca-certs {
authenticated if it has a valid chain of trust to if-feature "ta:x509-certificates";
a configured pinned CA certificate."; type ta:pinned-certificates-ref;//FIXME: local-or-remote?
reference description
"RFC YYYY: YANG Data Model for Global Trust Anchors"; "A reference to a list of certificate authority (CA)
certificates used by the TLS server to authenticate
TLS client certificates. A client certificate is
authenticated if it has a valid chain of trust to
a configured pinned CA certificate.";
reference
"RFC YYYY: YANG Data Model for Global Trust Anchors";
}
leaf pinned-client-certs {
if-feature "ta:x509-certificates";
type ta:pinned-certificates-ref;//FIXME: local-or-remote?
description
"A reference to a list of client certificates
used by the TLS server to authenticate TLS
client certificates. A clients certificate
is authenticated if it is an exact match to
a configured pinned client certificate.";
reference
"RFC YYYY: YANG Data Model for Global Trust Anchors";
}
} }
leaf pinned-client-certs { case external {
if-feature "ta:x509-certificates"; if-feature "external-client-auth-supported";
type ta:pinned-certificates-ref;
description description
"A reference to a list of client certificates used by "The certificates needed to authenticate the clients
the TLS server to authenticate TLS client certificates. are configured externally.";
A clients certificate is authenticated if it is an leaf client-auth-defined-elsewhere {
exact match to a configured pinned client certificate."; type empty;
reference description
"RFC YYYY: YANG Data Model for Global Trust Anchors"; "Indicates that certificates needed to authenticate
clients are configured elsewhere.";
}
} }
} // container client-authentication } // choice local-or-external
} // container client-authentication
container hello-params { container hello-params {
if-feature "tls-server-hello-params-config"; nacm:default-deny-write;
uses tlscmn:hello-params-grouping; if-feature "tls-server-hello-params-config";
description uses tlscmn:hello-params-grouping;
"Configurable parameters for the TLS hello message."; description
} // container hello-params "Configurable parameters for the TLS hello message.";
} // container hello-params
container keepalives { container keepalives {
if-feature "tls-server-keepalives"; nacm:default-deny-write;
presence "Indicates that keepalives are enabled."; if-feature "tls-server-keepalives";
description presence "Indicates that keepalives are enabled.";
"Configures the keep-alive policy, to proactively test description
the aliveness of the TLS client. An unresponsive "Configures the keep-alive policy, to proactively test
TLS client is dropped after approximately max-wait the aliveness of the TLS client. An unresponsive
* max-attempts seconds."; TLS client is dropped after approximately max-wait
leaf max-wait { * max-attempts seconds.";
type uint16 { leaf max-wait {
range "1..max"; type uint16 {
} range "1..max";
units "seconds";
default "30";
description
"Sets the amount of time in seconds after which if
no data has been received from the TLS client, a
TLS-level message will be sent to test the
aliveness of the TLS client.";
}
leaf max-attempts {
type uint8;
default "3";
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the TLS client before assuming the TLS client is
no longer alive.";
} }
} // container keepalives units "seconds";
} // container tls-server-parameters default "30";
description
"Sets the amount of time in seconds after which if
no data has been received from the TLS client, a
TLS-level message will be sent to test the
aliveness of the TLS client.";
}
leaf max-attempts {
type uint8;
default "3";
description
"Sets the maximum number of sequential keep-alive
messages that can fail to obtain a response from
the TLS client before assuming the TLS client is
no longer alive.";
}
} // container keepalives
} // grouping tls-server-grouping } // grouping tls-server-grouping
} }
<CODE ENDS> <CODE ENDS>
5. The TLS Common Model 5. The TLS Common Model
The TLS common model presented in this section contains identities The TLS common model presented in this section contains identities
and groupings common to both TLS clients and TLS servers. The hello- and groupings common to both TLS clients and TLS servers. The hello-
params-grouping can be used to configure the list of TLS algorithms params-grouping can be used to configure the list of TLS algorithms
permitted by the TLS client or TLS server. The lists of algorithms permitted by the TLS client or TLS server. The lists of algorithms
skipping to change at page 26, line 45 skipping to change at page 27, line 45
</hello-params> </hello-params>
5.3. YANG Module 5.3. YANG Module
This YANG module has a normative references to [RFC4346], [RFC5246], This YANG module has a normative references to [RFC4346], [RFC5246],
[RFC5288], [RFC5289], and [RFC8422]. [RFC5288], [RFC5289], and [RFC8422].
This YANG module has a informative references to [RFC2246], This YANG module has a informative references to [RFC2246],
[RFC4346], [RFC5246], and [RFC8446]. [RFC4346], [RFC5246], and [RFC8446].
<CODE BEGINS> file "ietf-tls-common@2019-04-07.yang" <CODE BEGINS> file "ietf-tls-common@2019-04-29.yang"
module ietf-tls-common { module ietf-tls-common {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-tls-common"; namespace "urn:ietf:params:xml:ns:yang:ietf-tls-common";
prefix tlscmn; prefix tlscmn;
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/>
skipping to change at page 27, line 36 skipping to change at page 28, line 36
(https://www.rfc-editor.org/info/rfcXXXX); see the RFC (https://www.rfc-editor.org/info/rfcXXXX); see the RFC
itself for full legal notices.; itself for full legal notices.;
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document 'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
are to be interpreted as described in BCP 14 (RFC 2119) are to be interpreted as described in BCP 14 (RFC 2119)
(RFC 8174) when, and only when, they appear in all (RFC 8174) when, and only when, they appear in all
capitals, as shown here."; capitals, as shown here.";
revision 2019-04-07 { revision 2019-04-29 {
description description
"Initial version"; "Initial version";
reference reference
"RFC XXXX: YANG Groupings for TLS Clients and TLS Servers"; "RFC XXXX: YANG Groupings for TLS Clients and TLS Servers";
} }
// Features // Features
feature tls-1_0 { feature tls-1_0 {
description description
skipping to change at page 43, line 22 skipping to change at page 44, line 22
section. section.
o Added "presence" statements on the "keepalive" containers, as was o Added "presence" statements on the "keepalive" containers, as was
needed to address a validation error that appeared after adding needed to address a validation error that appeared after adding
the "must" statements into the NETCONF/RESTCONF client/server the "must" statements into the NETCONF/RESTCONF client/server
modules. modules.
o Updated the boilerplate text in module-level "description" o Updated the boilerplate text in module-level "description"
statement to match copyeditor convention. statement to match copyeditor convention.
A.12. 11 to 12
o In server model, made 'client-authentication' a 'presence' node
indicating that the server supports client authentication.
o In the server model, added a 'required-or-optional' choice to
'client-authentication' to better support protocols such as
RESTCONF.
o In the server model, added a 'local-or-external' choice to
'client-authentication' to better support consuming data models
that prefer to keep client auth with client definitions than in a
model principally concerned with the "transport".
o In both models, removed the "demux containers", floating the
nacm:default-deny-write to each descendent node, and adding a note
to model designers regarding the potential need to add their own
demux containers.
o Fixed a couple references (section 2 --> section 3)
Acknowledgements Acknowledgements
The authors would like to thank for following for lively discussions The authors would like to thank for following for lively discussions
on list and in the halls (ordered by last name): Andy Bierman, Martin on list and in the halls (ordered by last name): Andy Bierman, Martin
Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David Bjorklund, Benoit Claise, Mehmet Ersue, Balazs Kovacs, David
Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch, Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Tom Petch,
Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert Wijnen. Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert Wijnen.
Authors' Addresses Authors' Addresses
 End of changes. 69 change blocks. 
308 lines changed or deleted 412 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/