Internet Engineering Task Force | A.B. Bierman |
Internet-Draft | Brocade |
Intended status: Standards Track | M.B. Bjorklund |
Expires: December 17, 2011 | Tail-f Systems |
June 15, 2011 |
Network Configuration Protocol Access Control Model
draft-ietf-netconf-access-control-04
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 operations and content. This document discusses requirements for a suitable access control model, and provides one solution that meets these requirements.
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 December 17, 2011.
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 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.
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:
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
The following terms are defined in [I-D.ietf-netconf-4741bis] and are not redefined here:
The following terms are defined in [RFC6020] and are not redefined here:
The following terms are used throughout this documentation:
[Editor's note: some things described here are requirements (MUST, SHOULD, etc), but some things are descriptions how NACM works, e.g. 2.4.1, 2.4.3...]
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? | | <rpc-reply> | +-------------+ | nodes? | | +-------------+ | if any datastore or | state data is accessed | by the operation V +-------------+ +----------------+ | data node | | prune | | access | | restricted | | allowed? | | <notification> | ---> client +-------------+ | event or data? | session +----------------+
The following access control points are defined:
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.
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 SHOULD be able to control all types of NETCONF protocol operation invocation, all conceptual datastore access, and all NETCONF session output.
Access control 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 <hello> messages.
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. Use of generic operations should be avoided, and separate operations defined instead, if different access levels are needed.
It MUST be possible to control access to specific nodes and subtrees within the conceptual NETCONF datastore.
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 <url> parameter are optional to support.
The non-volatile startup configuration needs to be loaded at boot-time into the running configuration without applying any access control rules. Access control is applied after the server has booted, and user sessions are active.
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:
Data nodes to which the client does not have read access, either directly or via wildcard access, are silently omitted from the <rpc-reply> message. This is done to allow NETCONF filters for <get> and <get-config> to function properly, instead of causing an "access-denied" error because the filter criteria would otherwise include unauthorized read access to some data nodes. For NETCONF filtering purposes, the selection criteria is applied to the subset of nodes that the client is authorized to read, not the entire datastore.
The NACM access rights are not directly coupled to the <edit-config> "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 describes how these access rights apply to the specific datastore operations supported by the <edit-config> 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 node may be present for naming purposes, but does 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.
[Editor's note: ditto for "replace" (and copy-config...) Note that with this rule, a client w/o read access can guess db content by sending merge requests - if access-denied is not returned, it means the db has that value.]
A "merge" operation may include data nodes, but not include particular child data nodes that are present in the datastore. These 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 <rpc-error> elements within the reply.
Access control for the <copy-config> 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.
The server SHOULD determine the exact nodes in the target datastore which are actually different, and only check write access permissions for this set of nodes, which could be empty. For example, if a session can read the entire datastore, but only change one leaf, that session SHOULD be able to edit and save that one leaf. E.g., the <copy-config> operation from <running> to <startup> SHOULD succeed if the only effective changes are for data nodes that session is authorized to change.
A client MUST have access to every datastore node, even ones that are not present in the source configuration data.
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 the server simply omits these subtrees from the reply, and 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.
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.
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 a RADIUS server [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.
It SHOULD be possible to disable part or all of the access control model without deleting any configuration.
Suitable control and monitoring mechanisms are needed to allow an operator to easily manage all aspects of the ACM behavior. A standard data model, suitable for use with the <edit-config> operation MUST be available for this purpose.
Access control rules to restrict operations on specific subtrees within the configuration datastore MUST be supported. Existing mechanisms can be used to identify the subtree(s) for this purpose.
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:
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.
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 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 <rpc-reply> 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 <rpc-reply> message.
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 <close-session> operation, defined in [I-D.ietf-netconf-4741bis].
A client MUST always be authorized to receive the <replayComplete> and <notificationComplete> notification events, defined in [RFC5277]
The set of module name strings used within one particular server MUST be unique.
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.
The NACM data model provides the following features:
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 following diagram shows the NETCONF message flow model, including the points at which access control is applied, during NETCONF message processing.
+-------------------------+ | session | | (username) | +-------------------------+ | ^ V | +--------------+ +---------------+ | message | | message | | dispatcher | | generator | +--------------+ +---------------+ | ^ ^ V | | +===========+ +-------------+ +----------------+ | <rpc> |---> | <rpc-reply> | | <notification> | | acc. ctl | | generator | | generator | +===========+ +-------------+ +----------------+ | ^ ^ ^ V +------+ | | +-----------+ | +=============+ +================+ | <rpc> | | | <rpc-reply> | | <notification> | | processor |-+ | acc. ctl | | access ctl | +-----------+ +=============+ +================+ | | ^ ^ V +----------------+ | | +===========+ | | | | data node | | | | | acc. ctl | -----------+ | | | +===========+ | | | | | | | | | V V V | | +---------------+ +-----------------+ | configuration | ---> | server | | datastore | | instrumentation | | | <--- | | +---------------+ +-----------------+
The following high-level sequence of conceptual processing steps is executed for each received <rpc> message, if access control enforcement is enabled:
The following sequence of conceptual processing steps is executed for each generated notification event, if access control enforcement is enabled:
This section defines the conceptual components related to access control model.
A "user" is the conceptual entity that 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 "recovery session" mechanism, which will bypass all access control enforcement. This is useful for restricting initial access and repairing a broken access control configuration.
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.
A session is simply a NETCONF session, which is the entity that is granted access to specific NETCONF operations.
A session is associated with a single user name for the lifetime of the session.
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:
There are four global controls that are used to help control how access control is enforced.
A global "enable-nacm" on/off switch is provided to enable or disable all access control enforcement. When this global switch is set to "true", then all access requested are checked against the access control rules, and only permitted if configured to allow the specific access request. When this global switch is set to "false", then all access requested are permitted.
An on/off "read-default" switch is provided to enable or disable default access to receive data in replies and notifications. When the "enable-nacm" global switch is set to "true", then this global switch is relevant, if no matching access control rule is found to explicitly permit or deny read access to the requested NETCONF datastore data or notification event type.
When this global switch is set to "permit", and no matching access control rule is found for the NETCONF datastore read or notification event requested, then access is permitted.
When this global switch is set to "deny", and no matching access control rule is found for the NETCONF datastore read or notification event requested, then access is denied.
An on/off "write-default" switch is provided to enable or disable default access to alter configuration data. When the "enable-nacm" global switch is set to "true", then this global switch is relevant, if no matching access control rule is found to explicitly permit or deny write access to the requested NETCONF datastore data.
When this global switch is set to "permit", and no matching access control rule is found for the NETCONF datastore write requested, then access is permitted.
When this global switch is set to "deny", and no matching access control rule is found for the NETCONF datastore write requested, then access is denied.
An on/off "exec-default" switch is provided to enable or disable default access to execute protocol operations. When the "enable-nacm" global switch is set to "true", then this global switch is relevant, if no matching access control rule is found to explicitly permit or deny access to the requested NETCONF protocol operation.
When this global switch is set to "permit", and no matching access control rule is found for the NETCONF protocol operation requested, then access is permitted.
When this global switch is set to "deny", and no matching access control rule is found for the NETCONF protocol operation requested, then access is denied.
There are 4 types of rules available in NACM:
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.
Upon the very first start-up of the NETCONF server, the access control configuration will probably not be present. If it isn't, a server MUST NOT allow any write access to any session role except a "recovery session", if supported.
Access control rules are not enforced before or while the non-volatile configuration data is processed and loaded into the running configuration, when the server is booting or rebooting. Access rules are enforced any time a request is initiated from a user session. Access control is not enforced for server-initiated access requests, such as the initial load of the running datastore, during bootup.
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 <hello> exchange has been successfully completed.
A server SHOULD NOT include any sensitive information in any <capability> elements within the <hello> exchange.
Once session establishment is completed, and a user has been authenticated, the NETCONF transport layer reports the user name 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 name, group names, and the configuration data stored on the server.
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 <error-info> elements within the <rpc-error> response.
The diagram below shows the basic conceptual structure of the access control processing model for incoming NETCONF <rpc> messages, within a server.
NETCONF server +------------+ | XML | | message | | dispatcher | +------------+ | | V +------------+ | NC-base NS | | <rpc> | +------------+ | | | | | +-------------------------+ | +------------+ | V V V +-----------+ +---------------+ +------------+ | acme NS | | NC-base NS | | NC-base NS | | <my-edit> | | <edit-config> | | <unlock> | +-----------+ +---------------+ +------------+ | | | | V V +----------------------+ | | | configuration | | datastore | +----------------------+
Access control begins with the message dispatcher.
After the server validates the <rpc> 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:
<error-path xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"> /nc:rpc/nc:edit-config </error-path>
If the session is not authorized to invoke the protocol operation then an <rpc-error> is generated with the following information:
If a datastore is accessed, either directly or as a side effect of the protocol operation, then the server MUST intercept the operation and make sure the session is authorized to perform the requested operation on the specified data, as defined in Section 3.3.5.
If a data node within a datastore is accessed, then the server MUST ensure that the client session is authorized to perform the requested read, create, update, or delete operation on the specified data node.
The data node access request is authorized by following these steps:
Configuration of access control rules specifically for descendant 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 <notification> messages.
NETCONF server +------------+ | XML | | message | | generator | +------------+ ^ | +----------------+ | <notification> | | generator | +----------------+ ^ | +=================+ | <notification> | | access control | | <eventType> | +=================+ ^ | +------------------------+ | server instrumentation | +------------------------+ | ^ V | +----------------------+ | configuration | | datastore | +----------------------+
The generation of a notification for a specific subscription is authorized by following these steps:
This section defines the semantics of the conceptual data structures found in the data model in Section 3.4.
The top-level element is called <nacm>, and it is defined in the "ietf-netconf-acm" module's namespace.
There are several data structures defined as child nodes of the <nacm> element:
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 <CODE BEGINS> file="ietf-netconf-acm@2011-06-14.yang" module ietf-netconf-acm { namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"; prefix "nacm"; import ietf-yang-types { prefix yang; } organization "IETF NETCONF (Network Configuration) Working Group"; contact "WG Web: <http://tools.ietf.org/wg/netconf/> WG List: <mailto:netconf@ietf.org> WG Chair: Mehmet Ersue <mailto:mehmet.ersue@nsn.com> WG Chair: Bert Wijnen <mailto:bertietf@bwijnen.net> Editor: Andy Bierman <mailto:andy.bierman@brocade.com> Editor: Martin Bjorklund <mailto:mbj@tail-f.com>"; description "NETCONF Server Access Control Model. Copyright (c) 2011 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; // RFC Ed.: replace XXXX with actual RFC number and // remove this note // RFC Ed.: remove this note // Note: extracted from draft-ietf-netconf-access-control-04.txt // RFC Ed.: please update the date to the date of publication revision "2011-06-14" { description "Initial version"; reference "RFC XXXX: Network Configuration Protocol Access Control Model"; } /* * Extension statements */ extension secure { description "Used to indicate that the data model node represents a sensitive security system parameter. If present, and the NACM module is enabled (i.e., /nacm/enable-nacm object equals 'true'), the NETCONF server will only allow the designated 'recovery session' to have write or execute access to the node. An explicit access control rule is required for all other users. The 'secure' extension MAY appear within a data definition statement or rpc statement. 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 'recovery session' to have read, write, or execute access to the node. An explicit access control rule is required for all other users. The 'very-secure' extension MAY appear within a data definition statement, rpc statement, or notification statement. It is ignored otherwise."; } /* * Derived types */ typedef user-name-type { type string { length "1..max"; } description "General Purpose User Name string."; } typedef 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 access-operations-type { type bits { bit create { description "Any operation that creates a new instance of the specified data is a create operation."; } bit read { description "Any operation or notification that returns data to an application is a read operation."; } bit update { description "Any operation that alters an existing data node is an update operation."; } bit delete { description "Any operation that removes a datastore node instance is a delete operation."; } bit exec { description "Execution access to the specified RPC operation. Any RPC operation invocation is an exec operation."; } } description "NETCONF Access Operation."; } typedef 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-list."; } typedef 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 node-instance-identifier { type yang:xpath1.0; description "Path expression used to represent a special data node instance identifier string. A node-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 node-instance-identifier represents all possible server instances for that key. 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 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 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."; } leaf exec-default { type 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."; } leaf denied-notifications { type yang:zero-based-counter32; config false; mandatory true; description "Number of times a notification was denied since the server last restarted."; } container groups { description "NETCONF Access Control Groups."; list group { key name; description "One NACM Group Entry."; leaf name { type group-name-type; description "Group name associated with this entry."; } leaf-list user-name { type user-name-type; description "Each entry identifies the user name of a member of the group associated with this entry."; } } } list rule-list { key "name"; ordered-by user; description "An ordered collection of access control rules."; leaf name { type string { length "1..256"; } description "Arbitrary name assigned to the rule-list."; } leaf-list group { type union { type matchall-string-type; type group-name-type; } description "List of administrative groups that will be assigned the associated access rights defined by the 'rule' list. The string '*' indicates that all groups apply to the entry."; } list rule { key "name"; ordered-by user; description "One access control rule. Rules are processed in user-defined order until a match is found. A rule matches if 'module-name', 'rule-type', and 'access-operations' matches the request. If a rule matches, the 'action' leaf determines if access is granted or not."; leaf name { type string { length "1..256"; } description "Arbitrary name assigned to the rule."; } leaf module-name { type union { type matchall-string-type; type string; } default "*"; description "Name of the module associated with this rule. This leaf matches if it has the value '*', or if the object being accessed is defined in the module with the specified module name."; } choice rule-type { description "This choice matches if all leafs present in the rule matches the request. If no leafs are present, the choice matches all requests."; case protocol-operation { leaf rpc-name { type union { type matchall-string-type; type string; } description "This leaf matches if it has the value '*', or if its value equals the requested RPC operation name."; } } case notification { leaf notification-name { type union { type matchall-string-type; type string; } description "This leaf matches if it has the value '*', or if its value equals the requested notification name."; } } case data-node { leaf path { type node-instance-identifier; mandatory true; description "Data Node Instance Identifier associated with the data node controlled by this rule. 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 data store contents."; } } } leaf access-operations { type union { type matchall-string-type; type access-operations-type; } default "*"; description "Access operations associated with this rule. This leaf matches if it has the value '*', or if the bit corresponding to the requested operation is set."; } leaf action { type action-type; 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; description "A textual description of the access rule."; } } } } } <CODE ENDS>
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.
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
This document registers one module in the "YANG Module Names" registry. Following the format in [RFC6020], the following has been registered.
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 "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 outside the scope of this document.
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 during a "recovery session".
There is a risk that non-standard protocol operations, or even the standard <get> 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.
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.
[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)", Internet-Draft draft-ietf-netconf-4741bis-10, March 2011. |
[I-D.ietf-netconf-rfc4742bis] | Wasserman, M and T Goddard, "Using the NETCONF Configuration Protocol over Secure Shell (SSH)", Internet-Draft draft-ietf-netconf-rfc4742bis-08, March 2011. |
[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. |
The following XML snippets are provided as examples only, to demonstrate how NACM can be configured to perform some access control tasks.
There needs to be at least one <group> 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.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <groups> <group> <name>admin</name> <user-name>admin</user-name> <user-name>andy</user-name> </group> <group> <name>monitor</name> <user-name>wilma</user-name> <user-name>bam-bam</user-name> </group> <group> <name>guest</name> <user-name>guest</user-name> <user-name>guest@example.com</user-name> </group> </groups> </nacm>
This example shows 3 groups:
Module rules are used to control access to all the content defined in a specific module. A module rule has the <module-name> leaf set, but no case in the "rule-type" choice.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <rule-list> <name>guest</name> <group>guest</group> <rule> <name>mod-1</name> <module-name>ietf-netconf-monitoring</module-name> <access-operations>*</access-operations> <action>deny</action> <comment> Do not allow guests any access to the netconf monitoring information. </comment> </rule> </rule-list> <rule-list> <name>monitor example</name> <group>monitor</group> <rule> <name>mod-2</name> <module-name>ietf-netconf-monitoring</module-name> <access-operations>read</access-operations> <action>permit</action> <comment> Allow read access to the netconf monitoring information. </comment> </rule> <rule> <name>mod-3</name> <module-name>*</module-name> <access-operations>exec</access-operations> <action>permit</action> <comment> Allow invocation of the supported server operations. </comment> </rule> </rule-list> <rule-list> <name>admin example</name> <group>admin</group> <rule> <name>mod-4</name> <module-name>*</module-name> <access-operations>*</access-operations> <action>permit</action> <comment> Allow the admin group complete access to all operations and data. </comment> </rule> </rule-list> </nacm>
This example shows 4 module rules:
RPC rules are used to control access to a specific protocol operation.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <rule-list> <name>guest</name> <group>monitor</group> <group>guest</group> <rule> <name>rpc-1</name> <module-name>ietf-netconf</module-name> <rpc-name>kill-session</rpc-name> <access-operations>exec</access-operations> <action>deny</action> <comment> Do not allow the monitor or guest group to kill another session. </comment> </rule> <rule> <name>rpc-2</name> <module-name>ietf-netconf</module-name> <rpc-name>delete-config</rpc-name> <access-operations>exec</access-operations> <action>deny</action> <comment> Do not allow monitor or guest group to delete any configurations. </comment> </rule> </rule-list> <rule-list> <name>monitor</name> <group>monitor</group> <rule> <name>rpc-3</name> <module-name>ietf-netconf</module-name> <rpc-name>edit-config</rpc-name> <access-operations>exec</access-operations> <action>permit</action> <comment> Allow the monitor group to edit the configuration. </comment> </rule> </rule-list> </nacm>
This example shows 3 protocol operation rules:
Data rules are used to control access to specific (config and non-config) data nodes within the NETCONF content provided by the server.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <rule-list> <name>guest rules</name> <group>guest</group> <rule> <name>data-1</name> <path xmlns:n="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> /n:nacm </path> <access-operations>*</access-operations> <action>deny</action> <comment> Deny the guest group any access to the /nacm data. </comment> </rule> </rule-list> <rule-list> <name>monitor rules</name> <group>monitor</group> <rule> <name>data-acme-config</name> <path xmlns:acme="http://example.com/ns/netconf"> /acme:acme-netconf/acme:config-parameters </path> <access-operations> read create update delete </access-operations> <action>permit</action> <comment> Allow the monitor group complete access to the acme netconf configuration parameters. Showing long form of 'access-operations' instead of shorthand. </comment> </rule> </rule-list> <rule-list> <name>dummy-itf</name> <group>guest monitor</group> <rule> <name>dummy-itf</name> <path xmlns:acme="http://example.com/ns/itf"> /acme:interfaces/acme:interface[acme:name='dummy'] </path> <access-operations>read update</access-operations> <action>permit</action> <comment> Allow the monitor and guest groups read and update access to the dummy interface. </comment> </rule> </rule-list> <rule-list> <name>admin rules</name> <rule> <name>admin-itf</name> <path xmlns:acme="http://example.com/ns/itf"> /acme:interfaces/acme:interface </path> <access-operations>*</access-operations> <action>permit</action> <comment> Allow admin full access to all acme interfaces. </comment> </rule> </rule-list> </nacm>
This example shows 4 data rules:
Notification rules are used to control access to a specific notification event type.
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm"> <rule-list> <name>sys</name> <group>monitor</group> <group>guest</group> <rule> <name>notif-1</name> <module-name>acme-system</module-name> <notification-name>sys-config-change</notification-name> <access-operations>read</access-operations> <action>deny</action> <comment> Do not allow the guest or monitor groups to receive config change events. </comment> </rule> </rule-list> </nacm>
This example shows 1 notification rule:
-- RFC Ed.: remove this section before publication.
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.
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".
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.
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.
Initial version cloned from draft-bierman-netconf-access-control-02.txt.