Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / ietf-netconf-acm@2012-02-22.yin
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
3 &lt;module name="ietf-netconf-acm"
4         xmlns="urn:ietf:params:xml:ns:yang:yin:1"
5         xmlns:nacm="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"
6         xmlns:yang="urn:ietf:params:xml:ns:yang:ietf-yang-types"&gt;
7   &lt;namespace uri="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"/&gt;
8   &lt;prefix value="nacm"/&gt;
9   &lt;import module="ietf-yang-types"&gt;
10     &lt;prefix value="yang"/&gt;
11   &lt;/import&gt;
12   &lt;organization&gt;
13     &lt;text&gt;IETF NETCONF (Network Configuration) Working Group&lt;/text&gt;
14   &lt;/organization&gt;
15   &lt;contact&gt;
16     &lt;text&gt;WG Web:   &amp;lt;http://tools.ietf.org/wg/netconf/&amp;gt;
17 WG List:  &amp;lt;mailto:netconf@ietf.org&amp;gt;
18
19 WG Chair: Mehmet Ersue
20           &amp;lt;mailto:mehmet.ersue@nsn.com&amp;gt;
21
22 WG Chair: Bert Wijnen
23           &amp;lt;mailto:bertietf@bwijnen.net&amp;gt;
24
25 Editor:   Andy Bierman
26           &amp;lt;mailto:andy@yumaworks.com&amp;gt;
27
28 Editor:   Martin Bjorklund
29           &amp;lt;mailto:mbj@tail-f.com&amp;gt;&lt;/text&gt;
30   &lt;/contact&gt;
31   &lt;description&gt;
32     &lt;text&gt;NETCONF Access Control Model.
33
34 Copyright (c) 2012 IETF Trust and the persons identified as
35 authors of the code.  All rights reserved.
36
37 Redistribution and use in source and binary forms, with or
38 without modification, is permitted pursuant to, and subject
39 to the license terms contained in, the Simplified BSD
40 License set forth in Section 4.c of the IETF Trust's
41 Legal Provisions Relating to IETF Documents
42 (http://trustee.ietf.org/license-info).
43
44 This version of this YANG module is part of RFC 6536; see
45 the RFC itself for full legal notices.&lt;/text&gt;
46   &lt;/description&gt;
47   &lt;revision date="2012-02-22"&gt;
48     &lt;description&gt;
49       &lt;text&gt;Initial version&lt;/text&gt;
50     &lt;/description&gt;
51     &lt;reference&gt;
52       &lt;text&gt;RFC 6536: Network Configuration Protocol (NETCONF)
53           Access Control Model&lt;/text&gt;
54     &lt;/reference&gt;
55   &lt;/revision&gt;
56   &lt;extension name="default-deny-write"&gt;
57     &lt;description&gt;
58       &lt;text&gt;Used to indicate that the data model node
59 represents a sensitive security system parameter.
60
61 If present, and the NACM module is enabled (i.e.,
62 /nacm/enable-nacm object equals 'true'), the NETCONF server
63 will only allow the designated 'recovery session' to have
64 write access to the node.  An explicit access control rule is
65 required for all other users.
66
67 The 'default-deny-write' extension MAY appear within a data
68 definition statement.  It is ignored otherwise.&lt;/text&gt;
69     &lt;/description&gt;
70   &lt;/extension&gt;
71   &lt;extension name="default-deny-all"&gt;
72     &lt;description&gt;
73       &lt;text&gt;Used to indicate that the data model node
74 controls a very sensitive security system parameter.
75
76 If present, and the NACM module is enabled (i.e.,
77 /nacm/enable-nacm object equals 'true'), the NETCONF server
78 will only allow the designated 'recovery session' to have
79 read, write, or execute access to the node.  An explicit
80 access control rule is required for all other users.
81
82 The 'default-deny-all' extension MAY appear within a data
83 definition statement, 'rpc' statement, or 'notification'
84 statement.  It is ignored otherwise.&lt;/text&gt;
85     &lt;/description&gt;
86   &lt;/extension&gt;
87   &lt;typedef name="user-name-type"&gt;
88     &lt;type name="string"&gt;
89       &lt;length value="1..max"/&gt;
90     &lt;/type&gt;
91     &lt;description&gt;
92       &lt;text&gt;General Purpose Username string.&lt;/text&gt;
93     &lt;/description&gt;
94   &lt;/typedef&gt;
95   &lt;typedef name="matchall-string-type"&gt;
96     &lt;type name="string"&gt;
97       &lt;pattern value="\*"/&gt;
98     &lt;/type&gt;
99     &lt;description&gt;
100       &lt;text&gt;The string containing a single asterisk '*' is used
101 to conceptually represent all possible values
102 for the particular leaf using this data type.&lt;/text&gt;
103     &lt;/description&gt;
104   &lt;/typedef&gt;
105   &lt;typedef name="access-operations-type"&gt;
106     &lt;type name="bits"&gt;
107       &lt;bit name="create"&gt;
108         &lt;description&gt;
109           &lt;text&gt;Any protocol operation that creates a
110 new data node.&lt;/text&gt;
111         &lt;/description&gt;
112       &lt;/bit&gt;
113       &lt;bit name="read"&gt;
114         &lt;description&gt;
115           &lt;text&gt;Any protocol operation or notification that
116 returns the value of a data node.&lt;/text&gt;
117         &lt;/description&gt;
118       &lt;/bit&gt;
119       &lt;bit name="update"&gt;
120         &lt;description&gt;
121           &lt;text&gt;Any protocol operation that alters an existing
122 data node.&lt;/text&gt;
123         &lt;/description&gt;
124       &lt;/bit&gt;
125       &lt;bit name="delete"&gt;
126         &lt;description&gt;
127           &lt;text&gt;Any protocol operation that removes a data node.&lt;/text&gt;
128         &lt;/description&gt;
129       &lt;/bit&gt;
130       &lt;bit name="exec"&gt;
131         &lt;description&gt;
132           &lt;text&gt;Execution access to the specified protocol operation.&lt;/text&gt;
133         &lt;/description&gt;
134       &lt;/bit&gt;
135     &lt;/type&gt;
136     &lt;description&gt;
137       &lt;text&gt;NETCONF Access Operation.&lt;/text&gt;
138     &lt;/description&gt;
139   &lt;/typedef&gt;
140   &lt;typedef name="group-name-type"&gt;
141     &lt;type name="string"&gt;
142       &lt;length value="1..max"/&gt;
143       &lt;pattern value="[^\*].*"/&gt;
144     &lt;/type&gt;
145     &lt;description&gt;
146       &lt;text&gt;Name of administrative group to which
147 users can be assigned.&lt;/text&gt;
148     &lt;/description&gt;
149   &lt;/typedef&gt;
150   &lt;typedef name="action-type"&gt;
151     &lt;type name="enumeration"&gt;
152       &lt;enum name="permit"&gt;
153         &lt;description&gt;
154           &lt;text&gt;Requested action is permitted.&lt;/text&gt;
155         &lt;/description&gt;
156       &lt;/enum&gt;
157       &lt;enum name="deny"&gt;
158         &lt;description&gt;
159           &lt;text&gt;Requested action is denied.&lt;/text&gt;
160         &lt;/description&gt;
161       &lt;/enum&gt;
162     &lt;/type&gt;
163     &lt;description&gt;
164       &lt;text&gt;Action taken by the server when a particular
165 rule matches.&lt;/text&gt;
166     &lt;/description&gt;
167   &lt;/typedef&gt;
168   &lt;typedef name="node-instance-identifier"&gt;
169     &lt;type name="yang:xpath1.0"/&gt;
170     &lt;description&gt;
171       &lt;text&gt;Path expression used to represent a special
172 data node instance identifier string.
173
174 A node-instance-identifier value is an
175 unrestricted YANG instance-identifier expression.
176 All the same rules as an instance-identifier apply
177 except predicates for keys are optional.  If a key
178 predicate is missing, then the node-instance-identifier
179 represents all possible server instances for that key.
180
181 This XPath expression is evaluated in the following context:
182
183  o  The set of namespace declarations are those in scope on
184     the leaf element where this type is used.
185
186  o  The set of variable bindings contains one variable,
187     'USER', which contains the name of the user of the current
188      session.
189
190  o  The function library is the core function library, but
191     note that due to the syntax restrictions of an
192     instance-identifier, no functions are allowed.
193
194  o  The context node is the root node in the data tree.&lt;/text&gt;
195     &lt;/description&gt;
196   &lt;/typedef&gt;
197   &lt;container name="nacm"&gt;
198     &lt;nacm:default-deny-all/&gt;
199     &lt;description&gt;
200       &lt;text&gt;Parameters for NETCONF Access Control Model.&lt;/text&gt;
201     &lt;/description&gt;
202     &lt;leaf name="enable-nacm"&gt;
203       &lt;type name="boolean"/&gt;
204       &lt;default value="true"/&gt;
205       &lt;description&gt;
206         &lt;text&gt;Enables or disables all NETCONF access control
207 enforcement.  If 'true', then enforcement
208 is enabled.  If 'false', then enforcement
209 is disabled.&lt;/text&gt;
210       &lt;/description&gt;
211     &lt;/leaf&gt;
212     &lt;leaf name="read-default"&gt;
213       &lt;type name="action-type"/&gt;
214       &lt;default value="permit"/&gt;
215       &lt;description&gt;
216         &lt;text&gt;Controls whether read access is granted if
217 no appropriate rule is found for a
218 particular read request.&lt;/text&gt;
219       &lt;/description&gt;
220     &lt;/leaf&gt;
221     &lt;leaf name="write-default"&gt;
222       &lt;type name="action-type"/&gt;
223       &lt;default value="deny"/&gt;
224       &lt;description&gt;
225         &lt;text&gt;Controls whether create, update, or delete access
226 is granted if no appropriate rule is found for a
227 particular write request.&lt;/text&gt;
228       &lt;/description&gt;
229     &lt;/leaf&gt;
230     &lt;leaf name="exec-default"&gt;
231       &lt;type name="action-type"/&gt;
232       &lt;default value="permit"/&gt;
233       &lt;description&gt;
234         &lt;text&gt;Controls whether exec access is granted if no appropriate
235 rule is found for a particular protocol operation request.&lt;/text&gt;
236       &lt;/description&gt;
237     &lt;/leaf&gt;
238     &lt;leaf name="enable-external-groups"&gt;
239       &lt;type name="boolean"/&gt;
240       &lt;default value="true"/&gt;
241       &lt;description&gt;
242         &lt;text&gt;Controls whether the server uses the groups reported by the
243 NETCONF transport layer when it assigns the user to a set of
244 NACM groups.  If this leaf has the value 'false', any group
245 names reported by the transport layer are ignored by the
246 server.&lt;/text&gt;
247       &lt;/description&gt;
248     &lt;/leaf&gt;
249     &lt;leaf name="denied-operations"&gt;
250       &lt;type name="yang:zero-based-counter32"/&gt;
251       &lt;config value="false"/&gt;
252       &lt;mandatory value="true"/&gt;
253       &lt;description&gt;
254         &lt;text&gt;Number of times since the server last restarted that a
255 protocol operation request was denied.&lt;/text&gt;
256       &lt;/description&gt;
257     &lt;/leaf&gt;
258     &lt;leaf name="denied-data-writes"&gt;
259       &lt;type name="yang:zero-based-counter32"/&gt;
260       &lt;config value="false"/&gt;
261       &lt;mandatory value="true"/&gt;
262       &lt;description&gt;
263         &lt;text&gt;Number of times since the server last restarted that a
264 protocol operation request to alter
265 a configuration datastore was denied.&lt;/text&gt;
266       &lt;/description&gt;
267     &lt;/leaf&gt;
268     &lt;leaf name="denied-notifications"&gt;
269       &lt;type name="yang:zero-based-counter32"/&gt;
270       &lt;config value="false"/&gt;
271       &lt;mandatory value="true"/&gt;
272       &lt;description&gt;
273         &lt;text&gt;Number of times since the server last restarted that
274 a notification was dropped for a subscription because
275 access to the event type was denied.&lt;/text&gt;
276       &lt;/description&gt;
277     &lt;/leaf&gt;
278     &lt;container name="groups"&gt;
279       &lt;description&gt;
280         &lt;text&gt;NETCONF Access Control Groups.&lt;/text&gt;
281       &lt;/description&gt;
282       &lt;list name="group"&gt;
283         &lt;key value="name"/&gt;
284         &lt;description&gt;
285           &lt;text&gt;One NACM Group Entry.  This list will only contain
286 configured entries, not any entries learned from
287 any transport protocols.&lt;/text&gt;
288         &lt;/description&gt;
289         &lt;leaf name="name"&gt;
290           &lt;type name="group-name-type"/&gt;
291           &lt;description&gt;
292             &lt;text&gt;Group name associated with this entry.&lt;/text&gt;
293           &lt;/description&gt;
294         &lt;/leaf&gt;
295         &lt;leaf-list name="user-name"&gt;
296           &lt;type name="user-name-type"/&gt;
297           &lt;description&gt;
298             &lt;text&gt;Each entry identifies the username of
299 a member of the group associated with
300 this entry.&lt;/text&gt;
301           &lt;/description&gt;
302         &lt;/leaf-list&gt;
303       &lt;/list&gt;
304     &lt;/container&gt;
305     &lt;list name="rule-list"&gt;
306       &lt;key value="name"/&gt;
307       &lt;ordered-by value="user"/&gt;
308       &lt;description&gt;
309         &lt;text&gt;An ordered collection of access control rules.&lt;/text&gt;
310       &lt;/description&gt;
311       &lt;leaf name="name"&gt;
312         &lt;type name="string"&gt;
313           &lt;length value="1..max"/&gt;
314         &lt;/type&gt;
315         &lt;description&gt;
316           &lt;text&gt;Arbitrary name assigned to the rule-list.&lt;/text&gt;
317         &lt;/description&gt;
318       &lt;/leaf&gt;
319       &lt;leaf-list name="group"&gt;
320         &lt;type name="union"&gt;
321           &lt;type name="matchall-string-type"/&gt;
322           &lt;type name="group-name-type"/&gt;
323         &lt;/type&gt;
324         &lt;description&gt;
325           &lt;text&gt;List of administrative groups that will be
326 assigned the associated access rights
327 defined by the 'rule' list.
328
329 The string '*' indicates that all groups apply to the
330 entry.&lt;/text&gt;
331         &lt;/description&gt;
332       &lt;/leaf-list&gt;
333       &lt;list name="rule"&gt;
334         &lt;key value="name"/&gt;
335         &lt;ordered-by value="user"/&gt;
336         &lt;description&gt;
337           &lt;text&gt;One access control rule.
338
339 Rules are processed in user-defined order until a match is
340 found.  A rule matches if 'module-name', 'rule-type', and
341 'access-operations' match the request.  If a rule
342 matches, the 'action' leaf determines if access is granted
343 or not.&lt;/text&gt;
344         &lt;/description&gt;
345         &lt;leaf name="name"&gt;
346           &lt;type name="string"&gt;
347             &lt;length value="1..max"/&gt;
348           &lt;/type&gt;
349           &lt;description&gt;
350             &lt;text&gt;Arbitrary name assigned to the rule.&lt;/text&gt;
351           &lt;/description&gt;
352         &lt;/leaf&gt;
353         &lt;leaf name="module-name"&gt;
354           &lt;type name="union"&gt;
355             &lt;type name="matchall-string-type"/&gt;
356             &lt;type name="string"/&gt;
357           &lt;/type&gt;
358           &lt;default value="*"/&gt;
359           &lt;description&gt;
360             &lt;text&gt;Name of the module associated with this rule.
361
362 This leaf matches if it has the value '*' or if the
363 object being accessed is defined in the module with the
364 specified module name.&lt;/text&gt;
365           &lt;/description&gt;
366         &lt;/leaf&gt;
367         &lt;choice name="rule-type"&gt;
368           &lt;description&gt;
369             &lt;text&gt;This choice matches if all leafs present in the rule
370 match the request.  If no leafs are present, the
371 choice matches all requests.&lt;/text&gt;
372           &lt;/description&gt;
373           &lt;case name="protocol-operation"&gt;
374             &lt;leaf name="rpc-name"&gt;
375               &lt;type name="union"&gt;
376                 &lt;type name="matchall-string-type"/&gt;
377                 &lt;type name="string"/&gt;
378               &lt;/type&gt;
379               &lt;description&gt;
380                 &lt;text&gt;This leaf matches if it has the value '*' or if
381 its value equals the requested protocol operation
382 name.&lt;/text&gt;
383               &lt;/description&gt;
384             &lt;/leaf&gt;
385           &lt;/case&gt;
386           &lt;case name="notification"&gt;
387             &lt;leaf name="notification-name"&gt;
388               &lt;type name="union"&gt;
389                 &lt;type name="matchall-string-type"/&gt;
390                 &lt;type name="string"/&gt;
391               &lt;/type&gt;
392               &lt;description&gt;
393                 &lt;text&gt;This leaf matches if it has the value '*' or if its
394 value equals the requested notification name.&lt;/text&gt;
395               &lt;/description&gt;
396             &lt;/leaf&gt;
397           &lt;/case&gt;
398           &lt;case name="data-node"&gt;
399             &lt;leaf name="path"&gt;
400               &lt;type name="node-instance-identifier"/&gt;
401               &lt;mandatory value="true"/&gt;
402               &lt;description&gt;
403                 &lt;text&gt;Data Node Instance Identifier associated with the
404 data node controlled by this rule.
405
406 Configuration data or state data instance
407 identifiers start with a top-level data node.  A
408 complete instance identifier is required for this
409 type of path value.
410
411 The special value '/' refers to all possible
412 datastore contents.&lt;/text&gt;
413               &lt;/description&gt;
414             &lt;/leaf&gt;
415           &lt;/case&gt;
416         &lt;/choice&gt;
417         &lt;leaf name="access-operations"&gt;
418           &lt;type name="union"&gt;
419             &lt;type name="matchall-string-type"/&gt;
420             &lt;type name="access-operations-type"/&gt;
421           &lt;/type&gt;
422           &lt;default value="*"/&gt;
423           &lt;description&gt;
424             &lt;text&gt;Access operations associated with this rule.
425
426 This leaf matches if it has the value '*' or if the
427 bit corresponding to the requested operation is set.&lt;/text&gt;
428           &lt;/description&gt;
429         &lt;/leaf&gt;
430         &lt;leaf name="action"&gt;
431           &lt;type name="action-type"/&gt;
432           &lt;mandatory value="true"/&gt;
433           &lt;description&gt;
434             &lt;text&gt;The access control action associated with the
435 rule.  If a rule is determined to match a
436 particular request, then this object is used
437 to determine whether to permit or deny the
438 request.&lt;/text&gt;
439           &lt;/description&gt;
440         &lt;/leaf&gt;
441         &lt;leaf name="comment"&gt;
442           &lt;type name="string"/&gt;
443           &lt;description&gt;
444             &lt;text&gt;A textual description of the access rule.&lt;/text&gt;
445           &lt;/description&gt;
446         &lt;/leaf&gt;
447       &lt;/list&gt;
448     &lt;/list&gt;
449   &lt;/container&gt;
450 &lt;/module&gt;
451 </data>
452 </rpc-reply>