NETCONF Working Group                                            Z. Wang
Internet-Draft                                                     Q. Wu
Intended status: Standards Track                                  Huawei
Expires: September 4, 2020                                        P. Liu
                                                                  H. Cai
                                                            China Mobile
                                                           March 3, 2020


              Bulk Subscription to YANG Event Notification
          draft-wang-netconf-bulk-subscribed-notifications-01

Abstract

   This document defines a YANG data model and associated mechanism that
   allows subscriber applications to bulk subscribe to publishers' event
   streams based on group identifier.  This allows the publishers to
   report multiple notifications in a single bundling message.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 4, 2020.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of



Wang, et al.            Expires September 4, 2020               [Page 1]


Internet-Draft              Bulk Subscription                 March 2020


   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Model Overview  . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  Bulk Subscription YANG Module . . . . . . . . . . . . . . . .   5
   4.  Bulk Notification YANG Module . . . . . . . . . . . . . . . .   8
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
     5.1.  Updates to the IETF XML Registry  . . . . . . . . . . . .   9
     5.2.  Updates to the YANG Module Names Registry . . . . . . . .  10
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  11
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  11
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .  11
     8.2.  Informative References  . . . . . . . . . . . . . . . . .  12
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  12

1.  Introduction

   The Subscription to YANG Notifications specification [RFC8639] uses a
   "stream" name in subscription protocol operation for identifying the
   targeted event stream against which the subscription is applied and
   supports multiple subscriptions on a single transport session.
   Notification Message Headers and Bundles [I-D.ietf-netconf-
   notification-messages] allows multiple notifications bundled into one
   transportable message.  However the subscription protocol operation
   doesn't provide specific criteria to classify subscriptions and
   therefore lacks the capability to explicitly indicate which specific
   subscription associated with the notification should be bundled
   together,e.g., subscription A and B are bundled based on their
   relationship with a set of YANG data models while subscription C and
   D are bundled based on "transport" and "encoding" parameters,both
   bundled groups are transported in the same transport session.  A
   group identifier associated with a set of subscriptions or YANG data
   models enables the ability to perform encapsulation operation on a
   set of subscriptions with common characteristics via a single
   transaction.  The group identifier provides a more optimal mechanism
   for notification encapsulation which would otherwise require multiple
   atomic transactions on a per subscription (i.e., one message per
   notification) basis.  Following are some of the use-cases where such
   identifier can be used.

   o  For a dynamic subscription, the subscriber may have already had
      priori knowledge about correlation relation between
      subscriptions(e.g., aggregated subscribed data from multiple



Wang, et al.            Expires September 4, 2020               [Page 2]


Internet-Draft              Bulk Subscription                 March 2020


      sources).  With this priori knowledge,it might send a bundle
      subscription RPC request to indicate what specific notifications
      associated with the subscription must be bundled together.

   o  For a configured subscription, self-explanation data Node tag
      capability advertisment describing correlation between data nodes
      in different YANG data model from different publisher can be used
      to further establish correlation relation between subscriptions.
      The correlation relation between subscriptions can be configured
      back onto publisher, which help determine which notifications can
      be bundles and which notifications are not.

   o  With the above bundle subscription indication from subscription to
      the publisher, multiple notifications corresponding to the request
      protocol operation for those notifications are bundled into one
      transportable message using Notification Message Headers and
      Bundles defined in [I-D.ietf-netconf-notification-messages].

   This document defines a YANG data model and associated mechanism that
   classify subscription based on various different filtering criteria
   and allow subscriber applications to bulk subscribe/unsubscribe to
   publishers' event streams based on group identifier.  This allows the
   publishers to report multiple notification in a single bundling
   message defined in [I-D.ietf-netconf-notification-messages].

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   This document uses the following terms:

   Event:  Something that happens which may be of interest or trigger
      the invocation of the rule.  A fault, an alarm, a change in
      network state, network security threat, hardware malfunction,
      buffer untilization crossing a threshold, network connection
      setup, an external input to the system, for example [RFC3877].

   Client:  Defined in [RFC8342].

   Configuration:   Defined in [RFC8342].

   Configured subscription:  Defined in [RFC8639]

   Configuration datastore:    Defined in [RFC8342].



