draft-ietf-netconf-restconf-notif-01.txt   draft-ietf-netconf-restconf-notif-02.txt 
NETCONF E. Voit NETCONF E. Voit
Internet-Draft A. Clemm Internet-Draft A. Gonzalez Prieto
Intended status: Standards Track A. Gonzalez Prieto Intended status: Standards Track A. Tripathy
Expires: April 2, 2017 A. Tripathy Expires: September 14, 2017 E. Nilsen-Nygaard
E. Nilsen-Nygaard
Cisco Systems Cisco Systems
A. Clemm
Huawei
A. Bierman A. Bierman
YumaWorks YumaWorks
September 29, 2016 March 13, 2017
Restconf and HTTP Transport for Event Notifications Restconf and HTTP Transport for Event Notifications
draft-ietf-netconf-restconf-notif-01 draft-ietf-netconf-restconf-notif-02
Abstract Abstract
This document defines Restconf, HTTP2, and HTTP1.1 bindings for the This document defines Restconf, HTTP2, and HTTP1.1 bindings for the
transport Subscription requests and corresponding push updates. transport of Subscription requests and corresponding push updates.
Being subscribed may be both Event Notifications and YANG Datastores. Being subscribed may be either Event Notifications or objects or
subtress of YANG Datastores.
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 http://datatracker.ietf.org/drafts/current/. Drafts is at http://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 April 2, 2017. This Internet-Draft will expire on September 14, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 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
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.1. Mechanisms for Subscription Establishment and Maintenance 4 3.1. Dynamic YANG Subscription with RESTCONF control . . . . . 3
3.2. Dynamic YANG Subscription with RESTCONF control . . . . . 5 3.2. Subscription Multiplexing . . . . . . . . . . . . . . . . 6
3.3. Subscription Multiplexing . . . . . . . . . . . . . . . . 8 4. Encoded Subscription and Event Notification Examples . . . . 7
3.4. Encoded Subscription and Event Notification Examples . . 9 4.1. Restconf Subscription and Events over HTTP1.1 . . . . . . 7
3.5. Stream Discovery . . . . . . . . . . . . . . . . . . . . 14 4.2. Event Notification over HTTP2 . . . . . . . . . . . . . . 12
4. Security Considerations . . . . . . . . . . . . . . . . . . . 14 5. Security Considerations . . . . . . . . . . . . . . . . . . . 12
5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1. Normative References . . . . . . . . . . . . . . . . . . 15 7.1. Normative References . . . . . . . . . . . . . . . . . . 13
6.2. Informative References . . . . . . . . . . . . . . . . . 16 7.2. Informative References . . . . . . . . . . . . . . . . . 14
Appendix A. Proxy YANG Subscription when the Subscriber and Appendix A. End-to-End Deployment Guidance . . . . . . . . . . . 14
Receiver are different . . . . . . . . . . . . . . . 17 A.1. Call Home . . . . . . . . . . . . . . . . . . . . . . . . 14
Appendix B. End-to-End Deployment Guidance . . . . . . . . . . . 17 A.2. TLS Heartbeat . . . . . . . . . . . . . . . . . . . . . . 15
B.1. Call Home . . . . . . . . . . . . . . . . . . . . . . . . 17 Appendix B. Issues being worked and resolved . . . . . . . . . . 15
B.2. TLS Heartbeat . . . . . . . . . . . . . . . . . . . . . . 18 B.1. Unresolved Issues . . . . . . . . . . . . . . . . . . . . 15
Appendix C. Issues being worked and resolved . . . . . . . . . . 18 Appendix C. Changes between revisions . . . . . . . . . . . . . 15
C.1. Unresolved Issues . . . . . . . . . . . . . . . . . . . . 18 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 16
C.2. Agreement in principal . . . . . . . . . . . . . . . . . 18
C.3. Resolved Issues . . . . . . . . . . . . . . . . . . . . . 18
Appendix D. Changes between revisions . . . . . . . . . . . . . 19
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction 1. Introduction
Mechanisms to support Event subscription and push are defined in Mechanisms to support Event subscription and push are defined in
[rfc5277bis]. Enhancements to [rfc5277bis] which enable YANG [sn]. Enhancements to [sn] which enable YANG Datastore subscription
Datastore subscription and push are defined in [yang-push]. This and push are defined in [yang-push]. This document provides a
document provides a transport specification for these protocols over transport specification for these protocols over Restconf and HTTP.
Restconf and HTTP. Driving these requirements is [RFC7923]. Driving these requirements is [RFC7923].
The streaming of Subscription Event Notifications has synergies with The streaming of Subscription Event Notifications has synergies with
HTTP2 streams. Benefits which can be realized when transporting HTTP2 streams. Benefits which can be realized when transporting
events directly HTTP2 [RFC7540] include: events directly HTTP2 [RFC7540] include:
o Elimination of head-of-line blocking o Elimination of head-of-line blocking
o Weighting and proportional dequeuing of Events from different o Weighting and proportional dequeuing of Events from different
subscriptions subscriptions
o Explicit precedence in subscriptions so that events from one o Explicit precedence in subscriptions so that events from one
subscription must be sent before another dequeues subscription must be sent before another dequeues
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Configured Subscription: a Subscription installed via a configuration The following terms use the defintions from [sn]: Configured
interface which persists across reboots. Subscription, Dynamic Subscription, Event Notification, Publisher,
Receiver, Subscriber, Subscription.
Dynamic Subscription: a Subscription negotiated between Subscriber
and Publisher via create, establish, modify, and delete RPC signaling
messages.
Event: an occurrence of something that may be of interest. (e.g., a
configuration change, a fault, a change in status, crossing a
threshold, status of a flow, or an external input to the system.)
Event Notification: a set of information intended for a Receiver
indicating that one or more Event(s) have occurred. Details of the
Event(s) may be included within.
Event Stream: a continuous, ordered set of Events grouped under an
explicit criteria.
Notification: the communication of an occurrence, perhaps triggered
by the occurrence of an Event.
Publisher: an entity responsible for streaming Event Notifications
per the terms of a Subscription.
Receiver: a target to which a Publisher pushes Event Notifications.
For Dynamic Subscriptions, the Receiver and Subscriber will often be
the same entity.
Subscriber: an entity able to request and negotiate a contract for
the receipt of Event Notifications from a Publisher
Subscription: a contract between a Subscriber and a Publisher
stipulating which information the Receiver wishes to have pushed from
the Publisher without the need for further solicitation.
3. Solution 3. Solution
Event subscription is defined in [rfc5277bis], YANG Datastore Event subscription is defined in [sn], YANG Datastore subscription is
subscription is defined in [yang-push]. This section specifies defined in [yang-push]. This section specifies transport mechanisms
transport mechanisms applicable to both. applicable to both.
3.1. Mechanisms for Subscription Establishment and Maintenance
There are three models for Subscription establishment and
maintenance:
1. Dynamic Subscription: Here the Subscriber and Receiver are the
same. A Subscription ends with a subscription-terminated
notification, or by a loss of transport connectivity.
2. Configured Subscription: Receiver(s) are specified on Publisher
in startup and running config. Subscription is not terminated
except via an operations interface. (Subscriptions may be
Suspended, with no Event Notifications sent however.)
3. Proxy Subscription: Subscriber and Receiver are different.
Subscription ends when a Subscription End-time is reached, or the
Publisher process is restarted. A key difference between this
and configured subscriptions (#2) is that configuration requests
are made to RPCs which might evaluate run-time conditions much
like in (#1). Typically direct configuration via (#2) will not
go through the same sort of capacity and validation checks seen
in (#1).
The first two models are described in this section. The third is
described in Appendix A. This third model will be moved into the
body of this specification should the IETF community desire. In
theory, all three models may be intermixed in a single deployment.
.---------------.
| Publisher |
'---------------'
^ ^ | ^
| | | |
.-----Restconf----' | | '-----Restconf----.
| .-----' '-HTTP-. |
V | V |
.-------------. .------------. .----------. .------------.
| Subscriber+ | | Operations | | Receiver | | Subscriber |
| Receiver | | /Config | '----------' '------------'
'-------------' '------------' ^ ^ ^
^ (out of scope) : : :
: ^ : :...Model #3....:
Model #1 :..Model #2...: (out of scope)
Figure 1: Subscription Models
3.2. Dynamic YANG Subscription with RESTCONF control 3.1. Dynamic YANG Subscription with RESTCONF control
Dynamic Subscriptions for both [rfc5277bis] and its [yang-push] Dynamic Subscriptions for both [sn] and its [yang-push] augmentations
augmentations are configured and managed via signaling messages are configured and managed via signaling messages transported over
transported over [restconf]. These interactions will be accomplished [RFC8040]. These interactions will be accomplished via a Restconf
via a Restconf POST into RPCs located on the Publisher. HTTP POST into RPCs located on the Publisher. HTTP responses codes will
responses codes will indicate the results of the interaction with the indicate the results of the interaction with the Publisher. An HTTP
Publisher. An HTTP status code of 200 is the proper response to a status code of 200 is the proper response to a successful <establish-
successful <establish-subscription> RPC call. The successful subscription> RPC call. The successful <establish-subscription> will
<establish-subscription> will result in a HTTP message with returned result in a HTTP message with returned subscription URI on a
subscription URI on a logically separate mechanism than was used for logically separate mechanism than was used for the original Restconf
the original Restconf POST. This mechanism would be via a parallel POST. This mechanism is via a parallel TCP connection in the case of
TCP connection in the case of HTTP 1.x, or in the case of HTTP2 via a HTTP 1.x, or in the case of HTTP2 via a separate HTTP stream within
separate HTTP stream within the HTTP connection. When a being the HTTP connection. When a being returned by the Publisher, failure
returned by the Publisher, failure will be indicated by error codes will be indicated by error codes transported in payload.
transported in payload, as well as the return of negotiation
parameters.
Once established, streaming Event Notifications are then delivered Once established, the resulting stream of Event Notifications are
via SSE for HTTP1.1 and via HTTP Data for HTTP2. then delivered via SSE for HTTP1.1 and via HTTP Data for HTTP2.
3.2.1. Call Flow for HTTP2 3.1.1. Call Flow for HTTP2
Requests to [yang-push] augmented RPCs are sent on one or more HTTP2 Requests to [yang-push] augmented RPCs are sent on one or more HTTP2
streams indicated by (a) in Figure 2. Event Notifications related to streams indicated by (a) in Figure 2. Event Notifications related to
a single subscription are pushed on a unique logical channel (b). In a single subscription are pushed on a unique logical channel (b). In
the case below, a newly established subscription has its events the case below, a newly established subscription has its events
pushed over HTTP2 stream (7). pushed over HTTP2 stream (7).
+------------+ +------------+ +------------+ +------------+
| Subscriber | | Publisher | | Subscriber | | Publisher |
|HTTP2 Stream| |HTTP2 Stream| |HTTP2 Stream| |HTTP2 Stream|
skipping to change at page 6, line 36 skipping to change at page 4, line 36
| | HTTP Data (event-notif)| | | HTTP Data (event-notif)|
| |<---------------------------------------------| | |<---------------------------------------------|
| Restconf POST (RPC:delete-subscription) | | | Restconf POST (RPC:delete-subscription) | |
|--------------------------------------------->| | |--------------------------------------------->| |
| | HTTP 200 OK| | | | HTTP 200 OK| |
|<---------------------------------------------| | |<---------------------------------------------| |
| | HTTP Headers (end of stream)| | | HTTP Headers (end of stream)|
| (/7)<-----------------------------------------(/7) | (/7)<-----------------------------------------(/7)
| |
Figure 2: Dynamic with HTTP2 Figure 1: Dynamic with HTTP2
3.2.2. Call flow for HTTP1.1 3.1.2. Call flow for HTTP1.1
Requests to [yang-push] RPCs are sent on the TCP connection indicated Requests to [yang-push] RPCs are sent on the TCP connection indicated
by (a). Event Notifications are pushed on a separate connection (b). by (a). Event Notifications are pushed on a separate connection (b).
This connection (b) will be used for all Event Notifications across This connection (b) will be used for all Event Notifications across
all subscriptions. all subscriptions.
+--------------+ +--------------+ +--------------+ +--------------+
| Subscriber | | Publisher | | Subscriber | | Publisher |
|TCP connection| |TCP connection| |TCP connection| |TCP connection|
| (a) (b) | | (a) (b) | | (a) (b) | | (a) (b) |
skipping to change at page 7, line 35 skipping to change at page 5, line 35
| |<---------------------------------------------| | |<---------------------------------------------|
| | SSE (event-notif)| | | SSE (event-notif)|
| |<---------------------------------------------| | |<---------------------------------------------|
| Restconf POST (RPC:delete-subscription) | | | Restconf POST (RPC:delete-subscription) | |
|--------------------------------------------->| | |--------------------------------------------->| |
| | HTTP 200 OK| | | | HTTP 200 OK| |
|<---------------------------------------------| | |<---------------------------------------------| |
| | | | | |
| | | |
Figure 3: Dynamic with HTTP1.1 Figure 2: Dynamic with HTTP1.1
3.2.3. Configured Subscription over HTTP2 3.1.3. Configured Subscription over HTTP2
With a Configured Subscription, all information needed to establish a With a Configured Subscription, all information needed to establish a
secure relationship with that Receiver is available on the Publisher. secure relationship with that Receiver is available on the Publisher.
With this information, the Publisher will establish a secure With this information, the Publisher will establish a secure
transport connection with the Receiver and then begin pushing the transport connection with the Receiver and then begin pushing the
Event Notifications to the Receiver. Since Restconf might not exist Event Notifications to the Receiver. Since Restconf might not exist
on the Receiver, it is not desirable to require that such Event on the Receiver, it is not desirable to require that such Event
Notifications be pushed with any dependency on Restconf. Nor is Notifications be pushed with any dependency on Restconf. Nor is
there value which Restconf provides on top of HTTP. Therefore in there value which Restconf provides on top of HTTP. Therefore in
place of Restconf, a TLS secured HTTP2 Client connection must be place of Restconf, a TLS secured HTTP2 Client connection must be
skipping to change at page 8, line 32 skipping to change at page 6, line 32
|--------------------------------------------->| |--------------------------------------------->|
| | HTTP Post Headers, Data (event-notif)| | | HTTP Post Headers, Data (event-notif)|
| |<---------------------------------------------| | |<---------------------------------------------|
| | HTTP Data (event-notif)| | | HTTP Data (event-notif)|
| |<---------------------------------------------| | |<---------------------------------------------|
| | HTTP Data (sub-terminate)| | | HTTP Data (sub-terminate)|
| |<---------------------------------------------| | |<---------------------------------------------|
| |HTTP 200 OK | | |HTTP 200 OK |
| |--------------------------------------------->| | |--------------------------------------------->|
Figure 4: Configured over HTTP2 Figure 3: Configured over HTTP2
As the HTTP2 transport is available to the Receiver, the Publisher As the HTTP2 transport is available to the Receiver, the Publisher
should: should:
o take any subscription-priority and copy it into the HTTP2 stream o take any subscription-priority and copy it into the HTTP2 stream
priority, and priority, and
o take a subscription-dependency if it has been provided and map the o take a subscription-dependency if it has been provided and map the
HTTP2 stream for the parent subscription into the HTTP2 stream HTTP2 stream for the parent subscription into the HTTP2 stream
dependency. dependency.
3.3. Subscription Multiplexing 3.2. Subscription Multiplexing
It is possible that updates might be delivered in a different It is possible that updates might be delivered in a different
sequence than generated. Reasons for this might include (but are not sequence than generated. Reasons for this might include (but are not
limited to): limited to):
o replay of pushed updates o replay of pushed updates
o temporary loss of transport connectivity, with update buffering o temporary loss of transport connectivity, with update buffering
and different dequeuing priorities per Subscription and different dequeuing priorities per Subscription
o population, marshalling and bundling of independent Subscription o population, marshalling and bundling of independent Subscription
Updates, and Updates, and
Therefore each Event Notification will include a millisecond level Therefore each Event Notification will include a timestamp to ensure
timestamp to ensure that a Receiver understands the time when a that that a Receiver understands the time when a that update was
update was generated. Use of this timestamp can give an indication generated. Use of this timestamp can give an indication of the state
of the state of objects at a Publisher when state-entangled of objects at a Publisher when state-entangled information is
information is received across different subscriptions. The use of received across different subscriptions. The use of the latest Event
the latest Event Notification timestamp for a particular object Notification timestamp for a particular object update can introduce
update can introduce errors. So when state-entangled updates have errors. So when state-entangled updates have inconsistent object
inconsistent object values and temporally close timestamps, a values and temporally close timestamps, a Receiver might consider
Receiver might consider performing a GET to validate the current performing a GET to validate the current state of a Publisher.
state of a Publisher.
3.4. Encoded Subscription and Event Notification Examples 4. Encoded Subscription and Event Notification Examples
Transported updates will contain context data for one or more Event Transported updates will contain context data for one or more Event
Notifications. Each transported Event Notification will contain Notifications. Each transported Event Notification will contain
several parameters: several parameters:
3.4.1. Restconf Subscription and Events over HTTP1.1 4.1. Restconf Subscription and Events over HTTP1.1
Subscribers can dynamically learn whether a RESTCONF server supports Subscribers can dynamically learn whether a RESTCONF server supports
various types of Event or Yang datastore subscription capabilities. various types of Event or Yang datastore subscription capabilities.
This is done by issuing an HTTP request OPTIONS, HEAD, or GET on the This is done by issuing an HTTP request OPTIONS, HEAD, or GET on the
stream. Some examples building upon the Call flow for HTTP1.1 from stream. Some examples building upon the Call flow for HTTP1.1 from
Section 3.2.2 are: Section 3.2.2 are:
GET /restconf/data/ietf-restconf-monitoring:restconf-state/ GET /restconf/data/ietf-restconf-monitoring:restconf-state/
streams/stream=yang-push HTTP/1.1 streams/stream=yang-push HTTP/1.1
Host: example.com Host: example.com
skipping to change at page 13, line 12 skipping to change at page 11, line 12
the Subscription above. It contains a subtree with root foo that the Subscription above. It contains a subtree with root foo that
contains a leaf called bar: contains a leaf called bar:
XML encoding representation: XML encoding representation:
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<notification xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"> <notification xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<subscription-id xmlns="urn:ietf:params:xml:ns:restconf: <subscription-id xmlns="urn:ietf:params:xml:ns:restconf:
datastore-push:1.0"> datastore-push:1.0">
my-sub my-sub
</subscription-id> </subscription-id>
<eventTime>2015-03-09T19:14:56.23Z</eventTime> <eventTime>2015-03-09T19:14:56.233Z</eventTime>
<datastore-contents xmlns="urn:ietf:params:xml:ns:restconf: <datastore-contents xmlns="urn:ietf:params:xml:ns:restconf:
datastore-push:1.0"> datastore-push:1.0">
<foo xmlns="http://example.com/yang-push/1.0"> <foo xmlns="http://example.com/yang-push/1.0">
<bar>some_string</bar> <bar>some_string</bar>
</foo> </foo>
</datastore-contents> </datastore-contents>
</notification> </notification>
Or with the equivalent YANG over JSON encoding representation as Or with the equivalent YANG over JSON encoding representation as
defined in [RFC7951]: defined in [RFC7951]:
{ {
"ietf-restconf:notification": { "ietf-restconf:notification": {
"datastore-push:subscription-id": "my-sub", "datastore-push:subscription-id": "my-sub",
"eventTime": "2015-03-09T19:14:56.23Z", "eventTime": "2015-03-09T19:14:56.233Z",
"datastore-push:datastore-contents": { "datastore-push:datastore-contents": {
"example-mod:foo": { "bar": "some_string" } "example-mod:foo": { "bar": "some_string" }
} }
} }
} }
To modify a Subscription, the subscriber issues another POST request To modify a Subscription, the subscriber issues another POST request
on the provided URI using the same subscription-id as in the original on the provided URI using the same subscription-id as in the original
request. For example, to modify the update period to 10 seconds, the request. For example, to modify the update period to 10 seconds, the
subscriber may send: subscriber may send:
skipping to change at page 14, line 9 skipping to change at page 12, line 9
"ietf-event-notifications:input" : { "ietf-event-notifications:input" : {
?subscription-id?: 100, ?subscription-id?: 100,
?period" : 10 ?period" : 10
} }
} }
To delete a Subscription, the Subscriber issues a DELETE request on To delete a Subscription, the Subscriber issues a DELETE request on
the provided URI using the same subscription-id as in the original the provided URI using the same subscription-id as in the original
request request
3.4.2. Event Notification over HTTP2 4.2. Event Notification over HTTP2
The basic encoding will look as below. It will consists of a JSON The basic encoding will look as below. It will consists of a JSON
representation wrapped in an HTTP2 header. representation wrapped in an HTTP2 header.
HyperText Transfer Protocol 2 HyperText Transfer Protocol 2
Stream: HEADERS, Stream ID: 5 Stream: HEADERS, Stream ID: 5
Header: :method: POST Header: :method: POST
Stream: HEADERS, Stream ID: 5 Stream: HEADERS, Stream ID: 5
{ {
"ietf-yangpush:notification": { "ietf-yangpush:notification": {
"datastore-push:subscription-id": "my-sub", "datastore-push:subscription-id": "my-sub",
"eventTime": "2015-03-09T19:14:56.23Z", "eventTime": "2015-03-09T19:14:56.233Z",
"datastore-push:datastore-contents": { "datastore-push:datastore-contents": {
"foo": { "bar": "some_string" } "foo": { "bar": "some_string" }
} }
} }
} }
3.5. Stream Discovery 5. Security Considerations
Relevant for Dynamic Subscriptions, this will be accomplished as
specified in [restconf] section 6.2. The namespace chosen will be
the same as how stream names are acquired for NETCONF, and so that
backwards compatibility can be maintained without replicating this
information.
As per [restconf] section 6.3, RESTCONF clients can determine the URL
for the subscription resource (to receive notifications) by sending
an HTTP GET request for the "location" leaf with the stream list
entry.
4. Security Considerations
Subscriptions could be used to intentionally or accidentally overload Subscriptions could be used to intentionally or accidentally overload
the resources of a Publisher. For this reason, it is important that the resources of a Publisher. For this reason, it is important that
the Publisher has the ability to prioritize the establishment and the Publisher has the ability to prioritize the establishment and
push of Event Notifications where there might be resource exhaust push of Event Notifications where there might be resource exhaust
potential. In addition, a server needs to be able to suspend potential. In addition, a server needs to be able to suspend
existing Subscriptions when needed. When this occurs, the existing Subscriptions when needed. When this occurs, the
subscription status must be updated accordingly and the Receivers subscription status must be updated accordingly and the Receivers
notified. notified.
skipping to change at page 15, line 28 skipping to change at page 13, line 14
terminate or refuse any transport sessions from the Publisher. terminate or refuse any transport sessions from the Publisher.
Second, the HTTP transport augmentation on the Receiver must send an Second, the HTTP transport augmentation on the Receiver must send an
HTTP 200 OK to a subscription started notification before the HTTP 200 OK to a subscription started notification before the
Publisher starts streaming any events. Publisher starts streaming any events.
One or more Publishers could overwhelm a Receiver which is unable to One or more Publishers could overwhelm a Receiver which is unable to
control or handle the volume of Event Notifications received. In control or handle the volume of Event Notifications received. In
deployments where this might be a concern, HTTP2 transport such as deployments where this might be a concern, HTTP2 transport such as
HTTP2) should be selected. HTTP2) should be selected.
5. Acknowledgments 6. Acknowledgments
We wish to acknowledge the helpful contributions, comments, and We wish to acknowledge the helpful contributions, comments, and
suggestions that were received from: Susan Hares, Tim Jenkins, Balazs suggestions that were received from: Susan Hares, Tim Jenkins, Balazs
Lengyel, Kent Watsen, Michael Scharf, and Guangying Zheng. Lengyel, Kent Watsen, Michael Scharf, and Guangying Zheng.
6. References 7. References
6.1. Normative References
[restconf] 7.1. Normative References
Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", March 2016, <https://datatracker.ietf.org/doc/
draft-ietf-netconf-restconf/>.
[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,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-editor.org/info/rfc2119>.
[RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport [RFC6520] Seggelmann, R., Tuexen, M., and M. Williams, "Transport
Layer Security (TLS) and Datagram Transport Layer Security Layer Security (TLS) and Datagram Transport Layer Security
(DTLS) Heartbeat Extension", RFC 6520, (DTLS) Heartbeat Extension", RFC 6520,
DOI 10.17487/RFC6520, February 2012, DOI 10.17487/RFC6520, February 2012,
skipping to change at page 16, line 15 skipping to change at page 13, line 45
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536, Protocol (NETCONF) Access Control Model", RFC 6536,
DOI 10.17487/RFC6536, March 2012, DOI 10.17487/RFC6536, March 2012,
<http://www.rfc-editor.org/info/rfc6536>. <http://www.rfc-editor.org/info/rfc6536>.
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<http://www.rfc-editor.org/info/rfc7540>. <http://www.rfc-editor.org/info/rfc7540>.
[RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
<http://www.rfc-editor.org/info/rfc8040>.
[sn] Voit, E., Clemm, A., Gonzalez Prieto, A., Prasad Tripathy,
A., and E. Nilsen-Nygaard, "Subscribing to Event
Notifications", February 2017,
<https://datatracker.ietf.org/doc/draft-ietf-netconf-
subscribed-notifications/>.
7.2. Informative References
[RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements [RFC7923] Voit, E., Clemm, A., and A. Gonzalez Prieto, "Requirements
for Subscription to YANG Datastores", RFC 7923, for Subscription to YANG Datastores", RFC 7923,
DOI 10.17487/RFC7923, June 2016, DOI 10.17487/RFC7923, June 2016,
<http://www.rfc-editor.org/info/rfc7923>. <http://www.rfc-editor.org/info/rfc7923>.
[RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG",
RFC 7951, DOI 10.17487/RFC7951, August 2016, RFC 7951, DOI 10.17487/RFC7951, August 2016,
<http://www.rfc-editor.org/info/rfc7951>. <http://www.rfc-editor.org/info/rfc7951>.
6.2. Informative References [RFC8071] Watsen, K., "NETCONF Call Home and RESTCONF Call Home",
RFC 8071, DOI 10.17487/RFC8071, February 2017,
[call-home] <http://www.rfc-editor.org/info/rfc8071>.
Watsen, K., "NETCONF Call Home and RESTCONF Call Home",
December 2015, <https://tools.ietf.org/html/draft-ietf-
netconf-call-home-17>.
[rfc5277bis]
Gonzalez Prieto, A., Clemm, A., Voit, E., Prasad Tripathy,
A., and E. Nilsen-Nygaard, "NETCONF Event Notifications",
September 2016, <https://datatracker.ietf.org/doc/draft-
ietf-netconf-rfc5277bis/>.
[W3C-20150203] [W3C-20150203]
"Server-Sent Events, World Wide Web Consortium CR CR- "Server-Sent Events, World Wide Web Consortium CR CR-
eventsource-20121211", February 2015, eventsource-20121211", February 2015,
<https://www.w3.org/TR/2015/REC-eventsource-20150203/>. <https://www.w3.org/TR/2015/REC-eventsource-20150203/>.
[yang-push] [yang-push]
Clemm, A., Voit, E., Gonzalez Prieto, A., Prasad Tripathy, Clemm, A., Voit, E., Gonzalez Prieto, A., Prasad Tripathy,
A., and E. Nilsen-Nygaard, "Subscribing to YANG datastore A., Nilsen-Nygaard, E., Bierman, A., and B. Lengyel,
push updates", June 2016, "Subscribing to YANG datastore push updates", March 2017,
<https://datatracker.ietf.org/doc/draft-ietf-netconf-yang- <https://datatracker.ietf.org/doc/draft-ietf-netconf-yang-
push/>. push/>.
Appendix A. Proxy YANG Subscription when the Subscriber and Receiver Appendix A. End-to-End Deployment Guidance
are different
The properties of Dynamic and Configured Subscriptions can be
combined to enable deployment models where the Subscriber and
Receiver are different. Such separation can be useful with some
combination of:
o An operator does not want the subscription to be dependent on the
maintenance of transport level keep-alives. (Transport
independence provides different scalability characteristics.)
o There is not a transport session binding, and a transient
Subscription needs to survive in an environment where there is
unreliable connectivity with the Receiver and/or Subscriber.
o An operator wants the Publisher to include highly restrictive
capacity management and Subscription security mechanisms outside
of domain of existing operational or programmatic interfaces.
To build a Proxy Subscription, first the necessary information must
be signaled as part of the <establish-subscription>. Using this set
of Subscriber provided information; the same process described within
section 3 will be followed. There is one exception. Only when an
HTTP status code of 200 comes back from the receiver, will it inform
the Subscriber of Subscription establishment success via its Restconf
connection.
After a successful establishment, if the Subscriber wishes to track
the state of Receiver subscriptions, it may choose to place a
separate on-change Subscription into the "Subscriptions" subtree of
the YANG Datastore on the Publisher.
Appendix B. End-to-End Deployment Guidance
Several technologies are expected to be seen within a deployment to Several technologies are expected to be seen within a deployment to
achieve security and ease-of-use requirements. These are not achieve security and ease-of-use requirements. These are not
necessary for an implementation of this specification, but will be necessary for an implementation of this specification, but will be
useful to consider when considering the operational context. useful to consider when considering the operational context.
B.1. Call Home A.1. Call Home
Pub/Sub implementations should have the ability to transparently Pub/Sub implementations should have the ability to transparently
incorporate [call-home] so that secure TLS connections can originate incorporate 'call home' [RFC8071] so that secure TLS connections can
from the desired device. originate from the desired device.
B.2. TLS Heartbeat A.2. TLS Heartbeat
HTTP sessions might not quickly allow a Subscriber to recognize when HTTP sessions might not quickly allow a Subscriber to recognize when
the communication path has been lost from the Publisher. To the communication path has been lost from the Publisher. To
recognize this, it is possible for a Receiver to establish a TLS recognize this, it is possible for a Receiver to establish a TLS
heartbeat [RFC6520]. In the case where a TLS heartbeat is included, heartbeat [RFC6520]. In the case where a TLS heartbeat is included,
it should be sent just from Receiver to Publisher. Loss of the it should be sent just from Receiver to Publisher. Loss of the
heartbeat should result in any Subscription related TCP sessions heartbeat should result in any Subscription related TCP sessions
between those endpoints being torn down. The subscription can then between those endpoints being torn down. The subscription can then
attempt to re-establish. attempt to re-establish.
Appendix C. Issues being worked and resolved Appendix B. Issues being worked and resolved
(To be removed by RFC editor prior to publication) (To be removed by RFC editor prior to publication)
C.1. Unresolved Issues B.1. Unresolved Issues
RT3 - Do we include 3rd party signaled subscriptions within models
that need to be supported generically, or for a particular type of
transport.
RT10 - Right now the examples show a YANG timestamp at the hundredths
of a second level. But the yang-push draft is at seconds. And the
requirements show at least milliseconds (if not more).
C.2. Agreement in principal
RT4 - Need to add into document examples of 5277bis Event streams. GRPC compatibility 1: Mechanisms for HTTP2 to GRPC mapping need to be
Document only includes yang-push examples at this point. considered. There is a good start there as this draft only uses
POST, not GET. As GET is used in RESTCONF for capabilities
discovery, we have some backwards compatibility issues with existing
IETF drafts. Possible options to address are (1) provide a POST
method for anything done by GET in RESTCONF, (2) await support of GET
by GRPC, or (3) tunnel RESTCONF's GET messages within a GRPC POST.
RT6 - We need to define encodings of rfc5277bis notifications. GRPC compatibility 2: We need to expose a method against which POST
is done as events begin on a stream. See Stream 7 in figure 2. Can
only send traffic to a method, not a URI. URI points to a method,
not a resource.
C.3. Resolved Issues Need to add into document examples of Event streams. Document only
includes yang-push examples at this point.
RT1 - Integration specifics for Restconf capability discovery on We need to reference the viable encodings of notifications.
different types of Streams
RT2 - In what way to we position Event notifications model in this Appendix C. Changes between revisions
document vs. current solution in Restconf.
RT5 - Doesn't make sense to use Restconf for Configured (To be removed by RFC editor prior to publication)
subscriptions. HTTP will be used.
RT7 - HTTP native option doesn't currently use SSE. But we should v01 - v02
evaluate moving to that as possible. It will make development
integration easier and more consistent.
RT8 - Once SSE starts, there will be no more Restconf interpretation o Removed sections now redundant with [sn] and [yang-push] such as:
of further signaling upon the connection. It is unclear how this can mechanisms for subscription maintenance, terminology definitions,
be made to work with modify and delete subscription. If it cannot, a stream discovery.
method of sending events without SSE will be needed, although this
would diverge from the existing Restconf mechanisms
RT9 - For static subscriptions, perhaps we can use Restconf call home o 3rd party subscriptions are out-of-scope.
to originate an SSE connection. This assume RT8 & RT2 can be
resolved with SSE.
Appendix D. Changes between revisions o SSE only used with Restconf and HTTP1.1 Dynamic Subscriptions
o Timeframes for event tagging are self-defined.
(To be removed by RFC editor prior to publication) o Clean-up of wording, references to terminology, section numbers.
v00 - v01 v00 - v01
o Removed the ability for more than one subscription to go to a o Removed the ability for more than one subscription to go to a
single HTTP2 stream. single HTTP2 stream.
o Updated call flows. Extensively. o Updated call flows. Extensively.
o SSE only used with Restconf and HTTP1.1 Dynamic Subscriptions o SSE only used with Restconf and HTTP1.1 Dynamic Subscriptions
skipping to change at page 19, line 40 skipping to change at page 16, line 29
o Many clean-ups of wording and terminology o Many clean-ups of wording and terminology
Authors' Addresses Authors' Addresses
Eric Voit Eric Voit
Cisco Systems Cisco Systems
Email: evoit@cisco.com Email: evoit@cisco.com
Alexander Clemm
Cisco Systems
Email: alex@clemm.org
Alberto Gonzalez Prieto Alberto Gonzalez Prieto
Cisco Systems Cisco Systems
Email: albertgo@cisco.com Email: albertgo@cisco.com
Ambika Prasad Tripathy Ambika Prasad Tripathy
Cisco Systems Cisco Systems
Email: ambtripa@cisco.com Email: ambtripa@cisco.com
Einar Nilsen-Nygaard Einar Nilsen-Nygaard
Cisco Systems Cisco Systems
Email: einarnn@cisco.com Email: einarnn@cisco.com
skipping to change at page 20, line 14 skipping to change at page 16, line 44
Ambika Prasad Tripathy Ambika Prasad Tripathy
Cisco Systems Cisco Systems
Email: ambtripa@cisco.com Email: ambtripa@cisco.com
Einar Nilsen-Nygaard Einar Nilsen-Nygaard
Cisco Systems Cisco Systems
Email: einarnn@cisco.com Email: einarnn@cisco.com
Alexander Clemm
Huawei
Email: ludwig@clemm.org
Andy Bierman Andy Bierman
YumaWorks YumaWorks
Email: andy@yumaworks.com Email: andy@yumaworks.com
 End of changes. 56 change blocks. 
274 lines changed or deleted 136 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/