Internet Engineering Task Force A. Bierman Internet-Draft Brocade Intended status: Standards Track M. Bjorklund Expires: September 12, 2011 Tail-f Systems March 11, 2011 Network Configuration Protocol Access Control Model draft-ietf-netconf-access-control-03 Abstract The standardization of network configuration interfaces for use with the NETCONF protocol requires a structured and secure operating environment, which promotes human usability and multi-vendor interoperability. There is a need for standard mechanisms to restrict NETCONF protocol access for particular users to a pre- configured subset of all available NETCONF operations and content. This document discusses requirements for a suitable access control model, and provides one solution which meets these requirements. Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on September 12, 2011. Copyright Notice Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect Bierman & Bjorklund Expires September 12, 2011 [Page 1] Internet-Draft NACM March 2011 to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.1. Requirements Notation . . . . . . . . . . . . . . . . 4 1.1.2. NETCONF Terms . . . . . . . . . . . . . . . . . . . . 4 1.1.3. YANG Terms . . . . . . . . . . . . . . . . . . . . . . 5 1.1.4. NACM Terms . . . . . . . . . . . . . . . . . . . . . . 5 2. Access Control Requirements . . . . . . . . . . . . . . . . . 6 2.1. Protocol Control Points . . . . . . . . . . . . . . . . . 6 2.2. Simplicity . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3. Procedural Interface . . . . . . . . . . . . . . . . . . . 7 2.4. Datastore Access . . . . . . . . . . . . . . . . . . . . . 7 2.4.1. Access Rights . . . . . . . . . . . . . . . . . . . . 8 2.4.2. and Operations . . . . . . . . . . 8 2.4.3. Operation . . . . . . . . . . . . . . . 8 2.4.4. Operation . . . . . . . . . . . . . . . 9 2.5. Users and Groups . . . . . . . . . . . . . . . . . . . . . 10 2.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . 10 2.7. Configuration Capabilities . . . . . . . . . . . . . . . . 10 2.8. Identifying Security Holes . . . . . . . . . . . . . . . . 11 2.9. Data Shadowing . . . . . . . . . . . . . . . . . . . . . . 12 2.10. NETCONF Specific Requirements . . . . . . . . . . . . . . 12 3. NETCONF Access Control Model (NACM) . . . . . . . . . . . . . 14 3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.1. Features . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.2. External Dependencies . . . . . . . . . . . . . . . . 15 3.1.3. Message Processing Model . . . . . . . . . . . . . . . 15 3.2. Model Components . . . . . . . . . . . . . . . . . . . . . 17 3.2.1. Users . . . . . . . . . . . . . . . . . . . . . . . . 17 3.2.2. Groups . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.3. Sessions . . . . . . . . . . . . . . . . . . . . . . . 18 3.2.4. Access Permissions . . . . . . . . . . . . . . . . . . 18 3.2.5. Global Enforcement Controls . . . . . . . . . . . . . 19 3.2.6. Access Control Rules . . . . . . . . . . . . . . . . . 19 3.3. Access Control Enforcement Procedures . . . . . . . . . . 19 3.3.1. Initial Operation . . . . . . . . . . . . . . . . . . 19 3.3.2. Session Establishment . . . . . . . . . . . . . . . . 20 3.3.3. 'access-denied' Error Handling . . . . . . . . . . . . 20 3.3.4. Incoming RPC Message Validation . . . . . . . . . . . 20 3.3.5. Data Node Access Validation . . . . . . . . . . . . . 23 3.3.6. Outgoing Authorization . . . . . . . . . . 26 Bierman & Bjorklund Expires September 12, 2011 [Page 2] Internet-Draft NACM March 2011 3.3.7. Outgoing Authorization . . . . . . . . 26 3.4. Data Model Definitions . . . . . . . . . . . . . . . . . . 29 3.4.1. High Level Procedures . . . . . . . . . . . . . . . . 29 3.4.2. Data Organization . . . . . . . . . . . . . . . . . . 29 3.4.3. YANG Module . . . . . . . . . . . . . . . . . . . . . 30 3.5. IANA Considerations . . . . . . . . . . . . . . . . . . . 41 3.6. Security Considerations . . . . . . . . . . . . . . . . . 41 4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.1. Normative References . . . . . . . . . . . . . . . . . . . 44 4.2. Informative References . . . . . . . . . . . . . . . . . . 44 Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 45 A.1. Example . . . . . . . . . . . . . . . . . . . . . 45 A.2. Example . . . . . . . . . . . . . . . . . . 46 A.3. Example . . . . . . . . . . . . . . . . . . . . 47 A.4. Example . . . . . . . . . . . . . . . . . . . 49 A.5. Example . . . . . . . . . . . . . . . 51 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 52 B.1. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 B.2. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 B.3. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 B.4. 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 53 Bierman & Bjorklund Expires September 12, 2011 [Page 3] Internet-Draft NACM March 2011 1. Introduction The NETCONF protocol does not provide any standard mechanisms to restrict the operations and content that each user is authorized to use. There is a need for inter-operable management of the controlled access to operator selected portions of the available NETCONF content within a particular server. This document addresses access control mechanisms for the Operation and Content layers of NETCONF, as defined in [I-D.ietf-netconf-4741bis], and [RFC5277]. It contains three main sections: 1. Access Control Requirements 2. NETCONF Access Control Model (NACM) 3. YANG Data Model (ietf-netconf-acm.yang) 1.1. Terminology 1.1.1. Requirements Notation The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 1.1.2. NETCONF Terms The following terms are defined in [I-D.ietf-netconf-4741bis] and are not redefined here: o client o datastore o operation o protocol operation o server o session o user Bierman & Bjorklund Expires September 12, 2011 [Page 4] Internet-Draft NACM March 2011 1.1.3. YANG Terms The following terms are defined in [RFC6020] and are not redefined here: o data node 1.1.4. NACM Terms The following terms are used throughout this documentation: access control: A security feature provided by the NETCONF server, which allows an operator to restrict access to a subset of all NETCONF protocol operations and data, based on various criteria. access control model (ACM): A conceptual model used to configure and monitor the access control procedures desired by the operator to enforce a particular access control policy. access control rule: The conceptual criteria used to determine if a particular NETCONF protocol operation will be permitted or denied. authentication: The process of verifying a user's identity. superuser: The special administrative user account which is given unlimited NETCONF access, and is exempt from all access control enforcement. Bierman & Bjorklund Expires September 12, 2011 [Page 5] Internet-Draft NACM March 2011 2. Access Control Requirements 2.1. Protocol Control Points The NETCONF protocol allows new operations to be added at any time, 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 set of operations, like some other protocols. Since few assumptions can be made about an arbitrary protocol operation, the NETCONF architectural server components need to be protected at several conceptual control points. +-------------+ +-------------+ client | protocol | | prune | client request --> | operation | | restricted | ---> reply | allowed? | | | +-------------+ | nodes? | | +-------------+ | if any datastore or | state data is accessed | by the operation V +-------------+ +----------------+ | data node | | prune | | access | | restricted | | allowed? | | | ---> client +-------------+ | event or data? | session +----------------+ Figure 1 The following access control points are defined: protocol operation: Configurable permission to invoke specific protocol operations is required. Wildcard or multiple target mechanisms to reduce configuration and effort are also required. NETCONF datastore: Configurable permission to read and/or alter specific data nodes within any conceptual datastore is required. Wildcard or multiple target mechanisms to reduce configuration and effort are also required. RPC Reply Content: Configurable permission to read specific data nodes within any conceptual RPC output section is required. Unauthorized data is silently omitted from the reply, instead of dropping the reply or sending an 'access-denied' error. Bierman & Bjorklund Expires September 12, 2011 [Page 6] Internet-Draft NACM March 2011 Notification Content: Configurable permission to receive specific notification event types is required. 2.2. Simplicity Experience has shown that a complicated ACM will not be widely deployed, because it is too hard to use. The key factor that is 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, instead of hard to do everything. Configuration of the access control system needs to be simple to use. Simple and common tasks need to be easy to configure, and require little expertise or domain-specific knowledge. Complex tasks are possible using additional mechanisms, which may require additional expertise. A single set of access control rules SHOULD be able to control all types of NETCONF protocol operation invocation, all conceptual datastore access, and all NETCONF session output. Default access control policy needs to be as secure as possible. Protocol access SHOULD be defined with a small and familiar set of permissions, while still allowing full control of NETCONF datastore access. Access control does not need to be applied to NETCONF messages. 2.3. Procedural Interface The NETCONF protocol uses a procedural interface model, and an extensible set of protocol operations. Access control for any possible protocol operation is required. It MUST be possible to configure the ACM to permit or deny access to specific NETCONF operations. YANG modules SHOULD be designed so that different access levels for input parameters to protocol operations is not required. 2.4. Datastore Access It MUST be possible to control access to specific nodes and sub-trees within the conceptual NETCONF datastore. In order for a user to obtain access to a particular datastore node, Bierman & Bjorklund Expires September 12, 2011 [Page 7] Internet-Draft NACM March 2011 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. For example, the candidate configuration or the running configuration. Only the standard NETCONF datastores (candidate, running, and startup) are controlled by the ACM. Local or remote files or datastores accessed via the parameter are optional to support. The non-volatile startup configuration needs to be loaded into the running configuration without applying any access control rules. 2.4.1. Access Rights A small set of hard-wired datastore access rights is needed to control access to all possible NETCONF datastore operations, including vendor extensions to the standard operation set. The familiar 'CRUDX' model can support all NETCONF operations: o Create: Allows the client to add a new data node instance to a datastore. o Read: Allows the client to read a data node instance from a datastore, or receive the notification event type. o Update: Allows the client to update an existing data node instance in a datastore. o Delete: Allows the client to delete a data node instance from a datastore. o eXec: Allows the client to execute the protocol operation. 2.4.2. and Operations Data nodes to which the client does not have 'read' access, either directly or via wildcard access, are silently omitted from the message. 2.4.3. Operation The NACM access rights are not directly coupled to the "operation" attribute, although they are similar. Instead, a NACM access right applies to all operations which would result in a particular access operation to the target datastore. This section Bierman & Bjorklund Expires September 12, 2011 [Page 8] Internet-Draft NACM March 2011 describes how these access rights apply to the specific datastore operations supported by the operation. If the effective operation is 'none' (i.e., default-operation='none') for a particular data node, then no access control is applied to that data node. A 'create', 'merge', or 'replace' operation on a datastore node 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 an 'access-denied' error. A 'merge' or 'replace' operation on a datastore node which would result in the modification of an existing data node instance, for which the user does not have 'update' access permission, is rejected with an 'access-denied' error. A 'replace', 'delete', or 'remove' operation on a datastore node which would result in the deletion of an existing data node instance, for which the user does not have 'delete' access permission, is rejected with an 'access-denied' error. A 'merge' operation may include data nodes which do not alter portions of the existing datastore. For example, a container or list nodes may be present for naming purposes, which do not actually alter the corresponding datastore node. These unaltered data nodes within the scope of a 'merge' operation are ignored by the server, and do not require any access rights by the client. A 'merge' operation may include data nodes, but not include particular child data nodes that are present in the datastore. These missing data nodes within the scope of a 'merge' operation are ignored by the server, and do not require any access rights by the client. The contents of specific restricted datastore nodes MUST NOT be exposed in any elements within the reply. 2.4.4. Operation Access control for the operation requires special consideration because the operator is replacing the entire target datastore. Read access to the entire source datastore, and write access to the entire target datastore is needed for this operation to succeed. A client MUST have access to every datastore node, even ones that are not present in the source configuration data. Bierman & Bjorklund Expires September 12, 2011 [Page 9] Internet-Draft NACM March 2011 For example, consider a common use-case such as a simple backup and restore procedure. The operator (client) MUST have full read access 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 that copy is later used to restore the server datastore, the server will interpret the missing nodes as a request to delete those nodes, and return an error. 2.5. Users and Groups The server MUST obtain a user name from the underlying NETCONF transport, such as an SSH user name. It MUST be possible to specify access control rules for a single user 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 well-established distinction between a root account and other types of less-privileged conceptual user accounts. These groups MUST be configurable by the operator. It MUST be possible to delegate the user-to-group mapping to a central server, such as RADIUS [RFC2865] [RFC5607]. Since authentication is performed by the NETCONF transport layer, and RADIUS performs authentication and service authorization at the same time, it MUST be possible for the underlying NETCONF transport to report a set of group names associated with the user to the server. 2.6. Maintenance It SHOULD be possible to disable part or all of the access control model without deleting any configuration. By default, only the '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 Suitable control and monitoring mechanisms are needed to allow an operator to easily manage all aspects of the ACM behavior. A Bierman & Bjorklund Expires September 12, 2011 [Page 10] Internet-Draft NACM March 2011 standard data model, suitable for use with the operation MUST be available for this purpose. Access control rules to restrict operations on specific sub-trees within the configuration datastore MUST be supported. Existing mechanisms can be used to identify the sub-tree(s) for this purpose. 2.8. Identifying Security Holes One of the most important aspects of the data model documentation, and biggest concerns during deployment, is the identification of security-sensitive content. This applies to operations in NETCONF, not just data and notifications. It is mandatory for security-sensitive objects to be documented in the Security Considerations section of an RFC. This is nice, but it is not good enough, for the following reasons: o This documentation-only approach forces operators to study the RFC and determine if there are any potential security holes introduced by a new YANG module. o If any security holes are identified, then the operator can study some more RFC text, and determine how to close the security hole(s). o The ACM on each server can be configured to close the security holes, e.g., require privileged access to read or write the specific data identified in the Security Considerations section. o If the ACM is not pre-configured, then there will be a time window of vulnerability, after the new module is loaded, and before the new access control rules for that module are configured, enabled, and debugged. Often, the operator just wants to disable default access to the secure content, so no inadvertent or malicious changes can be made to the server. This allows the default rules to be more lenient, without significantly increasing the security risk. A data model designer needs to be able to use machine-readable statements to identify NETCONF content which needs to be protected by default. This will allow client and server tools to automatically close data-model specific security holes, by denying access to sensitive data unless the user is explicitly authorized to perform the requested operation. Bierman & Bjorklund Expires September 12, 2011 [Page 11] Internet-Draft NACM March 2011 2.9. Data Shadowing One of the more complicated security administration problems is identifying data nodes which shadow or mirror the content of another data node. An access control rule to prevent read operations for a particular node may be insufficient to prevent access to the data 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 documentation exists to identify a data shadow problem, then it may not be detected. Since NETCONF allows any vendor operation to be added to the protocol, there is no way to reliably identify all of the operations that may expose copies of sensitive data nodes in messages. A NETCONF server MUST ensure that unauthorized access to its conceptual datastores and non-configuration data nodes is prevented. It is beyond the scope of this document to define access control enforcement procedures for underlying device instrumentation that may exist to support the NETCONF server operation. An operator can identify each operation that the server provides, and decide if it needs any access control applied to it. Proprietary protocol operations SHOULD be properly documented by the vendor, so it is clear to operators what data nodes (if any) are affected by the operation, and what information (if any) is returned in the message. 2.10. NETCONF Specific Requirements The server MUST be able to identify the specific protocol access request at the 4 access control points defined above. The server MUST be able to identify any datastore access request, even for proprietary operations. A client MUST always be authorized to invoke the operation, defined in [I-D.ietf-netconf-4741bis]. A client MUST always be authorized to receive the and notification events, defined in [RFC5277] Bierman & Bjorklund Expires September 12, 2011 [Page 12] Internet-Draft NACM March 2011 The set of module name strings used within one particular server MUST be unique. Bierman & Bjorklund Expires September 12, 2011 [Page 13] Internet-Draft NACM March 2011 3. NETCONF Access Control Model (NACM) 3.1. Introduction This section provides a high-level overview of the access control model structure. It describes the NETCONF protocol message processing model, and the conceptual access control requirements within that model. 3.1.1. Features The NACM data model provides the following features: o Independent control of RPC, data, and notification access. o Very simple access control rules configuration data model which is easy to use. o The concept of a 'superuser' type of account is supported, but configuration such an account is beyond the scope of this document. If the server supports a 'superuser' account, then it MUST be able to determine the actual user name for this account. A session associated with the superuser account will bypass all access control enforcement. o A simple and familiar set of datastore permissions is used. o Support for YANG security tagging (e.g., nacm:secure extension) allows default security modes to automatically exclude sensitive data. o Separate default access modes for read, write, and execute permissions. o Access control rules are applied to configurable groups of users. o The entire ACM can be disabled during operation, in order to debug operational problems. o Access control rules are simple to configure. o The number of denied protocol operation requests and denied datastore write requests can be monitored by the client. o Simple unconstrained YANG instance identifiers are used to configure access control rules for specific data nodes. Bierman & Bjorklund Expires September 12, 2011 [Page 14] Internet-Draft NACM March 2011 3.1.2. External Dependencies The NETCONF [I-D.ietf-netconf-4741bis] protocol is used for all management purposes within this document. It is expected that the mandatory transport mapping NETCONF Over SSH [I-D.ietf-netconf-rfc4742bis] is also supported by the server, and that the server has access to the user name associated with each session. The YANG Data Modeling Language [RFC6020] is used to define the NETCONF data models specified in this document. The YANG instance- identifier data type is used to configure data-node-specific access control rules. 3.1.3. Message Processing Model The following diagram shows the NETCONF message flow model, including the points at which access control is applied, during NETCONF message processing. Bierman & Bjorklund Expires September 12, 2011 [Page 15] Internet-Draft NACM March 2011 +-------------------------+ | session | | (username) | +-------------------------+ | ^ V | +--------------+ +---------------+ | message | | message | | dispatcher | | generator | +--------------+ +---------------+ | ^ ^ V | | +===========+ +-------------+ +----------------+ | |---> | | | | | acc. ctl | | generator | | generator | +===========+ +-------------+ +----------------+ | ^ ^ ^ V +------+ | | +-----------+ | +=============+ +================+ | | | | | | | | processor |-+ | acc. ctl | | access ctl | +-----------+ +=============+ +================+ | | ^ ^ V +----------------+ | | +===========+ | | | | data node | | | | | acc. ctl | -----------+ | | | +===========+ | | | | | | | | | V V V | | +---------------+ +-----------------+ | configuration | ---> | server | | datastore | | instrumentation | | | <--- | | +---------------+ +-----------------+ Figure 2 The following high-level sequence of conceptual processing steps is executed for each received message, if access control enforcement is enabled: o Access control is applied to all messages (except ) received by the server, individually, for each active session, unless the session is associated with the 'superuser' account. Bierman & Bjorklund Expires September 12, 2011 [Page 16] Internet-Draft NACM March 2011 o If the session is authorized to execute the specified RPC operation, then processing continues, otherwise the request is rejected with an 'access-denied' error. o If the configuration datastore or conceptual state data is accessed by the protocol operation, then the data node access MUST be authorized. If the session is authorized to perform the requested operation on the requested data, then processing continues. The following sequence of conceptual processing steps is executed for each generated notification event, if access control enforcement is enabled: o Server instrumentation generates a conceptual notification, for a particular subscription. o The notification access control enforcer checks the notification event type, and if it is one which the session is not authorized to read, then the notification is dropped for that subscription. 3.2. Model Components This section defines the conceptual components related to access control model. 3.2.1. Users A 'user' is the conceptual entity, which is associated with the access permissions granted to a particular session. A user is identified by a string which MUST be unique within the server. As described in [I-D.ietf-netconf-4741bis], the user name string is derived from the transport layer during session establishment. If the transport layer cannot authenticate the user, the session is terminated. The server MAY support a 'superuser' administrative user account, which will bypass all access control enforcement. This is useful for restricting initial access and repairing a broken access control configuration. This account may be configurable to use a specific 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. Bierman & Bjorklund Expires September 12, 2011 [Page 17] Internet-Draft NACM March 2011 3.2.2. Groups Access to a specific NETCONF operation is granted to a session, associated with a group, not a user. A group is identified by its name. All group names MUST be unique within the server. A group member is identified by a user name string. The same user may be configured in multiple groups. 3.2.3. Sessions A session is simply a NETCONF session, which is the entity which is granted access to specific NETCONF operations. A session is associated with a single user name for the lifetime of the session. 3.2.4. Access Permissions The access permissions are the NETCONF protocol specific set of permissions that have been assigned to a particular session. The same access permissions MUST stay in effect for the processing of a particular message. The server MUST use the access control rules in effect at the time the message is processed. The access control model treats protocol operation execution separately from configuration datastore access and outgoing messages: create: Permission to create conceptual server data. read: Read access to conceptual server data, and content. update: Permission to modify existing conceptual server data. delete: Permission to delete existing conceptual server data. exec: Permission to invoke an protocol operation. Bierman & Bjorklund Expires September 12, 2011 [Page 18] Internet-Draft NACM March 2011 3.2.5. Global Enforcement Controls A global on/off switch is provided to enable or disable all access control enforcement. An on/off switch is provided to enable or disable default access to invoke protocol operations. An on/off switch is provided to enable or disable default permission to receive data in replies and notifications. An on/off switch is provided to enable or disable default access to alter configuration data. 3.2.6. Access Control Rules There are 4 types of rules available in NACM: module rule: Controls access for definitions in a specific module, identified by its name. protocol operation rule: Controls access for a specific protocol operation, identified by its module and name. data node rule: Controls access for a specific data node, identified by its path location within the conceptual XML document for the data node. notification rule: Controls access for a specific notification event type, identified by its module and name. 3.3. Access Control Enforcement Procedures There are seven separate phases that need to be addressed, four of which are related to the NETCONF message processing model. In addition, the initial start-up mode for a NETCONF server, session establishment, and 'access-denied' error handling procedures also need to be considered. 3.3.1. Initial Operation Upon the very first start-up of the NETCONF server, the access control configuration will probably not be present. If not, a server MUST NOT allow any write access to any session role except 'superuser' type of account in this state. There is no requirement to enforce access control rules before or while the non-volatile configuration data is processed and loaded Bierman & Bjorklund Expires September 12, 2011 [Page 19] Internet-Draft NACM March 2011 into the running configuration. 3.3.2. Session Establishment The access control model applies specifically to the well-formed XML content transferred between a client and a server, after session establishment has been completed, and after the exchange has been successfully completed. A server SHOULD NOT include any sensitive information in any elements within the exchange. Once session establishment is completed, and a user identity has been authenticated, the NETCONF transport layer reports the username and a possibly empty set of group names associated with the user to the NETCONF server. The NETCONF server will enforce the access control rules, based on the supplied user identity, group names, and the configuration data stored on the server. 3.3.3. 'access-denied' Error Handling The 'access-denied' error-tag is generated when the access control system denies access to either a request to invoke a protocol operation or a request to perform a particular operation on the configuration datastore. A server MUST NOT include any sensitive information in any elements within the response. 3.3.4. Incoming RPC Message Validation The diagram below shows the basic conceptual structure of the access control processing model for incoming NETCONF messages, within a server. Bierman & Bjorklund Expires September 12, 2011 [Page 20] Internet-Draft NACM March 2011 NETCONF server +------------+ | XML | | message | | dispatcher | +------------+ | | V +------------+ | NC-base NS | | | +------------+ | | | | | +-------------------------+ | +------------+ | V V V +-----------+ +---------------+ +------------+ | acme NS | | NC-base NS | | NC-base NS | | | | | | | +-----------+ +---------------+ +------------+ | | | | V V +----------------------+ | | | configuration | | datastore | +----------------------+ Figure 3 Access control begins with the message dispatcher. Only well-formed XML messages will be processed by the server. After the server validates the element, and determines the namespace URI and the element name of the protocol operation being requested, the RPC access control enforcer verifies that the session is authorized to invoke the protocol operation. The protocol operation is authorized by following these steps: 1. If the parameter is set to 'false', then the protocol operation is permitted. Bierman & Bjorklund Expires September 12, 2011 [Page 21] Internet-Draft NACM March 2011 2. If the session is associated with the 'superuser' account, then the protocol operation is permitted. 3. If the requested operation is the NETCONF operation, then the protocol operation is permitted. 4. Check all the entries for ones that contain a 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. 5. If no groups are found: * If the requested protocol operation is associated with a YANG 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 parameter is set to 'permit', then permit the protocol operation, otherwise deny the request. 6. Check if there are any matching entries for the requested protocol operation. Any matching rules are processed in user-defined order, in case there are multiple entries for the requested protocol operation. 7. If an entry is found, then check the bits field for the entry, otherwise continue. The 'exec' bit MUST be present in the bits field for an , so it is not used in this procedure. 8. If the entry is considered a match, then the 'nacm- action' leaf is checked. If is equal to 'permit', then the protocol operation is permitted, otherwise it is denied. 9. Check if there are any matching entries for the same module as the requested protocol operation. Any matching rules are processed in user-defined order, in case there are multiple entries for the module containing the requested protocol operation. 10. If a entry is found, then check the bits field for the entry, otherwise continue. If the 'exec' bit is present in the bits field then the RPC rule is considered a match. otherwise it is not considered to match the request. Bierman & Bjorklund Expires September 12, 2011 [Page 22] Internet-Draft NACM March 2011 11. If the entry is considered a match, then the '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 nacm:very-secure protocol operation, then the protocol operation is denied. 13. If the parameter is set to 'permit', then permit the protocol operation, otherwise the protocol operation is denied. If the session is not authorized to invoke the protocol operation then an is generated with the following information: error-tag: access-denied error-path: /rpc/method-QName, where 'method-QName' is a qualified name identifying the actual protocol operation name. For example, '/rpc/edit-config' represents the operation in the NETCONF base namespace. If the configuration 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. 3.3.5. Data Node Access Validation If a data node within a configuration datastore is accessed, or a conceptual non-configuration node is accessed, then the server MUST ensure that the client session is authorized to perform the requested operation create, read, update, or delete operation on the specified data node. The data node access request is authorized by following these steps: 1. If the parameter is set to 'false', then the data node access request is permitted. 2. If the session is associated with the 'superuser' account, then the data node access request is permitted. 3. Check all the entries for ones that contain a 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. Bierman & Bjorklund Expires September 12, 2011 [Page 23] Internet-Draft NACM March 2011 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 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 parameter is set to 'permit', then permit the data node access request, otherwise deny the request. 5. Check if there are any matching entries for the requested data node access request. Any matching rules are processed in user-defined order, in case there are multiple entries for the requested data node. 6. If an entry is found, then check the bits field for the entry, otherwise continue. 1. For a creation operation, if the 'create' bit is present in the bits field then the entry is considered to be a match. 2. For a read operation, if the 'read' bit is present in the bits field, then the entry is considered to be a match. 3. For an update (e.g., 'merge' or 'replace') operation, if the 'update' bit is present in the bits field then the entry is considered to be a match. 4. For a deletion (e.g., 'delete') operation, if the 'delete' bit is present in the bits field then the entry is considered to be a match. 7. If the entry is considered a match, then the '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. Bierman & Bjorklund Expires September 12, 2011 [Page 24] Internet-Draft NACM March 2011 8. Check if there are any matching entries for the same module as the requested data node. Any matching rules are processed in user-defined order, in case there are multiple entries for the module containing the requested data node. 9. If a entry is found, then check the bits field for the entry, otherwise continue. 1. For a creation operation, if the 'create' bit is present in the bits field then the entry is considered to be a match. 2. For a read operation, if the 'read' bit is present in the bits field, then the entry is considered to be a match. 3. For an update (e.g., 'merge' or 'replace') operation, if the 'update' bit is present in the bits field then the entry is considered to be a match. 4. For a deletion (e.g., 'delete') operation, if the 'delete' bit is present in the bits field then the entry is considered to be a match. 10. If the entry is considered a match, then the '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 a nacm:very-secure definition, then the requested data node is not included in the reply. 12. For a write request, if the requested data node is identified an a nacm:secure or nacm:very-secure definition, then the data node access request is denied. 13. For a read request, if the parameter is set to 'permit', then include the requested data in the reply, otherwise do not include the requested data in the reply. 14. For a write request, if the parameter is set to 'permit', then permit the data node access request, otherwise deny the request. Bierman & Bjorklund Expires September 12, 2011 [Page 25] Internet-Draft NACM March 2011 3.3.6. Outgoing Authorization The 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 for that protocol operation. 3.3.7. Outgoing Authorization The 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 nodes of the notification event type element are outside the scope of this document. If the session is authorized to receive the notification event type, then it is also authorized to receive any data it contains. The following figure shows the conceptual message processing model for outgoing messages. Bierman & Bjorklund Expires September 12, 2011 [Page 26] Internet-Draft NACM March 2011 NETCONF server +------------+ | XML | | message | | generator | +------------+ ^ | +----------------+ | | | generator | +----------------+ ^ | +=================+ | | | access control | | | +=================+ ^ | +------------------------+ | server instrumentation | +------------------------+ | ^ V | +----------------------+ | configuration | | datastore | +----------------------+ Figure 4 The generation of a notification event for a specific subscription is authorized by following these steps: 1. If the parameter is set to 'false', then the notification event is permitted. 2. If the session is associated with the 'superuser' account, then the notification event is permitted. 3. If the requested operation is the NETCONF or event type, then the notification event is permitted. Bierman & Bjorklund Expires September 12, 2011 [Page 27] Internet-Draft NACM March 2011 4. Check all the entries for ones that contain a entry that matches the user name for the session that started the notification subscription. Add to these groups the set of groups provided by the transport layer. 5. If no groups are found: * If the requested notification is associated with a YANG module advertised in the server capabilities, and the notification statement contains a nacm:secure or nacm:very- secure extension, then the notification event is dropped for the associated subscription. * If the parameter is set to 'permit', then permit the notification event, otherwise drop this event type for the associated subscription. 6. Check if there are any matching entries for the specific notification event type being delivered to the subscription. Any matching rules are processed in user-defined order, in case there are multiple entries for the requested notification event type. 7. If a entry is found, then check the bits field for the entry, otherwise continue. If the 'read' bit is present in the bits field then the notification event type is permitted, otherwise it is dropped for the associated subscription. 8. Check if there are any matching entries for the same module as the notification event type. Any matching rules are processed in user-defined order, in case there are multiple entries for the module containing the notification event type. 9. If a entry is found, then check the bits field for the entry, otherwise continue. If the 'read' bit is present in the bits field then 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 notification definition, then the notification event type is denied. 11. If the parameter is set to 'permit', then permit the notification event type, otherwise it is dropped for the associated subscription. Bierman & Bjorklund Expires September 12, 2011 [Page 28] Internet-Draft NACM March 2011 3.4. Data Model Definitions This section defines the semantics of the conceptual data structures found in the data model in Section 3.4. 3.4.1. High Level Procedures 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 , and it is defined in the 'ietf-netconf-acm' module namespace. There are several data structures defined as child nodes of the element: leaf : On/off boolean switch to enable or disable access control enforcement. leaf : Enumeration to permit or deny default read access requests. leaf : Enumeration to permit or deny default write access requests. leaf : Enumeration to permit or deny default protocol operation execution requests. leaf : Read-only counter of the number of times the server has denied an RPC operation request, since the last reboot of the server. Bierman & Bjorklund Expires September 12, 2011 [Page 29] Internet-Draft NACM March 2011 leaf : Read-only counter of the number of times the server has denied a data node write request, since the last reboot of the server. container : Configures the groups used within the access control system. list : A list of user names belonging to the same administrative group. container : Configures the access control rules used within the server. list : Configures the access control rules for a specific module. list : Configures the access control rules for protocol operation invocation. list : Configures the access control rules for configuration datastore access. list : Configures the access control rules for controlling delivery of events. 3.4.3. YANG Module The following YANG module is provided to specify the normative NETCONF content that MUST by supported by the server. The ietf-netconf-acm YANG module imports typedefs from [RFC6021]. // RFC Ed.: please update the date to the date of publication file="ietf-netconf-acm@2011-03-11.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"; Bierman & Bjorklund Expires September 12, 2011 [Page 30] Internet-Draft NACM March 2011 contact "WG Web: WG List: WG Chair: Mehmet Ersue WG Chair: Bert Wijnen Editor: Andy Bierman Editor: Martin Bjorklund "; 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 Bierman & Bjorklund Expires September 12, 2011 [Page 31] Internet-Draft NACM March 2011 */ 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 (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, or notification node definition. It is ignored otherwise."; } extension very-secure { description "Used to indicate that the data model node controls a very sensitive security system parameter. If present, and the NACM module is enabled (i.e., /nacm/enable-nacm object equals 'true'), 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, or notification node definition. It is ignored otherwise."; } /* * Derived types */ typedef nacm-user-name-type { type string { length "1..max"; } description "General Purpose User Name string."; } Bierman & Bjorklund Expires September 12, 2011 [Page 32] Internet-Draft NACM March 2011 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 { type union { type nacm-matchall-string-type; type bits { bit create { 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."; } } } Bierman & Bjorklund Expires September 12, 2011 [Page 33] Internet-Draft NACM March 2011 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 { type string { 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 { type enumeration { 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 { type yang:xpath1.0; description "Path expression used to represent a special schema-instance identifier string. A schema-instance-identifier value is an unrestricted YANG instance-identifier expression. All the same rules as an instance-identifier apply except predicates for keys are optional. If a key predicate is missing, then the schema-instance-identifier represents all possible server instances for that key. Bierman & Bjorklund Expires September 12, 2011 [Page 34] Internet-Draft NACM March 2011 This XPath expression is evaluated in the following context: o The set of namespace declarations are those in scope on the leaf element where this type is used. o The set of variable bindings contains one variable, 'USER', which contains the name of user of the current session. o The function library is the core function library, but note that due to the syntax restrictions of an instance-identifier, no functions are allowed. o The context node is the root node in the data tree."; } container nacm { nacm:very-secure; description "Parameters for NETCONF Access Control Model."; leaf enable-nacm { type boolean; default true; description "Enable or disable all NETCONF access control enforcement. If 'true', then enforcement is enabled. If 'false', then enforcement is disabled."; } leaf read-default { type nacm-action-type; default "permit"; description "Controls whether read access is granted if no appropriate rule is found for a particular read request."; } leaf write-default { type nacm-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."; Bierman & Bjorklund Expires September 12, 2011 [Page 35] Internet-Draft NACM March 2011 } leaf exec-default { type nacm-action-type; default "permit"; description "Controls whether exec access is granted if no appropriate rule is found for a particular RPC operation request."; } leaf denied-rpcs { type yang:zero-based-counter32; config false; mandatory true; description "Number of times an RPC operation request was denied since the server last restarted."; } leaf denied-data-writes { type yang:zero-based-counter32; config false; mandatory true; description "Number of times a request to alter a data node was denied, since the server last restarted."; } container groups { description "NETCONF Access Control Groups."; list group { key name; description "One NACM Group Entry."; leaf name { type nacm-group-name-type; description "Group name associated with this entry."; } leaf-list user-name { type nacm-user-name-type; description "Each entry identifies the user name of Bierman & Bjorklund Expires September 12, 2011 [Page 36] Internet-Draft NACM March 2011 a member of the group associated with this entry."; } } } container rules { description "NETCONF Access Control Rules."; grouping common-rule-parms { description "Common rule parameters."; leaf rule-name { type string { length "1..256"; } description "Arbitrary name assigned to the access control rule."; } leaf allowed-rights { type nacm-rights-type; description "List of access rights granted to specified administrative groups for the content specified by the associated path."; } leaf-list allowed-group { 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 administrative groups apply to the entry."; } leaf nacm-action { type nacm-action-type; Bierman & Bjorklund Expires September 12, 2011 [Page 37] Internet-Draft NACM March 2011 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 { type string { length "1..4095"; } description "A textual description of the access rule."; } } list module-rule { key "module-name rule-name"; ordered-by user; description "One Module Access Rule. Rules are processed in user-defined order. A module rule is considered a match if the XML namespace for the specified module name matches the XML namespace used within a NETCONF PDU, and the administrative group associated with the requesting session is specified in the 'allowed-group' leaf-list, and the requested operation is included in the 'allowed-rights' leaf."; leaf module-name { type string; description "Name of the module associated with this rule."; } uses common-rule-parms { refine allowed-rights { mandatory true; } } } list rpc-rule { key "module-name rpc-name rule-name"; Bierman & Bjorklund Expires September 12, 2011 [Page 38] Internet-Draft NACM March 2011 ordered-by user; description "One RPC Operation Access Rule. Rules are processed in user-defined order. An RPC rule is considered a match if the module name of the requested RPC 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 { type string; description "Name of the module defining this RPC operation."; } leaf rpc-name { type string; description "Name of the RPC operation."; } uses common-rule-parms; } list data-rule { key "rule-name"; ordered-by user; description "One Data Access Control Rule. Rules are processed in user-defined order. A data rule is considered to match when the path expression identifies the same node that is being accessed in the NETCONF datastore, and the administrative group associated with the session is identified in the 'allowed-group' leaf-list, and the requested operation is included in the 'allowed-rights' leaf."; leaf path { type schema-instance-identifier; mandatory true; Bierman & Bjorklund Expires September 12, 2011 [Page 39] Internet-Draft NACM March 2011 description "Schema Instance Identifier associated with the data node controlled by this rule. Configuration data or state data instance identifiers start with a top-level data node. A complete instance identifier is required for this type of path value. The special value '/' refers to all possible datastore contents."; } uses common-rule-parms { refine allowed-rights { mandatory true; } } } list notification-rule { key "module-name notification-name rule-name"; ordered-by user; description "One Notification Access Rule. A notification is considered a match if the module name of the requested event type matches 'module-name', the requested event type matches the 'notification-name', and the administrative group associated with the requesting session is listed in the 'allowed-group' leaf-list. If the 'allowed-rights' leaf is present, it is ignored by the server. Only the 'read' bit can possibly cause a match for a notification rule."; leaf module-name { type string; description "Name of the module defining this notification event type."; } leaf notification-name { type string; description Bierman & Bjorklund Expires September 12, 2011 [Page 40] Internet-Draft NACM March 2011 "Name of the notification event."; } uses common-rule-parms; } } } } Figure 5 3.5. IANA Considerations There are two actions that are requested of IANA: This document registers one URI in "The IETF XML Registry". Following the format in [RFC3688], the following has been registered. URI: urn:ietf:params:xml:ns:yang:ietf-netconf-acm Registrant Contact: The IESG. XML: N/A, the requested URI is an XML namespace. This document registers one module in the "YANG Module Names" registry. Following the format in [RFC6020], the following has been registered. name: ietf-netconf-acm namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-acm prefix: nacm reference: RFC XXXX // RFC Ed.: Replace XXX with actual RFC number // and remove this note 3.6. Security Considerations This entire document discusses access control requirements and mechanisms for restricting NETCONF protocol behavior within a given session. Configuration of the access control system is highly sensitive to system security. A server may choose not to allow any user configuration to some portions of it, such as the global security level, or the groups which allowed access to system resources. This document incorporates the optional use of a 'superuser' account, Bierman & Bjorklund Expires September 12, 2011 [Page 41] Internet-Draft NACM March 2011 which can be used to bypass access control enforcement. It is suggested that the 'root' account not be used for NETCONF over SSH servers, because 'root' SSH logins SHOULD be disabled in the SSH server. 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 will have undocumented side effects. An administrator needs to construct access control rules such that the configuration datastore is protected from such side effects. Also, such protocol operations SHOULD never be invoked by a session using the 'superuser' administrative user. There is a risk that non-standard protocol operations, or even the standard operation, may return data which 'aliases' or 'copies' sensitive data from a different data object. In this case, 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 different namespace and/or element. An administrator needs to avoid using data models which use this practice. An administrator needs to restrict write access to all configurable objects within this data model. It is suggested that only sessions 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, then care needs to be taken not to disrupt the access control enforcement. An administrator needs to restrict read access to the following objects within this data model, which reveal access control configuration which could be considered sensitive. o enable-nacm o read-default Bierman & Bjorklund Expires September 12, 2011 [Page 42] Internet-Draft NACM March 2011 o write-default o exec-default o groups o rules Bierman & Bjorklund Expires September 12, 2011 [Page 43] Internet-Draft NACM March 2011 4. References 4.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, January 2004. [RFC5277] Chisholm, S. and H. Trevino, "NETCONF Event Notifications", RFC 5277, July 2008. [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)", RFC 6020, October 2010. [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, October 2010. [I-D.ietf-netconf-4741bis] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, "Network Configuration Protocol (NETCONF)", draft-ietf-netconf-4741bis-09 (work in progress), February 2011. [I-D.ietf-netconf-rfc4742bis] Wasserman, M. and T. Goddard, "Using the NETCONF Configuration Protocol over Secure Shell (SSH)", draft-ietf-netconf-rfc4742bis-07 (work in progress), February 2011. 4.2. Informative References [RFC2865] Rigney, C., Willens, S., Rubens, A., and W. Simpson, "Remote Authentication Dial In User Service (RADIUS)", RFC 2865, June 2000. [RFC5607] Nelson, D. and G. Weber, "Remote Authentication Dial-In User Service (RADIUS) Authorization for Network Access Server (NAS) Management", RFC 5607, July 2009. Bierman & Bjorklund Expires September 12, 2011 [Page 44] Internet-Draft NACM March 2011 Appendix A. Usage Examples The following XML snippets are provided as examples only, to demonstrate how NACM can be configured to perform some access control tasks. A.1. Example There needs to be at least one entry in order for any of the access control rules to be useful. The following XML shows arbitrary groups, and is not intended to represent any particular use-case. admin admin andy monitor wilma bam-bam guest guest guest@example.com This example shows 3 groups: 1. The nacm:admin group contains 2 users named 'admin' and 'andy'. 2. The nacm:monitor group contains 2 users named 'wilma' and 'bam- bam'. Bierman & Bjorklund Expires September 12, 2011 [Page 45] Internet-Draft NACM March 2011 3. The nacm:guest group contains 2 users named 'guest' and 'guest@example.com'. A.2. Example Module rules are used to control access to all the content defined in a specific module. These rules are checked after none of the specific rules (i.e., rpc-rule, data-rule, or notification-rule) matched the current access request. ietf-netconf-monitoring mod-1 * guest deny Do not allow guests any access to the netconf monitoring information. ietf-netconf-monitoring mod-2 read monitor permit Allow the monitor group read access to the netconf monitoring information. * mod-3 exec monitor permit Allow the monitor group to invoke any of the supported server operations. Bierman & Bjorklund Expires September 12, 2011 [Page 46] Internet-Draft NACM March 2011 * mod-4 * admin permit Allow the admin group complete access to all operations and data. This example shows 4 module rules: mod-1: This rule prevents the guest group from reading any monitoring information in the ietf-netconf-monitoring YANG module. mod-2: This rule allows the monitor group to read the ietf-netconf- monitoring YANG module. mod-3: This rule allows the monitor group to invoke any protocol operation supported by the server. mod-4: This rule allows the admin group complete access to all content in the server. No subsequent rule will match for the admin group, because of this module rule. A.3. Example RPC rules are used to control access to a specific protocol operation. Bierman & Bjorklund Expires September 12, 2011 [Page 47] Internet-Draft NACM March 2011 ietf-netconf kill-session rpc-1 monitor guest deny Do not allow the monitor or guest group to kill another session. ietf-netconf delete-config rpc-2 monitor guest deny Do not allow monitor or guest group to delete any configurations. ietf-netconf edit-config rpc-3 monitor permit Allow the monitor group to edit the configuration. This example shows 3 protocol operation rules: Bierman & Bjorklund Expires September 12, 2011 [Page 48] Internet-Draft NACM March 2011 rpc-1: This rule prevents the monitor or guest groups from invoking the NETCONF protocol operation. rpc-2: This rule prevents the monitor or guest groups from invoking the NETCONF protocol operation. rpc-3: This rule allows the monitor group to invoke the NETCONF protocol operation. This rule will have no real affect unless the 'exec-default' leaf is set to 'deny'. A.4. Example Data rules are used to control access to specific (config and non- config) data nodes within the NETCONF content provided by the server. data-1 /nacm * guest deny Deny the guest group any access to the /nacm data. data-acme-config /acme:acme-netconf/acme:config-parameters read create update delete monitor permit Allow the monitor group complete access to the acme netconf configuration parameters. Showing long form of 'allowed-rights' instead of shorthand. dummy-itf /acme:interfaces/acme:interface[acme:name='dummy'] Bierman & Bjorklund Expires September 12, 2011 [Page 49] Internet-Draft NACM March 2011 read update monitor guest permit Allow the monitor and guest groups read and update access to the dummy interface. admin-itf /acme:interfaces/acme:interface * admin permit 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. This example shows 4 data rules: data-1: This rule denies the guest group any access to the sub-tree. Note that the default namespace is only applicable because this sub-tree is defined in the same namespace as the element. data-acme-config: This rule gives the monitor group read-write access to the acme . dummy-itf: This rule gives the monitor and guest groups read-update access to the acme . entry named 'dummy'. This entry cannot be created or deleted by these groups, just altered. Bierman & Bjorklund Expires September 12, 2011 [Page 50] Internet-Draft NACM March 2011 admin-itf: This rule gives the admin group read-write access to all acme . entries. This is an example of an unreachable rule because the 'mod-3' rule already gives the admin group full access to this data. A.5. Example Notification rules are used to control access to a specific notification event type. acme-system sys-config-change notif-1 monitor guest deny Do not allow the guest or monitor groups to receive config change events. This example shows 1 notification rule: notif-1: This rule prevents the monitor or guest groups from receiving the acme event type. Bierman & Bjorklund Expires September 12, 2011 [Page 51] Internet-Draft NACM March 2011 Appendix B. Change Log -- RFC Ed.: remove this section before publication. B.1. 02-03 Fixed improper usage of RFC 2119 keywords. Changed term usage of 'database' to 'datastore'. Clarified that 'secure' and 'very-secure' extensions only apply if the /nacm/enable-nacm object is 'true'. B.2. 01-02 Removed authentication text and objects. Changed module name from ietf-nacm to ietf-netconf-acm. Updated NETCONF and YANG terminology. Removed open issues section. Changed some must to MUST in requirements section. B.3. 00-01 Updated YANG anf YANG Types references. Updated module namespace URI to standard format. Updated module header meta-data to standard format. Filled in IANA section. B.4. 00 Initial version cloned from draft-bierman-netconf-access-control-02.txt. Bierman & Bjorklund Expires September 12, 2011 [Page 52] Internet-Draft NACM March 2011 Authors' Addresses Andy Bierman Brocade Email: andy.bierman@brocade.com Martin Bjorklund Tail-f Systems Email: mbj@tail-f.com Bierman & Bjorklund Expires September 12, 2011 [Page 53]