draft-ietf-netconf-access-control-03.txt   draft-ietf-netconf-access-control-04.txt 
Internet Engineering Task Force A. Bierman Internet Engineering Task Force A. Bierman
Internet-Draft Brocade Internet-Draft Brocade
Intended status: Standards Track M. Bjorklund Intended status: Standards Track M. Bjorklund
Expires: September 12, 2011 Tail-f Systems Expires: December 16, 2011 Tail-f Systems
March 11, 2011 June 14, 2011
Network Configuration Protocol Access Control Model Network Configuration Protocol Access Control Model
draft-ietf-netconf-access-control-03 draft-ietf-netconf-access-control-04
Abstract Abstract
The standardization of network configuration interfaces for use with The standardization of network configuration interfaces for use with
the NETCONF protocol requires a structured and secure operating the NETCONF protocol requires a structured and secure operating
environment, which promotes human usability and multi-vendor environment that promotes human usability and multi-vendor
interoperability. There is a need for standard mechanisms to interoperability. There is a need for standard mechanisms to
restrict NETCONF protocol access for particular users to a pre- restrict NETCONF protocol access for particular users to a pre-
configured subset of all available NETCONF operations and content. configured subset of all available NETCONF operations and content.
This document discusses requirements for a suitable access control This document discusses requirements for a suitable access control
model, and provides one solution which meets these requirements. model, and provides one solution that meets these requirements.
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 September 12, 2011. This Internet-Draft will expire on December 16, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 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 17 skipping to change at page 2, line 17
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1. Requirements Notation . . . . . . . . . . . . . . . . 4 1.1.1. Requirements Notation . . . . . . . . . . . . . . . . 4
1.1.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . 4 1.1.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . 4
1.1.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . 5 1.1.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . 5
1.1.4. NACM Terms . . . . . . . . . . . . . . . . . . . . . . 5 1.1.4. NACM Terms . . . . . . . . . . . . . . . . . . . . . . 5
2. Access Control Requirements . . . . . . . . . . . . . . . . . 6 2. Access Control Design Objectives . . . . . . . . . . . . . . . 6
2.1. Protocol Control Points . . . . . . . . . . . . . . . . . 6 2.1. Protocol Control Points . . . . . . . . . . . . . . . . . 6
2.2. Simplicity . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2. Simplicity . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3. Procedural Interface . . . . . . . . . . . . . . . . . . . 7 2.3. Procedural Interface . . . . . . . . . . . . . . . . . . . 7
2.4. Datastore Access . . . . . . . . . . . . . . . . . . . . . 7 2.4. Datastore Access . . . . . . . . . . . . . . . . . . . . . 8
2.4.1. Access Rights . . . . . . . . . . . . . . . . . . . . 8 2.4.1. Access Rights . . . . . . . . . . . . . . . . . . . . 8
2.4.2. <get> and <get-config> Operations . . . . . . . . . . 8 2.4.2. <get> and <get-config> Operations . . . . . . . . . . 8
2.4.3. <edit-config> Operation . . . . . . . . . . . . . . . 8 2.4.3. <edit-config> Operation . . . . . . . . . . . . . . . 9
2.4.4. <copy-config> Operation . . . . . . . . . . . . . . . 9 2.4.4. <copy-config> Operation . . . . . . . . . . . . . . . 10
2.5. Users and Groups . . . . . . . . . . . . . . . . . . . . . 10 2.5. Users and Groups . . . . . . . . . . . . . . . . . . . . . 10
2.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . 10 2.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . 11
2.7. Configuration Capabilities . . . . . . . . . . . . . . . . 10 2.7. Configuration Capabilities . . . . . . . . . . . . . . . . 11
2.8. Identifying Security Holes . . . . . . . . . . . . . . . . 11 2.8. Identifying Security Holes . . . . . . . . . . . . . . . . 11
2.9. Data Shadowing . . . . . . . . . . . . . . . . . . . . . . 12 2.9. Data Shadowing . . . . . . . . . . . . . . . . . . . . . . 12
2.10. NETCONF Specific Requirements . . . . . . . . . . . . . . 12 2.10. NETCONF Specific Requirements . . . . . . . . . . . . . . 12
3. NETCONF Access Control Model (NACM) . . . . . . . . . . . . . 14 3. NETCONF Access Control Model (NACM) . . . . . . . . . . . . . 14
3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 14 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.1. Features . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.1. Features . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.2. External Dependencies . . . . . . . . . . . . . . . . 15 3.1.2. External Dependencies . . . . . . . . . . . . . . . . 15
3.1.3. Message Processing Model . . . . . . . . . . . . . . . 15 3.1.3. Message Processing Model . . . . . . . . . . . . . . . 15
3.2. Model Components . . . . . . . . . . . . . . . . . . . . . 17 3.2. Model Components . . . . . . . . . . . . . . . . . . . . . 17
3.2.1. Users . . . . . . . . . . . . . . . . . . . . . . . . 17 3.2.1. Users . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.2. Groups . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.2. Groups . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2.3. Sessions . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.3. Sessions . . . . . . . . . . . . . . . . . . . . . . . 18
3.2.4. Access Permissions . . . . . . . . . . . . . . . . . . 18 3.2.4. Access Permissions . . . . . . . . . . . . . . . . . . 18
3.2.5. Global Enforcement Controls . . . . . . . . . . . . . 19 3.2.5. Global Enforcement Controls . . . . . . . . . . . . . 18
3.2.6. Access Control Rules . . . . . . . . . . . . . . . . . 19 3.2.5.1. enable-nacm Switch . . . . . . . . . . . . . . . . 18
3.3. Access Control Enforcement Procedures . . . . . . . . . . 19 3.2.5.2. read-default Switch . . . . . . . . . . . . . . . 19
3.3.1. Initial Operation . . . . . . . . . . . . . . . . . . 19 3.2.5.3. write-default Switch . . . . . . . . . . . . . . . 19
3.3.2. Session Establishment . . . . . . . . . . . . . . . . 20 3.2.5.4. exec-default Switch . . . . . . . . . . . . . . . 19
3.3.3. 'access-denied' Error Handling . . . . . . . . . . . . 20 3.2.6. Access Control Rules . . . . . . . . . . . . . . . . . 20
3.3.4. Incoming RPC Message Validation . . . . . . . . . . . 20 3.3. Access Control Enforcement Procedures . . . . . . . . . . 20
3.3.5. Data Node Access Validation . . . . . . . . . . . . . 23 3.3.1. Initial Operation . . . . . . . . . . . . . . . . . . 20
3.3.6. Outgoing <rpc-reply> Authorization . . . . . . . . . . 26 3.3.2. Session Establishment . . . . . . . . . . . . . . . . 21
3.3.7. Outgoing <notification> Authorization . . . . . . . . 26 3.3.3. "access-denied" Error Handling . . . . . . . . . . . . 21
3.4. Data Model Definitions . . . . . . . . . . . . . . . . . . 29 3.3.4. Incoming RPC Message Validation . . . . . . . . . . . 21
3.4.1. High Level Procedures . . . . . . . . . . . . . . . . 29 3.3.5. Data Node Access Validation . . . . . . . . . . . . . 24
3.4.2. Data Organization . . . . . . . . . . . . . . . . . . 29 3.3.6. Outgoing <notification> Authorization . . . . . . . . 26
3.4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . 30 3.4. Data Model Definitions . . . . . . . . . . . . . . . . . . 28
3.5. IANA Considerations . . . . . . . . . . . . . . . . . . . 41 3.4.1. Data Organization . . . . . . . . . . . . . . . . . . 28
3.6. Security Considerations . . . . . . . . . . . . . . . . . 41 3.4.2. YANG Module . . . . . . . . . . . . . . . . . . . . . 29
4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.5. IANA Considerations . . . . . . . . . . . . . . . . . . . 38
4.1. Normative References . . . . . . . . . . . . . . . . . . . 44 3.6. Security Considerations . . . . . . . . . . . . . . . . . 39
4.2. Informative References . . . . . . . . . . . . . . . . . . 44 4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 45 4.1. Normative References . . . . . . . . . . . . . . . . . . . 41
A.1. <groups> Example . . . . . . . . . . . . . . . . . . . . . 45 4.2. Informative References . . . . . . . . . . . . . . . . . . 41
A.2. <module-rule> Example . . . . . . . . . . . . . . . . . . 46 Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 42
A.3. <rpc-rule> Example . . . . . . . . . . . . . . . . . . . . 47 A.1. <groups> Example . . . . . . . . . . . . . . . . . . . . . 42
A.4. <data-rule> Example . . . . . . . . . . . . . . . . . . . 49 A.2. Module Rule Example . . . . . . . . . . . . . . . . . . . 43
A.5. <notification-rule> Example . . . . . . . . . . . . . . . 51 A.3. RPC Rule Example . . . . . . . . . . . . . . . . . . . . . 44
Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 52 A.4. Data Rule Example . . . . . . . . . . . . . . . . . . . . 46
B.1. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 A.5. Notification Rule Example . . . . . . . . . . . . . . . . 48
B.2. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 50
B.3. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 B.1. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 50
B.4. 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 B.2. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 53 B.3. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 50
B.4. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 50
B.5. 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 52
1. Introduction 1. Introduction
The NETCONF protocol does not provide any standard mechanisms to The NETCONF protocol does not provide any standard mechanisms to
restrict the operations and content that each user is authorized to restrict the operations and content that each user is authorized to
use. use.
There is a need for inter-operable management of the controlled There is a need for inter-operable management of the controlled
access to operator selected portions of the available NETCONF content access to operator selected portions of the available NETCONF content
within a particular server. within a particular server.
This document addresses access control mechanisms for the Operation This document addresses access control mechanisms for the Operation
and Content layers of NETCONF, as defined in and Content layers of NETCONF, as defined in
[I-D.ietf-netconf-4741bis], and [RFC5277]. It contains three main [I-D.ietf-netconf-4741bis], and [RFC5277]. It contains three main
sections: sections:
1. Access Control Requirements 1. Access Control Design Objectives
2. NETCONF Access Control Model (NACM) 2. NETCONF Access Control Model (NACM)
3. YANG Data Model (ietf-netconf-acm.yang) 3. YANG Data Model (ietf-netconf-acm.yang)
1.1. Terminology 1.1. Terminology
1.1.1. Requirements Notation 1.1.1. Requirements Notation
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
skipping to change at page 5, line 12 skipping to change at page 5, line 12
o user o user
1.1.3. YANG Terms 1.1.3. YANG Terms
The following terms are defined in [RFC6020] and are not redefined The following terms are defined in [RFC6020] and are not redefined
here: here:
o data node o data node
o data definition statement
1.1.4. NACM Terms 1.1.4. NACM Terms
The following terms are used throughout this documentation: The following terms are used throughout this documentation:
access control: A security feature provided by the NETCONF server, access control: A security feature provided by the NETCONF server,
which allows an operator to restrict access to a subset of all that allows an operator to restrict access to a subset of all
NETCONF protocol operations and data, based on various criteria. NETCONF protocol operations and data, based on various criteria.
access control model (ACM): A conceptual model used to configure and access control model (ACM): A conceptual model used to configure and
monitor the access control procedures desired by the operator to monitor the access control procedures desired by the operator to
enforce a particular access control policy. enforce a particular access control policy.
access control rule: The conceptual criteria used to determine if a access control rule: The conceptual criteria used to determine if a
particular NETCONF protocol operation will be permitted or denied. particular NETCONF protocol operation will be permitted or denied.
authentication: The process of verifying a user's identity. access operation: How a request attempts to access a conceptual
object. One of "read", "create", "delete", "update", and
"execute".
superuser: The special administrative user account which is given recovery session: A special administrative session that is given
unlimited NETCONF access, and is exempt from all access control unlimited NETCONF access, and is exempt from all access control
enforcement. enforcement. The specific mechanism(s) used by an implementation
to control and identify whether a session is a recovery session or
not are outside the scope of this document.
2. Access Control Requirements 2. Access Control Design Objectives
[Editor's note: some things described here are requirements (MUST,
SHOULD, etc), but some things are descriptions how NACM works, e.g.
2.4.1, 2.4.3...]
2.1. Protocol Control Points 2.1. Protocol Control Points
The NETCONF protocol allows new operations to be added at any time, The NETCONF protocol allows new operations to be added at any time,
and the YANG data modeling language supports this feature. It is not and the YANG data modeling language supports this feature. It is not
possible to design an ACM for NETCONF which only focuses on a static possible to design an ACM for NETCONF which only focuses on a static
set of operations, like some other protocols. Since few assumptions set of operations, like some other protocols. Since few assumptions
can be made about an arbitrary protocol operation, the NETCONF can be made about an arbitrary protocol operation, the NETCONF
architectural server components need to be protected at several architectural server components need to be protected at several
conceptual control points. conceptual control points.
skipping to change at page 6, line 50 skipping to change at page 7, line 8
mechanisms to reduce configuration and effort are also required. mechanisms to reduce configuration and effort are also required.
NETCONF datastore: Configurable permission to read and/or alter NETCONF datastore: Configurable permission to read and/or alter
specific data nodes within any conceptual datastore is required. specific data nodes within any conceptual datastore is required.
Wildcard or multiple target mechanisms to reduce configuration and Wildcard or multiple target mechanisms to reduce configuration and
effort are also required. effort are also required.
RPC Reply Content: Configurable permission to read specific data RPC Reply Content: Configurable permission to read specific data
nodes within any conceptual RPC output section is required. nodes within any conceptual RPC output section is required.
Unauthorized data is silently omitted from the reply, instead of Unauthorized data is silently omitted from the reply, instead of
dropping the reply or sending an 'access-denied' error. dropping the reply or sending an "access-denied" error.
Notification Content: Configurable permission to receive specific Notification Content: Configurable permission to receive specific
notification event types is required. notification event types is required.
2.2. Simplicity 2.2. Simplicity
Experience has shown that a complicated ACM will not be widely Experience has shown that a complicated ACM will not be widely
deployed, because it is too hard to use. The key factor that is deployed, because it is too hard to use. The key factor that is
ignored in such solutions is the concept of 'localized cost'. It ignored in such solutions is the concept of "localized cost". It
needs to be easy to do simple things, and hard to do complex things, needs to be easy to do simple things, and possible to do complex
instead of hard to do everything. things, instead of hard to do everything.
Configuration of the access control system needs to be simple to use. Configuration of the access control system needs to be as simple as
Simple and common tasks need to be easy to configure, and require possible. Simple and common tasks need to be easy to configure, and
little expertise or domain-specific knowledge. Complex tasks are require little expertise or domain-specific knowledge. Complex tasks
possible using additional mechanisms, which may require additional are possible using additional mechanisms, which may require
expertise. additional expertise.
A single set of access control rules SHOULD be able to control all A single set of access control rules SHOULD be able to control all
types of NETCONF protocol operation invocation, all conceptual types of NETCONF protocol operation invocation, all conceptual
datastore access, and all NETCONF session output. datastore access, and all NETCONF session output.
Default access control policy needs to be as secure as possible. Access control SHOULD be defined with a small and familiar set of
Protocol access SHOULD be defined with a small and familiar set of
permissions, while still allowing full control of NETCONF datastore permissions, while still allowing full control of NETCONF datastore
access. access.
Access control does not need to be applied to NETCONF <hello> Access control does not need to be applied to NETCONF <hello>
messages. messages.
2.3. Procedural Interface 2.3. Procedural Interface
The NETCONF protocol uses a procedural interface model, and an The NETCONF protocol uses a procedural interface model, and an
extensible set of protocol operations. Access control for any extensible set of protocol operations. Access control for any
possible protocol operation is required. possible protocol operation is required.
It MUST be possible to configure the ACM to permit or deny access to It MUST be possible to configure the ACM to permit or deny access to
specific NETCONF operations. specific NETCONF operations.
YANG modules SHOULD be designed so that different access levels for YANG modules SHOULD be designed so that different access levels for
input parameters to protocol operations is not required. input parameters to protocol operations is not required. Use of
generic operations should be avoided, and separate operations defined
instead, if different access levels are needed.
2.4. Datastore Access 2.4. Datastore Access
It MUST be possible to control access to specific nodes and sub-trees It MUST be possible to control access to specific nodes and subtrees
within the conceptual NETCONF datastore. within the conceptual NETCONF datastore.
In order for a user to obtain access to a particular datastore node,
the user MUST be authorized to have the same requested access to the
specified node, and all of its ancestors.
The same access control rules apply to all conceptual datastores. The same access control rules apply to all conceptual datastores.
For example, the candidate configuration or the running For example, the candidate configuration or the running
configuration. configuration.
Only the standard NETCONF datastores (candidate, running, and Only the standard NETCONF datastores (candidate, running, and
startup) are controlled by the ACM. Local or remote files or startup) are controlled by the ACM. Local or remote files or
datastores accessed via the <url> parameter are optional to support. datastores accessed via the <url> parameter are optional to support.
The non-volatile startup configuration needs to be loaded into the The non-volatile startup configuration needs to be loaded at boot-
running configuration without applying any access control rules. time into the running configuration without applying any access
control rules. Access control is applied after the server has
booted, and user sessions are active.
2.4.1. Access Rights 2.4.1. Access Rights
A small set of hard-wired datastore access rights is needed to A small set of hard-wired datastore access rights is needed to
control access to all possible NETCONF datastore operations, control access to all possible NETCONF datastore operations,
including vendor extensions to the standard operation set. including vendor extensions to the standard operation set.
The familiar 'CRUDX' model can support all NETCONF operations: The familiar "CRUDX" model can support all NETCONF operations:
o Create: Allows the client to add a new data node instance to a o Create: Allows the client to add a new data node instance to a
datastore. datastore.
o Read: Allows the client to read a data node instance from a o Read: Allows the client to read a data node instance from a
datastore, or receive the notification event type. datastore, or receive the notification event type.
o Update: Allows the client to update an existing data node instance o Update: Allows the client to update an existing data node instance
in a datastore. in a datastore.
o Delete: Allows the client to delete a data node instance from a o Delete: Allows the client to delete a data node instance from a
datastore. datastore.
o eXec: Allows the client to execute the protocol operation. o eXec: Allows the client to execute the protocol operation.
2.4.2. <get> and <get-config> Operations 2.4.2. <get> and <get-config> Operations
Data nodes to which the client does not have 'read' access, either Data nodes to which the client does not have read access, either
directly or via wildcard access, are silently omitted from the <rpc- directly or via wildcard access, are silently omitted from the <rpc-
reply> message. reply> message. This is done to allow NETCONF filters for <get> and
<get-config> to function properly, instead of causing an "access-
denied" error because the filter criteria would otherwise include
unauthorized read access to some data nodes. For NETCONF filtering
purposes, the selection criteria is applied to the subset of nodes
that the client is authorized to read, not the entire datastore.
2.4.3. <edit-config> Operation 2.4.3. <edit-config> Operation
The NACM access rights are not directly coupled to the <edit-config> The NACM access rights are not directly coupled to the <edit-config>
"operation" attribute, although they are similar. Instead, a NACM "operation" attribute, although they are similar. Instead, a NACM
access right applies to all operations which would result in a access right applies to all operations which would result in a
particular access operation to the target datastore. This section particular access operation to the target datastore. This section
describes how these access rights apply to the specific datastore describes how these access rights apply to the specific datastore
operations supported by the <edit-config> operation. operations supported by the <edit-config> operation.
If the effective operation is 'none' (i.e., default-operation='none') If the effective operation is "none" (i.e., default-operation="none")
for a particular data node, then no access control is applied to that for a particular data node, then no access control is applied to that
data node. data node.
A 'create', 'merge', or 'replace' operation on a datastore node which A "create", "merge", or "replace" operation on a datastore node which
would result in the creation of a new data node instance, for which would result in the creation of a new data node instance, for which
the user does not have 'create' access permission, is rejected with the user does not have "create" access permission, is rejected with
an 'access-denied' error. an "access-denied" error.
A 'merge' or 'replace' operation on a datastore node which would A "merge" or "replace" operation on a datastore node which would
result in the modification of an existing data node instance, for result in the modification of an existing data node instance, for
which the user does not have 'update' access permission, is rejected which the user does not have "update" access permission, is rejected
with an 'access-denied' error. with an "access-denied" error.
A 'replace', 'delete', or 'remove' operation on a datastore node A "replace", "delete", or "remove" operation on a datastore node
which would result in the deletion of an existing data node instance, which would result in the deletion of an existing data node instance,
for which the user does not have 'delete' access permission, is for which the user does not have "delete" access permission, is
rejected with an 'access-denied' error. rejected with an "access-denied" error.
A 'merge' operation may include data nodes which do not alter A "merge" operation may include data nodes which do not alter
portions of the existing datastore. For example, a container or list portions of the existing datastore. For example, a container or list
nodes may be present for naming purposes, which do not actually alter node may be present for naming purposes, but does not actually alter
the corresponding datastore node. These unaltered data nodes within the corresponding datastore node. These unaltered data nodes within
the scope of a 'merge' operation are ignored by the server, and do the scope of a "merge" operation are ignored by the server, and do
not require any access rights by the client. not require any access rights by the client.
A 'merge' operation may include data nodes, but not include [Editor's note: ditto for "replace" (and copy-config...) Note that
with this rule, a client w/o read access can guess db content by
sending merge requests - if access-denied is not returned, it means
the db has that value.]
A "merge" operation may include data nodes, but not include
particular child data nodes that are present in the datastore. These particular child data nodes that are present in the datastore. These
missing data nodes within the scope of a 'merge' operation are missing data nodes within the scope of a "merge" operation are
ignored by the server, and do not require any access rights by the ignored by the server, and do not require any access rights by the
client. client.
The contents of specific restricted datastore nodes MUST NOT be The contents of specific restricted datastore nodes MUST NOT be
exposed in any <rpc-error> elements within the reply. exposed in any <rpc-error> elements within the reply.
2.4.4. <copy-config> Operation 2.4.4. <copy-config> Operation
Access control for the <copy-config> operation requires special Access control for the <copy-config> operation requires special
consideration because the operator is replacing the entire target consideration because the operator is replacing the entire target
datastore. Read access to the entire source datastore, and write datastore. Read access to the entire source datastore, and write
access to the entire target datastore is needed for this operation to access to the entire target datastore is needed for this operation to
succeed. succeed.
The server SHOULD determine the exact nodes in the target datastore
which are actually different, and only check write access permissions
for this set of nodes, which could be empty. For example, if a
session can read the entire datastore, but only change one leaf, that
session SHOULD be able to edit and save that one leaf. E.g., the
<copy-config> operation from <running> to <startup> SHOULD succeed if
the only effective changes are for data nodes that session is
authorized to change.
A client MUST have access to every datastore node, even ones that are A client MUST have access to every datastore node, even ones that are
not present in the source configuration data. not present in the source configuration data.
For example, consider a common use-case such as a simple backup and For example, consider a common use-case such as a simple backup and
restore procedure. The operator (client) MUST have full read access restore procedure. The operator (client) MUST have full read access
to the datastore in order to receive a complete copy of its contents. to the datastore in order to receive a complete copy of its contents.
If not, the server will simply omit these sub-trees from the reply. If the server simply omits these subtrees from the reply, and that
If that copy is later used to restore the server datastore, the copy is later used to restore the server datastore, the server will
server will interpret the missing nodes as a request to delete those interpret the missing nodes as a request to delete those nodes, and
nodes, and return an error. return an error.
2.5. Users and Groups 2.5. Users and Groups
The server MUST obtain a user name from the underlying NETCONF The server MUST obtain a user name from the underlying NETCONF
transport, such as an SSH user name. transport, such as an SSH user name.
It MUST be possible to specify access control rules for a single user It MUST be possible to specify access control rules for a single user
or a configurable group of users. or a configurable group of users.
A configurable superuser account may be needed which bypasses all
access control rules. This could be needed in case the access
control rules are mis-configured, and all access is denied by
mistake.
The ACM MUST support the concept of administrative groups, to support The ACM MUST support the concept of administrative groups, to support
the well-established distinction between a root account and other the well-established distinction between a root account and other
types of less-privileged conceptual user accounts. These groups MUST types of less-privileged conceptual user accounts. These groups MUST
be configurable by the operator. be configurable by the operator.
It MUST be possible to delegate the user-to-group mapping to a It MUST be possible to delegate the user-to-group mapping to a
central server, such as RADIUS [RFC2865] [RFC5607]. Since central server, such as a RADIUS server [RFC2865] [RFC5607]. Since
authentication is performed by the NETCONF transport layer, and authentication is performed by the NETCONF transport layer, and
RADIUS performs authentication and service authorization at the same RADIUS performs authentication and service authorization at the same
time, it MUST be possible for the underlying NETCONF transport to time, it MUST be possible for the underlying NETCONF transport to
report a set of group names associated with the user to the server. report a set of group names associated with the user to the server.
2.6. Maintenance 2.6. Maintenance
It SHOULD be possible to disable part or all of the access control It SHOULD be possible to disable part or all of the access control
model without deleting any configuration. By default, only the model without deleting any configuration.
'superuser' SHOULD be able to perform this task.
It SHOULD be possible to configure a 'superuser' account so that all
access control is disabled for just this user. This allows the
access control rules to always be modified without completely
disabling access control for all users.
2.7. Configuration Capabilities 2.7. Configuration Capabilities
Suitable control and monitoring mechanisms are needed to allow an Suitable control and monitoring mechanisms are needed to allow an
operator to easily manage all aspects of the ACM behavior. A operator to easily manage all aspects of the ACM behavior. A
standard data model, suitable for use with the <edit-config> standard data model, suitable for use with the <edit-config>
operation MUST be available for this purpose. operation MUST be available for this purpose.
Access control rules to restrict operations on specific sub-trees Access control rules to restrict operations on specific subtrees
within the configuration datastore MUST be supported. Existing within the configuration datastore MUST be supported. Existing
mechanisms can be used to identify the sub-tree(s) for this purpose. mechanisms can be used to identify the subtree(s) for this purpose.
2.8. Identifying Security Holes 2.8. Identifying Security Holes
One of the most important aspects of the data model documentation, One of the most important aspects of the data model documentation,
and biggest concerns during deployment, is the identification of and biggest concerns during deployment, is the identification of
security-sensitive content. This applies to operations in NETCONF, security-sensitive content. This applies to operations in NETCONF,
not just data and notifications. not just data and notifications.
It is mandatory for security-sensitive objects to be documented in It is mandatory for security-sensitive objects to be documented in
the Security Considerations section of an RFC. This is nice, but it the Security Considerations section of an RFC. This is nice, but it
skipping to change at page 12, line 13 skipping to change at page 12, line 23
the requested operation. the requested operation.
2.9. Data Shadowing 2.9. Data Shadowing
One of the more complicated security administration problems is One of the more complicated security administration problems is
identifying data nodes which shadow or mirror the content of another identifying data nodes which shadow or mirror the content of another
data node. An access control rule to prevent read operations for a data node. An access control rule to prevent read operations for a
particular node may be insufficient to prevent access to the data particular node may be insufficient to prevent access to the data
node with the copied value. node with the copied value.
If the YANG leafref data type is used, then this data shadowing can
be detected by applications (and the server stack), and prevented.
If the description statement, other documentation, or no If the description statement, other documentation, or no
documentation exists to identify a data shadow problem, then it may documentation exists to identify a data shadow problem, then it may
not be detected. not be detected.
Since NETCONF allows any vendor operation to be added to the Since NETCONF allows any vendor operation to be added to the
protocol, there is no way to reliably identify all of the operations protocol, there is no way to reliably identify all of the operations
that may expose copies of sensitive data nodes in <rpc-reply> that may expose copies of sensitive data nodes in <rpc-reply>
messages. messages.
A NETCONF server MUST ensure that unauthorized access to its A NETCONF server MUST ensure that unauthorized access to its
skipping to change at page 14, line 20 skipping to change at page 14, line 20
model structure. It describes the NETCONF protocol message model structure. It describes the NETCONF protocol message
processing model, and the conceptual access control requirements processing model, and the conceptual access control requirements
within that model. within that model.
3.1.1. Features 3.1.1. Features
The NACM data model provides the following features: The NACM data model provides the following features:
o Independent control of RPC, data, and notification access. o Independent control of RPC, data, and notification access.
o Very simple access control rules configuration data model which is o Simple access control rules configuration data model that is easy
easy to use. to use.
o The concept of a 'superuser' type of account is supported, but o The concept of an emergency recovery session is supported, but
configuration such an account is beyond the scope of this configuration of the server for this purpose is beyond the scope
document. If the server supports a 'superuser' account, then it of this document. An emergency recovery session will bypass all
MUST be able to determine the actual user name for this account. access control enforcement, in order to allow it to initialize or
A session associated with the superuser account will bypass all repair the NACM configuration.
access control enforcement.
o A simple and familiar set of datastore permissions is used. o A simple and familiar set of datastore permissions is used.
o Support for YANG security tagging (e.g., nacm:secure extension) o Support for YANG security tagging (e.g., nacm:secure extension)
allows default security modes to automatically exclude sensitive allows default security modes to automatically exclude sensitive
data. data.
o Separate default access modes for read, write, and execute o Separate default access modes for read, write, and execute
permissions. permissions.
skipping to change at page 15, line 15 skipping to change at page 15, line 15
3.1.2. External Dependencies 3.1.2. External Dependencies
The NETCONF [I-D.ietf-netconf-4741bis] protocol is used for all The NETCONF [I-D.ietf-netconf-4741bis] protocol is used for all
management purposes within this document. It is expected that the management purposes within this document. It is expected that the
mandatory transport mapping NETCONF Over SSH mandatory transport mapping NETCONF Over SSH
[I-D.ietf-netconf-rfc4742bis] is also supported by the server, and [I-D.ietf-netconf-rfc4742bis] is also supported by the server, and
that the server has access to the user name associated with each that the server has access to the user name associated with each
session. session.
The YANG Data Modeling Language [RFC6020] is used to define the The YANG Data Modeling Language [RFC6020] is used to define the
NETCONF data models specified in this document. The YANG instance- NETCONF data models specified in this document.
identifier data type is used to configure data-node-specific access
control rules.
3.1.3. Message Processing Model 3.1.3. Message Processing Model
The following diagram shows the NETCONF message flow model, including The following diagram shows the NETCONF message flow model, including
the points at which access control is applied, during NETCONF message the points at which access control is applied, during NETCONF message
processing. processing.
+-------------------------+ +-------------------------+
| session | | session |
| (username) | | (username) |
skipping to change at page 16, line 49 skipping to change at page 16, line 49
+---------------+ +-----------------+ +---------------+ +-----------------+
Figure 2 Figure 2
The following high-level sequence of conceptual processing steps is The following high-level sequence of conceptual processing steps is
executed for each received <rpc> message, if access control executed for each received <rpc> message, if access control
enforcement is enabled: enforcement is enabled:
o Access control is applied to all <rpc> messages (except <close- o Access control is applied to all <rpc> messages (except <close-
session>) received by the server, individually, for each active session>) received by the server, individually, for each active
session, unless the session is associated with the 'superuser' session, unless the session is identified as a "recovery session".
account.
o If the session is authorized to execute the specified RPC o If the session is authorized to execute the specified RPC
operation, then processing continues, otherwise the request is operation, then processing continues, otherwise the request is
rejected with an 'access-denied' error. rejected with an "access-denied" error.
o If the configuration datastore or conceptual state data is o If the configuration datastore or conceptual state data is
accessed by the protocol operation, then the data node access MUST accessed by the protocol operation, then the data node access MUST
be authorized. If the session is authorized to perform the be authorized. If the session is authorized to perform the
requested operation on the requested data, then processing requested operation on the requested data, then processing
continues. continues.
The following sequence of conceptual processing steps is executed for The following sequence of conceptual processing steps is executed for
each generated notification event, if access control enforcement is each generated notification event, if access control enforcement is
enabled: enabled:
skipping to change at page 17, line 33 skipping to change at page 17, line 33
event type, and if it is one which the session is not authorized event type, and if it is one which the session is not authorized
to read, then the notification is dropped for that subscription. to read, then the notification is dropped for that subscription.
3.2. Model Components 3.2. Model Components
This section defines the conceptual components related to access This section defines the conceptual components related to access
control model. control model.
3.2.1. Users 3.2.1. Users
A 'user' is the conceptual entity, which is associated with the A "user" is the conceptual entity that is associated with the access
access permissions granted to a particular session. A user is permissions granted to a particular session. A user is identified by
identified by a string which MUST be unique within the server. a string which MUST be unique within the server.
As described in [I-D.ietf-netconf-4741bis], the user name string is As described in [I-D.ietf-netconf-4741bis], the user name string is
derived from the transport layer during session establishment. If derived from the transport layer during session establishment. If
the transport layer cannot authenticate the user, the session is the transport layer cannot authenticate the user, the session is
terminated. terminated.
The server MAY support a 'superuser' administrative user account, The server MAY support a "recovery session" mechanism, which will
which will bypass all access control enforcement. This is useful for bypass all access control enforcement. This is useful for
restricting initial access and repairing a broken access control restricting initial access and repairing a broken access control
configuration. This account may be configurable to use a specific configuration.
user, or disabled completely. Some systems have factory-selected
superuser account names. There is no need to standardize the exact
user name for the superuser account. If no such account exists, then
all NETCONF access will be controlled by NACM.
3.2.2. Groups 3.2.2. Groups
Access to a specific NETCONF operation is granted to a session, Access to a specific NETCONF operation is granted to a session,
associated with a group, not a user. associated with a group, not a user.
A group is identified by its name. All group names MUST be unique A group is identified by its name. All group names MUST be unique
within the server. within the server.
A group member is identified by a user name string. A group member is identified by a user name string.
The same user may be configured in multiple groups. The same user may be configured in multiple groups.
3.2.3. Sessions 3.2.3. Sessions
A session is simply a NETCONF session, which is the entity which is A session is simply a NETCONF session, which is the entity that is
granted access to specific NETCONF operations. granted access to specific NETCONF operations.
A session is associated with a single user name for the lifetime of A session is associated with a single user name for the lifetime of
the session. the session.
3.2.4. Access Permissions 3.2.4. Access Permissions
The access permissions are the NETCONF protocol specific set of The access permissions are the NETCONF protocol specific set of
permissions that have been assigned to a particular session. permissions that have been assigned to a particular session.
skipping to change at page 18, line 48 skipping to change at page 18, line 41
create: Permission to create conceptual server data. create: Permission to create conceptual server data.
read: Read access to conceptual server data, <rpc-reply> and read: Read access to conceptual server data, <rpc-reply> and
<notification> content. <notification> content.
update: Permission to modify existing conceptual server data. update: Permission to modify existing conceptual server data.
delete: Permission to delete existing conceptual server data. delete: Permission to delete existing conceptual server data.
exec: Permission to invoke an protocol operation. exec: Permission to invoke a protocol operation.
3.2.5. Global Enforcement Controls 3.2.5. Global Enforcement Controls
A global on/off switch is provided to enable or disable all access There are four global controls that are used to help control how
control enforcement. access control is enforced.
An on/off switch is provided to enable or disable default access to 3.2.5.1. enable-nacm Switch
invoke protocol operations.
An on/off switch is provided to enable or disable default permission A global "enable-nacm" on/off switch is provided to enable or disable
to receive data in replies and notifications. all access control enforcement. When this global switch is set to
"true", then all access requested are checked against the access
control rules, and only permitted if configured to allow the specific
access request. When this global switch is set to "false", then all
access requested are permitted.
An on/off switch is provided to enable or disable default access to 3.2.5.2. read-default Switch
alter configuration data.
An on/off "read-default" switch is provided to enable or disable
default access to receive data in replies and notifications. When
the "enable-nacm" global switch is set to "true", then this global
switch is relevant, if no matching access control rule is found to
explicitly permit or deny read access to the requested NETCONF
datastore data or notification event type.
When this global switch is set to "permit", and no matching access
control rule is found for the NETCONF datastore read or notification
event requested, then access is permitted.
When this global switch is set to "deny", and no matching access
control rule is found for the NETCONF datastore read or notification
event requested, then access is denied.
3.2.5.3. write-default Switch
An on/off "write-default" switch is provided to enable or disable
default access to alter configuration data. When the "enable-nacm"
global switch is set to "true", then this global switch is relevant,
if no matching access control rule is found to explicitly permit or
deny write access to the requested NETCONF datastore data.
When this global switch is set to "permit", and no matching access
control rule is found for the NETCONF datastore write requested, then
access is permitted.
When this global switch is set to "deny", and no matching access
control rule is found for the NETCONF datastore write requested, then
access is denied.
3.2.5.4. exec-default Switch
An on/off "exec-default" switch is provided to enable or disable
default access to execute protocol operations. When the "enable-
nacm" global switch is set to "true", then this global switch is
relevant, if no matching access control rule is found to explicitly
permit or deny access to the requested NETCONF protocol operation.
When this global switch is set to "permit", and no matching access
control rule is found for the NETCONF protocol operation requested,
then access is permitted.
When this global switch is set to "deny", and no matching access
control rule is found for the NETCONF protocol operation requested,
then access is denied.
3.2.6. Access Control Rules 3.2.6. Access Control Rules
There are 4 types of rules available in NACM: There are 4 types of rules available in NACM:
module rule: Controls access for definitions in a specific module, module rule: Controls access for definitions in a specific module,
identified by its name. identified by its name.
protocol operation rule: Controls access for a specific protocol protocol operation rule: Controls access for a specific protocol
operation, identified by its module and name. operation, identified by its module and name.
skipping to change at page 19, line 41 skipping to change at page 20, line 32
data node. data node.
notification rule: Controls access for a specific notification event notification rule: Controls access for a specific notification event
type, identified by its module and name. type, identified by its module and name.
3.3. Access Control Enforcement Procedures 3.3. Access Control Enforcement Procedures
There are seven separate phases that need to be addressed, four of There are seven separate phases that need to be addressed, four of
which are related to the NETCONF message processing model. In which are related to the NETCONF message processing model. In
addition, the initial start-up mode for a NETCONF server, session addition, the initial start-up mode for a NETCONF server, session
establishment, and 'access-denied' error handling procedures also establishment, and "access-denied" error handling procedures also
need to be considered. need to be considered.
3.3.1. Initial Operation 3.3.1. Initial Operation
Upon the very first start-up of the NETCONF server, the access Upon the very first start-up of the NETCONF server, the access
control configuration will probably not be present. If not, a server control configuration will probably not be present. If it isn't, a
MUST NOT allow any write access to any session role except server MUST NOT allow any write access to any session role except a
'superuser' type of account in this state. "recovery session", if supported.
There is no requirement to enforce access control rules before or Access control rules are not enforced before or while the non-
while the non-volatile configuration data is processed and loaded volatile configuration data is processed and loaded into the running
into the running configuration. configuration, when the server is booting or rebooting. Access rules
are enforced any time a request is initiated from a user session.
Access control is not enforced for server-initiated access requests,
such as the initial load of the running datastore, during bootup.
3.3.2. Session Establishment 3.3.2. Session Establishment
The access control model applies specifically to the well-formed XML The access control model applies specifically to the well-formed XML
content transferred between a client and a server, after session content transferred between a client and a server, after session
establishment has been completed, and after the <hello> exchange has establishment has been completed, and after the <hello> exchange has
been successfully completed. been successfully completed.
A server SHOULD NOT include any sensitive information in any A server SHOULD NOT include any sensitive information in any
<capability> elements within the <hello> exchange. <capability> elements within the <hello> exchange.
Once session establishment is completed, and a user identity has been Once session establishment is completed, and a user has been
authenticated, the NETCONF transport layer reports the username and a authenticated, the NETCONF transport layer reports the user name and
possibly empty set of group names associated with the user to the a possibly empty set of group names associated with the user to the
NETCONF server. The NETCONF server will enforce the access control NETCONF server. The NETCONF server will enforce the access control
rules, based on the supplied user identity, group names, and the rules, based on the supplied user name, group names, and the
configuration data stored on the server. configuration data stored on the server.
3.3.3. 'access-denied' Error Handling 3.3.3. "access-denied" Error Handling
The 'access-denied' error-tag is generated when the access control The "access-denied" error-tag is generated when the access control
system denies access to either a request to invoke a protocol system denies access to either a request to invoke a protocol
operation or a request to perform a particular operation on the operation or a request to perform a particular operation on the
configuration datastore. configuration datastore.
A server MUST NOT include any sensitive information in any <error- A server MUST NOT include any sensitive information in any <error-
info> elements within the <rpc-error> response. info> elements within the <rpc-error> response.
3.3.4. Incoming RPC Message Validation 3.3.4. Incoming RPC Message Validation
The diagram below shows the basic conceptual structure of the access The diagram below shows the basic conceptual structure of the access
skipping to change at page 21, line 37 skipping to change at page 22, line 37
| | | |
V V V V
+----------------------+ +----------------------+
| | | |
| configuration | | configuration |
| datastore | | datastore |
+----------------------+ +----------------------+
Figure 3 Figure 3
Access control begins with the message dispatcher. Only well-formed Access control begins with the message dispatcher.
XML messages will be processed by the server.
After the server validates the <rpc> element, and determines the After the server validates the <rpc> element, and determines the
namespace URI and the element name of the protocol operation being namespace URI and the element name of the protocol operation being
requested, the RPC access control enforcer verifies that the session requested, the RPC access control enforcer verifies that the session
is authorized to invoke the protocol operation. is authorized to invoke the protocol operation.
The protocol operation is authorized by following these steps: The protocol operation is authorized by following these steps:
1. If the <enable-nacm> parameter is set to 'false', then the 1. If the "enable-nacm" leaf is set to "false", then the protocol
protocol operation is permitted. operation is permitted.
2. If the session is associated with the 'superuser' account, then 2. If the requesting session is identified as a "recovery session",
the protocol operation is permitted. then the protocol operation is permitted.
3. If the requested operation is the NETCONF <close-session> 3. If the requested operation is the NETCONF <close-session>
operation, then the protocol operation is permitted. operation, then the protocol operation is permitted.
4. Check all the <group> entries for ones that contain a <user- 4. Check all the "group" entries for ones that contain a "user-
name> entry that matches the user name for the session making name" entry that equals the user name for the session making the
the request. Add to these groups the set of groups provided by request. Add to these groups the set of groups provided by the
the transport layer. transport layer.
5. If no groups are found:
* If the requested protocol operation is associated with a YANG 5. If no groups are found, continue with step 10.
module advertised in the server capabilities, and the rpc
statement contains a nacm:secure or nacm:very-secure
extension, then the protocol operation is denied.
* If the <exec-default> parameter is set to 'permit', then 6. Process all rule-list entries, in order. If a rule-list's
permit the protocol operation, otherwise deny the request. "group" leaf-list does not match any of the user's groups,
proceed to the next rule-list entry.
6. Check if there are any matching <rpc-rule> entries for the 7. For each rule-list entry found, process all rules, in order,
requested protocol operation. Any matching rules are processed until a rule that matches the requested operation is found. A
in user-defined order, in case there are multiple <rpc-rule> rule matches if all of the following criteria are met:
entries for the requested protocol operation.
7. If an <rpc-rule> entry is found, then check the <allowed-rights> * The rule's "module-name" leaf is "*", or equals the name of
bits field for the entry, otherwise continue. The 'exec' bit the YANG module where the protocol operation is defined.
MUST be present in the <allowed-rights> bits field for an <rpc-
rule>, so it is not used in this procedure.
8. If the <rpc-rule> entry is considered a match, then the 'nacm- * The rule does not have a "rule-type" defined, or the "rule-
action' leaf is checked. If is equal to 'permit', then the type" is "protocol-operation" and the "rpc-name" is "*" or
protocol operation is permitted, otherwise it is denied. equals the name of the requested protocol operation.
9. Check if there are any matching <module-rule> entries for the * The rule's "access-operations" leaf has the "exec" bit set,
same module as the requested protocol operation. Any matching or has the special value "*".
rules are processed in user-defined order, in case there are
multiple <module-rule> entries for the module containing the
requested protocol operation.
10. If a <module-rule> entry is found, then check the <allowed- 8. If a matching rule is found, then the "action" leaf is checked.
rights> bits field for the entry, otherwise continue. If the If it is equal to "permit", then the protocol operation is
'exec' bit is present in the <allowed-rights> bits field then permitted, otherwise it is denied.
the RPC rule is considered a match. otherwise it is not
considered to match the request.
11. If the <module-rule> entry is considered a match, then the 9. Otherwise, no matching rule was found in any rule-list entry.
'nacm-action' leaf is checked. If is equal to 'permit', then
the protocol operation is permitted, otherwise it is denied.
12. If the requested operation is identified an a nacm:secure or 10. If the requested protocol operation is defined in a YANG module
nacm:very-secure protocol operation, then the protocol operation advertised in the server capabilities, and the "rpc" statement
is denied. contains a "nacm:secure" or a "nacm:very-secure" statement, then
the protocol operation is denied.
13. If the <exec-default> parameter is set to 'permit', then permit 11. If the "exec-default" leaf is set to "permit", then permit the
the protocol operation, otherwise the protocol operation is protocol operation, otherwise deny the request.
denied.
If the session is not authorized to invoke the protocol operation If the session is not authorized to invoke the protocol operation
then an <rpc-error> is generated with the following information: then an <rpc-error> is generated with the following information:
error-tag: access-denied error-tag: access-denied
error-path: /rpc/method-QName, where 'method-QName' is a qualified error-path: Identifies the requested protocol operation. For
name identifying the actual protocol operation name. For example, example:
'/rpc/edit-config' represents the <edit-config> operation in the
NETCONF base namespace.
If the configuration datastore is accessed, either directly or as a <error-path
side effect of the protocol operation, then the server MUST intercept xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
the operation and make sure the session is authorized to perform the /nc:rpc/nc:edit-config
requested operation on the specified data. </error-path>
represents the <edit-config> operation in the NETCONF base
namespace.
If a datastore is accessed, either directly or as a side effect of
the protocol operation, then the server MUST intercept the operation
and make sure the session is authorized to perform the requested
operation on the specified data, as defined in Section 3.3.5.
3.3.5. Data Node Access Validation 3.3.5. Data Node Access Validation
If a data node within a configuration datastore is accessed, or a If a data node within a datastore is accessed, then the server MUST
conceptual non-configuration node is accessed, then the server MUST
ensure that the client session is authorized to perform the requested ensure that the client session is authorized to perform the requested
operation create, read, update, or delete operation on the specified read, create, update, or delete operation on the specified data node.
data node.
The data node access request is authorized by following these steps: The data node access request is authorized by following these steps:
1. If the <enable-nacm> parameter is set to 'false', then the data 1. If the "enable-nacm" leaf is set to "false", then the protocol
node access request is permitted. operation is permitted.
2. If the session is associated with the 'superuser' account, then
the data node access request is permitted.
3. Check all the <group> entries for ones that contain a <user-
name> entry that matches the user name for the session making
the request. Add to these groups the set of groups provided by
the transport layer.
4. If no groups are found:
* If the requested data node is associated with a YANG module
advertised in the server capabilities, and the data
definition statement or any of its ancestors contains a nacm:
secure or nacm:very-secure extension, then the data node
access request is denied.
* For a read request, if the <read-default> parameter is set to
'permit', then permit the data node access request, otherwise
deny the request. For a read operation, this means that the
requested node is not included in the rpc-reply.
* For a write request, if the <write-default> parameter is set
to 'permit', then permit the data node access request,
otherwise deny the request.
5. Check if there are any matching <data-rule> entries for the
requested data node access request. Any matching rules are
processed in user-defined order, in case there are multiple
<data-rule> entries for the requested data node.
6. If an <data-rule> entry is found, then check the <allowed- 2. If the requesting session is identified as a "recovery session",
rights> bits field for the entry, otherwise continue. then the protocol operation is permitted.
1. For a creation operation, if the 'create' bit is present in 3. Check all the "group" entries for ones that contain a "user-
the <allowed-rights> bits field then the entry is considered name" entry that equals the user name for the session making the
to be a match. request. Add to these groups the set of groups provided by the
transport layer.
2. For a read operation, if the 'read' bit is present in the 4. If no groups are found, continue with step 9.
<allowed-rights> bits field, then the entry is considered to
be a match.
3. For an update (e.g., 'merge' or 'replace') operation, if the 5. Process all rule-list entries, in order. If a rule-list's
'update' bit is present in the <allowed-rights> bits field "group" leaf-list does not match any of the user's groups,
then the entry is considered to be a match. proceed to the next rule-list entry.
4. For a deletion (e.g., 'delete') operation, if the 'delete' 6. For each rule-list entry found, process all rules, in order,
bit is present in the <allowed-rights> bits field then the until a rule that matches the requested operation is found. A
entry is considered to be a match. rule matches if all of the following criteria are met:
7. If the <data-rule> entry is considered a match, then the 'nacm- * The rule's "module-name" leaf is "*", or equals the name of
action' leaf is checked. If it is equal to 'permit', then the the YANG module where the protocol operation is defined.
data operation is permitted, otherwise it is denied. For 'read'
operations, 'denied' means the requested data is not returned in
the reply.
8. Check if there are any matching <module-rule> entries for the * The rule does not have a "rule-type" defined, or the "rule-
same module as the requested data node. Any matching rules are type" is "data-node" and the "path" matches the requested
processed in user-defined order, in case there are multiple data node.
<module-rule> entries for the module containing the requested
data node.
9. If a <module-rule> entry is found, then check the <allowed- * For a read operation, the rule's "access-operations" leaf has
rights> bits field for the entry, otherwise continue. the "read" bit set, or has the special value "*".
1. For a creation operation, if the 'create' bit is present in * For a creation operation, the rule's "access-operations" leaf
the <allowed-rights> bits field then the entry is considered has the "create" bit set, or has the special value "*".
to be a match.
2. For a read operation, if the 'read' bit is present in the * For a deletion operation, the rule's "access-operations" leaf
<allowed-rights> bits field, then the entry is considered to has the "delete" bit set, or has the special value "*".
be a match.
3. For an update (e.g., 'merge' or 'replace') operation, if the * For an update operation, the rule's "access-operations" leaf
'update' bit is present in the <allowed-rights> bits field has the "update" bit set, or has the special value "*".
then the entry is considered to be a match.
4. For a deletion (e.g., 'delete') operation, if the 'delete' 7. If a matching rule is found, then the "action" leaf is checked.
bit is present in the <allowed-rights> bits field then the If it is equal to "permit", then the data node access is
entry is considered to be a match. permitted, otherwise it is denied. For a read operation,
"denied" means that the requested data is not returned in the
reply.
10. If the <module-rule> entry is considered a match, then the 8. Otherwise, no matching rule was found in any rule-list entry.
'nacm-action' leaf is checked. If it is equal to 'permit', then
the data operation is permitted, otherwise it is denied. For
'read' operations, 'denied' means the requested data is not
returned in the reply.
11. For a read request, if the requested data node is identified an 9. For a read operation, if the requested data node is defined in a
a nacm:very-secure definition, then the requested data node is YANG module advertised in the server capabilities, and the data
not included in the reply. definition statement contains a "nacm:very-secure" statement,
then the requested data node is not included in the reply.
12. For a write request, if the requested data node is identified an 10. For a write operation, if the requested data node is defined in
a nacm:secure or nacm:very-secure definition, then the data node a YANG module advertised in the server capabilities, and the
access request is denied. data definition statement contains a "nacm:secure" or a "nacm:
very-secure" statement, then the data node access request is
denied.
13. For a read request, if the <read-default> parameter is set to 11. For a read operation, if the "read-default" leaf is set to
'permit', then include the requested data in the reply, "permit", then include the requested data node in the reply,
otherwise do not include the requested data in the reply. otherwise do not include the requested data node in the reply.
14. For a write request, if the <write-default> parameter is set to 12. For a write operation, if the "write-default" leaf is set to
'permit', then permit the data node access request, otherwise "permit", then permit the data node access request, otherwise
deny the request. deny the request.
3.3.6. Outgoing <rpc-reply> Authorization 3.3.6. Outgoing <notification> Authorization
The <rpc-reply> message MUST be checked by the server to make sure no
unauthorized data is contained within it. If so, the restricted data
MUST be removed from the message before it is sent to the client.
For protocol operations which do not access any data nodes, then any
client authorized to invoke the protocol operation is also authorized
to receive the <rpc-reply> for that protocol operation.
3.3.7. Outgoing <notification> Authorization
The <notification> message MUST be checked by the server to make sure
no unauthorized data is contained within it. If so, the restricted
data MUST be removed from the message before it is sent to the
client.
Configuration of access control rules specifically for descendent Configuration of access control rules specifically for descendant
nodes of the notification event type element are outside the scope of nodes of the notification event type element are outside the scope of
this document. If the session is authorized to receive the this document. If the session is authorized to receive the
notification event type, then it is also authorized to receive any notification event type, then it is also authorized to receive any
data it contains. data it contains.
The following figure shows the conceptual message processing model The following figure shows the conceptual message processing model
for outgoing <notification> messages. for outgoing <notification> messages.
NETCONF server NETCONF server
+------------+ +------------+
skipping to change at page 27, line 38 skipping to change at page 27, line 5
+------------------------+ +------------------------+
| ^ | ^
V | V |
+----------------------+ +----------------------+
| configuration | | configuration |
| datastore | | datastore |
+----------------------+ +----------------------+
Figure 4 Figure 4
The generation of a notification event for a specific subscription is The generation of a notification for a specific subscription is
authorized by following these steps: authorized by following these steps:
1. If the <enable-nacm> parameter is set to 'false', then the 1. If the "enable-nacm" leaf is set to "false", then the
notification event is permitted. notification is permitted.
2. If the session is associated with the 'superuser' account, then 2. If the session is identified as a "recovery session", then the
the notification event is permitted. notification is permitted.
3. If the requested operation is the NETCONF <replayComplete> or 3. If the notification is the NETCONF <replayComplete> or
<notificationComplete> event type, then the notification event <notificationComplete> event type, then the notification is
is permitted. permitted.
4. Check all the <group> entries for ones that contain a <user- 4. Check all the "group" entries for ones that contain a "user-
name> entry that matches the user name for the session that name" entry that equals the user name for the session making the
started the notification subscription. Add to these groups the request. Add to these groups the set of groups provided by the
set of groups provided by the transport layer. transport layer.
5. If no groups are found: 5. If no groups are found, continue with step 10.
* If the requested notification is associated with a YANG 6. Process all rule-list entries, in order. If a rule-list's
module advertised in the server capabilities, and the "group" leaf-list does not match any of the user's groups,
notification statement contains a nacm:secure or nacm:very- proceed to the next rule-list entry.
secure extension, then the notification event is dropped for
the associated subscription.
* If the <read-default> parameter is set to 'permit', then 7. For each rule-list entry found, process all rules, in order,
permit the notification event, otherwise drop this event type until a rule that matches the requested operation is found. A
for the associated subscription. rule matches if all of the following criteria are met:
6. Check if there are any matching <notification-rule> entries for * The rule's "module-name" leaf is "*", or equals the name of
the specific notification event type being delivered to the the YANG module where the protocol operation is defined.
subscription. Any matching rules are processed in user-defined
order, in case there are multiple <notification-rule> entries
for the requested notification event type.
7. If a <notification-rule> entry is found, then check the * The rule does not have a "rule-type" defined, or the "rule-
<allowed-rights> bits field for the entry, otherwise continue. type" is "notification" and the "notification-name" is "*",
If the 'read' bit is present in the <allowed-rights> bits field equals the name of the notification.
then the notification event type is permitted, otherwise it is
dropped for the associated subscription.
8. Check if there are any matching <module-rule> entries for the * The rule's "access-operations" leaf has the "read" bit set,
same module as the notification event type. Any matching rules or has the special value "*".
are processed in user-defined order, in case there are multiple
<module-rule> entries for the module containing the notification
event type.
9. If a <module-rule> entry is found, then check the <allowed- 8. If a matching rule is found, then the "action" leaf is checked.
rights> bits field for the entry, otherwise continue. If the If it is equal to "permit", then permit the notification,
'read' bit is present in the <allowed-rights> bits field then otherwise drop the notification for the associated subscription.
the notification event type is permitted, otherwise it is
dropped for the associated subscription.
10. If the requested event type is identified an a nacm:very-secure 9. Otherwise, no matching rule was found in any rule-list entry.
notification definition, then the notification event type is
denied.
11. If the <read-default> parameter is set to 'permit', then permit 10. If the requested notification is defined in a YANG module
the notification event type, otherwise it is dropped for the advertised in the server capabilities, and the "notification"
associated subscription. statement contains a "nacm:very-secure" statement, then the
notification is dropped for the associated subscription.
11. If the "read-default" leaf is set to "permit", then permit the
notification, otherwise drop the notification for the associated
subscription.
3.4. Data Model Definitions 3.4. Data Model Definitions
This section defines the semantics of the conceptual data structures This section defines the semantics of the conceptual data structures
found in the data model in Section 3.4. found in the data model in Section 3.4.
3.4.1. High Level Procedures 3.4.1. Data Organization
There are some high level management procedures that an administrator
needs to consider before using this access control model:
1. Configure the global settings.
2. Configure one or more user groups.
3. Configure zero or more access control rules for specific modules.
4. Configure zero or more access control rules for specific protocol
operations.
5. Configure zero or more access control rules for data node access.
6. Configure zero or more access control rules for notification
event type access.
3.4.2. Data Organization
The top-level element is called <nacm>, and it is defined in the The top-level element is called <nacm>, and it is defined in the
'ietf-netconf-acm' module namespace. "ietf-netconf-acm" module's namespace.
There are several data structures defined as child nodes of the There are several data structures defined as child nodes of the
<nacm> element: <nacm> element:
leaf <enable-nacm>: On/off boolean switch to enable or disable leaf <enable-nacm>: On/off boolean switch to enable or disable
access control enforcement. access control enforcement.
leaf <read-default>: Enumeration to permit or deny default read leaf <read-default>: Enumeration to permit or deny default read
access requests. access requests.
skipping to change at page 30, line 9 skipping to change at page 28, line 42
operation execution requests. operation execution requests.
leaf <denied-rpcs>: Read-only counter of the number of times the leaf <denied-rpcs>: Read-only counter of the number of times the
server has denied an RPC operation request, since the last reboot server has denied an RPC operation request, since the last reboot
of the server. of the server.
leaf <denied-data-writes>: Read-only counter of the number of times leaf <denied-data-writes>: Read-only counter of the number of times
the server has denied a data node write request, since the last the server has denied a data node write request, since the last
reboot of the server. reboot of the server.
leaf <denied-notifications>: Read-only counter of the number of
times the server has denied a notification, since the last reboot
of the server.
container <groups>: Configures the groups used within the access container <groups>: Configures the groups used within the access
control system. control system.
list <group>: A list of user names belonging to the same list <group>: A list of user names belonging to the same
administrative group. administrative group.
container <rules>: Configures the access control rules used within container <rules>: Configures the access control rules used within
the server. the server.
list <module-rule>: Configures the access control rules for a list <rule-list>: An ordered collection of related access control
specific module. rules.
list <rpc-rule>: Configures the access control rules for protocol
operation invocation.
list <data-rule>: Configures the access control rules for
configuration datastore access.
list <notification-rule>: Configures the access control rules for list <rule>: Configures the access control rules for protocol
controlling delivery of <notification> events. operation invocation, configuration datastore access, and
for controlling delivery of <notification> events.
3.4.3. YANG Module 3.4.2. YANG Module
The following YANG module is provided to specify the normative The following YANG module specifies the normative NETCONF content
NETCONF content that MUST by supported by the server. that MUST by supported by the server.
The ietf-netconf-acm YANG module imports typedefs from [RFC6021]. The ietf-netconf-acm YANG module imports typedefs from [RFC6021].
// RFC Ed.: please update the date to the date of publication // RFC Ed.: please update the date to the date of publication
<CODE BEGINS> file="ietf-netconf-acm@2011-03-11.yang" <CODE BEGINS> file="ietf-netconf-acm@2011-06-14.yang"
module ietf-netconf-acm {
namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm";
prefix "nacm";
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netconf/>
WG List: <mailto:netconf@ietf.org>
WG Chair: Mehmet Ersue
<mailto:mehmet.ersue@nsn.com>
WG Chair: Bert Wijnen
<mailto:bertietf@bwijnen.net>
Editor: Andy Bierman
<mailto:andy.bierman@brocade.com>
Editor: Martin Bjorklund
<mailto:mbj@tail-f.com>";
description
"NETCONF Server Access Control Model.
Copyright (c) 2011 IETF Trust and the persons identified as
authors of the code. 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 XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and
// remove this note
// RFC Ed.: remove this note
// Note: extracted from draft-ietf-netconf-access-control-03.txt
// RFC Ed.: please update the date to the date of publication
revision "2011-03-11" {
description
"Initial version";
reference
"RFC XXXX: Network Configuration Protocol
Access Control Model";
}
/*
* Extension statements
*/
extension secure {
description
"Used to indicate that the data model node
represents a sensitive security system parameter.
If present, and the NACM module is enabled module ietf-netconf-acm {
(i.e., /nacm/enable-nacm object equals 'true'),
the NETCONF server will only allow
the designated 'superuser' to have write or execute
default nacm-rights-type for the node. An explicit access
control rule is required for all other users.
The 'secure' extension MAY appear within a data, rpc, namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm";
or notification node definition. It is ignored
otherwise.";
}
extension very-secure { prefix "nacm";
description
"Used to indicate that the data model node
controls a very sensitive security system parameter.
If present, and the NACM module is enabled import ietf-yang-types {
(i.e., /nacm/enable-nacm object equals 'true'), prefix yang;
the NETCONF server will only allow }
the designated 'superuser' to have read, write, or execute
default nacm-rights-type for the node. An explicit access
control rule is required for all other users.
The 'very-secure' extension MAY appear within a data, rpc, organization
or notification node definition. It is ignored "IETF NETCONF (Network Configuration) Working Group";
otherwise.";
}
/* contact
* Derived types "WG Web: <http://tools.ietf.org/wg/netconf/>
*/ WG List: <mailto:netconf@ietf.org>
typedef nacm-user-name-type { WG Chair: Mehmet Ersue
type string { <mailto:mehmet.ersue@nsn.com>
length "1..max";
}
description
"General Purpose User Name string.";
}
typedef nacm-matchall-string-type {
type string {
pattern "\*";
}
description
"The string containing a single asterisk '*' is used
to conceptually represent all possible values
for the particular leaf using this data type.";
}
typedef nacm-rights-type { WG Chair: Bert Wijnen
type union { <mailto:bertietf@bwijnen.net>
type nacm-matchall-string-type;
type bits { Editor: Andy Bierman
bit create { <mailto:andy.bierman@brocade.com>
description
"Create access allowed to all specified data.
Any protocol operation that creates a
new instance of the specified data is a create
operation.";
}
bit read {
description
"Read access allowed to all specified data.
Any protocol operation or notification that
returns data to an application is a read
operation.";
}
bit update {
description
"Update access allowed to all specified data.
Any protocol operation that alters an existing
data node is an update operation.";
}
bit delete {
description
"Delete access allowed to all specified data.
Any protocol operation that removes a datastore
node instance is a delete operation.";
}
bit exec {
description
"Execution access to the specified RPC operation.
Any RPC operation invocation is an exec operation.";
}
}
}
description
"NETCONF Access Rights.
The string '*' indicates that all possible access
rights apply to the access rule. Otherwise, only
the specific access rights represented by the bit names
that are present apply to the access rule.";
}
typedef nacm-group-name-type { Editor: Martin Bjorklund
type string { <mailto:mbj@tail-f.com>";
length "1..max";
pattern "[^\*].*";
}
description
"Name of administrative group that can be
assigned to the user, and specified in
an access control rule.";
}
typedef nacm-action-type { description
type enumeration { "NETCONF Server Access Control Model.
enum permit {
description
"Requested action is permitted.";
}
enum deny {
description
"Requested action is denied.";
}
}
description
"Action taken by the server when a particular
rule matches.";
}
typedef schema-instance-identifier { Copyright (c) 2011 IETF Trust and the persons identified as
type yang:xpath1.0; authors of the code. All rights reserved.
description
"Path expression used to represent a special
schema-instance identifier string.
A schema-instance-identifier value is an Redistribution and use in source and binary forms, with or
unrestricted YANG instance-identifier expression. without modification, is permitted pursuant to, and subject
All the same rules as an instance-identifier apply to the license terms contained in, the Simplified BSD
except predicates for keys are optional. If a key License set forth in Section 4.c of the IETF Trust's
predicate is missing, then the schema-instance-identifier Legal Provisions Relating to IETF Documents
represents all possible server instances for that key. (http://trustee.ietf.org/license-info).
This XPath expression is evaluated in the following context: This version of this YANG module is part of RFC XXXX; see
the RFC itself for full legal notices.";
// RFC Ed.: replace XXXX with actual RFC number and
// remove this note
o The set of namespace declarations are those in scope on // RFC Ed.: remove this note
the leaf element where this type is used. // Note: extracted from draft-ietf-netconf-access-control-04.txt
o The set of variable bindings contains one variable, // RFC Ed.: please update the date to the date of publication
'USER', which contains the name of user of the current revision "2011-06-14" {
session. description
"Initial version";
reference
"RFC XXXX: Network Configuration Protocol
Access Control Model";
}
o The function library is the core function library, but /*
note that due to the syntax restrictions of an * Extension statements
instance-identifier, no functions are allowed. */
o The context node is the root node in the data tree."; extension secure {
} description
"Used to indicate that the data model node
represents a sensitive security system parameter.
container nacm { If present, and the NACM module is enabled (i.e.,
nacm:very-secure; /nacm/enable-nacm object equals 'true'), the NETCONF server
will only allow the designated 'recovery session' to have
write or execute access to the node. An explicit access
control rule is required for all other users.
description The 'secure' extension MAY appear within a data definition
"Parameters for NETCONF Access Control Model."; statement or rpc statement. It is ignored otherwise.";
}
leaf enable-nacm { extension very-secure {
type boolean; description
default true; "Used to indicate that the data model node
description controls a very sensitive security system parameter.
"Enable or disable all NETCONF access control
enforcement. If 'true', then enforcement
is enabled. If 'false', then enforcement
is disabled.";
}
leaf read-default { If present, and the NACM module is enabled (i.e.,
type nacm-action-type; /nacm/enable-nacm object equals 'true'), the NETCONF server
default "permit"; will only allow the designated 'recovery session' to have
description read, write, or execute access to the node. An explicit
"Controls whether read access is granted if access control rule is required for all other users.
no appropriate rule is found for a
particular read request.";
}
leaf write-default { The 'very-secure' extension MAY appear within a data
type nacm-action-type; definition statement, rpc statement, or notification
default "deny"; statement. It is ignored otherwise.";
description }
"Controls whether create, update, or delete access
is granted if no appropriate rule is found for a
particular write request.";
} /*
* Derived types
*/
leaf exec-default { typedef user-name-type {
type nacm-action-type; type string {
default "permit"; length "1..max";
description }
"Controls whether exec access is granted if no appropriate description
rule is found for a particular RPC operation request."; "General Purpose User Name string.";
} }
leaf denied-rpcs { typedef matchall-string-type {
type yang:zero-based-counter32; type string {
config false; pattern "\*";
mandatory true; }
description description
"Number of times an RPC operation request was denied "The string containing a single asterisk '*' is used
since the server last restarted."; to conceptually represent all possible values
} for the particular leaf using this data type.";
}
leaf denied-data-writes { typedef access-operations-type {
type yang:zero-based-counter32; type bits {
config false; bit create {
mandatory true; description
description "Any operation that creates a
"Number of times a request to alter a data node new instance of the specified data is a create
was denied, since the server last restarted."; operation.";
} }
bit read {
description
"Any operation or notification that
returns data to an application is a read
operation.";
}
bit update {
description
"Any operation that alters an existing
data node is an update operation.";
}
bit delete {
description
"Any operation that removes a datastore
node instance is a delete operation.";
}
bit exec {
description
"Execution access to the specified RPC operation.
Any RPC operation invocation is an exec operation.";
}
}
description
"NETCONF Access Operation.";
}
container groups { typedef group-name-type {
description type string {
"NETCONF Access Control Groups."; length "1..max";
pattern "[^\*].*";
}
description
"Name of administrative group that can be
assigned to the user, and specified in
an access control rule-list.";
}
list group { typedef action-type {
key name; type enumeration {
enum permit {
description
"Requested action is permitted.";
}
enum deny {
description
"Requested action is denied.";
description }
"One NACM Group Entry."; }
description
"Action taken by the server when a particular
rule matches.";
}
leaf name { typedef node-instance-identifier {
type nacm-group-name-type; type yang:xpath1.0;
description description
"Group name associated with this entry."; "Path expression used to represent a special
} data node instance identifier string.
leaf-list user-name { A node-instance-identifier value is an
type nacm-user-name-type; unrestricted YANG instance-identifier expression.
description All the same rules as an instance-identifier apply
"Each entry identifies the user name of except predicates for keys are optional. If a key
a member of the group associated with predicate is missing, then the node-instance-identifier
this entry."; represents all possible server instances for that key.
}
}
}
container rules { This XPath expression is evaluated in the following context:
description
"NETCONF Access Control Rules.";
grouping common-rule-parms { o The set of namespace declarations are those in scope on
description the leaf element where this type is used.
"Common rule parameters.";
leaf rule-name { o The set of variable bindings contains one variable,
type string { 'USER', which contains the name of user of the current
length "1..256"; session.
}
description
"Arbitrary name assigned to the
access control rule.";
}
leaf allowed-rights { o The function library is the core function library, but
type nacm-rights-type; note that due to the syntax restrictions of an
description instance-identifier, no functions are allowed.
"List of access rights granted to
specified administrative groups for the
content specified by the associated path.";
}
leaf-list allowed-group { o The context node is the root node in the data tree.";
type union { }
type nacm-matchall-string-type;
type nacm-group-name-type;
}
min-elements 1;
description
"List of administrative groups which will be
assigned the associated access rights
for the content specified by the associated path.
The string '*' indicates that all configured container nacm {
administrative groups apply to the entry."; nacm:very-secure;
}
leaf nacm-action { description
type nacm-action-type; "Parameters for NETCONF Access Control Model.";
mandatory true;
description
"The access control action associated with the
rule. If a rule is determined to match a
particular request, then this object is used
to determine whether to permit or deny the
request.";
}
leaf comment { leaf enable-nacm {
type string { type boolean;
length "1..4095"; default true;
} description
description "Enable or disable all NETCONF access control
"A textual description of the access rule."; enforcement. If 'true', then enforcement
} is enabled. If 'false', then enforcement
} is disabled.";
}
list module-rule { leaf read-default {
key "module-name rule-name"; type action-type;
ordered-by user; default "permit";
description
"Controls whether read access is granted if
no appropriate rule is found for a
particular read request.";
}
description leaf write-default {
"One Module Access Rule. type action-type;
default "deny";
description
"Controls whether create, update, or delete access
is granted if no appropriate rule is found for a
particular write request.";
}
Rules are processed in user-defined order. A module rule leaf exec-default {
is considered a match if the XML namespace for the type action-type;
specified module name matches the XML namespace used default "permit";
within a NETCONF PDU, and the administrative group description
associated with the requesting session is specified in the "Controls whether exec access is granted if no appropriate
'allowed-group' leaf-list, and the requested operation rule is found for a particular RPC operation request.";
is included in the 'allowed-rights' leaf."; }
leaf module-name { leaf denied-rpcs {
type string; type yang:zero-based-counter32;
description config false;
"Name of the module associated with this rule."; mandatory true;
} description
"Number of times an RPC operation request was denied
since the server last restarted.";
}
uses common-rule-parms { leaf denied-data-writes {
refine allowed-rights { type yang:zero-based-counter32;
mandatory true; config false;
} mandatory true;
} description
} "Number of times a request to alter a data node
was denied, since the server last restarted.";
}
leaf denied-notifications {
type yang:zero-based-counter32;
config false;
mandatory true;
description
"Number of times a notification was denied
since the server last restarted.";
}
list rpc-rule { container groups {
key "module-name rpc-name rule-name"; description
ordered-by user; "NETCONF Access Control Groups.";
description list group {
"One RPC Operation Access Rule. key name;
Rules are processed in user-defined order. An RPC rule is description
considered a match if the module name of the requested RPC "One NACM Group Entry.";
operation matches 'module-name', the requested RPC
operation matches 'rpc-name', and an administrative group
associated with the session user is listed in the
'allowed-group' leaf-list. The 'allowed-rights' leaf
is ignored by the server if it is present.
Only the 'exec' bit can possibly cause
a match for an RPC rule.";
leaf module-name { leaf name {
type string; type group-name-type;
description description
"Name of the module defining this RPC operation."; "Group name associated with this entry.";
} }
leaf rpc-name { leaf-list user-name {
type string; type user-name-type;
description description
"Name of the RPC operation."; "Each entry identifies the user name of
} a member of the group associated with
this entry.";
}
}
}
uses common-rule-parms; list rule-list {
} key "name";
ordered-by user;
description
"An ordered collection of access control rules.";
list data-rule { leaf name {
key "rule-name"; type string {
ordered-by user; length "1..256";
}
description
"Arbitrary name assigned to the rule-list.";
}
leaf-list group {
type union {
type matchall-string-type;
type group-name-type;
}
description
"List of administrative groups that will be
assigned the associated access rights
defined by the 'rule' list.
description The string '*' indicates that all groups apply to the
"One Data Access Control Rule. entry.";
}
Rules are processed in user-defined order. A data rule is list rule {
considered to match when the path expression identifies key "name";
the same node that is being accessed in the NETCONF ordered-by user;
datastore, and the administrative group associated with the description
session is identified in the 'allowed-group' leaf-list, "One access control rule.
and the requested operation is included in the
'allowed-rights' leaf.";
leaf path { Rules are processed in user-defined order until a match is
type schema-instance-identifier; found. A rule matches if 'module-name', 'rule-type', and
mandatory true; 'access-operations' matches the request. If a rule
description matches, the 'action' leaf determines if access is granted
"Schema Instance Identifier associated with the data node or not.";
controlled by this rule.
Configuration data or state data instance identifiers leaf name {
start with a top-level data node. A complete instance type string {
identifier is required for this type of path value. length "1..256";
}
description
"Arbitrary name assigned to the rule.";
}
The special value '/' refers to all possible datastore leaf module-name {
contents."; type union {
} type matchall-string-type;
type string;
}
default "*";
description
"Name of the module associated with this rule.
uses common-rule-parms { This leaf matches if it has the value '*', or if the
refine allowed-rights { object being accessed is defined in the module with the
mandatory true; specified module name.";
} }
} choice rule-type {
} description
"This choice matches if all leafs present in the rule
matches the request. If no leafs are present, the
choice matches all requests.";
case protocol-operation {
leaf rpc-name {
type union {
type matchall-string-type;
type string;
}
description
"This leaf matches if it has the value '*', or if its
value equals the requested RPC operation name.";
}
}
case notification {
leaf notification-name {
type union {
type matchall-string-type;
type string;
}
description
"This leaf matches if it has the value '*', or if its
value equals the requested notification name.";
}
}
case data-node {
leaf path {
type node-instance-identifier;
mandatory true;
description
"Data Node Instance Identifier associated with the data
node controlled by this rule.
list notification-rule { Configuration data or state data instance
key "module-name identifiers start with a top-level data node. A
notification-name complete instance identifier is required for this
rule-name"; type of path value.
ordered-by user;
description The special value '/' refers to all possible data
"One Notification Access Rule. store contents.";
}
}
}
A notification is considered a match if the module name of leaf access-operations {
the requested event type matches type union {
'module-name', the requested event type type matchall-string-type;
matches the 'notification-name', and the administrative type access-operations-type;
group associated with the requesting session is listed in }
the 'allowed-group' leaf-list. If the 'allowed-rights' default "*";
leaf is present, it is ignored by the server. description
Only the 'read' bit can possibly cause "Access operations associated with this rule.
a match for a notification rule.";
leaf module-name { This leaf matches if it has the value '*', or if the
type string; bit corresponding to the requested operation is set.";
description }
"Name of the module defining this
notification event type.";
}
leaf notification-name { leaf action {
type string; type action-type;
description mandatory true;
"Name of the notification event."; description
} "The access control action associated with the
rule. If a rule is determined to match a
particular request, then this object is used
to determine whether to permit or deny the
request.";
}
uses common-rule-parms; leaf comment {
} type string;
} description
} "A textual description of the access rule.";
} }
}
}
}
}
<CODE ENDS> <CODE ENDS>
Figure 5 Figure 5
3.5. IANA Considerations 3.5. IANA Considerations
There are two actions that are requested of IANA: This document There are two actions that are requested of IANA: This document
registers one URI in "The IETF XML Registry". Following the format registers one URI in "The IETF XML Registry". Following the format
in [RFC3688], the following has been registered. in [RFC3688], the following has been registered.
URI: urn:ietf:params:xml:ns:yang:ietf-netconf-acm URI: urn:ietf:params:xml:ns:yang:ietf-netconf-acm
skipping to change at page 41, line 49 skipping to change at page 39, line 25
This entire document discusses access control requirements and This entire document discusses access control requirements and
mechanisms for restricting NETCONF protocol behavior within a given mechanisms for restricting NETCONF protocol behavior within a given
session. session.
Configuration of the access control system is highly sensitive to Configuration of the access control system is highly sensitive to
system security. A server may choose not to allow any user system security. A server may choose not to allow any user
configuration to some portions of it, such as the global security configuration to some portions of it, such as the global security
level, or the groups which allowed access to system resources. level, or the groups which allowed access to system resources.
This document incorporates the optional use of a 'superuser' account, This document incorporates the optional use of a "recovery session"
which can be used to bypass access control enforcement. It is mechanism, which can be used to bypass access control enforcement in
suggested that the 'root' account not be used for NETCONF over SSH emergencies, such as NACM configuration errors which disable all
servers, because 'root' SSH logins SHOULD be disabled in the SSH access to the server. The configuration and identification of such a
server. recovery session mechanism are outside the scope of this document.
If the server chooses to allow user configuration of the access
control system, then only sessions using the 'superuser'
administrative user SHOULD be allowed to have write access to the
data model.
If the server chooses to allow user retrieval of the access control
system configuration, then only sessions using the 'superuser'
administrative user SHOULD be allowed to have read access to the data
model.
There is a risk that invocation of non-standard protocol operations There is a risk that invocation of non-standard protocol operations
will have undocumented side effects. An administrator needs to will have undocumented side effects. An administrator needs to
construct access control rules such that the configuration datastore construct access control rules such that the configuration datastore
is protected from such side effects. Also, such protocol operations is protected from such side effects. Also, such protocol operations
SHOULD never be invoked by a session using the 'superuser' SHOULD never be invoked by a session during a "recovery session".
administrative user.
There is a risk that non-standard protocol operations, or even the There is a risk that non-standard protocol operations, or even the
standard <get> operation, may return data which 'aliases' or 'copies' standard <get> operation, may return data which "aliases" or "copies"
sensitive data from a different data object. In this case, the sensitive data from a different data object. In this case, the
namespace and/or the element name will not match the values for the namespace and/or the element name will not match the values for the
sensitive data, which is then fully or partially copied into a sensitive data, which is then fully or partially copied into a
different namespace and/or element. An administrator needs to avoid different namespace and/or element. An administrator needs to avoid
using data models which use this practice. using data models which use this practice.
An administrator needs to restrict write access to all configurable An administrator needs to restrict write access to all configurable
objects within this data model. It is suggested that only sessions objects within this data model.
using the 'superuser' administrative role be permitted to configure
the data model defined in this document.
If write access is allowed for configuration of access control rules, If write access is allowed for configuration of access control rules,
then care needs to be taken not to disrupt the access control then care needs to be taken not to disrupt the access control
enforcement. enforcement.
An administrator needs to restrict read access to the following An administrator needs to restrict read access to the following
objects within this data model, which reveal access control objects within this data model, which reveal access control
configuration which could be considered sensitive. configuration which could be considered sensitive.
o enable-nacm o enable-nacm
skipping to change at page 44, line 28 skipping to change at page 41, line 28
[RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the
Network Configuration Protocol (NETCONF)", RFC 6020, Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010. October 2010.
[RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021,
October 2010. October 2010.
[I-D.ietf-netconf-4741bis] [I-D.ietf-netconf-4741bis]
Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
Bierman, "Network Configuration Protocol (NETCONF)", Bierman, "Network Configuration Protocol (NETCONF)",
draft-ietf-netconf-4741bis-09 (work in progress), draft-ietf-netconf-4741bis-10 (work in progress),
February 2011. March 2011.
[I-D.ietf-netconf-rfc4742bis] [I-D.ietf-netconf-rfc4742bis]
Wasserman, M. and T. Goddard, "Using the NETCONF Wasserman, M. and T. Goddard, "Using the NETCONF
Configuration Protocol over Secure Shell (SSH)", Configuration Protocol over Secure Shell (SSH)",
draft-ietf-netconf-rfc4742bis-07 (work in progress), draft-ietf-netconf-rfc4742bis-08 (work in progress),
February 2011. March 2011.
4.2. Informative References 4.2. Informative References
[RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson, [RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson,
"Remote Authentication Dial In User Service (RADIUS)", "Remote Authentication Dial In User Service (RADIUS)",
RFC 2865, June 2000. RFC 2865, June 2000.
[RFC5607] Nelson, D. and G. Weber, "Remote Authentication Dial-In [RFC5607] Nelson, D. and G. Weber, "Remote Authentication Dial-In
User Service (RADIUS) Authorization for Network Access User Service (RADIUS) Authorization for Network Access
Server (NAS) Management", RFC 5607, July 2009. Server (NAS) Management", RFC 5607, July 2009.
skipping to change at page 45, line 43 skipping to change at page 42, line 43
<group> <group>
<name>guest</name> <name>guest</name>
<user-name>guest</user-name> <user-name>guest</user-name>
<user-name>guest@example.com</user-name> <user-name>guest@example.com</user-name>
</group> </group>
</groups> </groups>
</nacm> </nacm>
This example shows 3 groups: This example shows 3 groups:
1. The nacm:admin group contains 2 users named 'admin' and 'andy'. 1. The "admin" group contains 2 users named "admin" and "andy".
2. The nacm:monitor group contains 2 users named 'wilma' and 'bam- 2. The "monitor" group contains 2 users named "wilma" and "bam-bam".
bam'.
3. The nacm:guest group contains 2 users named 'guest' and 3. The "guest" group contains 2 users named "guest" and
'guest@example.com'. "guest@example.com".
A.2. <module-rule> Example A.2. Module Rule Example
Module rules are used to control access to all the content defined in Module rules are used to control access to all the content defined in
a specific module. These rules are checked after none of the a specific module. A module rule has the <module-name> leaf set, but
specific rules (i.e., rpc-rule, data-rule, or notification-rule) no case in the "rule-type" choice.
matched the current access request.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<rules> <rule-list>
<module-rule> <name>guest</name>
<group>guest</group>
<rule>
<name>mod-1</name>
<module-name>ietf-netconf-monitoring</module-name> <module-name>ietf-netconf-monitoring</module-name>
<rule-name>mod-1</rule-name> <access-operations>*</access-operations>
<allowed-rights>*</allowed-rights> <action>deny</action>
<allowed-group>guest</allowed-group>
<nacm-action>deny</nacm-action>
<comment> <comment>
Do not allow guests any access to the netconf Do not allow guests any access to the netconf
monitoring information. monitoring information.
</comment> </comment>
</module-rule> </rule>
</rule-list>
<module-rule> <rule-list>
<name>monitor example</name>
<group>monitor</group>
<rule>
<name>mod-2</name>
<module-name>ietf-netconf-monitoring</module-name> <module-name>ietf-netconf-monitoring</module-name>
<rule-name>mod-2</rule-name> <access-operations>read</access-operations>
<allowed-rights>read</allowed-rights> <action>permit</action>
<allowed-group>monitor</allowed-group>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow the monitor group read access to the netconf Allow read access to the netconf
monitoring information. monitoring information.
</comment> </comment>
</module-rule> </rule>
<rule>
<module-rule> <name>mod-3</name>
<module-name>*</module-name> <module-name>*</module-name>
<rule-name>mod-3</rule-name> <access-operations>exec</access-operations>
<allowed-rights>exec</allowed-rights> <action>permit</action>
<allowed-group>monitor</allowed-group>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow the monitor group to invoke any of the Allow invocation of the
supported server operations. supported server operations.
</comment> </comment>
</module-rule> </rule>
<module-rule>
</rule-list>
<rule-list>
<name>admin example</name>
<group>admin</group>
<rule>
<name>mod-4</name>
<module-name>*</module-name> <module-name>*</module-name>
<rule-name>mod-4</rule-name> <access-operations>*</access-operations>
<allowed-rights>*</allowed-rights> <action>permit</action>
<allowed-group>admin</allowed-group>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow the admin group complete access to all Allow the admin group complete access to all
operations and data. operations and data.
</comment> </comment>
</module-rule> </rule>
</rule-list>
</rules>
</nacm> </nacm>
This example shows 4 module rules: This example shows 4 module rules:
mod-1: This rule prevents the guest group from reading any mod-1: This rule prevents the guest group from reading any
monitoring information in the ietf-netconf-monitoring YANG module. monitoring information in the ietf-netconf-monitoring YANG module.
mod-2: This rule allows the monitor group to read the ietf-netconf- mod-2: This rule allows the monitor group to read the ietf-netconf-
monitoring YANG module. monitoring YANG module.
mod-3: This rule allows the monitor group to invoke any protocol mod-3: This rule allows the monitor group to invoke any protocol
operation supported by the server. operation supported by the server.
mod-4: This rule allows the admin group complete access to all mod-4: This rule allows the admin group complete access to all
content in the server. No subsequent rule will match for the content in the server. No subsequent rule will match for the
admin group, because of this module rule. admin group, because of this module rule.
A.3. <rpc-rule> Example A.3. RPC Rule Example
RPC rules are used to control access to a specific protocol RPC rules are used to control access to a specific protocol
operation. operation.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<rules> <rule-list>
<rpc-rule> <name>guest</name>
<group>monitor</group>
<group>guest</group>
<rule>
<name>rpc-1</name>
<module-name>ietf-netconf</module-name> <module-name>ietf-netconf</module-name>
<rpc-name>kill-session</rpc-name> <rpc-name>kill-session</rpc-name>
<rule-name>rpc-1</rule-name> <access-operations>exec</access-operations>
<allowed-group>monitor</allowed-group> <action>deny</action>
<allowed-group>guest</allowed-group>
<nacm-action>deny</nacm-action>
<comment> <comment>
Do not allow the monitor or guest group Do not allow the monitor or guest group
to kill another session. to kill another session.
</comment> </comment>
</rpc-rule> </rule>
<rule>
<rpc-rule> <name>rpc-2</name>
<module-name>ietf-netconf</module-name> <module-name>ietf-netconf</module-name>
<rpc-name>delete-config</rpc-name> <rpc-name>delete-config</rpc-name>
<rule-name>rpc-2</rule-name> <access-operations>exec</access-operations>
<allowed-group>monitor</allowed-group> <action>deny</action>
<allowed-group>guest</allowed-group>
<nacm-action>deny</nacm-action>
<comment> <comment>
Do not allow monitor or guest group Do not allow monitor or guest group
to delete any configurations. to delete any configurations.
</comment> </comment>
</rpc-rule> </rule>
</rule-list>
<rpc-rule> <rule-list>
<name>monitor</name>
<group>monitor</group>
<rule>
<name>rpc-3</name>
<module-name>ietf-netconf</module-name> <module-name>ietf-netconf</module-name>
<rpc-name>edit-config</rpc-name> <rpc-name>edit-config</rpc-name>
<rule-name>rpc-3</rule-name> <access-operations>exec</access-operations>
<allowed-group>monitor</allowed-group> <action>permit</action>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow the monitor group to edit the configuration. Allow the monitor group to edit the configuration.
</comment> </comment>
</rpc-rule> </rule>
</rules> </rule-list>
</nacm>
</nacm>
This example shows 3 protocol operation rules: This example shows 3 protocol operation rules:
rpc-1: This rule prevents the monitor or guest groups from invoking rpc-1: This rule prevents the monitor or guest groups from invoking
the NETCONF <kill-session> protocol operation. the NETCONF <kill-session> protocol operation.
rpc-2: This rule prevents the monitor or guest groups from invoking rpc-2: This rule prevents the monitor or guest groups from invoking
the NETCONF <delete-config> protocol operation. the NETCONF <delete-config> protocol operation.
rpc-3: This rule allows the monitor group to invoke the NETCONF rpc-3: This rule allows the monitor group to invoke the NETCONF
<edit-config> protocol operation. This rule will have no real <edit-config> protocol operation. This rule will have no real
affect unless the 'exec-default' leaf is set to 'deny'. effect unless the "exec-default" leaf is set to "deny".
A.4. <data-rule> Example A.4. Data Rule Example
Data rules are used to control access to specific (config and non- Data rules are used to control access to specific (config and non-
config) data nodes within the NETCONF content provided by the server. config) data nodes within the NETCONF content provided by the server.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<rules> <rule-list>
<data-rule> <name>guest rules</name>
<rule-name>data-1</rule-name> <group>guest</group>
<path>/nacm</path>
<allowed-rights>*</allowed-rights> <rule>
<allowed-group>guest</allowed-group> <name>data-1</name>
<nacm-action>deny</nacm-action> <path xmlns:n="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
/n:nacm
</path>
<access-operations>*</access-operations>
<action>deny</action>
<comment> <comment>
Deny the guest group any access to the /nacm data. Deny the guest group any access to the /nacm data.
</comment> </comment>
</data-rule> </rule>
</rule-list>
<data-rule> <rule-list>
<rule-name>data-acme-config</rule-name> <name>monitor rules</name>
<group>monitor</group>
<rule>
<name>data-acme-config</name>
<path xmlns:acme="http://example.com/ns/netconf"> <path xmlns:acme="http://example.com/ns/netconf">
/acme:acme-netconf/acme:config-parameters /acme:acme-netconf/acme:config-parameters
</path> </path>
<allowed-rights>read create update delete</allowed-rights> <access-operations>
<allowed-group>monitor</allowed-group> read create update delete
<nacm-action>permit</nacm-action> </access-operations>
<action>permit</action>
<comment> <comment>
Allow the monitor group complete access to the acme Allow the monitor group complete access to the acme
netconf configuration parameters. Showing long form netconf configuration parameters. Showing long form
of 'allowed-rights' instead of shorthand. of 'access-operations' instead of shorthand.
</comment> </comment>
</data-rule> </rule>
</rule-list>
<data-rule> <rule-list>
<rule-name>dummy-itf</rule-name> <name>dummy-itf</name>
<group>guest monitor</group>
<rule>
<name>dummy-itf</name>
<path xmlns:acme="http://example.com/ns/itf"> <path xmlns:acme="http://example.com/ns/itf">
/acme:interfaces/acme:interface[acme:name='dummy'] /acme:interfaces/acme:interface[acme:name='dummy']
</path> </path>
<allowed-rights>read update</allowed-rights> <access-operations>read update</access-operations>
<allowed-group>monitor</allowed-group> <action>permit</action>
<allowed-group>guest</allowed-group>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow the monitor and guest groups read Allow the monitor and guest groups read
and update access to the dummy interface. and update access to the dummy interface.
</comment> </comment>
</data-rule> </rule>
</rule-list>
<data-rule> <rule-list>
<rule-name>admin-itf</rule-name> <name>admin rules</name>
<rule>
<name>admin-itf</name>
<path xmlns:acme="http://example.com/ns/itf"> <path xmlns:acme="http://example.com/ns/itf">
/acme:interfaces/acme:interface /acme:interfaces/acme:interface
</path> </path>
<allowed-rights>*</allowed-rights> <access-operations>*</access-operations>
<allowed-group>admin</allowed-group> <action>permit</action>
<nacm-action>permit</nacm-action>
<comment> <comment>
Allow admin full access to all acme interfaces. Allow admin full access to all acme interfaces.
This is an example of an unreachable rule,
because the admin group already has full access
to all modules (see rule 'mod-4').
All 'module-rule' entries will be checked
before this 'data-rule' entry is checked.
</comment> </comment>
</data-rule> </rule>
</rules> </rule-list>
</nacm> </nacm>
This example shows 4 data rules: This example shows 4 data rules:
data-1: This rule denies the guest group any access to the <nacm> data-1: This rule denies the guest group any access to the <nacm>
sub-tree. Note that the default namespace is only applicable subtree. Note that the default namespace is only applicable
because this sub-tree is defined in the same namespace as the because this subtree is defined in the same namespace as the
<data-rule> element. <data-rule> element.
data-acme-config: This rule gives the monitor group read-write data-acme-config: This rule gives the monitor group read-write
access to the acme <config-parameters>. access to the acme <config-parameters>.
dummy-itf: This rule gives the monitor and guest groups read-update dummy-itf: This rule gives the monitor and guest groups read-update
access to the acme <interface>. entry named 'dummy'. This entry access to the acme <interface>. entry named "dummy". This entry
cannot be created or deleted by these groups, just altered. cannot be created or deleted by these groups, just altered.
admin-itf: This rule gives the admin group read-write access to all admin-itf: This rule gives the admin group read-write access to all
acme <interface>. entries. This is an example of an unreachable acme <interface>. entries. This is an example of an unreachable
rule because the 'mod-3' rule already gives the admin group full rule because the "mod-3" rule already gives the admin group full
access to this data. access to this data.
A.5. <notification-rule> Example A.5. Notification Rule Example
Notification rules are used to control access to a specific Notification rules are used to control access to a specific
notification event type. notification event type.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<rules> <rule-list>
<notification-rule> <name>sys</name>
<group>monitor</group>
<group>guest</group>
<rule>
<name>notif-1</name>
<module-name>acme-system</module-name> <module-name>acme-system</module-name>
<notification-name>sys-config-change</notification-name> <notification-name>sys-config-change</notification-name>
<rule-name>notif-1</rule-name> <access-operations>read</access-operations>
<allowed-group>monitor</allowed-group> <action>deny</action>
<allowed-group>guest</allowed-group>
<nacm-action>deny</nacm-action>
<comment> <comment>
Do not allow the guest or monitor groups Do not allow the guest or monitor groups
to receive config change events. to receive config change events.
</comment> </comment>
</notification-rule> </rule>
</rules> </rule-list>
</nacm> </nacm>
This example shows 1 notification rule: This example shows 1 notification rule:
notif-1: This rule prevents the monitor or guest groups from notif-1: This rule prevents the monitor or guest groups from
receiving the acme <sys-config-change> event type. receiving the acme <sys-config-change> event type.
Appendix B. Change Log Appendix B. Change Log
-- RFC Ed.: remove this section before publication. -- RFC Ed.: remove this section before publication.
B.1. 02-03 B.1. 03-04
Introduced rule-lists to group related rules together.
Moved "module-rule", "rpc-rule", "notification-rule", and "data-rule"
into one common "rule", with a choice to select between the four
variants.
Changed "superuser" to "recovery session", and adjusted text
throughout document for this change.
Clarified behavior of global default NACM parameters, enable-nacm,
read-default, write-default, exec-default.
Clarified when access control is applied during system
initialization.
B.2. 02-03
Fixed improper usage of RFC 2119 keywords. Fixed improper usage of RFC 2119 keywords.
Changed term usage of 'database' to 'datastore'. Changed term usage of "database" to "datastore".
Clarified that 'secure' and 'very-secure' extensions only apply if Clarified that "secure" and "very-secure" extensions only apply if
the /nacm/enable-nacm object is 'true'. the /nacm/enable-nacm object is "true".
B.2. 01-02 B.3. 01-02
Removed authentication text and objects. Removed authentication text and objects.
Changed module name from ietf-nacm to ietf-netconf-acm. Changed module name from ietf-nacm to ietf-netconf-acm.
Updated NETCONF and YANG terminology. Updated NETCONF and YANG terminology.
Removed open issues section. Removed open issues section.
Changed some must to MUST in requirements section. Changed some must to MUST in requirements section.
B.3. 00-01 B.4. 00-01
Updated YANG anf YANG Types references. Updated YANG anf YANG Types references.
Updated module namespace URI to standard format. Updated module namespace URI to standard format.
Updated module header meta-data to standard format. Updated module header meta-data to standard format.
Filled in IANA section. Filled in IANA section.
B.4. 00 B.5. 00
Initial version cloned from Initial version cloned from
draft-bierman-netconf-access-control-02.txt. draft-bierman-netconf-access-control-02.txt.
Authors' Addresses Authors' Addresses
Andy Bierman Andy Bierman
Brocade Brocade
Email: andy.bierman@brocade.com Email: andy.bierman@brocade.com
 End of changes. 257 change blocks. 
985 lines changed or deleted 920 lines changed or added

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