An HTTPS-based Transport for
Configured SubscriptionsVMwaremjethanandani@gmail.comWatsen NetworksUSAkent+ietf@watsen.netRouting
NETCONFhttpyangnotificationThis document defines a YANG data module for configuring HTTPS based
configured subscription, as defined in RFC 8639. The use of HTTPS
maximizes transport-level interoperability, while allowing for encoding
selection from text, e.g. XML or JSON, to binary.Subscription to YANG Notifications
defines a YANG data module for configuring subscribed notifications. It
defines a "subscriptions" container that contains a list of receivers,
but it defers the configuration and management of those receivers to
other documents. This document defines a YANG 1.1
data module for configuring and managing HTTPS based receivers
for the notifications. Configured subscriptions enable a server, acting
as a publisher of notifications, to proactively push notifications to
external receivers without the receivers needing to first connect to the
server, as is the case with dynamic subscriptions.This document describes how to enable the transmission of YANG
modeled notifications, in the configured encoding (i.e., XML, JSON) over
HTTPS. Notifications are delivered in the form of a HTTPS POST. The use
of HTTPS maximizes transport-level interoperability, while the encoding
selection pivots between implementation simplicity (XML, JSON) and
throughput (text versus binary).While the YANG module has been defined as an augmentation of Subscription to YANG Notifications, the
notification method defined in this document MAY be used outside of
Subscription to YANG Notifications by
using the grouping defined in the model.This document uses several placeholder values throughout the
document. Please replace them as follows and remove this section
before publication.RFC XXXX, where XXXX is the number assigned to this document at the
time of publication.2020-03-09 with the actual date of the publication of this
document.AcronymExpansionHTTPHyper Text Transport ProtocolHTTPSHyper Text Transport Protocol SecureTCPTransmission Control ProtocolTLSTransport Layer SecurityThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 when, and only
when, they appear in all capitals, as shown here.The following terms are defined in Subscription to YANG Notifications.Subscribed NotificationsTo learn the capabilities of the receiver, the publisher can issue
a HTTPS GET request with Accept-Type set to
application/ietf-https-notif-cap+xml or
application/ietf-https-notif-cap+json, with latter as the mandatory to
implement, and the default in case the type is not specified. If the
receiver supports capabilities such as binary encoding of data, it can
return that as a capability in a response. Please note that, when used
in conjunction with Subscription to YANG
Notifications, dynamic discovery of the receiver’s
supported encoding is considered only when the
"/subscriptions/subscription/encoding” leaf is not configured,
per the “encoding” leaf’s description statement.The publisher can send the following request to learn the receiver
capabilities. The Accept-Type states its preferred order for
Content-Type that it wants to receive starting with XML, and if not
supported, to use JSON encoding. Currently, there is only one
capability of binary encoding defined.In case the receiver supports the first Accept-Type, its response
should look like this:
]]>The YANG module is a definition of a set of receivers that are
interested in the notifications published by the publisher. The module
contains the TCP, TLS and HTTPS parameters that are needed to
communicate with the receiver. The module augments the Subscription to YANG Notifications receiver
container to create a reference to a receiver defined by the YANG
module. As mentioned earlier, it uses POST method to deliver the
notification. The attribute 'path' defines the absolute path for the
resource on the receiver, as defined by 'path-absolute' in URI Generic Syntax. The user-id used by Network Configuration Access Control Model, is
that of the receiver and is derived from the certificate presented by
the receiver.An abridged tree diagram representing the module is shown
below.The YANG module imports Common YANG Data
Types, A YANG Data Model for SNMP
Configuration, and Subscription to YANG
Notifications.The YANG module is shown below. file "ietf-https-notif@2020-03-09.yang"
module ietf-https-notif {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-https-notif";
prefix "hn";
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types.";
}
import ietf-subscribed-notifications {
prefix sn;
reference
"I-D.ietf-netconf-subscribed-notifications";
}
import ietf-x509-cert-to-name {
prefix x509c2n;
reference
"RFC 7407: A YANG Data Model for SNMP Configuration";
}
import ietf-tcp-client {
prefix tcpc;
}
import ietf-tls-client {
prefix tlsc;
}
import ietf-http-client {
prefix httpc;
}
organization
"IETF NETCONF Working Group";
contact
"WG Web:
WG List:
Authors: Mahesh Jethanandani (mjethanandani at gmail dot com)
Kent Watsen (kent plus ietf at watsen dot net)";
description
"YANG module for configuring HTTPS base configuration.
Copyright (c) 2018 IETF Trust and the persons identified as
the document authors. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simplified BSD
License set forth in Section 4.c of the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
they appear in all capitals, as shown here.";
revision "2020-03-09" {
description
"Initial Version.";
reference
"RFC XXXX, YANG Data Module for HTTPS Notifications.";
}
identity https {
base sn:transport;
description
"HTTPS transport for notifications.";
}
grouping https-receivers {
description
"Grouping for HTTPS based receivers such that it can be
implemented outside the constructs of a Subscription to YANG
Notification [RFC8639] module.";
container https-receivers {
description
"HTTPS based notifications.";
list https-receiver {
key "name";
leaf name {
type string;
description
"A name that uniquely identifies this receiver.";
}
container tcp-params {
uses tcpc:tcp-client-grouping;
description
"TCP client parameters.";
}
container tls-params {
uses tlsc:tls-client-grouping;
description
"TLS client parameters.";
}
container http-params {
description
"HTTP client parameters.";
uses httpc:http-client-grouping;
leaf path {
type inet:uri;
description
"The absolute path for the resource on the remote
HTTPS server. The absolute path as specified in
RFC 3986 as 'path-absolute'.";
reference
"RFC 3986: URI Generic Syntax.";
}
}
container receiver-identity {
description
"Specifies mechanism for identifying the receiver. The
publisher MUST NOT include any content in a notification
that the user is not authorized to view.";
container cert-maps {
uses x509c2n:cert-to-name;
description
"The cert-maps container is used by a TLS-based HTTP
server to map the HTTPS client's presented X.509
certificate to a 'local' username. If no matching and
valid cert-to-name list entry is found, the publisher
MUST close the connection, and MUST NOT
not send any notifications over it.";
reference
"RFC 7407: A YANG Data Model for SNMP Configuration.";
}
}
description
"All receivers interested in this notification.";
}
}
}
augment "/sn:subscriptions" {
description
"Augment the subscirbed notification module to add in the
receivers container.";
uses https-receivers;
}
augment "/sn:subscriptions/sn:subscription/sn:receivers/sn:receiver" {
leaf receiver-ref {
type leafref {
path "/sn:subscriptions/hn:https-receivers/hn:https-receiver/" +
"hn:name";
}
description
"Reference to a receiver.";
}
description
"Augment the subscriptions container to define the receiver.";
}
}
]]>The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such as
NETCONF or RESTCONF. The lowest NETCONF layer is the secure
transport layer, and the mandatory-to-implement secure transport is
Secure Shell (SSH). The lowest RESTCONF
layer is HTTPS, and the mandatory-to-implement secure transport is TLS. The NETCONF Access
Control Model (NACM) provides the means to restrict access for
particular NETCONF or RESTCONF users to a preconfigured subset of all
available NETCONF or RESTCONF protocol operations and content.There are a number of data nodes defined in this YANG module that are
writable/creatable/deletable (i.e., config true, which is the default).
These data nodes may be considered sensitive or vulnerable in some
network environments. Write operations (e.g., edit-config) to these data
nodes without proper protection can have a negative effect on network
operations. These are the subtrees and data nodes and their
sensitivity/vulnerability:Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data nodes
and their sensitivity/vulnerability:Some of the RPC operations in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control access to these operations. These are the
operations and their sensitivity/vulnerability:This document registers one URI, one YANG module and two Media
Types.in the IETF XML registry. Following
the format in RFC 3688, the following registration is requested to be
made: Registrant Contact: The IESG. XML: N/A, the requested URI is an XML
namespace.This document registers one YANG module in the YANG Module Names
registry YANG.This section tries to show some examples in how the model can be
used.This example shows how a HTTPS client can be configured to send
notifications to a receiver at address 192.0.2.1, port 443 with server
certificates, and the corresponding trust store that is used to
authenticate a connection.\
foomy-receiver.my-domain.com443explicitly-trusted-server-ca-certsexplicitly-trusted-server-certsmy-namemy-password/some/path111:0A:05:11:00x509c2n:san-any6666foosome-streammy-receiverfoo
explicitly-trusted-server-certs
Specific server authentication certificates for explicitly
trusted servers. These are needed for server certificates
that are not signed by a pinned CA.
Fred Flintstonebase64encodedvalue==explicitly-trusted-server-ca-certs
Trust anchors (i.e. CA certs) that are used to authenticate
server connections. Servers are authenticated if their
certificate has a chain of trust to one of these CA
certificates.
ca.example.combase64encodedvalue==
]]>In the case of "bundled-message" as defined in Notification Message
Headers and Bundles, something that this module supports, the
flow of messages would look something like this.
Establish TLS ------>
Send HTTPS POST message
with YANG defined ------>
notification #1
Send HTTPS POST message
with YANG defined ------>
notification #2
Send 204 (No Content)
notification #3
Send 204 (No Content)
The content of the exchange would look something like this.2019-03-22T12:35:00Z
...
2019-03-22T12:35:00Z
...
2019-03-22T12:35:01Z
...
Response:
HTTP/1.1 204 No Content
Date: Fri, 03 Mar 2019 12:35:00 GMT
Server: my-receiver.my-domain.com
HTTP/1.1 204 No Content
Date: Fri, 03 Mar 2019 12:35:00 GMT
Server: my-receiver.my-domain.com
HTTP/1.1 204 No Content
Date: Fri, 03 Mar 2019 12:35:01 GMT
Server: my-receiver.my-domain.com]]>