draft-ietf-netconf-restconf-client-server-11.txt   draft-ietf-netconf-restconf-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 April 7, 2019 Intended status: Standards Track April 29, 2019
Expires: October 9, 2019 Expires: October 31, 2019
RESTCONF Client and Server Models RESTCONF Client and Server Models
draft-ietf-netconf-restconf-client-server-11 draft-ietf-netconf-restconf-client-server-12
Abstract Abstract
This document defines two YANG modules, one module to configure a This document defines two YANG modules, one module to configure a
RESTCONF client and the other module to configure a RESTCONF server. RESTCONF client and the other module to configure a RESTCONF server.
Both modules support the TLS transport protocol with both standard Both modules support the TLS transport protocol with both standard
RESTCONF and RESTCONF Call Home connections. RESTCONF and RESTCONF Call Home connections.
Editorial Note (To be removed by RFC Editor) Editorial Note (To be removed by RFC Editor)
skipping to change at page 2, line 11 skipping to change at page 2, line 11
o "BBBB" --> the assigned RFC value for I-D.ietf-netconf-tls-client- o "BBBB" --> the assigned RFC value for I-D.ietf-netconf-tls-client-
server server
o "CCCC" --> the assigned RFC value for I-D.ietf-netconf-http- o "CCCC" --> the assigned RFC value for I-D.ietf-netconf-http-
client-server client-server
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 B. Change Log o Appendix B. 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 3, line 11 skipping to change at page 3, line 11
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
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
2. The RESTCONF Client Model . . . . . . . . . . . . . . . . . . 4 2. The RESTCONF Client Model . . . . . . . . . . . . . . . . . . 4
2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 4
2.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 5 2.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 6
2.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 9 2.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 9
3. The RESTCONF Server Model . . . . . . . . . . . . . . . . . . 17 3. The RESTCONF Server Model . . . . . . . . . . . . . . . . . . 18
3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 17 3.1. Tree Diagram . . . . . . . . . . . . . . . . . . . . . . 18
3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 18 3.2. Example Usage . . . . . . . . . . . . . . . . . . . . . . 20
3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 22 3.3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . 23
4. Security Considerations . . . . . . . . . . . . . . . . . . . 31 4. Security Considerations . . . . . . . . . . . . . . . . . . . 34
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35
5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 32 5.1. The IETF XML Registry . . . . . . . . . . . . . . . . . . 35
5.2. The YANG Module Names Registry . . . . . . . . . . . . . 33 5.2. The YANG Module Names Registry . . . . . . . . . . . . . 35
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.1. Normative References . . . . . . . . . . . . . . . . . . 33 6.1. Normative References . . . . . . . . . . . . . . . . . . 35
6.2. Informative References . . . . . . . . . . . . . . . . . 34 6.2. Informative References . . . . . . . . . . . . . . . . . 37
Appendix A. Expanded Tree Diagrams . . . . . . . . . . . . . . . 36 Appendix A. Expanded Tree Diagrams . . . . . . . . . . . . . . . 38
A.1. Expanded Tree Diagram for 'ietf-restconf-client' . . . . 36 A.1. Expanded Tree Diagram for 'ietf-restconf-client' . . . . 38
A.2. Expanded Tree Diagram for 'ietf-restconf-server' . . . . 45 A.2. Expanded Tree Diagram for 'ietf-restconf-server' . . . . 47
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 49 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 52
B.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 49 B.1. 00 to 01 . . . . . . . . . . . . . . . . . . . . . . . . 52
B.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 49 B.2. 01 to 02 . . . . . . . . . . . . . . . . . . . . . . . . 53
B.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 49 B.3. 02 to 03 . . . . . . . . . . . . . . . . . . . . . . . . 53
B.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 49 B.4. 03 to 04 . . . . . . . . . . . . . . . . . . . . . . . . 53
B.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 50 B.5. 04 to 05 . . . . . . . . . . . . . . . . . . . . . . . . 53
B.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 50 B.6. 05 to 06 . . . . . . . . . . . . . . . . . . . . . . . . 53
B.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 50 B.7. 06 to 07 . . . . . . . . . . . . . . . . . . . . . . . . 54
B.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 50 B.8. 07 to 08 . . . . . . . . . . . . . . . . . . . . . . . . 54
B.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 50 B.9. 08 to 09 . . . . . . . . . . . . . . . . . . . . . . . . 54
B.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 51 B.10. 09 to 10 . . . . . . . . . . . . . . . . . . . . . . . . 54
B.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 51 B.11. 10 to 11 . . . . . . . . . . . . . . . . . . . . . . . . 54
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 51 B.12. 11 to 12 . . . . . . . . . . . . . . . . . . . . . . . . 55
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 51 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 55
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 55
1. Introduction 1. Introduction
This document defines two YANG [RFC7950] modules, one module to This document defines two YANG [RFC7950] modules, one module to
configure a RESTCONF client and the other module to configure a configure a RESTCONF client and the other module to configure a
RESTCONF server [RFC8040]. Both modules support the TLS [RFC8446] RESTCONF server [RFC8040]. Both modules support the TLS [RFC8446]
transport protocol with both standard RESTCONF and RESTCONF Call Home transport protocol with both standard RESTCONF and RESTCONF Call Home
connections [RFC8071]. connections [RFC8071].
1.1. Terminology 1.1. Terminology
skipping to change at page 5, line 10 skipping to change at page 5, line 10
module. module.
Please see Appendix A.1 for a tree diagram that illustrates what the Please see Appendix A.1 for a tree diagram that illustrates what the
module looks like with all the "grouping" statements expanded. module looks like with all the "grouping" statements expanded.
module: ietf-restconf-client module: ietf-restconf-client
+--rw restconf-client +--rw restconf-client
+---u restconf-client-grouping +---u restconf-client-grouping
grouping restconf-client-grouping grouping restconf-client-grouping
+-- initiate! {initiate}? +-- initiate! {https-initiate}?
| +-- restconf-server* [name] | +-- restconf-server* [name]
| +-- name? string | +-- name? string
| +-- endpoints | +-- endpoints
| | +-- endpoint* [name] | | +-- endpoint* [name]
| | +-- name? string | | +-- name? string
| | +-- (transport) | | +-- (transport)
| | +--:(https) {https-initiate}? | | +--:(https) {https-initiate}?
| | +-- https | | +-- https
| | +---u restconf-client-grouping | | +-- tcp-client-parameters
| | | +---u restconf-client-grouping
| | +-- tls-client-parameters
| | | +---u restconf-client-grouping
| | +-- http-client-parameters
| | +---u restconf-client-grouping
| +-- connection-type | +-- connection-type
| | +-- (connection-type) | | +-- (connection-type)
| | +--:(persistent-connection) | | +--:(persistent-connection)
| | | +-- persistent! | | | +-- persistent!
| | +--:(periodic-connection) | | +--:(periodic-connection)
| | +-- periodic! | | +-- periodic!
| | +-- period? uint16 | | +-- period? uint16
| | +-- anchor-time? yang:date-and-time | | +-- anchor-time? yang:date-and-time
| | +-- idle-timeout? uint16 | | +-- idle-timeout? uint16
| +-- reconnect-strategy | +-- reconnect-strategy
| +-- start-with? enumeration | +-- start-with? enumeration
| +-- max-attempts? uint8 | +-- max-attempts? uint8
+-- listen! {listen}? +-- listen! {https-listen}?
+-- idle-timeout? uint16 +-- idle-timeout? uint16
+-- endpoint* [name] +-- endpoint* [name]
+-- name? string +-- name? string
+-- (transport) +-- (transport)
+--:(https) {https-listen}? +--:(https) {https-listen}?
+-- https +-- https
+---u restconf-client-grouping +-- tcp-server-parameters
| +---u restconf-client-grouping
+-- tls-client-parameters
| +---u restconf-client-grouping
+-- http-client-parameters
+---u restconf-client-grouping
2.2. Example Usage 2.2. Example Usage
The following example illustrates configuring a RESTCONF client to The following example illustrates configuring a RESTCONF client to
initiate connections, as well as listening for call-home connections. initiate connections, as well as listening for call-home connections.
This example is consistent with the examples presented in Section 2 This example is consistent with the examples presented in Section 2
of [I-D.ietf-netconf-trust-anchors] and Section 3.2 of of [I-D.ietf-netconf-trust-anchors] and Section 3.2 of
[I-D.ietf-netconf-keystore]. [I-D.ietf-netconf-keystore].
skipping to change at page 9, line 12 skipping to change at page 9, line 24
</listen> </listen>
</restconf-client> </restconf-client>
2.3. YANG Module 2.3. YANG Module
This YANG module has normative references to [RFC6991], [RFC8040], This YANG module has normative references to [RFC6991], [RFC8040],
and [RFC8071], [I-D.kwatsen-netconf-tcp-client-server], and [RFC8071], [I-D.kwatsen-netconf-tcp-client-server],
[I-D.ietf-netconf-tls-client-server], and [I-D.ietf-netconf-tls-client-server], and
[I-D.kwatsen-netconf-http-client-server]. [I-D.kwatsen-netconf-http-client-server].
<CODE BEGINS> file "ietf-restconf-client@2019-04-07.yang" <CODE BEGINS> file "ietf-restconf-client@2019-04-29.yang"
module ietf-restconf-client { module ietf-restconf-client {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-client"; namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-client";
prefix rcc; prefix rcc;
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
skipping to change at page 10, line 33 skipping to change at page 10, line 47
(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: RESTCONF Client and Server Models"; "RFC XXXX: RESTCONF Client and Server Models";
} }
// Features // Features
feature initiate {
description
"The 'initiate' feature indicates that the RESTCONF client
supports initiating RESTCONF connections to RESTCONF servers
using at least one transport (e.g., HTTPS, etc.).";
}
feature https-initiate { feature https-initiate {
if-feature "initiate";
description description
"The 'https-initiate' feature indicates that the RESTCONF "The 'https-initiate' feature indicates that the RESTCONF
client supports initiating HTTPS connections to RESTCONF client supports initiating HTTPS connections to RESTCONF
servers. This feature exists as HTTPS might not be a servers. This feature exists as HTTPS might not be a
mandatory to implement transport in the future."; mandatory to implement transport in the future.";
reference reference
"RFC 8040: RESTCONF Protocol"; "RFC 8040: RESTCONF Protocol";
} }
feature listen {
description
"The 'listen' feature indicates that the RESTCONF client
supports opening a port to accept RESTCONF server call
home connections using at least one transport (e.g.,
HTTPS, etc.).";
}
feature https-listen { feature https-listen {
if-feature "listen";
description description
"The 'https-listen' feature indicates that the RESTCONF client "The 'https-listen' feature indicates that the RESTCONF client
supports opening a port to listen for incoming RESTCONF supports opening a port to listen for incoming RESTCONF
server call-home connections. This feature exists as not server call-home connections. This feature exists as not
all RESTCONF clients may support RESTCONF call home."; all RESTCONF clients may support RESTCONF call home.";
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 8071: NETCONF Call Home and RESTCONF Call Home";
} }
// Groupings // Groupings
grouping restconf-client-grouping { grouping restconf-client-grouping {
description description
"Top-level grouping for RESTCONF client configuration."; "Top-level grouping for RESTCONF client configuration.";
container initiate { container initiate {
if-feature "initiate"; if-feature "https-initiate";
presence "Enables client to initiate TCP connections"; presence "Enables client to initiate TCP connections";
description description
"Configures client initiating underlying TCP connections."; "Configures client initiating underlying TCP connections.";
list restconf-server { list restconf-server {
key "name"; key "name";
min-elements 1; min-elements 1;
description description
"List of RESTCONF servers the RESTCONF client is to "List of RESTCONF servers the RESTCONF client is to
initiate connections to in parallel."; initiate connections to in parallel.";
leaf name { leaf name {
skipping to change at page 12, line 32 skipping to change at page 12, line 27
description description
"Selects between available transports. This is a "Selects between available transports. This is a
'choice' statement so as to support additional 'choice' statement so as to support additional
transport options to be augmented in."; transport options to be augmented in.";
case https { case https {
if-feature "https-initiate"; if-feature "https-initiate";
container https { container https {
description description
"Specifies HTTPS-specific transport "Specifies HTTPS-specific transport
configuration."; configuration.";
uses tcpc:tcp-client-grouping { container tcp-client-parameters {
refine "tcp-client-parameters/remote-port" { description
default "443"; "A wrapper around the TCP client parameters
description to avoid name collisions.";
"The RESTCONF client will attempt to uses tcpc:tcp-client-grouping {
connect to the IANA-assigned well-known refine "remote-port" {
port value for 'https' (443) if no value default "443";
is specified."; description
"The RESTCONF client will attempt to
connect to the IANA-assigned well-known
port value for 'https' (443) if no value
is specified.";
}
} }
} }
uses tlsc:tls-client-grouping { container tls-client-parameters {
refine "tls-client-parameters/client-identity" description
+ "/auth-type" { "A wrapper around the TLS client parameters
mandatory true; to avoid name collisions.";
description uses tlsc:tls-client-grouping {
"RESTCONF clients MUST pass some refine "client-identity/auth-type" {
authentication credentials."; mandatory true;
description
"RESTCONF clients MUST pass some
authentication credentials.";
}
} }
} }
uses httpc:http-client-grouping; container http-client-parameters {
description
"A wrapper around the HTTP client parameters
to avoid name collisions.";
uses httpc:http-client-grouping;
}
} }
} // https } // https
} // transport } // transport
} // endpoint } // endpoint
} // endpoints } // endpoints
container connection-type { container connection-type {
description description
"Indicates the RESTCONF client's preference for how "Indicates the RESTCONF client's preference for how
the RESTCONF connection is maintained."; the RESTCONF connection is maintained.";
choice connection-type { choice connection-type {
mandatory true; mandatory true;
description description
"Selects between available connection types."; "Selects between available connection types.";
case persistent-connection { case persistent-connection {
container persistent { container persistent {
presence "Indicates that a persistent connection presence "Indicates that a persistent connection
is to be maintained."; is to be maintained.";
description description
"Maintain a persistent connection to the "Maintain a persistent connection to the
RESTCONF server. If the connection goes down, RESTCONF server. If the connection goes down,
immediately start trying to reconnect to it, immediately start trying to reconnect to the
using the reconnection strategy. This RESTCONF server, using the reconnection strategy.
connection type minimizes any RESTCONF server
This connection type minimizes any RESTCONF server
to RESTCONF client data-transfer delay, albeit to RESTCONF client data-transfer delay, albeit
at the expense of holding resources longer."; at the expense of holding resources longer.";
} }
} }
case periodic-connection { case periodic-connection {
container periodic { container periodic {
must 'not (../../endpoints/endpoint/https/'
+ 'tcp-client-parameters/keepalives '
+ 'or ../../endpoints/endpoint/https/'
+ 'tls-client-parameters/keepalives)';
presence "Indicates that a periodic connection is presence "Indicates that a periodic connection is
to be maintained."; to be maintained.";
description description
"Periodically connect to the RESTCONF server. "Periodically connect to the RESTCONF server.
The RESTCONF server should close the
underlying TCP connection upon completing
planned activities.
This connection type increases resource This connection type increases resource
utilization, albeit with increased delay in utilization, albeit with increased delay
RESTCONF server to RESTCONF client in RESTCONF server to RESTCONF client
interactions."; interactions.
The RESTCONF client SHOULD gracefully close
the underlying TLS connection upon completing
planned activities.
In the case that the previous connection is
still active, establishing a new connection
is NOT RECOMMENDED.";
leaf period { leaf period {
type uint16; type uint16;
units "minutes"; units "minutes";
default "60"; default "60";
description description
"Duration of time between periodic "Duration of time between periodic
connections."; connections.";
} }
leaf anchor-time { leaf anchor-time {
type yang:date-and-time { type yang:date-and-time {
skipping to change at page 15, line 51 skipping to change at page 16, line 13
"Specifies the number times the RESTCONF client "Specifies the number times the RESTCONF client
tries to connect to a specific endpoint before tries to connect to a specific endpoint before
moving on to the next endpoint in the list moving on to the next endpoint in the list
(round robin)."; (round robin).";
} }
} // reconnect-strategy } // reconnect-strategy
} // restconf-server } // restconf-server
} // initiate } // initiate
container listen { container listen {
if-feature "listen"; if-feature "https-listen";
presence "Enables client to accept call-home connections"; presence "Enables client to accept call-home connections";
description description
"Configures client accepting call-home TCP connections."; "Configures client accepting call-home TCP connections.";
leaf idle-timeout { leaf idle-timeout {
type uint16; type uint16;
units "seconds"; units "seconds";
default 3600; // one hour default 3600; // one hour
description description
"Specifies the maximum number of seconds that an "Specifies the maximum number of seconds that an
underlying TCP session may remain idle. A TCP session underlying TCP session may remain idle. A TCP session
skipping to change at page 16, line 41 skipping to change at page 17, line 4
description description
"Selects between available transports. This is a "Selects between available transports. This is a
'choice' statement so as to support additional 'choice' statement so as to support additional
transport options to be augmented in."; transport options to be augmented in.";
case https { case https {
if-feature "https-listen"; if-feature "https-listen";
container https { container https {
description description
"HTTPS-specific listening configuration for inbound "HTTPS-specific listening configuration for inbound
connections."; connections.";
uses tcps:tcp-server-grouping {
refine "tcp-server-parameters/local-port" { container tcp-server-parameters {
default "4336"; description
description "A wrapper around the TCP client parameters
"The RESTCONF client will listen on the IANA- to avoid name collisions.";
assigned well-known port for 'restconf-ch-tls' uses tcps:tcp-server-grouping {
(4336) if no value is specified."; refine "local-port" {
default "4336";
description
"The RESTCONF client will listen on the IANA-
assigned well-known port for 'restconf-ch-tls'
(4336) if no value is specified.";
}
} }
} }
uses tlsc:tls-client-grouping { container tls-client-parameters {
refine description
"tls-client-parameters/client-identity/auth-type" { "A wrapper around the TLS client parameters
mandatory true; to avoid name collisions.";
description uses tlsc:tls-client-grouping {
"RESTCONF clients MUST pass some authentication refine "client-identity/auth-type" {
credentials."; mandatory true;
description
"RESTCONF clients MUST pass some authentication
credentials.";
}
} }
} }
uses httpc:http-client-grouping; container http-client-parameters {
description
"A wrapper around the HTTP client parameters
to avoid name collisions.";
uses httpc:http-client-grouping;
}
} }
} // case https } // case https
} // transport } // transport
} // endpoint } // endpoint
} // listen } // listen
} // restconf-client } // restconf-client
// Protocol accessible node, for servers that implement this // Protocol accessible node, for servers that implement this
// module. // module.
skipping to change at page 18, line 10 skipping to change at page 19, line 10
module. module.
Please see Appendix A.2 for a tree diagram that illustrates what the Please see Appendix A.2 for a tree diagram that illustrates what the
module looks like with all the "grouping" statements expanded. module looks like with all the "grouping" statements expanded.
module: ietf-restconf-server module: ietf-restconf-server
+--rw restconf-server +--rw restconf-server
+---u restconf-server-grouping +---u restconf-server-grouping
grouping restconf-server-grouping grouping restconf-server-grouping
+-- listen! {listen}? +-- listen! {https-listen}?
| +-- endpoint* [name] | +-- endpoint* [name]
| +-- name? string | +-- name? string
| +-- (transport) | +-- (transport)
| +--:(https) {https-listen}? | +--:(https) {https-listen}?
| +-- https | +-- https
| +---u restconf-server-grouping | +-- tcp-server-parameters
+-- call-home! {call-home}? | | +---u restconf-server-grouping
| +-- tls-server-parameters
| | +---u restconf-server-grouping
| +-- http-server-parameters
| +---u restconf-server-grouping
+-- call-home! {https-call-home}?
+-- restconf-client* [name] +-- restconf-client* [name]
+-- name? string +-- name? string
+-- endpoints +-- endpoints
| +-- endpoint* [name] | +-- endpoint* [name]
| +-- name? string | +-- name? string
| +-- (transport) | +-- (transport)
| +--:(https) {https-call-home}? | +--:(https) {https-call-home}?
| +-- https | +-- https
| +---u restconf-server-grouping | +-- tcp-client-parameters
| | +---u restconf-server-grouping
| +-- tls-server-parameters
| | +---u restconf-server-grouping
| +-- http-server-parameters
| +---u restconf-server-grouping
+-- connection-type +-- connection-type
| +-- (connection-type) | +-- (connection-type)
| +--:(persistent-connection) | +--:(persistent-connection)
| | +-- persistent! | | +-- persistent!
| +--:(periodic-connection) | +--:(periodic-connection)
| +-- periodic! | +-- periodic!
| +-- period? uint16 | +-- period? uint16
| +-- anchor-time? yang:date-and-time | +-- anchor-time? yang:date-and-time
| +-- idle-timeout? uint16 | +-- idle-timeout? uint16
+-- reconnect-strategy +-- reconnect-strategy
skipping to change at page 19, line 26 skipping to change at page 20, line 40
<server-identity> <server-identity>
<local-definition> <local-definition>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:ietf-\
crypto-types">ct:rsa2048</algorithm> crypto-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>
</server-identity> </server-identity>
<client-authentication> <client-authentication>
<required/>
<pinned-ca-certs>explicitly-trusted-client-ca-certs</pin\ <pinned-ca-certs>explicitly-trusted-client-ca-certs</pin\
ned-ca-certs> ned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs</pi\ <pinned-client-certs>explicitly-trusted-client-certs</pi\
nned-client-certs> nned-client-certs>
<cert-maps> <cert-maps>
<cert-to-name> <cert-to-name>
<id>1</id> <id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint> <fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type> <map-type>x509c2n:san-any</map-type>
</cert-to-name> </cert-to-name>
skipping to change at page 20, line 31 skipping to change at page 21, line 44
<server-identity> <server-identity>
<local-definition> <local-definition>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\
etf-crypto-types">ct:rsa2048</algorithm> etf-crypto-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>
</server-identity> </server-identity>
<client-authentication> <client-authentication>
<required/>
<pinned-ca-certs>explicitly-trusted-client-ca-certs<\ <pinned-ca-certs>explicitly-trusted-client-ca-certs<\
/pinned-ca-certs> /pinned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs\ <pinned-client-certs>explicitly-trusted-client-certs\
</pinned-client-certs> </pinned-client-certs>
<cert-maps> <cert-maps>
<cert-to-name> <cert-to-name>
<id>1</id> <id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint> <fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type> <map-type>x509c2n:san-any</map-type>
</cert-to-name> </cert-to-name>
skipping to change at page 21, line 27 skipping to change at page 22, line 42
<server-identity> <server-identity>
<local-definition> <local-definition>
<algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\ <algorithm xmlns:ct="urn:ietf:params:xml:ns:yang:i\
etf-crypto-types">ct:rsa2048</algorithm> etf-crypto-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>
</server-identity> </server-identity>
<client-authentication> <client-authentication>
<required/>
<pinned-ca-certs>explicitly-trusted-client-ca-certs<\ <pinned-ca-certs>explicitly-trusted-client-ca-certs<\
/pinned-ca-certs> /pinned-ca-certs>
<pinned-client-certs>explicitly-trusted-client-certs\ <pinned-client-certs>explicitly-trusted-client-certs\
</pinned-client-certs> </pinned-client-certs>
<cert-maps> <cert-maps>
<cert-to-name> <cert-to-name>
<id>1</id> <id>1</id>
<fingerprint>11:0A:05:11:00</fingerprint> <fingerprint>11:0A:05:11:00</fingerprint>
<map-type>x509c2n:san-any</map-type> <map-type>x509c2n:san-any</map-type>
</cert-to-name> </cert-to-name>
<cert-to-name> <cert-to-name>
<id>2</id> <id>2</id>
<fingerprint>B3:4F:A1:8C:54</fingerprint> <fingerprint>B3:4F:A1:8C:54</fingerprint>
<map-type>x509c2n:specified</map-type> <map-type>x509c2n:specified</map-type>
<name>scooby-doo</name> <name>scooby-doo</name>
</cert-to-name> </cert-to-name>
</cert-maps> </cert-maps>
</client-authentication> </client-authentication>
</tls-server-parameters> </tls-server-parameters>
skipping to change at page 22, line 30 skipping to change at page 23, line 46
</call-home> </call-home>
</restconf-server> </restconf-server>
3.3. YANG Module 3.3. YANG Module
This YANG module has normative references to [RFC6991], [RFC7407], This YANG module has normative references to [RFC6991], [RFC7407],
[RFC8040], [RFC8071], [I-D.kwatsen-netconf-tcp-client-server], [RFC8040], [RFC8071], [I-D.kwatsen-netconf-tcp-client-server],
[I-D.ietf-netconf-tls-client-server], and [I-D.ietf-netconf-tls-client-server], and
[I-D.kwatsen-netconf-http-client-server]. [I-D.kwatsen-netconf-http-client-server].
<CODE BEGINS> file "ietf-restconf-server@2019-04-07.yang" <CODE BEGINS> file "ietf-restconf-server@2019-04-29.yang"
module ietf-restconf-server { module ietf-restconf-server {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-server"; namespace "urn:ietf:params:xml:ns:yang:ietf-restconf-server";
prefix rcs; prefix rcs;
import ietf-yang-types { import ietf-yang-types {
prefix yang; prefix yang;
reference reference
"RFC 6991: Common YANG Data Types"; "RFC 6991: Common YANG Data Types";
} }
skipping to change at page 24, line 10 skipping to change at page 25, line 27
(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: RESTCONF Client and Server Models"; "RFC XXXX: RESTCONF Client and Server Models";
} }
// Features // Features
feature listen {
description
"The 'listen' feature indicates that the RESTCONF server
supports opening a port to accept RESTCONF client connections
using at least one transport (e.g., HTTPS, etc.).";
}
feature https-listen { feature https-listen {
if-feature "listen";
description description
"The 'https-listen' feature indicates that the RESTCONF server "The 'https-listen' feature indicates that the RESTCONF server
supports opening a port to listen for incoming RESTCONF supports opening a port to listen for incoming RESTCONF
client connections. This feature exists as HTTPS might not client connections. This feature exists as HTTPS might not
be a mandatory to implement transport in the future."; be a mandatory to implement transport in the future.";
reference reference
"RFC 8040: RESTCONF Protocol"; "RFC 8040: RESTCONF Protocol";
} }
feature call-home {
description
"The 'call-home' feature indicates that the RESTCONF
server supports initiating RESTCONF call home connections
to RESTCONF clients using at least one transport (e.g.,
HTTPS, etc.).";
reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home";
}
feature https-call-home { feature https-call-home {
if-feature "call-home";
description description
"The 'https-call-home' feature indicates that the RESTCONF "The 'https-call-home' feature indicates that the RESTCONF
server supports initiating connections to RESTCONF clients. server supports initiating connections to RESTCONF clients.
This feature exists as not all RESTCONF servers may This feature exists as not all RESTCONF servers may
support RESTCONF call home."; support RESTCONF call home.";
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 8071: NETCONF Call Home and RESTCONF Call Home";
} }
// Groupings // Groupings
grouping restconf-server-grouping { grouping restconf-server-grouping {
description description
"Top-level grouping for RESTCONF server configuration."; "Top-level grouping for RESTCONF server configuration.";
container listen { container listen {
skipping to change at page 25, line 17 skipping to change at page 26, line 15
reference reference
"RFC 8071: NETCONF Call Home and RESTCONF Call Home"; "RFC 8071: NETCONF Call Home and RESTCONF Call Home";
} }
// Groupings // Groupings
grouping restconf-server-grouping { grouping restconf-server-grouping {
description description
"Top-level grouping for RESTCONF server configuration."; "Top-level grouping for RESTCONF server configuration.";
container listen { container listen {
if-feature "listen"; if-feature "https-listen";
presence "Enables server to listen for TCP connections"; presence
"Enables the RESTCONF server to listen for RESTCONF
client connections.";
description "Configures listen behavior"; description "Configures listen behavior";
list endpoint { list endpoint {
key "name"; key "name";
min-elements 1; min-elements 1;
description description
"List of endpoints to listen for RESTCONF connections."; "List of endpoints to listen for RESTCONF connections.";
leaf name { leaf name {
type string; type string;
description description
"An arbitrary name for the RESTCONF listen endpoint."; "An arbitrary name for the RESTCONF listen endpoint.";
skipping to change at page 25, line 42 skipping to change at page 26, line 42
description description
"Selects between available transports. This is a "Selects between available transports. This is a
'choice' statement so as to support additional 'choice' statement so as to support additional
transport options to be augmented in."; transport options to be augmented in.";
case https { case https {
if-feature "https-listen"; if-feature "https-listen";
container https { container https {
description description
"HTTPS-specific listening configuration for inbound "HTTPS-specific listening configuration for inbound
connections."; connections.";
uses tcps:tcp-server-grouping { container tcp-server-parameters {
refine "tcp-server-parameters/local-port" { description
default "443"; "A wrapper around the TCP server parameters
description to avoid name collisions.";
"The RESTCONF server will listen on the IANA- uses tcps:tcp-server-grouping {
assigned well-known port value for 'https' refine "local-port" {
(443) if no value is specified."; default "443";
description
"The RESTCONF server will listen on the IANA-
assigned well-known port value for 'https'
(443) if no value is specified.";
}
} }
} }
uses tlss:tls-server-grouping { container tls-server-parameters {
refine description
"tls-server-parameters/client-authentication" { "A wrapper around the TLS server parameters
must 'pinned-ca-certs or pinned-client-certs'; to avoid name collisions.";
description uses tlss:tls-server-grouping {
"RESTCONF servers MUST be able to validate /*
clients."; refine
"client-authentication" {
//must 'pinned-ca-certs or pinned-client-certs';
//presence "Enables TLS-level authentication
// using client certificates.";
description
"RESTCONF servers MUST be able to validate
clients.";
}
*/
augment
"client-authentication/local-or-external/local" {
description
"Augments in the cert-to-name structure,
so the RESTCONF server can map TLS-layer
client certificates to RESTCONF usernames.";
container cert-maps {
/*must '../pinned-ca-certs
or ../pinned-client-certs'; */
uses x509c2n:cert-to-name;
description
"The cert-maps container is used by a TLS-
based RESTCONF server to map the RESTCONF
client's presented X.509 certificate to
a RESTCONF username. If no matching and
valid cert-to-name list entry can be found,
then the RESTCONF server MUST close the
connection, and MUST NOT accept RESTCONF
messages over it.";
reference
"RFC 7407: A YANG Data Model for SNMP
Configuration.";
}
//leaf optional {
// type empty;
//}
}
} }
augment }
"tls-server-parameters/client-authentication" { container http-server-parameters {
description description
"Augments in the cert-to-name structure, "A wrapper around the HTTP server parameters
so the RESTCONF server can map TLS-layer to avoid name collisions.";
client certificates to RESTCONF usernames."; uses https:http-server-grouping;
container cert-maps { /* {
uses x509c2n:cert-to-name; augment "http-server-parameters" { // HELP!!!
description description
"The cert-maps container is used by a TLS- "Augments in a flag indicating that the
based RESTCONF server to map the RESTCONF RESCONF server MUST authenticate the
client's presented X.509 certificate to RESTCONF client using the HTTP 'basic'
a RESTCONF username. If no matching and authentication scheme. How the RESTCONF
valid cert-to-name list entry can be found, server defines users and passwords is
then the RESTCONF server MUST close the outside the scope of this data model.";
connection, and MUST NOT accept RESTCONF container client-authentication {
messages over it."; leaf optional {
reference type empty;
"RFC 7407: A YANG Data Model for SNMP }
Configuration."; choice configured-or-external {
mandatory true;
case external {
leaf user-auth-defined-elsewhere {
type empty;
}
}
}
}
} }
} }
*/
} }
uses https:http-server-grouping;
} // https container } // https container
} // tls case } // tls case
} // transport } // transport
} // endpoint } // endpoint
} // listen } // listen
container call-home { container call-home {
if-feature "call-home"; if-feature "https-call-home";
presence "Enables server to initiate TCP connections"; presence
"Enables the RESTCONF server to initiate the underlying
transport connection to RESTCONF clients.";
description "Configures call-home behavior"; description "Configures call-home behavior";
list restconf-client { list restconf-client {
key "name"; key "name";
min-elements 1; min-elements 1;
description description
"List of RESTCONF clients the RESTCONF server is to "List of RESTCONF clients the RESTCONF server is to
initiate call-home connections to in parallel."; initiate call-home connections to in parallel.";
leaf name { leaf name {
type string; type string;
description description
skipping to change at page 27, line 35 skipping to change at page 29, line 38
description description
"Selects between available transports. This is a "Selects between available transports. This is a
'choice' statement so as to support additional 'choice' statement so as to support additional
transport options to be augmented in."; transport options to be augmented in.";
case https { case https {
if-feature "https-call-home"; if-feature "https-call-home";
container https { container https {
description description
"Specifies HTTPS-specific call-home transport "Specifies HTTPS-specific call-home transport
configuration."; configuration.";
uses tcpc:tcp-client-grouping { container tcp-client-parameters {
refine "tcp-client-parameters/remote-port" { description
default "4336"; "A wrapper around the TCP client parameters
description to avoid name collisions.";
"The RESTCONF server will attempt to connect uses tcpc:tcp-client-grouping {
to the IANA-assigned well-known port for refine "remote-port" {
'restconf-ch-tls' (4336) if no value is default "4336";
specified."; description
"The RESTCONF server will attempt to
connect to the IANA-assigned well-known
port for 'restconf-ch-tls' (4336) if no
value is specified.";
}
} }
}
uses tlss:tls-server-grouping {
refine
"tls-server-parameters/client-authentication" {
must 'pinned-ca-certs or pinned-client-certs';
description
"RESTCONF servers MUST be able to validate
clients.";
} }
augment container tls-server-parameters {
"tls-server-parameters/client-authentication" { description
description "A wrapper around the TLS server parameters
"Augments in the cert-to-name structure, to avoid name collisions.";
so the RESTCONF server can map TLS-layer uses tlss:tls-server-grouping {
client certificates to RESTCONF usernames."; refine "client-authentication" {
container cert-maps { /*must 'pinned-ca-certs
uses x509c2n:cert-to-name; or pinned-client-certs'; */
description description
"The cert-maps container is used by a "RESTCONF servers MUST be able to validate
TLS-based RESTCONF server to map the clients.";
RESTCONF client's presented X.509 }
certificate to a RESTCONF username. If augment "client-authentication" {
no matching and valid cert-to-name list description
entry can be found, then the RESTCONF "Augments in the cert-to-name structure,
server MUST close the connection, and so the RESTCONF server can map TLS-layer
MUST NOT accept RESTCONF messages over client certificates to RESTCONF
it."; usernames.";
reference container cert-maps {
"RFC 7407: A YANG Data Model for SNMP uses x509c2n:cert-to-name;
Configuration."; description
"The cert-maps container is used by a
TLS-based RESTCONF server to map the
RESTCONF client's presented X.509
certificate to a RESTCONF username. If
no matching and valid cert-to-name list
entry can be found, then the RESTCONF
server MUST close the connection, and
MUST NOT accept RESTCONF messages over
it.";
reference
"RFC 7407: A YANG Data Model for SNMP
Configuration.";
}
} }
} }
} }
uses https:http-server-grouping; container http-server-parameters {
description
"A wrapper around the HTTP server parameters
to avoid name collisions.";
uses https:http-server-grouping;
}
} }
} }
} // transport } // transport
} // endpoint } // endpoint
} // endpoints } // endpoints
container connection-type { container connection-type {
description description
"Indicates the RESTCONF server's preference for how the "Indicates the RESTCONF server's preference for how the
RESTCONF connection is maintained."; RESTCONF connection is maintained.";
choice connection-type { choice connection-type {
mandatory true; mandatory true;
description description
"Selects between available connection types."; "Selects between available connection types.";
case persistent-connection { case persistent-connection {
skipping to change at page 28, line 51 skipping to change at page 31, line 21
mandatory true; mandatory true;
description description
"Selects between available connection types."; "Selects between available connection types.";
case persistent-connection { case persistent-connection {
container persistent { container persistent {
presence "Indicates that a persistent connection is presence "Indicates that a persistent connection is
to be maintained."; to be maintained.";
description description
"Maintain a persistent connection to the RESTCONF "Maintain a persistent connection to the RESTCONF
client. If the connection goes down, immediately client. If the connection goes down, immediately
start trying to reconnect to it, using the start trying to reconnect to the RESTCONF server,
reconnection strategy. using the reconnection strategy.
This connection type minimizes any RESTCONF This connection type minimizes any RESTCONF
client to RESTCONF server data-transfer delay, client to RESTCONF server data-transfer delay,
albeit at the expense of holding resources albeit at the expense of holding resources
longer."; longer.";
} }
} }
case periodic-connection { case periodic-connection {
container periodic { container periodic {
must 'not (../../endpoints/endpoint/https/'
+ 'tcp-client-parameters/keepalives '
+ 'or ../../endpoints/endpoint/https/'
+ 'tls-server-parameters/keepalives)';
presence "Indicates that a periodic connection is presence "Indicates that a periodic connection is
to be maintained."; to be maintained.";
description description
"Periodically connect to the RESTCONF client. The "Periodically connect to the RESTCONF client.
RESTCONF client should close the underlying TCP
connection upon completing planned activities.
This connection type increases resource This connection type increases resource
utilization, albeit with increased delay in utilization, albeit with increased delay in
RESTCONF client to RESTCONF client interactions."; RESTCONF client to RESTCONF client interactions.
The RESTCONF client SHOULD gracefully close
the underlying TLS connection upon completing
planned activities. If the underlying TLS
connection is not closed gracefully, the
RESTCONF server MUST immediately attempt
to reestablish the connection.
In the case that the previous connection is
still active (i.e., the RESTCONF client has not
closed it yet), establishing a new connection
is NOT RECOMMENDED.";
leaf period { leaf period {
type uint16; type uint16;
units "minutes"; units "minutes";
default "60"; default "60";
description description
"Duration of time between periodic connections."; "Duration of time between periodic connections.";
} }
leaf anchor-time { leaf anchor-time {
type yang:date-and-time { type yang:date-and-time {
// constrained to minute-level granularity // constrained to minute-level granularity
skipping to change at page 33, line 33 skipping to change at page 36, line 8
6.1. Normative References 6.1. Normative References
[I-D.ietf-netconf-keystore] [I-D.ietf-netconf-keystore]
Watsen, K., "YANG Data Model for a Centralized Keystore Watsen, K., "YANG Data Model for a Centralized Keystore
Mechanism", draft-ietf-netconf-keystore-08 (work in Mechanism", draft-ietf-netconf-keystore-08 (work in
progress), March 2019. progress), March 2019.
[I-D.ietf-netconf-tls-client-server] [I-D.ietf-netconf-tls-client-server]
Watsen, K., Wu, G., and L. Xia, "YANG Groupings for TLS Watsen, K., Wu, G., and L. Xia, "YANG Groupings for TLS
Clients and TLS Servers", draft-ietf-netconf-tls-client- Clients and TLS Servers", draft-ietf-netconf-tls-client-
server-10 (work in progress), March 2019. server-11 (work in progress), April 2019.
[I-D.kwatsen-netconf-http-client-server] [I-D.kwatsen-netconf-http-client-server]
Watsen, K., "YANG Groupings for HTTP Clients and HTTP Watsen, K., "YANG Groupings for HTTP Clients and HTTP
Servers", draft-kwatsen-netconf-http-client-server-00 Servers", draft-kwatsen-netconf-http-client-server-01
(work in progress), March 2019. (work in progress), April 2019.
[I-D.kwatsen-netconf-tcp-client-server] [I-D.kwatsen-netconf-tcp-client-server]
Watsen, K., "YANG Groupings for TCP Clients and TCP Watsen, K., "YANG Groupings for TCP Clients and TCP
Servers", draft-kwatsen-netconf-tcp-client-server-00 (work Servers", draft-kwatsen-netconf-tcp-client-server-01 (work
in progress), March 2019. in progress), April 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 36, line 22 skipping to change at page 38, line 22
This tree diagram shows all the nodes defined in this module, This tree diagram shows all the nodes defined in this module,
including those defined by "grouping" statements used by this module. including those defined by "grouping" statements used by this module.
Please see Section 2.1 for a tree diagram that illustrates what the Please see Section 2.1 for a tree diagram that illustrates what the
module looks like without all the "grouping" statements expanded. module looks like without all the "grouping" statements expanded.
========== NOTE: '\\' line wrapping per BCP XX (RFC XXXX) =========== ========== NOTE: '\\' line wrapping per BCP XX (RFC XXXX) ===========
module: ietf-restconf-client module: ietf-restconf-client
+--rw restconf-client +--rw restconf-client
+--rw initiate! {initiate}? +--rw initiate! {https-initiate}?
| +--rw restconf-server* [name] | +--rw restconf-server* [name]
| +--rw name string | +--rw name string
| +--rw endpoints | +--rw endpoints
| | +--rw endpoint* [name] | | +--rw endpoint* [name]
| | +--rw name string | | +--rw name string
| | +--rw (transport) | | +--rw (transport)
| | +--:(https) {https-initiate}? | | +--:(https) {https-initiate}?
| | +--rw https | | +--rw https
| | +--rw tcp-client-parameters | | +--rw tcp-client-parameters
| | | +--rw remote-address inet:host | | | +--rw remote-address inet:host
| | | +--rw remote-port? inet:port-number | | | +--rw remote-port? inet:port-number
| | | +--rw local-address? inet:ip-address | | | +--rw local-address? inet:ip-address
| | | +--rw local-port? inet:port-number | | | +--rw local-port? inet:port-number
| | | +--rw keepalives! | | | +--rw keepalives!
| | | {tcp-client-keepalives}?
| | | +--rw idle-time uint16 | | | +--rw idle-time uint16
| | | +--rw max-probes? uint16 | | | +--rw max-probes uint16
| | | +--rw probe-interval? uint16 | | | +--rw probe-interval uint16
| | +--rw tls-client-parameters | | +--rw tls-client-parameters
| | | +--rw client-identity | | | +--rw client-identity
| | | | +--rw (auth-type) | | | | +--rw (auth-type)
| | | | +--:(certificate) | | | | +--:(certificate)
| | | | +--rw certificate | | | | +--rw certificate
| | | | +--rw (local-or-keystore) | | | | +--rw (local-or-keystore)
| | | | +--:(local) | | | | +--:(local)
| | | | | {local-keys-sup\ | | | | | {local-keys-sup\
\ported}? \ported}?
| | | | | +--rw local-definition | | | | | +--rw local-definition
skipping to change at page 39, line 11 skipping to change at page 41, line 10
| | +--rw proxy-server! {proxy-connect}? | | +--rw proxy-server! {proxy-connect}?
| | +--rw tcp-client-parameters | | +--rw tcp-client-parameters
| | | +--rw remote-address inet:host | | | +--rw remote-address inet:host
| | | +--rw remote-port? | | | +--rw remote-port?
| | | | inet:port-number | | | | inet:port-number
| | | +--rw local-address? | | | +--rw local-address?
| | | | inet:ip-address | | | | inet:ip-address
| | | +--rw local-port? | | | +--rw local-port?
| | | | inet:port-number | | | | inet:port-number
| | | +--rw keepalives! | | | +--rw keepalives!
| | | {tcp-client-keepalives}?
| | | +--rw idle-time uint16 | | | +--rw idle-time uint16
| | | +--rw max-probes? uint16 | | | +--rw max-probes uint16
| | | +--rw probe-interval? uint16 | | | +--rw probe-interval uint16
| | +--rw tls-client-parameters | | +--rw tls-client-parameters
| | | +--rw client-identity | | | +--rw client-identity
| | | | +--rw (auth-type)? | | | | +--rw (auth-type)?
| | | | +--:(certificate) | | | | +--:(certificate)
| | | | +--rw certificate | | | | +--rw certificate
| | | | +--rw (local-or-keyst\ | | | | +--rw (local-or-keyst\
\ore) \ore)
| | | | +--:(local) | | | | +--:(local)
| | | | | {local-ke\ | | | | | {local-ke\
\ys-supported}? \ys-supported}?
skipping to change at page 41, line 19 skipping to change at page 43, line 17
| | +--:(persistent-connection) | | +--:(persistent-connection)
| | | +--rw persistent! | | | +--rw persistent!
| | +--:(periodic-connection) | | +--:(periodic-connection)
| | +--rw periodic! | | +--rw periodic!
| | +--rw period? uint16 | | +--rw period? uint16
| | +--rw anchor-time? yang:date-and-time | | +--rw anchor-time? yang:date-and-time
| | +--rw idle-timeout? uint16 | | +--rw idle-timeout? uint16
| +--rw reconnect-strategy | +--rw reconnect-strategy
| +--rw start-with? enumeration | +--rw start-with? enumeration
| +--rw max-attempts? uint8 | +--rw max-attempts? uint8
+--rw listen! {listen}? +--rw listen! {https-listen}?
+--rw idle-timeout? uint16 +--rw idle-timeout? uint16
+--rw endpoint* [name] +--rw endpoint* [name]
+--rw name string +--rw name string
+--rw (transport) +--rw (transport)
+--:(https) {https-listen}? +--:(https) {https-listen}?
+--rw https +--rw https
+--rw tcp-server-parameters +--rw tcp-server-parameters
| +--rw local-address inet:ip-address | +--rw local-address inet:ip-address
| +--rw local-port? inet:port-number | +--rw local-port? inet:port-number
| +--rw keepalives! {tcp-server-keepalives}? | +--rw keepalives!
| +--rw idle-time uint16 | +--rw idle-time uint16
| +--rw max-probes? uint16 | +--rw max-probes uint16
| +--rw probe-interval? uint16 | +--rw probe-interval uint16
+--rw tls-client-parameters +--rw tls-client-parameters
| +--rw client-identity | +--rw client-identity
| | +--rw (auth-type) | | +--rw (auth-type)
| | +--:(certificate) | | +--:(certificate)
| | +--rw certificate | | +--rw certificate
| | +--rw (local-or-keystore) | | +--rw (local-or-keystore)
| | +--:(local) | | +--:(local)
| | | {local-keys-supported\ | | | {local-keys-supported\
\}? \}?
| | | +--rw local-definition | | | +--rw local-definition
skipping to change at page 43, line 34 skipping to change at page 45, line 32
| | {scram-sha-256-auth}? | | {scram-sha-256-auth}?
| +--:(vapid) | +--:(vapid)
| +--rw vapid {vapid-auth}? | +--rw vapid {vapid-auth}?
+--rw proxy-server! {proxy-connect}? +--rw proxy-server! {proxy-connect}?
+--rw tcp-client-parameters +--rw tcp-client-parameters
| +--rw remote-address inet:host | +--rw remote-address inet:host
| +--rw remote-port? inet:port-number | +--rw remote-port? inet:port-number
| +--rw local-address? inet:ip-address | +--rw local-address? inet:ip-address
| +--rw local-port? inet:port-number | +--rw local-port? inet:port-number
| +--rw keepalives! | +--rw keepalives!
| {tcp-client-keepalives}?
| +--rw idle-time uint16 | +--rw idle-time uint16
| +--rw max-probes? uint16 | +--rw max-probes uint16
| +--rw probe-interval? uint16 | +--rw probe-interval uint16
+--rw tls-client-parameters +--rw tls-client-parameters
| +--rw client-identity | +--rw client-identity
| | +--rw (auth-type)? | | +--rw (auth-type)?
| | +--:(certificate) | | +--:(certificate)
| | +--rw certificate | | +--rw certificate
| | +--rw (local-or-keystore) | | +--rw (local-or-keystore)
| | +--:(local) | | +--:(local)
| | | {local-keys-sup\ | | | {local-keys-sup\
\ported}? \ported}?
| | | +--rw local-definition | | | +--rw local-definition
skipping to change at page 45, line 34 skipping to change at page 47, line 31
This tree diagram shows all the nodes defined in this module, This tree diagram shows all the nodes defined in this module,
including those defined by "grouping" statements used by this module. including those defined by "grouping" statements used by this module.
Please see Section 3.1 for a tree diagram that illustrates what the Please see Section 3.1 for a tree diagram that illustrates what the
module looks like without all the "grouping" statements expanded. module looks like without all the "grouping" statements expanded.
=========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) =========== =========== NOTE: '\' line wrapping per BCP XX (RFC XXXX) ===========
module: ietf-restconf-server module: ietf-restconf-server
+--rw restconf-server +--rw restconf-server
+--rw listen! {listen}? +--rw listen! {https-listen}?
| +--rw endpoint* [name] | +--rw endpoint* [name]
| +--rw name string | +--rw name string
| +--rw (transport) | +--rw (transport)
| +--:(https) {https-listen}? | +--:(https) {https-listen}?
| +--rw https | +--rw https
| +--rw tcp-server-parameters | +--rw tcp-server-parameters
| | +--rw local-address inet:ip-address | | +--rw local-address inet:ip-address
| | +--rw local-port? inet:port-number | | +--rw local-port? inet:port-number
| | +--rw keepalives! {tcp-server-keepalives}? | | +--rw keepalives!
| | +--rw idle-time uint16 | | +--rw idle-time uint16
| | +--rw max-probes? uint16 | | +--rw max-probes uint16
| | +--rw probe-interval? uint16 | | +--rw probe-interval uint16
| +--rw tls-server-parameters | +--rw tls-server-parameters
| | +--rw server-identity | | +--rw server-identity
| | | +--rw (local-or-keystore) | | | +--rw (local-or-keystore)
| | | +--:(local) {local-keys-supported}? | | | +--:(local) {local-keys-supported}?
| | | | +--rw local-definition | | | | +--rw local-definition
| | | | +--rw algorithm? | | | | +--rw algorithm?
| | | | | asymmetric-key-algorithm-\ | | | | | asymmetric-key-algorithm-\
ref ref
| | | | +--rw public-key? | | | | +--rw public-key?
| | | | | binary | | | | | binary
skipping to change at page 46, line 32 skipping to change at page 48, line 29
| | | | | +---w private-key? binary | | | | | +---w private-key? binary
| | | | +--rw cert? | | | | +--rw cert?
| | | | | end-entity-cert-cms | | | | | end-entity-cert-cms
| | | | +---n certificate-expiration | | | | +---n certificate-expiration
| | | | +-- expiration-date | | | | +-- expiration-date
| | | | yang:date-and-time | | | | yang:date-and-time
| | | +--:(keystore) {keystore-supported}? | | | +--:(keystore) {keystore-supported}?
| | | +--rw keystore-reference? | | | +--rw keystore-reference?
| | | ks:asymmetric-key-certificat\ | | | ks:asymmetric-key-certificat\
e-ref e-ref
| | +--rw client-authentication | | +--rw client-authentication!
| | | +--rw pinned-ca-certs? | | | +--rw (required-or-optional)
| | | | ta:pinned-certificates-ref | | | | +--:(required)
| | | | {ta:x509-certificates}? | | | | | +--rw required?
| | | +--rw pinned-client-certs? | | | | | empty
| | | | ta:pinned-certificates-ref | | | | +--:(optional)
| | | | {ta:x509-certificates}? | | | | +--rw optional?
| | | +--rw cert-maps | | | | empty
| | | +--rw cert-to-name* [id] | | | +--rw (local-or-external)
| | | +--rw id uint32 | | | +--:(local)
| | | +--rw fingerprint | | | | {local-client-auth-supported}?
| | | | x509c2n:tls-fingerprint | | | | +--rw pinned-ca-certs?
| | | +--rw map-type identityref | | | | | ta:pinned-certificates-ref
| | | +--rw name string | | | | | {ta:x509-certificates}?
| | | | +--rw pinned-client-certs?
| | | | | ta:pinned-certificates-ref
| | | | | {ta:x509-certificates}?
| | | | +--rw cert-maps
| | | | +--rw cert-to-name* [id]
| | | | +--rw id uint32
| | | | +--rw fingerprint
| | | | | x509c2n:tls-fingerprint
| | | | +--rw map-type
| | | | | identityref
| | | | +--rw name string
| | | +--:(external)
| | | {external-client-auth-supporte\
d}?
| | | +--rw client-auth-defined-elsewhere?
| | | empty
| | +--rw hello-params | | +--rw hello-params
| | | {tls-server-hello-params-config}? | | | {tls-server-hello-params-config}?
| | | +--rw tls-versions | | | +--rw tls-versions
| | | | +--rw tls-version* identityref | | | | +--rw tls-version* identityref
| | | +--rw cipher-suites | | | +--rw cipher-suites
| | | +--rw cipher-suite* identityref | | | +--rw cipher-suite* identityref
| | +--rw keepalives! {tls-server-keepalives}? | | +--rw keepalives! {tls-server-keepalives}?
| | +--rw max-wait? uint16 | | +--rw max-wait? uint16
| | +--rw max-attempts? uint8 | | +--rw max-attempts? uint8
| +--rw http-server-parameters | +--rw http-server-parameters
| +--rw server-name? string | +--rw server-name? string
| +--rw protocol-versions | +--rw protocol-versions
| +--rw protocol-version* enumeration | | +--rw protocol-version* enumeration
+--rw call-home! {call-home}? | +--rw client-authentication!
| +--rw (required-or-optional)
| | +--:(required)
| | | +--rw required?
| | | empty
| | +--:(optional)
| | +--rw optional?
| | empty
| +--rw (local-or-external)
| +--:(local)
| | {local-client-auth-supported}?
| | +--rw users
| | +--rw user* [name]
| | +--rw name string
| | +--rw password?
| | ianach:crypt-hash
| +--:(external)
| {external-client-auth-supporte\
d}?
| +--rw client-auth-defined-elsewhere?
| empty
+--rw call-home! {https-call-home}?
+--rw restconf-client* [name] +--rw restconf-client* [name]
+--rw name string +--rw name string
+--rw endpoints +--rw endpoints
| +--rw endpoint* [name] | +--rw endpoint* [name]
| +--rw name string | +--rw name string
| +--rw (transport) | +--rw (transport)
| +--:(https) {https-call-home}? | +--:(https) {https-call-home}?
| +--rw https | +--rw https
| +--rw tcp-client-parameters | +--rw tcp-client-parameters
| | +--rw remote-address inet:host | | +--rw remote-address inet:host
| | +--rw remote-port? inet:port-number | | +--rw remote-port? inet:port-number
| | +--rw local-address? inet:ip-address | | +--rw local-address? inet:ip-address
| | +--rw local-port? inet:port-number | | +--rw local-port? inet:port-number
| | +--rw keepalives! | | +--rw keepalives!
| | {tcp-client-keepalives}?
| | +--rw idle-time uint16 | | +--rw idle-time uint16
| | +--rw max-probes? uint16 | | +--rw max-probes uint16
| | +--rw probe-interval? uint16 | | +--rw probe-interval uint16
| +--rw tls-server-parameters | +--rw tls-server-parameters
| | +--rw server-identity | | +--rw server-identity
| | | +--rw (local-or-keystore) | | | +--rw (local-or-keystore)
| | | +--:(local) | | | +--:(local)
| | | | {local-keys-supported}? | | | | {local-keys-supported}?
| | | | +--rw local-definition | | | | +--rw local-definition
| | | | +--rw algorithm? | | | | +--rw algorithm?
| | | | | asymmetric-key-algo\ | | | | | asymmetric-key-algo\
rithm-ref rithm-ref
| | | | +--rw public-key? | | | | +--rw public-key?
skipping to change at page 48, line 20 skipping to change at page 51, line 4
| | | | +--rw cert? | | | | +--rw cert?
| | | | | end-entity-cert-cms | | | | | end-entity-cert-cms
| | | | +---n certificate-expiration | | | | +---n certificate-expiration
| | | | +-- expiration-date | | | | +-- expiration-date
| | | | yang:date-and-ti\ | | | | yang:date-and-ti\
me me
| | | +--:(keystore) | | | +--:(keystore)
| | | {keystore-supported}? | | | {keystore-supported}?
| | | +--rw keystore-reference? | | | +--rw keystore-reference?
| | | ks:asymmetric-key-cert\ | | | ks:asymmetric-key-cert\
ificate-ref ificate-ref
| | +--rw client-authentication | | +--rw client-authentication!
| | | +--rw pinned-ca-certs? | | | +--rw (required-or-optional)
| | | | ta:pinned-certificates-ref | | | | +--:(required)
| | | | {ta:x509-certificates}? | | | | | +--rw required?
| | | +--rw pinned-client-certs? | | | | | empty
| | | | ta:pinned-certificates-ref | | | | +--:(optional)
| | | | {ta:x509-certificates}? | | | | +--rw optional?
| | | | empty
| | | +--rw (local-or-external)
| | | | +--:(local)
| | | | | {local-client-auth-suppo\
rted}?
| | | | | +--rw pinned-ca-certs?
| | | | | | ta:pinned-certificates\
-ref
| | | | | | {ta:x509-certificates}?
| | | | | +--rw pinned-client-certs?
| | | | | ta:pinned-certificates\
-ref
| | | | | {ta:x509-certificates}?
| | | | +--:(external)
| | | | {external-client-auth-su\
pported}?
| | | | +--rw client-auth-defined-else\
where?
| | | | empty
| | | +--rw cert-maps | | | +--rw cert-maps
| | | +--rw cert-to-name* [id] | | | +--rw cert-to-name* [id]
| | | +--rw id uint32 | | | +--rw id uint32
| | | +--rw fingerprint | | | +--rw fingerprint
| | | | x509c2n:tls-fingerprint | | | | x509c2n:tls-fingerprint
| | | +--rw map-type | | | +--rw map-type
| | | | identityref | | | | identityref
| | | +--rw name string | | | +--rw name string
| | +--rw hello-params | | +--rw hello-params
| | | {tls-server-hello-params-config\ | | | {tls-server-hello-params-config\
}? }?
| | | +--rw tls-versions | | | +--rw tls-versions
| | | | +--rw tls-version* identityref | | | | +--rw tls-version* identityref
| | | +--rw cipher-suites | | | +--rw cipher-suites
| | | +--rw cipher-suite* identityref | | | +--rw cipher-suite* identityref
| | +--rw keepalives! | | +--rw keepalives!
| | {tls-server-keepalives}? | | {tls-server-keepalives}?
| | +--rw max-wait? uint16 | | +--rw max-wait? uint16
| | +--rw max-attempts? uint8 | | +--rw max-attempts? uint8
| +--rw http-server-parameters | +--rw http-server-parameters
| +--rw server-name? string | +--rw server-name? string
| +--rw protocol-versions | +--rw protocol-versions
| +--rw protocol-version* enumeration | | +--rw protocol-version* enumeration
| +--rw client-authentication!
| +--rw (required-or-optional)
| | +--:(required)
| | | +--rw required?
| | | empty
| | +--:(optional)
| | +--rw optional?
| | empty
| +--rw (local-or-external)
| +--:(local)
| | {local-client-auth-suppo\
rted}?
| | +--rw users
| | +--rw user* [name]
| | +--rw name string
| | +--rw password?
| | ianach:crypt-hash
| +--:(external)
| {external-client-auth-su\
pported}?
| +--rw client-auth-defined-else\
where?
| empty
+--rw connection-type +--rw connection-type
| +--rw (connection-type) | +--rw (connection-type)
| +--:(persistent-connection) | +--:(persistent-connection)
| | +--rw persistent! | | +--rw persistent!
| +--:(periodic-connection) | +--:(periodic-connection)
| +--rw periodic! | +--rw periodic!
| +--rw period? uint16 | +--rw period? uint16
| +--rw anchor-time? yang:date-and-time | +--rw anchor-time? yang:date-and-time
| +--rw idle-timeout? uint16 | +--rw idle-timeout? uint16
+--rw reconnect-strategy +--rw reconnect-strategy
skipping to change at page 51, line 22 skipping to change at page 55, line 5
imported from other modules. imported from other modules.
o Added "must" expressions to ensure that keepalives are not o Added "must" expressions to ensure that keepalives are not
configured for "periodic" connections. configured for "periodic" connections.
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.
o Moved "expanded" tree diagrams to the Appendix. o Moved "expanded" tree diagrams to the Appendix.
B.12. 11 to 12
o Removed the 'must' statement limiting keepalives in periodic
connections.
o Updated models and examples to reflect removal of the "demux"
containers in the imported models.
o Updated the "periodic-connnection" description statements to
better describe behavior when connections are not closed
gracefully.
o Updated text to better reference where certain examples come from
(e.g., which Section in which draft).
o In the server model, commented out the "must 'pinned-ca-certs or
pinned-client-certs'" statement to reflect change made in the TLS
draft whereby the trust anchors MAY be defined externally.
o Replaced the 'listen', 'initiate', and 'call-home' features with
boolean expressions.
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, Ramkumar Dhanapal, Mehmet Ersue, Balazs Bjorklund, Benoit Claise, Ramkumar Dhanapal, Mehmet Ersue, Balazs
Kovacs, David Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci, Kovacs, David Lamparter, Alan Luchuk, Ladislav Lhotka, Radek Krejci,
Tom Petch, Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert Tom Petch, Juergen Schoenwaelder, Phil Shafer, Sean Turner, and Bert
Wijnen. Wijnen.
Author's Address Author's Address
 End of changes. 88 change blocks. 
269 lines changed or deleted 464 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/