Wang, et al.            Expires September 4, 2020               [Page 3]


Internet-Draft              Bulk Subscription                 March 2020


   Event record:   A set of information detailing an event [RFC8639].

   Event stream:   A continuous, chronologically ordered set of events
      aggregated under some context [RFC8639].

   Notification message:   Information intended for a receiver
      indicating that one or more events have occurred [RFC8639].

   Publisher:  An entity responsible for streaming notification messages
      per the terms of a subscription [RFC8639].

   Receiver:  A target to which a publisher pushes subscribed event
      records.  For dynamic subscriptions, the receiver and subscriber
      are the same entity [RFC8639].

   Subscriber:   A client able to request and negotiate a contract for
      the generation and push of event records from a publisher.  For
      dynamic subscriptions, the receiver and subscriber are the same
      entity [RFC8639].

   Subscription:  A contract with a publisher, stipulating the
      information that one or more receivers wish to have pushed from
      the publisher without the need for further solicitation [RFC8639].

2.  Model Overview

   The YANG data model for the Bulk Subscriptions to YANG Event
   Notification has been split into two modules:

   o  The ietf-bulk-subscription.yang module defines a list for
      classifying different subscriptions corresponding to event streams
      into groups.  Each group is associated with a group identifier and
      a set of subscriptions.  A set of subscription is identified by a
      "group-id" string.  This string is used both as an index within
      the bulk subscription module.  It associate a specific bundle
      group with a group of subscriptions and a set of YANG data models,
      as shown in the subscription augmentation.  In addition,ietf-
      subscribed-notifications.yang module defined in [RFC8639] is
      augmented with "max-bundle-latency" and "compression-algorithm" to
      enhance QoS feature and provide additional subscription bundle
      classification criteria.

   o  The ietf-bulk-notification.yang module augment the YANG structure
      of ietf-notification-messages.yang [draft-ietf-netconf-
      notification-messages], a "group-id" is added to the "message-
      header" of the ietf-notification-messages.yang to indicate the
      group to which a set of notifications belongs.  In addition,
      "compression-algorithm" parameer is augmented to "message-header"



Wang, et al.            Expires September 4, 2020               [Page 4]


Internet-Draft              Bulk Subscription                 March 2020


      to inform the corresponding recievers of compression algorithm to
      be used by the publisher.

   The following tree diagrams [RFC8340] provide an overview of the data
   model for "ietf-bulk-subscription.yang" module and the "ietf-bulk-
   notification.yang" module.

  module: ietf-bulk-subscription
    +--rw bundle-groups
       +--rw bundle-group* [group-id]
          +--rw group-id    string
          +--rw subscription-id*     leafref
          +--rw yang-module*         yang:yang-identifier

    augment /sn:subscriptions/sn:subscription:
       +--rw max-bundle-latency      uint32
       +--rw compression-algorithm  string
    +---x bundle-subscription
       +---input
          +---w group-id?        -> /bundle-groups/bundle-group/group-id
          +---w max-bundle-latency      uint32
          +---w compression-algorithm   string
          +---w subscription-id*        subscription-id
          +---w masked-subscription-id* subscription-id

  module: ietf-bulk-notification
       augment-structure /nm:message/nm:message-header:
          +--rw group-id?    string
          +--rw compression-algorithm string

3.  Bulk Subscription YANG Module

  <CODE BEGINS> file "ietf-bulk-subscription@2019-09-23.yang"
module ietf-bulk-subscription {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bulk-subscription";
  prefix bs;

