| < draft-ietf-netconf-restconf-notif-00.txt | draft-ietf-netconf-restconf-notif-01.txt > | |||
|---|---|---|---|---|
| NETCONF E. Voit | NETCONF E. Voit | |||
| Internet-Draft A. Clemm | Internet-Draft A. Clemm | |||
| Intended status: Informational A. Tripathy | Intended status: Standards Track A. Gonzalez Prieto | |||
| Expires: February 27, 2017 E. Nilsen-Nygaard | Expires: April 2, 2017 A. Tripathy | |||
| A. Gonzalez Prieto | E. Nilsen-Nygaard | |||
| Cisco Systems | Cisco Systems | |||
| August 26, 2016 | A. Bierman | |||
| YumaWorks | ||||
| September 29, 2016 | ||||
| Restconf and HTTP Transport for Event Notifications | Restconf and HTTP Transport for Event Notifications | |||
| draft-ietf-netconf-restconf-notif-00 | draft-ietf-netconf-restconf-notif-01 | |||
| Abstract | Abstract | |||
| This document defines Restconf, HTTP, and HTTP2 bindings for the | This document defines Restconf, HTTP2, and HTTP1.1 bindings for the | |||
| transport Subscription requests and corresponding push updates. | transport Subscription requests and corresponding push updates. | |||
| Being subscribed may be both Event Notifications and YANG Datastores. | Being subscribed may be both Event Notifications and 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 February 27, 2017. | This Internet-Draft will expire on April 2, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2016 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 | |||
| skipping to change at page 2, line 13 ¶ | skipping to change at page 2, line 14 ¶ | |||
| 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 . . . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 3.1. Mechanisms for Subscription Establishment and Maintenance 4 | 3.1. Mechanisms for Subscription Establishment and Maintenance 4 | |||
| 3.2. Subscription Multiplexing . . . . . . . . . . . . . . . . 6 | 3.2. Dynamic YANG Subscription with RESTCONF control . . . . . 5 | |||
| 3.3. Push Data Stream and Transport Mapping . . . . . . . . . 7 | 3.3. Subscription Multiplexing . . . . . . . . . . . . . . . . 8 | |||
| 3.4. Stream Discovery . . . . . . . . . . . . . . . . . . . . 12 | 3.4. Encoded Subscription and Event Notification Examples . . 9 | |||
| 4. Security Considerations . . . . . . . . . . . . . . . . . . . 12 | 3.5. Stream Discovery . . . . . . . . . . . . . . . . . . . . 14 | |||
| 5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 13 | 4. Security Considerations . . . . . . . . . . . . . . . . . . . 14 | |||
| 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 | 5. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 6.1. Normative References . . . . . . . . . . . . . . . . . . 14 | 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 | |||
| 6.2. Informative References . . . . . . . . . . . . . . . . . 14 | 6.1. Normative References . . . . . . . . . . . . . . . . . . 15 | |||
| 6.2. Informative References . . . . . . . . . . . . . . . . . 16 | ||||
| Appendix A. Proxy YANG Subscription when the Subscriber and | Appendix A. Proxy YANG Subscription when the Subscriber and | |||
| Receiver are different . . . . . . . . . . . . . . . 15 | Receiver are different . . . . . . . . . . . . . . . 17 | |||
| Appendix B. End-to-End Deployment Guidance . . . . . . . . . . . 16 | Appendix B. End-to-End Deployment Guidance . . . . . . . . . . . 17 | |||
| B.1. Call Home . . . . . . . . . . . . . . . . . . . . . . . . 16 | B.1. Call Home . . . . . . . . . . . . . . . . . . . . . . . . 17 | |||
| B.2. TLS Heartbeat . . . . . . . . . . . . . . . . . . . . . . 16 | B.2. TLS Heartbeat . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| Appendix C. Issues being worked and resolved . . . . . . . . . . 17 | Appendix C. Issues being worked and resolved . . . . . . . . . . 18 | |||
| C.1. Unresolved Issues . . . . . . . . . . . . . . . . . . . . 17 | C.1. Unresolved Issues . . . . . . . . . . . . . . . . . . . . 18 | |||
| C.2. Agreement in principal . . . . . . . . . . . . . . . . . 17 | C.2. Agreement in principal . . . . . . . . . . . . . . . . . 18 | |||
| C.3. Resolved Issues . . . . . . . . . . . . . . . . . . . . . 18 | C.3. Resolved Issues . . . . . . . . . . . . . . . . . . . . . 18 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 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 | [rfc5277bis]. Enhancements to [rfc5277bis] which enable YANG | |||
| Datastore subscription and push are defined in [yang-push]. This | Datastore subscription and push are defined in [yang-push]. This | |||
| document provides a transport specification for these Restconf and | document provides a transport specification for these protocols over | |||
| HTTP. This has been driven by Requirements for subscriptions to YANG | Restconf and HTTP. Driving these requirements is [RFC7923]. | |||
| datastores are defined in[RFC7923] . | ||||
| Beyond based transport bindings, there are benefits which can be | The streaming of Subscription Event Notifications has synergies with | |||
| realized when transporting updates directly HTTP/2[RFC7540] which can | HTTP2 streams. Benefits which can be realized when transporting | |||
| be realized via an implementation of this transport specification | events directly HTTP2 [RFC7540] include: | |||
| including: | ||||
| o Subscription multiplexing over independent HTTP/2 streams | o Elimination of head-of-line blocking | |||
| o Stream prioritization and stream dependencies | o Weighting and proportional dequeuing of Events from different | |||
| subscriptions | ||||
| o Flow control on independent streams | o Explicit precedence in subscriptions so that events from one | |||
| 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 | Configured Subscription: a Subscription installed via a configuration | |||
| interface which persists across reboots. | interface which persists across reboots. | |||
| Data Node: An instance of management information in a datastore. | ||||
| Data Node Update: A data item containing the current value/property | ||||
| of a Data Node at the time the Data Node Update was created. | ||||
| Dynamic Subscription: a Subscription negotiated between Subscriber | Dynamic Subscription: a Subscription negotiated between Subscriber | |||
| and Publisher via create, establish, modify, and delete RPC control | and Publisher via create, establish, modify, and delete RPC signaling | |||
| plane signaling messages. | messages. | |||
| Event: an occurrence of something that may be of interest. (e.g., a | Event: an occurrence of something that may be of interest. (e.g., a | |||
| configuration change, a fault, a change in status, crossing a | configuration change, a fault, a change in status, crossing a | |||
| threshold, status of a flow, or an external input to the system.) | threshold, status of a flow, or an external input to the system.) | |||
| Event Notification: a set of information intended for a Receiver | Event Notification: a set of information intended for a Receiver | |||
| indicating that one or more Event(s) have occurred. Details of the | indicating that one or more Event(s) have occurred. Details of the | |||
| Event(s) may be included within. | Event(s) may be included within. | |||
| Event Stream: a continuous, ordered set of Events grouped under an | Event Stream: a continuous, ordered set of Events grouped under an | |||
| skipping to change at page 4, line 27 ¶ | skipping to change at page 4, line 27 ¶ | |||
| same. A Subscription ends with a subscription-terminated | same. A Subscription ends with a subscription-terminated | |||
| notification, or by a loss of transport connectivity. | notification, or by a loss of transport connectivity. | |||
| 2. Configured Subscription: Receiver(s) are specified on Publisher | 2. Configured Subscription: Receiver(s) are specified on Publisher | |||
| in startup and running config. Subscription is not terminated | in startup and running config. Subscription is not terminated | |||
| except via an operations interface. (Subscriptions may be | except via an operations interface. (Subscriptions may be | |||
| Suspended, with no Event Notifications sent however.) | Suspended, with no Event Notifications sent however.) | |||
| 3. Proxy Subscription: Subscriber and Receiver are different. | 3. Proxy Subscription: Subscriber and Receiver are different. | |||
| Subscription ends when a Subscription End-time is reached, or the | Subscription ends when a Subscription End-time is reached, or the | |||
| Publisher process is restarted. The real difference between 2 | Publisher process is restarted. A key difference between this | |||
| and 3 is that configuration requests are made to RPCs which might | and configured subscriptions (#2) is that configuration requests | |||
| evaluate run-time conditions much like in 1. Typically direct | are made to RPCs which might evaluate run-time conditions much | |||
| configuration via 2 will not go through the same sort of capacity | like in (#1). Typically direct configuration via (#2) will not | |||
| and validation checks seen in 1. | go through the same sort of capacity and validation checks seen | |||
| in (#1). | ||||
| The first two are described in this section. The third is described | The first two models are described in this section. The third is | |||
| in Appendix A. This third option can be moved into the body of this | described in Appendix A. This third model will be moved into the | |||
| specification should the IETF community desire. In theory, all three | body of this specification should the IETF community desire. In | |||
| models may be intermixed in a single deployment. | theory, all three models may be intermixed in a single deployment. | |||
| .---------------. | .---------------. | |||
| | Publisher | | | Publisher | | |||
| '---------------' | '---------------' | |||
| ^ ^ | ^ | ^ ^ | ^ | |||
| | | | | | | | | | | |||
| .-----Restconf----' | | '-----Restconf----. | .-----Restconf----' | | '-----Restconf----. | |||
| | .-----' '-HTTP-. | | | .-----' '-HTTP-. | | |||
| V | V | | V | V | | |||
| .-------------. .------------. .----------. .------------. | .-------------. .------------. .----------. .------------. | |||
| | Subscriber+ | | Operations | | Receiver | | Subscriber | | | Subscriber+ | | Operations | | Receiver | | Subscriber | | |||
| | Receiver | | /Config | '----------' '------------' | | Receiver | | /Config | '----------' '------------' | |||
| '-------------' '------------' ^ ^ ^ | '-------------' '------------' ^ ^ ^ | |||
| ^ (out of scope) : : : | ^ (out of scope) : : : | |||
| : ^ : :....Model 3....: | : ^ : :...Model #3....: | |||
| Model 1 :...Model 2...: (out of scope) | Model #1 :..Model #2...: (out of scope) | |||
| 3.1.1. Dynamic YANG Subscription over RESTCONF | Figure 1: Subscription Models | |||
| Dynamic Subscriptions for both [rfc5277bis] and its [rfc5277bis] | 3.2. Dynamic YANG Subscription with RESTCONF control | |||
| Dynamic Subscriptions for both [rfc5277bis] and its [yang-push] | ||||
| augmentations are configured and managed via signaling messages | augmentations are configured and managed via signaling messages | |||
| transported over Restconf. Extending the paradigm of [restconf] | transported over [restconf]. These interactions will be accomplished | |||
| section 6.3.1, it must support the encoding and transport query | via a Restconf POST into RPCs located on the Publisher. HTTP | |||
| parameters corresponding to the YANG model for subscriptions defined | responses codes will indicate the results of the interaction with the | |||
| in [RFC5277bis] and [Yang-Push]. These interactions will be | Publisher. An HTTP status code of 200 is the proper response to a | |||
| accomplished via the typical[restconf] POST into Success of the RPC | successful <establish-subscription> RPC call. The successful | |||
| interaction will be indicated by HTTP status codes of 20x being | <establish-subscription> will result in a HTTP message with returned | |||
| subscription URI on a logically separate mechanism than was used for | ||||
| the original Restconf POST. This mechanism would be via a parallel | ||||
| TCP connection in the case of HTTP 1.x, or in the case of HTTP2 via a | ||||
| separate HTTP stream within the HTTP connection. When a being | ||||
| returned by the Publisher, failure will be indicated by error codes | returned by the Publisher, failure will be indicated by error codes | |||
| transported in payload, as well as the return of negotiation | transported in payload, as well as the return of negotiation | |||
| parameters. | parameters. | |||
| Once established, streaming Event Notifications are then delivered | Once established, streaming Event Notifications are then delivered | |||
| via Restconf SSE (assuming issue RT8 is reloved, see appx). As they | via SSE for HTTP1.1 and via HTTP Data for HTTP2. | |||
| are successfully received, HTTP status codes of 20x will be returned | ||||
| by the Receiver. | ||||
| 3.1.2. Configured Subscription over HTTP | 3.2.1. Call Flow for HTTP2 | |||
| With a Configured Subscription, all information needed to establish a | Requests to [yang-push] augmented RPCs are sent on one or more HTTP2 | |||
| secure relationship with that Receiver is configured on the | streams indicated by (a) in Figure 2. Event Notifications related to | |||
| Publisher. With this information, the Publisher will establish a | a single subscription are pushed on a unique logical channel (b). In | |||
| secure transport connection with the Receiver and then begin pushing | the case below, a newly established subscription has its events | |||
| the Event Notifications to the Receiver. Since Restconf might not | pushed over HTTP2 stream (7). | |||
| exist on the Receiver, it is not desirable to require that such Event | ||||
| Notifications be pushed via Restconf. Nor is there value which | ||||
| Restconf provides on top of HTTP. Therefore in place of Restconf, a | ||||
| TLS secured HTTP Client connection must be established with an HTTP | ||||
| Server located on the Receiver. Event Notifications will then be | ||||
| sent via HTTP Post messages to the Receiver. | ||||
| Post messages will be addressed to HTTP augmentation code on the | +------------+ +------------+ | |||
| Receiver capable of accepting and responding to Event Notifications. | | Subscriber | | Publisher | | |||
| Some Post messages must include the URI for the subscribed resource. | |HTTP2 Stream| |HTTP2 Stream| | |||
| This URI can be retained for operational tracking and debugging use | | (a) (b) | | (a) (b) | | |||
| by the Receiver. | +------------+ +------------+ | |||
| | Restconf POST (RPC:establish-subscription) | | ||||
| |--------------------------------------------->| | ||||
| | HTTP 200 OK (URI)| | ||||
| |<---------------------------------------------| | ||||
| | (7)HTTP POST (URI) (7) | ||||
| | |--------------------------------------------->| | ||||
| | | HTTP 200 OK| | ||||
| | |<---------------------------------------------| | ||||
| | | HTTP Data (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | Restconf POST (RPC:modify-subscription) | | | ||||
| |--------------------------------------------->| | | ||||
| | | HTTP 200 OK| | | ||||
| |<---------------------------------------------| | | ||||
| | | HTTP Data (subscription-modified)| | ||||
| | |<---------------------------------------------| | ||||
| | | HTTP Data (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | Restconf POST (RPC:delete-subscription) | | | ||||
| |--------------------------------------------->| | | ||||
| | | HTTP 200 OK| | | ||||
| |<---------------------------------------------| | | ||||
| | | HTTP Headers (end of stream)| | ||||
| | (/7)<-----------------------------------------(/7) | ||||
| | | ||||
| After successful receipt of an initial Event Notification for a | Figure 2: Dynamic with HTTP2 | |||
| particular Subscription, the Reciever should reply back with an HTTP | ||||
| status code of 201 (Created). Further successful receipts should | ||||
| result in the return of code of 200 (Accepted). To ensure the | ||||
| Receiver always has the URI, it should also be sent in the next push | ||||
| update for a Subscription after any status code of 201 (Created) has | ||||
| been returned from the Receiver. At any point, receipt of any status | ||||
| codes from 300-510 with the exception of 408 (Request Timeout) should | ||||
| result in either the movement of the Subscription to the suspended | ||||
| state, or cause the HTTP session to fail (need to determine | ||||
| appropriate action). A sequential series of multiple 408 exceptions | ||||
| should also drive the Subscription to a suspended state. If a | ||||
| suspension occurs, a POST including a subscription Id and URI post- | ||||
| pended with a Suspended indication (format tbd) must be sent. | ||||
| Figure 2 depicts this message flow. | 3.2.2. Call flow for HTTP1.1 | |||
| +-----------+ +----------+ | Requests to [yang-push] RPCs are sent on the TCP connection indicated | |||
| | Publisher | | Receiver | | by (a). Event Notifications are pushed on a separate connection (b). | |||
| +-----------+ +----------+ | This connection (b) will be used for all Event Notifications across | |||
| |<--------------TLS------------>| | all subscriptions. | |||
| | | | ||||
| |HTTP POST (Sub ID, data1) | | ||||
| |------------------------------>| | ||||
| | HTTP 201 (Created)| | ||||
| |<------------------------------| | ||||
| |HTTP POST (Sub ID, URI, data2) | | ||||
| |------------------------------>| | ||||
| | HTTP 200 (OK)| | ||||
| |<------------------------------| | ||||
| | data3 | | ||||
| |<----------------------------->| | ||||
| If HTTP/2 transport is available to a Receiver, the Publisher should | +--------------+ +--------------+ | |||
| also: | | Subscriber | | Publisher | | |||
| |TCP connection| |TCP connection| | ||||
| | (a) (b) | | (a) (b) | | ||||
| +--------------+ +--------------+ | ||||
| | Restconf POST (RPC:establish-subscription) | | ||||
| |--------------------------------------------->| | ||||
| | HTTP 200 OK (URI)| | ||||
| |<---------------------------------------------| | ||||
| | |HTTP GET (URI) | | ||||
| | |--------------------------------------------->| | ||||
| | | HTTP 200 OK| | ||||
| | |<---------------------------------------------| | ||||
| | | SSE (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | Restconf POST (RPC:modify-subscription) | | | ||||
| |--------------------------------------------->| | | ||||
| | | HTTP 200 OK| | | ||||
| |<---------------------------------------------| | | ||||
| | | SSE (subscription-modified)| | ||||
| | |<---------------------------------------------| | ||||
| | | SSE (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | Restconf POST (RPC:delete-subscription) | | | ||||
| |--------------------------------------------->| | | ||||
| | | HTTP 200 OK| | | ||||
| |<---------------------------------------------| | | ||||
| | | | | ||||
| | | | ||||
| o point individual Event Notifications to a unique HTTP/2 stream for | Figure 3: Dynamic with HTTP1.1 | |||
| that Subscription, | ||||
| o take any subscription-priority and provision it into the HTTP/2 | 3.2.3. Configured Subscription over HTTP2 | |||
| stream priority, and | ||||
| o take any subscription-dependency and provision it into the HTTP/2 | With a Configured Subscription, all information needed to establish a | |||
| stream dependency. | secure relationship with that Receiver is available on the Publisher. | |||
| With this information, the Publisher will establish a secure | ||||
| transport connection with the Receiver and then begin pushing the | ||||
| Event Notifications to the Receiver. Since Restconf might not exist | ||||
| on the Receiver, it is not desirable to require that such Event | ||||
| Notifications be pushed with any dependency on Restconf. Nor is | ||||
| there value which Restconf provides on top of HTTP. Therefore in | ||||
| place of Restconf, a TLS secured HTTP2 Client connection must be | ||||
| established with an HTTP2 Server located on the Receiver. Event | ||||
| Notifications will then be sent as part of an extended HTTP POST to | ||||
| the Receiver. | ||||
| 3.2. Subscription Multiplexing | POST messages will be addressed to HTTP augmentation code on the | |||
| Receiver capable of accepting and responding to Event Notifications. | ||||
| The first POST message must be a subscription-started notification. | ||||
| Push update notifications must not be sent until the receipt of an | ||||
| HTTP 200 OK for this initial notification. The 200 OK will indicate | ||||
| that the Receiver is ready for Event Notifications. At this point a | ||||
| Subscription must be allocated its own HTTP2 stream. Figure 4 | ||||
| depicts this message flow. | ||||
| When pushed directly over HTTP/2, it is expected that the Event | +------------+ +------------+ | |||
| Notifications from a single Subscription will be allocated a separate | | Receiver | | Publisher | | |||
| HTTP/2 stream. This will enable multiplexing, and address issues of | |HTTP2 Stream| |HTTP2 Stream| | |||
| Head-of-line blocking with different priority Subscriptions. | | (a) (b) | | (a) (b) | | |||
| +------------+ +------------+ | ||||
| | HTTP Post Headers, Data (sub-start, SubID)| | ||||
| |<---------------------------------------------| | ||||
| | HTTP 200 OK | | ||||
| |--------------------------------------------->| | ||||
| | | HTTP Post Headers, Data (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | | HTTP Data (event-notif)| | ||||
| | |<---------------------------------------------| | ||||
| | | HTTP Data (sub-terminate)| | ||||
| | |<---------------------------------------------| | ||||
| | |HTTP 200 OK | | ||||
| | |--------------------------------------------->| | ||||
| When pushed via Restconf over HTTP/2, different Subscriptions will | Figure 4: Configured over HTTP2 | |||
| not be mapped to independent HTTP/2 streams. When Restconf specifies | ||||
| this mapping, support may be appended on top of this specification. | ||||
| With or without independent queueing of multiplexed subscriptions, it | As the HTTP2 transport is available to the Receiver, the Publisher | |||
| is possible that updates might be delivered in a different sequence | should: | |||
| than generated. Reasons for this might include (but are not limited | ||||
| to): | ||||
| o replay of pushed updates | o take any subscription-priority and copy it into the HTTP2 stream | |||
| priority, and | ||||
| o take a subscription-dependency if it has been provided and map the | ||||
| HTTP2 stream for the parent subscription into the HTTP2 stream | ||||
| dependency. | ||||
| 3.3. Subscription Multiplexing | ||||
| It is possible that updates might be delivered in a different | ||||
| sequence than generated. Reasons for this might include (but are not | ||||
| limited to): | ||||
| 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 | |||
| o parallel HTTP1.1 sessions | Therefore each Event Notification will include a millisecond level | |||
| Therefore each Event Notification will include a microsecond level | ||||
| timestamp to ensure that a Receiver understands the time when a that | timestamp to ensure that a Receiver understands the time when a that | |||
| update was generated. Use of this timestamp can give an indication | update was generated. Use of this timestamp can give an indication | |||
| of the state of objects at a Publisher when state-entangled | of the state of objects at a Publisher when state-entangled | |||
| information is received across different subscriptions. The use of | information is received across different subscriptions. The use of | |||
| the latest Event Notification timestamp for a particular object | the latest Event Notification timestamp for a particular object | |||
| update can introduce errors. So when state-entangled updates have | update can introduce errors. So when state-entangled updates have | |||
| inconsistent object values and temporally close timestamps, a | inconsistent object values and temporally close timestamps, a | |||
| Receiver might consider performing a 'get' to validate the current | Receiver might consider performing a GET to validate the current | |||
| state of a Publisher. | state of a Publisher. | |||
| 3.3. Push Data Stream and Transport Mapping | 3.4. Encoded Subscription and Event Notification Examples | |||
| Transported updates will contain 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: | |||
| o A Subscription ID correlator | 3.4.1. Restconf Subscription and Events over HTTP1.1 | |||
| o Event Notification(s) . (Note 1: These must be filtered per access | ||||
| control rules to contain only data that the Subscriber is | ||||
| authorized to see. Note 2: these Event Notifications might be | ||||
| Data Node Update(s).) | ||||
| o A timestamp indication when the Event Notification was generated | ||||
| on the Publisher. The timestamp must correspond to a time where | ||||
| any Data Nodes included in the Update held the values/state | ||||
| indicated within the Update. | ||||
| 3.3.1. Subscription and Updates via Restconf | ||||
| 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 existing RESTCONF mechanisms | stream. Some examples building upon the Call flow for HTTP1.1 from | |||
| are below: | 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 | |||
| Accept: application/yang.data+xml | Accept: application/yang.data+xml | |||
| If the server supports it, it may respond | If the server supports it, it may respond | |||
| HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
| Content-Type: application/yang.api+xml | Content-Type: application/yang.api+xml | |||
| <stream xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> | <stream xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> | |||
| <name>yang-push</name> | <name>yang-push</name> | |||
| <description>Yang push stream</description> | <description>Yang push stream</description> | |||
| <access> | <access> | |||
| <encoding>xml</encoding> | <encoding>xml</encoding> | |||
| <location>https://example.com/streams/yang-push-xml | <location>https://example.com/streams/yang-push-xml | |||
| </location> | </location> | |||
| </access> | </access> | |||
| skipping to change at page 8, line 46 ¶ | skipping to change at page 10, line 30 ¶ | |||
| If the server does not support any form of subscription, it may | If the server does not support any form of subscription, it may | |||
| respond | respond | |||
| HTTP/1.1 404 Not Found | HTTP/1.1 404 Not Found | |||
| Date: Mon, 25 Apr 2012 11:10:30 GMT | Date: Mon, 25 Apr 2012 11:10:30 GMT | |||
| Server: example-server | Server: example-server | |||
| Subscribers can determine the URL to receive updates by sending an | Subscribers can determine the URL to receive updates by sending an | |||
| HTTP GET as a request for the "location" leaf with the stream list | HTTP GET as a request for the "location" leaf with the stream list | |||
| entry.The stream to use for may be selected from the Event Stream | entry. The stream to use for may be selected from the Event Stream | |||
| list provided in the capabilities exchange. Note that different | list provided in the capabilities exchange. Note that different | |||
| encodings are supporting using different Event Stream locations. For | encodings are supporting using different Event Stream locations. For | |||
| example, the Subscriber might send the following request: | example, the Subscriber might send the following request: | |||
| GET /restconf/data/ietf-restconf-monitoring:restconf-state/ | GET /restconf/data/ietf-restconf-monitoring:restconf-state/ | |||
| streams/stream=yang-push/access=xml/location HTTP/1.1 | streams/stream=yang-push/access=xml/location HTTP/1.1 | |||
| Host: example.com | Host: example.com | |||
| Accept: application/yang.data+xml | Accept: application/yang.data+xml | |||
| The Publisher might send the following response: | The Publisher might send the following response: | |||
| skipping to change at page 9, line 22 ¶ | skipping to change at page 11, line 4 ¶ | |||
| HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
| Content-Type: application/yang.api+xml | Content-Type: application/yang.api+xml | |||
| <location | <location | |||
| xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> | xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"> | |||
| https://example.com/streams/yang-push-xml | https://example.com/streams/yang-push-xml | |||
| </location> | </location> | |||
| To subscribe and start receiving updates, the subscriber can then | To subscribe and start receiving updates, the subscriber can then | |||
| send an HTTP GET request for the URL returned by the Publisher in the | send an HTTP GET request for the URL returned by the Publisher in the | |||
| request above. The accept header must be "text/event-stream". The | request above. The accept header must be "text/event-stream". The | |||
| Publisher uses the Server Sent Events[W3C-20150203] transport | Publisher uses the Server Sent Events [W3C-20150203] transport | |||
| strategy to push filtered Event Notifications from the Event stream,. | strategy to push filtered Event Notifications from the Event stream. | |||
| The Publisher MUST support individual parameters within the POST | The Publisher MUST support individual parameters within the POST | |||
| request body for all the parameters of a subscription. The only | request body for all the parameters of a subscription. The only | |||
| exception is the encoding, which is embedded in the URI. An example | exception is the encoding, which is embedded in the URI. An example | |||
| of this is: | of this is: | |||
| // subtree filter = /foo | // subtree filter = /foo | |||
| // periodic updates, every 5 seconds | // periodic updates, every 5 seconds | |||
| POST /restconf/operations/ietf-event-notifications: | POST /restconf/operations/ietf-event-notifications: | |||
| establish-subscription HTTP/1.1 | establish-subscription HTTP/1.1 | |||
| skipping to change at page 10, line 46 ¶ | skipping to change at page 12, line 46 ¶ | |||
| "error-info": { | "error-info": { | |||
| "datastore-push:supported-subscription": { | "datastore-push:supported-subscription": { | |||
| "subtree-filter": [null] | "subtree-filter": [null] | |||
| } | } | |||
| } | } | |||
| } | } | |||
| } | } | |||
| } | } | |||
| The following is an example of a pushed Event Notification data for | The following is an example of a pushed Event Notification data for | |||
| 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:56Z</eventTime> | <eventTime>2015-03-09T19:14:56.23Z</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[yang-json] : | 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:56Z", | "eventTime": "2015-03-09T19:14:56.23Z", | |||
| "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: | |||
| POST /restconf/operations/ietf-event-notifications: | POST /restconf/operations/ietf-event-notifications: | |||
| modify-subscription HTTP/1.1 | modify-subscription HTTP/1.1 | |||
| Host: example.com | Host: example.com | |||
| Content-Type: application/yang-data+json | Content-Type: application/yang-data+json | |||
| { | { | |||
| "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 | |||
| DELETE /mystreams/yang-push?subscription-id=my-sub | 3.4.2. Event Notification over HTTP2 | |||
| 3.3.2. Subscription and Updates directly via HTTP | The basic encoding will look as below. It will consists of a JSON | |||
| representation wrapped in an HTTP2 header. | ||||
| For any version of HTTP, the basic encoding will look as below. It | HyperText Transfer Protocol 2 | |||
| consists of a JSON representation wrapped in an HTTP header. | Stream: HEADERS, Stream ID: 5 | |||
| Header: :method: POST | ||||
| Stream: HEADERS, Stream ID: 5 | ||||
| POST (IP+Port) HTTP/1.1 | ||||
| From: (Identifier for Network Element) | ||||
| User-Agent: (CiscoYANGPubSub/1.0) | ||||
| Content-Type: multipart/form-data | ||||
| Content-Length: (determined runtime) | ||||
| { | { | |||
| "ietf-yangpush:notification": { | "ietf-yangpush:notification": { | |||
| "datastore-push:subscription-id": "my-sub", | "datastore-push:subscription-id": "my-sub", | |||
| "eventTime": "2015-03-09T19:14:56Z", | "eventTime": "2015-03-09T19:14:56.23Z", | |||
| "datastore-push:datastore-contents": { | "datastore-push:datastore-contents": { | |||
| "foo": { "bar": "some_string" } | "foo": { "bar": "some_string" } | |||
| } | } | |||
| } | } | |||
| } | } | |||
| 3.4. Stream Discovery | 3.5. Stream Discovery | |||
| For Restconf, this will be accomplished as specified in [Restconf] | Relevant for Dynamic Subscriptions, this will be accomplished as | |||
| section 6.2. The namespace chosen will be the same as how stream | specified in [restconf] section 6.2. The namespace chosen will be | |||
| names are acquired for NETCONF, and so that backwards compatibility | the same as how stream names are acquired for NETCONF, and so that | |||
| can be maintained without replicating this information. For HTTP, | backwards compatibility can be maintained without replicating this | |||
| this is not specified as there is no client driven signaling/ | information. | |||
| subscription. | ||||
| As per [restconf] section 6.3, RESTCONF clients can determine the URL | As per [restconf] section 6.3, RESTCONF clients can determine the URL | |||
| for the subscription resource (to receive notifications) by sending | for the subscription resource (to receive notifications) by sending | |||
| an HTTP GET request for the "location" leaf with the stream list | an HTTP GET request for the "location" leaf with the stream list | |||
| entry. | entry. | |||
| 4. Security Considerations | 4. Security Considerations | |||
| Subscriptions could be used to intentionally or accidentally overload | Subscriptions could be used to intentionally or accidentally overload | |||
| resources of a Publisher. For this reason, it is important that the | the resources of a Publisher. For this reason, it is important that | |||
| Publisher has the ability to prioritize the establishment and push of | the Publisher has the ability to prioritize the establishment and | |||
| Event Notifications where there might be resource exhaust potential. | push of Event Notifications where there might be resource exhaust | |||
| In addition, a server needs to be able to suspend existing | potential. In addition, a server needs to be able to suspend | |||
| Subscriptions when needed. When this occurs, the subscription status | existing Subscriptions when needed. When this occurs, the | |||
| must be updated accordingly and the Receivers notified. | subscription status must be updated accordingly and the Receivers | |||
| notified. | ||||
| A Subscription could be used to attempt retrieve information for | A Subscription could be used to attempt retrieve information for | |||
| which a Receiver has no authorized access. Therefore it is important | which a Receiver has no authorized access. Therefore it is important | |||
| that data pushed via a Subscription is authorized equivalently with | that data pushed via a Subscription is authorized equivalently with | |||
| regular data retrieval operations. Data being pushed to a Receiver | regular data retrieval operations. Data being pushed to a Receiver | |||
| needs therefore to be filtered accordingly, just like if the data | needs therefore to be filtered accordingly, just like if the data | |||
| were being retrieved on-demand. The Netconf Authorization Control | were being retrieved on-demand. The Netconf Authorization Control | |||
| Model [RFC6536] applies even though the transport is not NETCONF. | Model [RFC6536] applies even though the transport is not NETCONF. | |||
| One or more Publishers could be used to overwhelm a Receiver which | One or more Publishers of Configured Subscriptions could be used to | |||
| doesn't even support Subscriptions. Therefore Event Notifications | overwhelm a Receiver which doesn't even support Subscriptions. There | |||
| for Configured Subscriptions MUST only be transmittable over | are two protections here. First Event Notifications for Configured | |||
| Encrypted transports. Clients which do not want pushed Event | Subscriptions MUST only be transmittable over Encrypted transports. | |||
| Notifications need only terminate or refuse any transport sessions | Clients which do not want pushed Event Notifications need only | |||
| from the Publisher. | terminate or refuse any transport sessions from the Publisher. | |||
| Second, the HTTP transport augmentation on the Receiver must send an | ||||
| HTTP 200 OK to a subscription started notification before the | ||||
| 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, transports supporting per- | deployments where this might be a concern, HTTP2 transport such as | |||
| subscription Flow Control and Prioritization (such as HTTP/2) should | HTTP2) should be selected. | |||
| be selected. | ||||
| Another benefit is that a well-behaved Publisher implementation is | ||||
| that it is difficult to a Publisher to perform a DoS attack on a | ||||
| Receiver. DoS attack protection comes from: | ||||
| o the requirement for trust of a TLS session before publication, | ||||
| o the need for an HTTP transport augmentation on the Receiver, and | ||||
| o that the Publication process is suspended when the Receiver | ||||
| doesn't respond. | ||||
| 5. Acknowledgments | 5. Acknowledgments | |||
| We wish to acknowledge the helpful contributions, comments, and | We wish to acknowledge the helpful contributions, comments, and | |||
| suggestions that were received from: Andy Bierman, Sharon Chisholm, | suggestions that were received from: Susan Hares, Tim Jenkins, Balazs | |||
| Yan Gang, Peipei Guo, Susan Hares, Tim Jenkins, Balazs Lengyel, | Lengyel, Kent Watsen, Michael Scharf, and Guangying Zheng. | |||
| Hector Trevino, Kent Watsen, and Guangying Zheng. | ||||
| 6. References | 6. References | |||
| 6.1. Normative References | 6.1. Normative References | |||
| [restconf] | [restconf] | |||
| Bierman, Andy., Bjorklund, Martin., and Kent. Watsen, | Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF | |||
| "RESTCONF Protocol", March 2016, | Protocol", March 2016, <https://datatracker.ietf.org/doc/ | |||
| <https://datatracker.ietf.org/doc/draft-ietf-netconf- | draft-ietf-netconf-restconf/>. | |||
| 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 14, line 38 ¶ | skipping to change at page 16, line 20 ¶ | |||
| [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>. | |||
| [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", | ||||
| RFC 7951, DOI 10.17487/RFC7951, August 2016, | ||||
| <http://www.rfc-editor.org/info/rfc7951>. | ||||
| 6.2. Informative References | 6.2. Informative References | |||
| [call-home] | [call-home] | |||
| Watsen, K., "NETCONF Call Home and RESTCONF Call Home", | Watsen, K., "NETCONF Call Home and RESTCONF Call Home", | |||
| December 2015, <https://tools.ietf.org/html/draft-ietf- | December 2015, <https://tools.ietf.org/html/draft-ietf- | |||
| netconf-call-home-17>. | netconf-call-home-17>. | |||
| [rfc5277bis] | [rfc5277bis] | |||
| Gonzalez Prieto, Alberto., Clemm, Alexander., Voit, Eric., | Gonzalez Prieto, A., Clemm, A., Voit, E., Prasad Tripathy, | |||
| Prasad Tripathy, Ambika., and Einar. Nilsen-Nygaard, | A., and E. Nilsen-Nygaard, "NETCONF Event Notifications", | |||
| "NETCONF Event Notifications", March 2016, | September 2016, <https://datatracker.ietf.org/doc/draft- | |||
| <https://datatracker.ietf.org/doc/draft-gonzalez-netconf- | ietf-netconf-rfc5277bis/>. | |||
| 5277bis/>. | ||||
| [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-json] | ||||
| Lhotka, Ladislav., "JSON Encoding of Data Modeled with | ||||
| YANG", March 2016, <https://datatracker.ietf.org/doc/ | ||||
| draft-ietf-netmod-yang-json/>. | ||||
| [yang-push] | [yang-push] | |||
| Clemm, Alexander., Gonzalez Prieto, Alberto., Voit, Eric., | Clemm, A., Voit, E., Gonzalez Prieto, A., Prasad Tripathy, | |||
| Prasad Tripathy, Ambika., and Einar. Nilsen-Nygaard, | A., and E. Nilsen-Nygaard, "Subscribing to YANG datastore | |||
| "Subscribing to YANG datastore push updates", February | push updates", June 2016, | |||
| 2016, <https://datatracker.ietf.org/doc/draft-ietf- | <https://datatracker.ietf.org/doc/draft-ietf-netconf-yang- | |||
| netconf-yang-push/>. | push/>. | |||
| Appendix A. Proxy YANG Subscription when the Subscriber and Receiver | Appendix A. Proxy YANG Subscription when the Subscriber and Receiver | |||
| are different | are different | |||
| The properties of Dynamic and Configured Subscriptions can be | The properties of Dynamic and Configured Subscriptions can be | |||
| combined to enable deployment models where the Subscriber and | combined to enable deployment models where the Subscriber and | |||
| Receiver are different. Such separation can be useful with some | Receiver are different. Such separation can be useful with some | |||
| combination of: | combination of: | |||
| o An operator doesn't want the subscription to be dependent on the | o An operator does not want the subscription to be dependent on the | |||
| maintenance of transport level keep-alives. (Transport | maintenance of transport level keep-alives. (Transport | |||
| independence provides different scalability characteristics.) | independence provides different scalability characteristics.) | |||
| o There is not a transport session binding, and a transient | o There is not a transport session binding, and a transient | |||
| Subscription needs to survive in an environment where there is | Subscription needs to survive in an environment where there is | |||
| unreliable connectivity with the Receiver and/or Subscriber. | unreliable connectivity with the Receiver and/or Subscriber. | |||
| o An operator wants the Publisher to include highly restrictive | o An operator wants the Publisher to include highly restrictive | |||
| capacity management and Subscription security mechanisms outside | capacity management and Subscription security mechanisms outside | |||
| of domain of existing operational or programmatic interfaces. | of domain of existing operational or programmatic interfaces. | |||
| To build a Proxy Subscription, first the necessary information must | To build a Proxy Subscription, first the necessary information must | |||
| be signaled as part of the <establish-subscription>. Using this set | be signaled as part of the <establish-subscription>. Using this set | |||
| of Subscriber provided information; the same process described within | of Subscriber provided information; the same process described within | |||
| section 3 will be followed. There is one exception. When an HTTP | section 3 will be followed. There is one exception. Only when an | |||
| status code is 201 is received by the Publisher, it will inform the | HTTP status code of 200 comes back from the receiver, will it inform | |||
| Subscriber of Subscription establishment success via its Restconf | the Subscriber of Subscription establishment success via its Restconf | |||
| connection. | connection. | |||
| After a successful establishment, if the Subscriber wishes to track | After a successful establishment, if the Subscriber wishes to track | |||
| the state of Receiver subscriptions, it may choose to place a | the state of Receiver subscriptions, it may choose to place a | |||
| separate on-change Subscription into the "Subscriptions" subtree of | separate on-change Subscription into the "Subscriptions" subtree of | |||
| the YANG Datastore on the Publisher. | the YANG Datastore on the Publisher. | |||
| Putting it all together, the message flow is: | ||||
| +------------+ +-----------+ +----------+ | ||||
| | Subscriber | | Publisher | | Receiver | | ||||
| +------------+ +-----------+ +----------+ | ||||
| | Restconf PUT: | | | ||||
| | <establish-subscription>| | | ||||
| |------------------------>| | | ||||
| | | | | ||||
| | |<-----------TLS-------------->| | ||||
| | | | | ||||
| | |HTTP POST (Sub ID, data1) | | ||||
| | |----------------------------->| | ||||
| | | HTTP 201 (Created)| | ||||
| | |<-----------------------------| | ||||
| | Success: HTTP 204| | | ||||
| |<------------------------| | | ||||
| | |HTTP POST (SubID, URI, data2) | | ||||
| | |----------------------------->| | ||||
| | | HTTP 200 (OK)| | ||||
| | |<-----------------------------| | ||||
| | | data3 | | ||||
| | |<---------------------------->| | ||||
| | | | | ||||
| Appendix B. End-to-End Deployment Guidance | 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 | B.1. Call Home | |||
| Pub/Sub implementations should have the ability to transparently | Pub/Sub implementations should have the ability to transparently | |||
| incorporate lower layer technologies such as Call Home so that secure | incorporate [call-home] so that secure TLS connections can originate | |||
| TLS connections are always originated from the Publisher. There is a | from the desired device. | |||
| Restconf Call home function in [call-home]. For security reasons, | ||||
| this should be implemented when applicable. | ||||
| B.2. TLS Heartbeat | B.2. TLS Heartbeat | |||
| Unlike NETCONF, HTTP sessions might not quickly allow a Subscriber to | HTTP sessions might not quickly allow a Subscriber to recognize when | |||
| recognize when the communication path has been lost from the | the communication path has been lost from the Publisher. To | |||
| Publisher. To recognize this, it is possible for a Receiver (usually | recognize this, it is possible for a Receiver to establish a TLS | |||
| the subscriber) to establish a TLS heartbeat [RFC6520]. In the case | heartbeat [RFC6520]. In the case where a TLS heartbeat is included, | |||
| where a TLS heartbeat is included, it should be sent just from | it should be sent just from Receiver to Publisher. Loss of the | |||
| Receiver to Publisher. Loss of the heartbeat should result in the | heartbeat should result in any Subscription related TCP sessions | |||
| Subscription being terminated with the Subscriber (even when the | between those endpoints being torn down. The subscription can then | |||
| Subscriber and Receiver are different). The Subscriber can then | attempt to re-establish. | |||
| attempt to re-establish the subscription if desired. If the | ||||
| Subscription remains active on the Publisher, future receipt of | ||||
| objects associated with that (or any other unknown) subscription ID | ||||
| should result in a <delete-subscription> being returned to the | ||||
| Publisher from the Receiver. | ||||
| Appendix C. Issues being worked and resolved | Appendix C. 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 | C.1. Unresolved Issues | |||
| RT2 - In what way to we position "Event notifications" model in this | ||||
| document vs. current solution in Restconf. | ||||
| RT3 - Do we include 3rd party signaled subscriptions within models | RT3 - Do we include 3rd party signaled subscriptions within models | |||
| that need to be supported generically, or for a particular type of | that need to be supported generically, or for a particular type of | |||
| transport. | transport. | |||
| RT8 - Once SSE starts, there will be no more Restconf interpretation | RT10 - Right now the examples show a YANG timestamp at the hundredths | |||
| of further signaling upon the connection. It is unclear how this can | of a second level. But the yang-push draft is at seconds. And the | |||
| be made to work with modify and delete subscription. If it cannot, a | requirements show at least milliseconds (if not more). | |||
| method of sending events without SSE will be needed, although this | ||||
| would diverge from the existing Restconf mechanisms | ||||
| C.2. Agreement in principal | C.2. Agreement in principal | |||
| RT4 - Need to add into document examples of 5277bis Event streams. | ||||
| Document only includes yang-push examples at this point. | ||||
| RT6 - We need to define encodings of rfc5277bis notifications. | ||||
| C.3. Resolved Issues | ||||
| RT1 - Integration specifics for Restconf capability discovery on | RT1 - Integration specifics for Restconf capability discovery on | |||
| different types of Streams | different types of Streams | |||
| RT4 - Need to add into document examples of 5277bis Event streams. | RT2 - In what way to we position Event notifications model in this | |||
| Document only includes yang-push examples at this point. | document vs. current solution in Restconf. | |||
| RT6 - We need to define encodings of rfc5277bis notifications for | RT5 - Doesn't make sense to use Restconf for Configured | |||
| both Restconf and HTTP. | subscriptions. HTTP will be used. | |||
| RT7 - HTTP native option doesn't currently use SSE. But we should | RT7 - HTTP native option doesn't currently use SSE. But we should | |||
| evaluate moving to that as possible. It will make development | evaluate moving to that as possible. It will make development | |||
| integration easier and more consistent. | integration easier and more consistent. | |||
| RT8 - Once SSE starts, there will be no more Restconf interpretation | ||||
| of further signaling upon the connection. It is unclear how this can | ||||
| be made to work with modify and delete subscription. If it cannot, a | ||||
| 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 | RT9 - For static subscriptions, perhaps we can use Restconf call home | |||
| to originate an SSE connection. This assume RT8 & RT2 can be | to originate an SSE connection. This assume RT8 & RT2 can be | |||
| resolved with SSE. | resolved with SSE. | |||
| C.3. Resolved Issues | Appendix D. Changes between revisions | |||
| RT5 - Doesn't make sense to use Restconf for Configured | (To be removed by RFC editor prior to publication) | |||
| subscriptions. HTTP will be used. | ||||
| v00 - v01 | ||||
| o Removed the ability for more than one subscription to go to a | ||||
| single HTTP2 stream. | ||||
| o Updated call flows. Extensively. | ||||
| o SSE only used with Restconf and HTTP1.1 Dynamic Subscriptions | ||||
| o HTTP is not used to determine that a Receiver has gone silent and | ||||
| is not Receiving Event Notifications | ||||
| 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 | Alexander Clemm | |||
| Cisco Systems | Cisco Systems | |||
| Email: alex@cisco.com | Email: alex@clemm.org | |||
| Alberto Gonzalez Prieto | ||||
| Cisco Systems | ||||
| 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 | |||
| Alberto Gonzalez Prieto | Andy Bierman | |||
| Cisco Systems | YumaWorks | |||
| Email: albertgo@cisco.com | Email: andy@yumaworks.com | |||
| End of changes. 87 change blocks. | ||||
| 290 lines changed or deleted | 315 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||