summaryrefslogtreecommitdiff
path: root/doc/rfc/rfc6470.txt
blob: 40cd45b01dda742e6a11ad3f6e812bda1ed91ec0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
Internet Engineering Task Force (IETF)                        A. Bierman
Request for Comments: 6470                                       Brocade
Category: Standards Track                                  February 2012
ISSN: 2070-1721


      Network Configuration Protocol (NETCONF) Base Notifications

Abstract

   The Network Configuration Protocol (NETCONF) provides mechanisms to
   manipulate configuration datastores.  However, client applications
   often need to be aware of common events, such as a change in NETCONF
   server capabilities, that may impact management applications.
   Standard mechanisms are needed to support the monitoring of the base
   system events within the NETCONF server.  This document defines a
   YANG module that allows a NETCONF client to receive notifications for
   some common system events.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc6470.

Copyright Notice

   Copyright (c) 2012 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
   (http://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
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.




Bierman                      Standards Track                    [Page 1]
^L
RFC 6470               NETCONF Base Notifications          February 2012


Table of Contents

   1. Introduction ....................................................2
      1.1. Terminology ................................................2
   2. YANG Module for NETCONF Base Notifications ......................3
      2.1. Overview ...................................................3
      2.2. Definitions ................................................4
   3. IANA Considerations ............................................11
   4. Security Considerations ........................................12
   5. Acknowledgements ...............................................14
   6. Normative References ...........................................14

1.  Introduction

   The NETCONF protocol [RFC6241] provides mechanisms to manipulate
   configuration datastores.  However, client applications often need to
   be aware of common events, such as a change in NETCONF server
   capabilities, that may impact management applications.  Standard
   mechanisms are needed to support the monitoring of the base system
   events within the NETCONF server.  This document defines a YANG
   module [RFC6020] that allows a NETCONF client to receive
   notifications for some common system events.

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

   The following terms are defined in [RFC6241]:

   o  client
   o  datastore
   o  protocol operation
   o  server

   The following terms are defined in [RFC5277]:

   o  event
   o  stream
   o  subscription

   The following term is defined in [RFC6020]:

   o  data node






Bierman                      Standards Track                    [Page 2]
^L
RFC 6470               NETCONF Base Notifications          February 2012


2.  YANG Module for NETCONF Base Notifications

2.1.  Overview

   The YANG module defined within this document specifies a small number
   of event notification messages for use within the 'NETCONF' stream,
   and accessible to clients via the subscription mechanism described in
   [RFC5277].  This module imports data types from the 'ietf-netconf'
   module defined in [RFC6241] and 'ietf-inet-types' module defined in
   [RFC6021].

   These notifications pertain to configuration and monitoring portions
   of the managed system, not the entire system.  A server MUST report
   events that are directly related to the NETCONF protocol.  A server
   MAY report events for non-NETCONF management sessions, using the
   'session-id' value of zero.

   This module defines the following notifications for the 'NETCONF'
   stream to notify a client application that the NETCONF server state
   has changed:

   netconf-config-change:
      Generated when the NETCONF server detects that the <running> or
      <startup> configuration datastore has been changed by a management
      session.  The notification summarizes the edits that have been
      detected.

   netconf-capability-change:
      Generated when the NETCONF server detects that the server
      capabilities have changed.  Indicates which capabilities have been
      added, deleted, and/or modified.  The manner in which a server
      capability is changed is outside the scope of this document.

   netconf-session-start:
      Generated when a NETCONF server detects that a NETCONF session has
      started.  A server MAY generate this event for non-NETCONF
      management sessions.  Indicates the identity of the user that
      started the session.

   netconf-session-end:
      Generated when a NETCONF server detects that a NETCONF session has
      terminated.  A server MAY optionally generate this event for
      non-NETCONF management sessions.  Indicates the identity of the
      user that owned the session, and why the session was terminated.







Bierman                      Standards Track                    [Page 3]
^L
RFC 6470               NETCONF Base Notifications          February 2012


   netconf-confirmed-commit:
      Generated when a NETCONF server detects that a confirmed-commit
      event has occurred.  Indicates the event and the current state of
      the confirmed-commit procedure in progress.

2.2.  Definitions

   <CODE BEGINS> file="ietf-netconf-notifications@2011-12-09.yang"

   module ietf-netconf-notifications {

      namespace
        "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications";

      prefix ncn;

      import ietf-inet-types { prefix inet; }
      import ietf-netconf { prefix nc; }

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

      contact
        "WG Web:   <http://tools.ietf.org/wg/netconf/>
         WG List:  <mailto:netconf@ietf.org>

         WG Chair: Bert Wijnen
                   <mailto:bertietf@bwijnen.net>

         WG Chair: Mehmet Ersue
                   <mailto:mehmet.ersue@nsn.com>

         Editor:   Andy Bierman
                   <mailto:andy@netconfcentral.org>";

      description
        "This module defines a YANG data model for use with the
         NETCONF protocol that allows the NETCONF client to
         receive common NETCONF base event notifications.

         Copyright (c) 2012 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





Bierman                      Standards Track                    [Page 4]
^L
RFC 6470               NETCONF Base Notifications          February 2012


         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 6470; see
         the RFC itself for full legal notices.";

      revision "2012-02-06" {
        description
          "Initial version.";
        reference
          "RFC 6470: NETCONF Base Notifications";
      }

     grouping common-session-parms {
       description
         "Common session parameters to identify a
          management session.";

       leaf username {
         type string;
         mandatory true;
         description
           "Name of the user for the session.";
       }

       leaf session-id {
         type nc:session-id-or-zero-type;
         mandatory true;
         description
           "Identifier of the session.
            A NETCONF session MUST be identified by a non-zero value.
            A non-NETCONF session MAY be identified by the value zero.";
       }

       leaf source-host {
         type inet:ip-address;
         description
           "Address of the remote host for the session.";
       }
     }










Bierman                      Standards Track                    [Page 5]
^L
RFC 6470               NETCONF Base Notifications          February 2012


      grouping changed-by-parms {
       description
         "Common parameters to identify the source
          of a change event, such as a configuration
          or capability change.";

       container changed-by {
         description
           "Indicates the source of the change.
            If caused by internal action, then the
            empty leaf 'server' will be present.
            If caused by a management session, then
            the name, remote host address, and session ID
            of the session that made the change will be reported.";
         choice server-or-user {
           mandatory true;
           leaf server {
             type empty;
             description
               "If present, the change was caused
                by the server.";
           }

           case by-user {
             uses common-session-parms;
           }
         } // choice server-or-user
       } // container changed-by-parms
     }


     notification netconf-config-change {
       description
         "Generated when the NETCONF server detects that the
          <running> or <startup> configuration datastore
          has been changed by a management session.
          The notification summarizes the edits that
          have been detected.

          The server MAY choose to also generate this
          notification while loading a datastore during the
          boot process for the device.";

       uses changed-by-parms;







Bierman                      Standards Track                    [Page 6]
^L
RFC 6470               NETCONF Base Notifications          February 2012


       leaf datastore {
         type enumeration {
           enum running {
             description "The <running> datastore has changed.";
           }
           enum startup {
             description "The <startup> datastore has changed";
           }
         }
         default "running";
         description
           "Indicates which configuration datastore has changed.";
       }

       list edit {
         description
           "An edit record SHOULD be present for each distinct
            edit operation that the server has detected on
            the target datastore.  This list MAY be omitted
            if the detailed edit operations are not known.
            The server MAY report entries in this list for
            changes not made by a NETCONF session (e.g., CLI).";

         leaf target {
           type instance-identifier;
           description
             "Topmost node associated with the configuration change.
              A server SHOULD set this object to the node within
              the datastore that is being altered.  A server MAY
              set this object to one of the ancestors of the actual
              node that was changed, or omit this object, if the
              exact node is not known.";
         }

         leaf operation {
           type nc:edit-operation-type;
           description
             "Type of edit operation performed.
              A server MUST set this object to the NETCONF edit
              operation performed on the target datastore.";
         }
       } // list edit
     } // notification netconf-config-change








Bierman                      Standards Track                    [Page 7]
^L
RFC 6470               NETCONF Base Notifications          February 2012


     notification netconf-capability-change {
       description
         "Generated when the NETCONF server detects that
          the server capabilities have changed.
          Indicates which capabilities have been added, deleted,
          and/or modified.  The manner in which a server
          capability is changed is outside the scope of this
          document.";

       uses changed-by-parms;

       leaf-list added-capability {
         type inet:uri;
         description
           "List of capabilities that have just been added.";
       }

       leaf-list deleted-capability {
         type inet:uri;
         description
           "List of capabilities that have just been deleted.";
       }

       leaf-list modified-capability {
         type inet:uri;
         description
           "List of capabilities that have just been modified.
            A capability is considered to be modified if the
            base URI for the capability has not changed, but
            one or more of the parameters encoded at the end of
            the capability URI have changed.
            The new modified value of the complete URI is returned.";
       }
     } // notification netconf-capability-change


     notification netconf-session-start {
       description
         "Generated when a NETCONF server detects that a
          NETCONF session has started.  A server MAY generate
          this event for non-NETCONF management sessions.
          Indicates the identity of the user that started
          the session.";
       uses common-session-parms;
     } // notification netconf-session-start






Bierman                      Standards Track                    [Page 8]
^L
RFC 6470               NETCONF Base Notifications          February 2012


     notification netconf-session-end {
       description
         "Generated when a NETCONF server detects that a
          NETCONF session has terminated.
          A server MAY optionally generate this event for
          non-NETCONF management sessions.  Indicates the
          identity of the user that owned the session,
          and why the session was terminated.";

       uses common-session-parms;

       leaf killed-by {
         when "../termination-reason = 'killed'";
         type nc:session-id-type;
         description
           "The ID of the session that directly caused this session
            to be abnormally terminated.  If this session was abnormally
            terminated by a non-NETCONF session unknown to the server,
            then this leaf will not be present.";
       }

       leaf termination-reason {
         type enumeration {
           enum "closed" {
             description
               "The session was terminated by the client in normal
                fashion, e.g., by the NETCONF <close-session>
                protocol operation.";
           }
           enum "killed" {
             description
               "The session was terminated in abnormal
                fashion, e.g., by the NETCONF <kill-session>
                protocol operation.";
           }
           enum "dropped" {
             description
               "The session was terminated because the transport layer
                connection was unexpectedly closed.";
           }
           enum "timeout" {
             description
               "The session was terminated because of inactivity,
                e.g., waiting for the <hello> message or <rpc>
                messages.";
           }





Bierman                      Standards Track                    [Page 9]
^L
RFC 6470               NETCONF Base Notifications          February 2012


           enum "bad-hello" {
             description
               "The client's <hello> message was invalid.";
           }
           enum "other" {
             description
               "The session was terminated for some other reason.";
           }
         }
         mandatory true;
         description
           "Reason the session was terminated.";
       }
     } // notification netconf-session-end


     notification netconf-confirmed-commit {
       description
         "Generated when a NETCONF server detects that a
          confirmed-commit event has occurred.  Indicates the event
          and the current state of the confirmed-commit procedure
          in progress.";
       reference
         "RFC 6241, Section 8.4";

       uses common-session-parms {
         when "../confirm-event != 'timeout'";
       }

       leaf confirm-event {
         type enumeration {
           enum "start" {
             description
               "The confirmed-commit procedure has started.";
           }
           enum "cancel" {
             description
               "The confirmed-commit procedure has been canceled,
                e.g., due to the session being terminated, or an
                explicit <cancel-commit> operation.";
           }
           enum "timeout" {
             description
               "The confirmed-commit procedure has been canceled
                due to the confirm-timeout interval expiring.
                The common session parameters will not be present
                in this sub-mode.";
           }



Bierman                      Standards Track                   [Page 10]
^L
RFC 6470               NETCONF Base Notifications          February 2012


           enum "extend" {
             description
               "The confirmed-commit timeout has been extended,
                e.g., by a new <confirmed-commit> operation.";
           }
           enum "complete" {
             description
               "The confirmed-commit procedure has been completed.";
           }
         }
         mandatory true;
         description
           "Indicates the event that caused the notification.";
       }

       leaf timeout {
         when
           "../confirm-event = 'start' or ../confirm-event = 'extend'";
         type uint32;
         units "seconds";
         description
           "The configured timeout value if the event type
            is 'start' or 'extend'.  This value represents
            the approximate number of seconds from the event
            time when the 'timeout' event might occur.";
       }
     } // notification netconf-confirmed-commit

   }

   <CODE ENDS>

3.  IANA Considerations

   This document registers one XML namespace URN in the 'IETF XML
   registry', following the format defined in [RFC3688].

      URI: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications

   Registrant Contact: The IESG.

   XML: N/A; the requested URI is an XML namespace.









Bierman                      Standards Track                   [Page 11]
^L
RFC 6470               NETCONF Base Notifications          February 2012


   This document registers one module name in the 'YANG Module Names'
   registry, defined in [RFC6020].

      name: ietf-netconf-notifications
      prefix: ncn
      namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications
      RFC: 6470

4.  Security Considerations

   The YANG module defined in this memo is designed to be accessed via
   the NETCONF protocol [RFC6241].  The lowest NETCONF layer is the
   secure transport layer and the mandatory-to-implement secure
   transport is SSH, defined in [RFC6242].

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  These are the subtrees and data
   nodes and their sensitivity/vulnerability:

   /netconf-config-change:
      Event type itself indicates that the system configuration has
      changed.  This event could alert an attacker that specific
      configuration data nodes have been altered.
   /netconf-config-change/changed-by:
      Indicates whether the server or a specific user management session
      made the configuration change.  Identifies the user name,
      session-id, and source host address associated with the
      configuration change, if any.
   /netconf-config-change/datastore:
      Indicates which datastore has been changed.  This data can be used
      to determine if the non-volatile startup configuration data has
      been changed.
   /netconf-config-change/edit:
      Identifies the specific edit operations and specific datastore
      subtree(s) that have changed.  This data could be used to
      determine if specific server vulnerabilities may now be present.













Bierman                      Standards Track                   [Page 12]
^L
RFC 6470               NETCONF Base Notifications          February 2012


   /netconf-capability-change:
      Event type itself indicates that the system capabilities have
      changed, and may now be vulnerable to unspecified attacks.  An
      attacker will likely need to understand the content represented by
      specific capability URI strings.  For example, knowing that a
      packet capture monitoring capability has been added to the system
      might help an attacker identify the device for possible
      unauthorized eavesdropping.
   /netconf-capability-change/changed-by:
      Indicates whether the server or a specific user management session
      made the capability change.  Identifies the user name, session-id,
      and source host address associated with the capability change, if
      any.
   /netconf-capability-change/added-capability:
      Indicates the specific capability URIs that have been added.  This
      data could be used to determine if specific server vulnerabilities
      may now be present.
   /netconf-capability-change/deleted-capability:
      Indicates the specific capability URIs that have been deleted.
      This data could be used to determine if specific server
      vulnerabilities may now be present.
   /netconf-capability-change/modified-capability:
      Indicates the specific capability URIs that have been modified.
      This data could be used to determine if specific server
      vulnerabilities may now be present.

   /netconf-session-start:
      Event type itself indicates that a NETCONF or other management
      session may start altering the device configuration and/or state.
      It may be possible for an attacker to alter the configuration by
      somehow taking advantage of another session concurrently editing
      an unlocked datastore.
   /netconf-session-start/username:
      Indicates the user name associated with the session.
   /netconf-session-start/source-host:
      Indicates the source host address associated with the session.

   /netconf-session-end:
      Event type itself indicates that a NETCONF or other management
      session may be finished altering the device configuration.  This
      event could alert an attacker that a datastore may have been
      altered.
   /netconf-session-end/username:
      Indicates the user name associated with the session.
   /netconf-session-end/source-host:
      Indicates the source host address associated with the session.





Bierman                      Standards Track                   [Page 13]
^L
RFC 6470               NETCONF Base Notifications          February 2012


   /netconf-confirmed-commit:
      Event type itself indicates that the <running> datastore may have
      changed.  This event could alert an attacker that the device
      behavior has changed.
   /netconf-confirmed-commit/username:
      Indicates the user name associated with the session.
   /netconf-confirmed-commit/source-host:
      Indicates the source host address associated with the session.
   /netconf-confirmed-commit/confirm-event:
      Indicates the specific confirmed-commit state change that
      occurred.  A value of 'complete' probably indicates that the
      <running> datastore has changed.
   /netconf-confirmed-commit/timeout:
      Indicates the number of seconds in the future when the <running>
      datastore may change, due to the server reverting to an older
      configuration.

5.  Acknowledgements

   Thanks to Martin Bjorklund, Juergen Schoenwaelder, Kent Watsen, and
   many other members of the NETCONF WG for providing important input to
   this document.

6.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              January 2004.

   [RFC5277]  Chisholm, S. and H. Trevino, "NETCONF Event
              Notifications", RFC 5277, July 2008.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010.

   [RFC6021]  Schoenwaelder, J., Ed., "Common YANG Data Types",
              RFC 6021, October 2010.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, June 2011.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, June 2011.




Bierman                      Standards Track                   [Page 14]
^L
RFC 6470               NETCONF Base Notifications          February 2012


Author's Address

   Andy Bierman
   Brocade

   EMail: andy@netconfcentral.org













































Bierman                      Standards Track                   [Page 15]
^L