  import ietf-subscribed-notifications {
    prefix sn;
  }
  import ietf-yang-types {
    prefix yang;
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";
  contact



Wang, et al.            Expires September 4, 2020               [Page 5]


Internet-Draft              Bulk Subscription                 March 2020


    "";
  description
    "NETCONF Protocol Data Types and Protocol Operations.

     Copyright (c) 2011 IETF Trust and the persons identified as
     the document authors.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 6241; see
     the RFC itself for full legal notices.";

  revision 2019-09-23 {
    description
      "Initial revision";
       reference "RFC XXXX: Bulk Subscription to YANG Event Notification";
  }
  identity encode-cbor {
    base sn:encoding;
    description
      "Encode data using cbor.";
  }
  identity encode-gpb {
    base sn:encoding;
    description
      "Encode data using gpb.";
  }
  container bundle-groups {
    list bundle-group {
      key "group-id";
      leaf group-id {
        type string;
        description
          "This group ID is used as an index within the bulk subscription module
           , which indicates subscription classification criteria.";
      }
      leaf-list subscription-id {
        type leafref {
         path "/sn:subscriptions/sn:subscription/sn:id";
        }
        description
          "subscription-id";
      }



Wang, et al.            Expires September 4, 2020               [Page 6]


Internet-Draft              Bulk Subscription                 March 2020


    leaf-list yang-module {
      type yang:yang-identifier;
      description
        "Name of the YANG module list supported by the publisher.";
    }
      description
        "List for group that classify different subscriptions into groups.";
    }
    leaf compression-algorithm {
      type string;
      description
        "The technology with which an originator compress bytestream
         contents.";
    }
    description
      "Container for subscription group.";
  }
  augment "/sn:subscriptions/sn:subscription" {
      leaf max-bundle-latency {
      type uint32;
      units centiseconds;
      default 400;
      description
      "The maximum latency before a specific YANG Notifications generated
       must egress a publisher.";
     }
    leaf compression-algorithm {
      type string;
      description
        "The technology with which an originator compress bytestream
         contents.";
    }
    description
      "Augment the subscribed-notifications module with transport specific inforamtion.";
  }

  rpc bundle-subscription {
   description
    "Bundle subscription. This paremeter indicates what subscription must be bundled together.";
    input {
     leaf group-id {
      type string;
      description
      "This group ID is used as an index within the bulk subscription module";
      }
    leaf-list subscription-id {
      type uint32;
      description



Wang, et al.            Expires September 4, 2020               [Page 7]


Internet-Draft              Bulk Subscription                 March 2020


       "Subscription-id paremeter indicates what subscription must be bundled together.";
      }
   leaf-list mask-subscription-id {
      type uint32;
      description
       "Mask subscription-id paremeter indicates what subscription must
        not be bundled together.";
      }
     leaf max-bundle-latency {
      type uint32;
      units centiseconds;
      default 400;
      description
      "The maximum latency before a specific YANG Notifications generated
       must egress a publisher.";
     }
    leaf compression-algorithm {
      type string;
      description
        "The technology with which an originator compress bytestream
         contents.";
    }
    }
  }
}
<CODE ENDS>

4.  Bulk Notification YANG Module

<CODE BEGINS> file "ietf-bulk-notification@2019-09-23.yang"
module ietf-bulk-notification {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bulk-notification";
  prefix bn;

  import ietf-yang-structure-ext {
    prefix sx;
  }
  import ietf-notification-messages {
    prefix nm;
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";
  contact
    "";
  description
    "NETCONF Protocol Data Types and Protocol Operations.



Wang, et al.            Expires September 4, 2020               [Page 8]


Internet-Draft              Bulk Subscription                 March 2020


     Copyright (c) 2011 IETF Trust and the persons identified as
     the document authors.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 6241; see
     the RFC itself for full legal notices.";

  revision 2019-09-23 {
    description
      "Initial revision";
    reference
      "RFC XXXX: Bulk Subscription to YANG Event Notification";
  }

  sx:augment-structure "/nm:message/nm:message-header" {
     leaf group-id {
      type string;
      description
        "To identify the group to which a set of notifications belongs.";
    }
    leaf compression-algorithm {
      type string;
      description
        "The technology with which an originator compress bytestream
         contents.";
    }
    description
      "Group related informations are added to the 'message-header' of
       the ietf-notification-messages to identify the group to which a
       set of notifications belongs." and compression algorithms used by
       the publisher.;
  }
}
<CODE ENDS>

5.  IANA Considerations

5.1.  Updates to the IETF XML Registry

