--- 1/draft-ietf-netconf-access-control-05.txt 2011-10-31 19:14:05.674671188 +0100 +++ 2/draft-ietf-netconf-access-control-06.txt 2011-10-31 19:14:05.746670870 +0100 @@ -1,19 +1,19 @@ Internet Engineering Task Force A. Bierman Internet-Draft Brocade Intended status: Standards Track M. Bjorklund -Expires: April 6, 2012 Tail-f Systems - October 4, 2011 +Expires: May 3, 2012 Tail-f Systems + October 31, 2011 Network Configuration Protocol (NETCONF) Access Control Model - draft-ietf-netconf-access-control-05 + draft-ietf-netconf-access-control-06 Abstract The standardization of network configuration interfaces for use with the NETCONF protocol requires a structured and secure operating environment that 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 protocol operations and content. This document defines such an access control model. @@ -26,21 +26,21 @@ 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 April 6, 2012. + This Internet-Draft will expire on May 3, 2012. 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 @@ -71,61 +71,62 @@ 3.2. Datastore Access . . . . . . . . . . . . . . . . . . . . . 13 3.2.1. Access Rights . . . . . . . . . . . . . . . . . . . . 13 3.2.2. and Operations . . . . . . . . . . 14 3.2.3. Operation . . . . . . . . . . . . . . . 14 3.2.4. Operation . . . . . . . . . . . . . . . 15 3.2.5. Operation . . . . . . . . . . . . . . 16 3.2.6. Operation . . . . . . . . . . . . . . . . . . 16 3.2.7. Operation . . . . . . . . . . . . . 16 3.2.8. Operation . . . . . . . . . . . . . . . 16 3.3. Model Components . . . . . . . . . . . . . . . . . . . . . 16 - 3.3.1. Users . . . . . . . . . . . . . . . . . . . . . . . . 16 + 3.3.1. Users . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3.2. Groups . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3.3. Global Enforcement Controls . . . . . . . . . . . . . 17 3.3.3.1. enable-nacm Switch . . . . . . . . . . . . . . . . 17 3.3.3.2. read-default Switch . . . . . . . . . . . . . . . 17 3.3.3.3. write-default Switch . . . . . . . . . . . . . . . 18 3.3.3.4. exec-default Switch . . . . . . . . . . . . . . . 18 3.3.4. Access Control Rules . . . . . . . . . . . . . . . . . 18 3.4. Access Control Enforcement Procedures . . . . . . . . . . 19 3.4.1. Initial Operation . . . . . . . . . . . . . . . . . . 19 3.4.2. Session Establishment . . . . . . . . . . . . . . . . 19 - 3.4.3. "access-denied" Error Handling . . . . . . . . . . . . 19 + 3.4.3. "access-denied" Error Handling . . . . . . . . . . . . 20 3.4.4. Incoming RPC Message Validation . . . . . . . . . . . 20 - 3.4.5. Data Node Access Validation . . . . . . . . . . . . . 22 - 3.4.6. Outgoing Authorization . . . . . . . . 24 + 3.4.5. Data Node Access Validation . . . . . . . . . . . . . 23 + 3.4.6. Outgoing Authorization . . . . . . . . 25 - 3.5. Data Model Definitions . . . . . . . . . . . . . . . . . . 26 - 3.5.1. Data Organization . . . . . . . . . . . . . . . . . . 27 - 3.5.2. YANG Module . . . . . . . . . . . . . . . . . . . . . 27 - 3.6. IANA Considerations . . . . . . . . . . . . . . . . . . . 37 - 3.7. Security Considerations . . . . . . . . . . . . . . . . . 37 - 3.7.1. NACM Configuration and Monitoring Considerations . . . 37 - 3.7.2. General Configuration Issues . . . . . . . . . . . . . 39 - 3.7.3. Data Model Design Considerations . . . . . . . . . . . 40 - 4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 41 - 4.1. Normative References . . . . . . . . . . . . . . . . . . . 41 - 4.2. Informative References . . . . . . . . . . . . . . . . . . 41 - Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 42 - A.1. Example . . . . . . . . . . . . . . . . . . . . . 42 - A.2. Module Rule Example . . . . . . . . . . . . . . . . . . . 43 - A.3. RPC Rule Example . . . . . . . . . . . . . . . . . . . . . 44 - A.4. Data Rule Example . . . . . . . . . . . . . . . . . . . . 46 - A.5. Notification Rule Example . . . . . . . . . . . . . . . . 48 - Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 50 - B.1. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . 50 - B.2. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 50 - B.3. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 50 - B.4. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 51 - B.5. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 51 - B.6. 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 52 + 3.5. Data Model Definitions . . . . . . . . . . . . . . . . . . 27 + 3.5.1. Data Organization . . . . . . . . . . . . . . . . . . 28 + 3.5.2. YANG Module . . . . . . . . . . . . . . . . . . . . . 28 + 3.6. IANA Considerations . . . . . . . . . . . . . . . . . . . 38 + 3.7. Security Considerations . . . . . . . . . . . . . . . . . 38 + 3.7.1. NACM Configuration and Monitoring Considerations . . . 38 + 3.7.2. General Configuration Issues . . . . . . . . . . . . . 40 + 3.7.3. Data Model Design Considerations . . . . . . . . . . . 41 + 4. References . . . . . . . . . . . . . . . . . . . . . . . . . . 43 + 4.1. Normative References . . . . . . . . . . . . . . . . . . . 43 + 4.2. Informative References . . . . . . . . . . . . . . . . . . 43 + Appendix A. Usage Examples . . . . . . . . . . . . . . . . . . . 44 + A.1. Example . . . . . . . . . . . . . . . . . . . . . 44 + A.2. Module Rule Example . . . . . . . . . . . . . . . . . . . 45 + A.3. RPC Rule Example . . . . . . . . . . . . . . . . . . . . . 46 + A.4. Data Rule Example . . . . . . . . . . . . . . . . . . . . 48 + A.5. Notification Rule Example . . . . . . . . . . . . . . . . 50 + Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 52 + B.1. 05-06 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 + B.2. 04-05 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 + B.3. 03-04 . . . . . . . . . . . . . . . . . . . . . . . . . . 52 + B.4. 02-03 . . . . . . . . . . . . . . . . . . . . . . . . . . 53 + B.5. 01-02 . . . . . . . . . . . . . . . . . . . . . . . . . . 53 + B.6. 00-01 . . . . . . . . . . . . . . . . . . . . . . . . . . 53 + B.7. 00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 54 1. Introduction The NETCONF protocol does not provide any standard mechanisms to restrict the protocol operations and content that each user is authorized to access. There is a need for inter-operable management of the controlled access to administrator selected portions of the available NETCONF content within a particular server. @@ -229,25 +230,24 @@ operations. datastore: Permission to read and/or alter specific data nodes within any datastore. notification: Permission to receive specific notification event types. 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 possible to do complex - things, instead of hard to do everything. + There is concern that a complicated ACM will not be widely deployed, + because it is too hard to use. It needs to be easy to do simple + things, and possible to do complex things, instead of hard to do + everything. Configuration of the access control system needs to be as simple as possible. 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 ought to be able to control all types of NETCONF protocol operation invocation, all datastore access, and all notification events. @@ -449,44 +449,45 @@ o Access control is applied to all messages (except ) received by the server, individually, for each active session, unless the session is identified as a "recovery session". o If the user is authorized to execute the specified protocol 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 user is authorized to perform the requested - access operation on the requested data, then processing continues. + accessed by the protocol operation, then the server checks if the + client is authorized to access the nodes in the data store. If + the user is authorized to perform the requested access 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 notification, for a particular subscription. o The notification access control enforcer checks the notification event type, and if it is one which the user is not authorized to read, then the notification is dropped for that subscription. 3.2. Datastore Access The same access control rules apply to all datastores. For example, the candidate configuration datastore or the running configuration datastore. 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. + startup) are controlled by NACM. Local or remote files or datastores + accessed via the parameter are not controlled by NACM. 3.2.1. Access Rights A small set of hard-wired datastore access rights is needed to control access to all possible NETCONF protocol operations, including vendor extensions to the standard protocol operation set. The "CRUDX" model can support all NETCONF protocol operations: o Create: Allows the client to add a new data node instance to a @@ -518,21 +519,28 @@ The NACM access rights are not directly coupled to the "operation" attribute, although they are similar. Instead, a NACM access right applies to all protocol operations which would result in a particular access operation to the target datastore. This section describes how these access rights apply to the specific access operations supported by the protocol operation. If the effective access operation is "none" (i.e., default- operation="none") for a particular data node, then no access control - is applied to that data node. + is applied to that data node. This is required to allow access to a + sub-tree within larger data structure. For example, a user may be + authorized to create a new "/interfaces/interface" list entry, but + not be authorized to create or delete its parent container + ("/interfaces"). If the "/interfaces" container already exists in + the target datastore, then the effective operation will be "none" for + the "/interfaces" node if an "/interfaces/interface" list entry is + edited. If the protocol operation would result in the creation of a data store node, and the user does not have "create" access permission for that node, the protocol operation is rejected with an "access-denied" error. If the protocol operation would result in the deletion of a data store node, and the user does not have "delete" access permission for that node, the protocol operation is rejected with an "access-denied" error. @@ -805,42 +813,43 @@ V +------------+ | NC-base NS | | | +------------+ | | | | | +-------------------------+ | +------------+ | V V V +-----------+ +---------------+ +------------+ - | acme NS | | NC-base NS | | NC-base NS | + | Vendor NS | | NC-base NS | | NC-base NS | | | | | | | +-----------+ +---------------+ +------------+ | | | | V V +----------------------+ | | | configuration | | datastore | +----------------------+ Figure 3 Access control begins with the message dispatcher. After the server validates the element, and determines the namespace URI and the element name of the protocol operation being requested, the server verifies that the user is authorized to invoke the protocol operation. - The protocol operation is authorized by following these steps: + The server MUST separately authorize every protocol operation by + following these steps: 1. If the "enable-nacm" leaf is set to "false", then the protocol operation is permitted. 2. If the requesting session is identified as a "recovery session", then the protocol operation is permitted. 3. If the requested operation is the NETCONF protocol operation, then the protocol operation is permitted. @@ -1026,22 +1035,22 @@ +------------------------+ | ^ V | +----------------------+ | configuration | | datastore | +----------------------+ Figure 4 - The generation of a notification for a specific subscription is - authorized by following these steps: + The generation of a notification for a specific subscription + [RFC5277] is authorized by following these steps: 1. If the "enable-nacm" leaf is set to "false", then the notification is permitted. 2. If the session is identified as a "recovery session", then the notification is permitted. 3. If the notification is the NETCONF or event type [RFC5277], then the notification is permitted. @@ -1127,21 +1136,21 @@ +--rw comment? string 3.5.2. YANG Module The following YANG module specifies 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-10-04.yang" + file="ietf-netconf-acm@2011-10-31.yang" module ietf-netconf-acm { namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; prefix "nacm"; import ietf-yang-types { prefix yang; } @@ -1176,24 +1185,24 @@ 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-05.txt + // Note: extracted from draft-ietf-netconf-access-control-06.txt // RFC Ed.: please update the date to the date of publication - revision "2011-10-04" { + revision "2011-10-31" { description "Initial version"; reference "RFC XXXX: Network Configuration Protocol Access Control Model"; } /* * Extension statements */ @@ -1631,29 +1640,40 @@ o /nacm/write-default (default "deny") o /nacm/exec-default (default "permit") An administrator needs to restrict write access to all configurable objects within this data model. If write access is allowed for configuration of access control rules, then care needs to be taken not to disrupt the access control enforcement. For example, if the NACM access control rules are - editing directly within the running configuration datastore (i.e., + edited directly within the running configuration datastore (i.e., :writable-running capability is supported and used), then care needs to be taken not to allow unintended access while the edits are being done. - NACM requires some a user name in each NACM group mapping. An - administrator needs to make sure that the translation from a + An administrator needs to make sure that the translation from a transport or implementation dependant user identity to a NACM user - name is unique. + name is unique and correct. This requirement is specified in detail + in section 2.2 of [RFC6241]. + + An administrator needs to be aware that the YANG data structures + representing access control rules (/nacm/rule-list and /nacm/ + rule-list/rule) are ordered by the client. The server will evaluate + the access control rules according to their relative conceptual order + within the running datastore configuration. + + Note that the /nacm/groups data structure contains the administrative + group names used by the server. These group names may be configured + locally and/or provided through an external protocol, such as RADIUS + [RFC2865] [RFC5607]. 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 /nacm/enable-nacm o /nacm/read-default o /nacm/write-default @@ -1674,57 +1694,65 @@ It is possible for a session with some write access (e.g., allowed to invoke ), but without any access to a particular datastore subtree containing sensitive data, to determine the presence or non-presence of that data. This can be done by repeatedly issuing some sort of edit request (create, update, or delete) and possibly receiving "access-denied" errors in response. These "fishing" attacks can identify the presence or non-presence of specific sensitive data even without the "error-path" field being present within the "rpc-error" response. + It may be possible for the set of NETCONF capabilities on the server + to change over time. If so, then there is a risk that new protocol + operations, notifications, and/or datastore content have been added + to the device. An administrator needs to be sure the access control + rules are correct for the new content in this case. Mechanisms to + detect NETCONF capability changes on a specific device are outside + the scope of this document. + It is possible that the data model definition itself (e.g., YANG when-stmt) will help an unauthorized session determine the presence or even value of sensitive data nodes by examining the presence and values of different data nodes. There is a risk that non-standard protocol operations, or even the standard protocol operation, may return data which "aliases" or "copies" sensitive data from a different data object. There may simply be multiple data model definitions which expose or even configure the same underlying system instrumentation. A data model may contain external keys (e.g., YANG leafref), which expose values from a different data structure. An administrator needs to be aware of sensitive data models which contain leafref nodes. This entails finding all the leafref objects that "point" at - the sensitive data (i.e., "path-stmt" values that implicitly or + the sensitive data (i.e., "path-stmt" values) that implicitly or explicitly include the sensitive data node. 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 administrator can identify each protocol operation that the server provides, and decide if it needs any access control applied to it. This document incorporates the optional use of a "recovery session" mechanism, which can be used to bypass access control enforcement in emergencies, such as NACM configuration errors which disable all access to the server. The configuration and identification of such a recovery session mechanism are implementation-specific and outside the scope of this document. An administrator needs to be aware of any "recovery session" mechanisms available on the device, and make sure they are used appropriately. It is possible for a session to disrupt configuration management, even without any write access to the configuration, by locking the datastore. This may be done to insure all or part of the - configuration remains stable while it is being retrieved, ot it may + configuration remains stable while it is being retrieved, or it may be done as a "denial-of-service" attack. There is no way for the server to know the difference. An administrator may wish to restrict "exec" access to the following protocol operations: o o o @@ -2037,20 +2065,21 @@ permit Allow the limited and guest groups read and update access to the dummy interface. admin-acl + admin permit-interface /acme:interfaces/acme:interface * permit Allow admin full access to all acme interfaces. @@ -2061,28 +2090,26 @@ deny-nacm: This rule denies the "guest" group any access to the subtree. Note that the default namespace is only applicable because this subtree is defined in the same namespace as the element. permit-acme-config: This rule gives the "limited" group read-write access to the acme . permit-dummy-interface: This rule gives the "limited" and "guest" - groups read-update access to the acme . entry named + groups read-update access to the acme entry named "dummy". This entry cannot be created or deleted by these groups, just altered. permit-interface: 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. + access to all acme entries. A.5. Notification Rule Example Notification rules are used to control access to a specific notification event type. sys-acl limited @@ -2094,98 +2121,109 @@ sys-config-change read deny Do not allow the guest or limited groups to receive config change events. + This example shows 1 notification rule: deny-config-change: This rule prevents the "limited" or "guest" groups from receiving the acme event type. Appendix B. Change Log -- RFC Ed.: remove this section before publication. -B.1. 04-05 +B.1. 05-06 + + Added clarification to Security Considerations section about + ordered-by user lists (/nacm/rule-list and /nacm/rule-list/rule). + + Added clarifications to security considerations wrt/ user names and + NETCONF capability changes. + + Fixed typos found in review. + +B.2. 04-05 Updated Security Considerations section. Changed term 'operator' to 'administrator'. Used the terms "access operation" and "protocol operation" consistently. Moved some normative text from section 2 to section 3. Also made it more clear that section 2 is not a requirements section, but documentation of the objectives for NACM. Renamed "nacm:secure" to "nacm:default-deny-write", and "nacm:very- secure" to "nacm:default-deny-all". Explained that "nacm:default- deny-write" is ignored on rpc statements. Described that and behave as if specified with "nacm:default-deny-all". -B.2. 03-04 +B.3. 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.3. 02-03 +B.4. 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.4. 01-02 +B.5. 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.5. 00-01 +B.6. 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.6. 00 +B.7. 00 Initial version cloned from draft-bierman-netconf-access-control-02.txt. Authors' Addresses Andy Bierman Brocade Email: andy.bierman@brocade.com