   This document registers two URIs in the IETF XML registry [RFC3688].
   Following the format in [RFC3688], the following registrations are
   requested to be made:



Wang, et al.            Expires September 4, 2020               [Page 9]


Internet-Draft              Bulk Subscription                 March 2020


   ---------------------------------------------------------------------
      URI: urn:ietf:params:xml:ns:yang:ietf-bulk-subscription
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.

      URI: urn:ietf:params:xml:ns:yang:ietf-bulk-notification
      Registrant Contact: The IESG.
      XML: N/A, the requested URI is an XML namespace.
   ---------------------------------------------------------------------

5.2.  Updates to the YANG Module Names Registry

   This document registers two YANG modules in the YANG Module Names
   registry [RFC7950]. . Following the format in [RFC6020], the
   following registration has been made:

   ---------------------------------------------------------------------
      Name:         ietf-bulk-subscription
      Namespace:    urn:ietf:params:xml:ns:yang:ietf-bulk-subscription
      Prefix:       trig
      Reference:    RFC xxxx

      Name:         ietf-bulk-notification
      Namespace:    urn:ietf:params:xml:ns:yang:ietf-bulk-notification
      Prefix:       evt
      Reference:    RFC xxxx
   ---------------------------------------------------------------------

6.  Security Considerations

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The NETCONF Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive in some
   network environments.  Write operations (e.g., edit-config) to these
   data nodes without proper protection can have a negative effect on



Wang, et al.            Expires September 4, 2020              [Page 10]


Internet-Draft              Bulk Subscription                 March 2020


   network operations.  These are the subtrees and data nodes and their
   sensitivity/vulnerability:

   o  /groups/group/group-id

   o  /groups/group/stream

   o  /sn:subscriptions/sn:subscription/sn:target/sn:stream/bs:group-id

   o  sn:establish-subscription/sn:input/sn:target/sn:stream /bs:group-
      id

7.  Acknowledgements

   Thanks to Eric Voit for reviewing this draft and providing important
   input to this document.

8.  References

8.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.




Wang, et al.            Expires September 4, 2020              [Page 11]


Internet-Draft              Bulk Subscription                 March 2020


   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

   [RFC8407]  Bierman, A., "Guidelines for Authors and Reviewers of
              Documents Containing YANG Data Models", BCP 216, RFC 8407,
              DOI 10.17487/RFC8407, October 2018,
              <https://www.rfc-editor.org/info/rfc8407>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

8.2.  Informative References

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

Authors' Addresses

   Michael Wang
   Huawei
   101 Software Avenue, Yuhua District
   Nanjing, Jiangsu  210012
   China

   Email: wangzitao@huawei.com




Wang, et al.            Expires September 4, 2020              [Page 12]


Internet-Draft              Bulk Subscription                 March 2020


   Qin Wu
   Huawei
   101 Software Avenue, Yuhua District
   Nanjing, Jiangsu  210012
   China

   Email: bill.wu@huawei.com


   Peng Liu
   China Mobile
   32 Xuanwumen West St, Xicheng District
   Beijing  10053

   Email: liupengyjy@chinamobile.com


   Hui Cai
   China Mobile
   32 Xuanwumen West St, Xicheng District
   Beijing  10053

   Email: caihui@chinamobile.com




























Wang, et al.            Expires September 4, 2020              [Page 13]