One document matched: draft-bogdanovic-netmod-acl-model-01.xml


<?xml version="1.0" encoding="UTF-8"?>

<!-- This is built from a template for a generic Internet Draft. Suggestions for
     improvement welcome - write to Brian Carpenter, brian.e.carpenter @ gmail.com -->

<!-- This can be converted using the Web service at http://xml.resource.org/experimental.html
     (which supports the latest, sometimes undocumented and under-tested, features.) -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

]>

<?rfc toc="yes"?>            <!-- You want a table of contents -->
<?rfc symrefs="yes"?>        <!-- Use symbolic labels for references -->
<?rfc sortrefs="yes"?>       <!-- This sorts the references -->
<?rfc iprnotified="no" ?>    <!-- Change to "yes" if someone has disclosed IPR for the draft -->
<?rfc compact="yes"?>


<!-- This defines the specific filename and version number of your draft (and inserts the appropriate IETF boilerplate -->
<rfc ipr="trust200902" docName="draft-bogdanovic-netmod-acl-model-01" category="info">

<front>
  <title abbrev="ACL YANG model">ACL YANG model</title>

  <author fullname="Dean Bogdanovic" initials="D." surname="Bogdanovic">
    <organization>Juniper Networks</organization>
    <address>
      <email>deanb@juniper.net</email>
    </address>
  </author>
  <author fullname="Kiran Agrahara Sreenivasa" initials="K." surname="Sreenivasa">
    <organization>Brocade Communications System</organization>
    <address>
      <email>kkoushik@brocade.com</email>
    </address>
  </author>
  <author fullname="Lisa Huang" initials="L." surname="Huang">
    <organization>Cisco Systems</organization>
    <address>
      <email>yihuan@cisco.com</email>
    </address>
  </author>
  <author fullname="Dana Blair" initials="D." surname="Blair">
    <organization>Cisco Systems</organization>
    <address>
      <email>dblair@cisco.com</email>
    </address>
  </author>
  <date day="26" month="June" year="2014" />
  <area>Operations and Management Area</area>
  <workgroup>NETMOD WG</workgroup>
  <abstract>
    <t>This document describes information and data model of Access Control List (ACL) basic building blocks.
    </t>
  </abstract>
</front>

<middle>
  <section anchor="intro" title="Introduction">
    <t>Access Control List (ACL) are one of the basic elements to configure
   device forwarding behavior.  It is used in many networking concepts
   such as Policy Based Routing, Firewalls etc.</t>
   <t>An ACL is an ordered set of rules that is used to filter traffic on a
   networking device.  Each rule is represented by an Access Control
   Entry (ACE).</t>
   <t>Each ACE has a group of match criteria and a group of action criteria.</t>
   <t>The match criteria consist of tuple of match criteria and metadata matching.</t>
   <t><list style="symbols">
     <t>Packet header matches apply to fields visible in the packet such as
      address or class of service or port numbers.</t>
     <t>Metadata matching applies to fields associated with the packet but
     not in the packet header such as input interface or overall packet length</t>
   </list></t>
   <t>The actions specify what to do with the packet when the matching criteria is
   met. These can be any sort of thing from counting to policing or simply 
   forwarding.The list of potential actions is endless depending on the 
   innovations of the networked devices.</t>
    <section title="Definitions and Acronyms">
      <t>ACE: Access Control Entry</t>
      <t>ACL: Access Control List</t>
      <t>AFI: Address Field Identifier</t>
      <t>DSCP: Differentiated Services Code Point</t>
      <t>ICMP: Internet Control Message Protocol</t>
      <t>IP: Internet Protocol</t>
      <t>IPv4: Internet Protocol version 4</t>
      <t>IPv6: Internet Protocol version 6</t>
      <t>MAC: Media Access Control</t>
      <t>TCP: Transmission Control Protocol</t>
    </section> <!-- definitions -->
  </section> <!-- intro -->

  <section anchor="problem" title="Problem Statement">
    <t>This document defines a YANG <xref target="RFC6020"/> data model for the configuration of ACLs. It is very important that model can be easily reused between vendors and between applications.</t>

   <t>ACL implementations in every device may vary greatly in terms of the filter constructs and Actions that they support. Therefore this draft proposes a simple model that augmented by vendor proprietary models. </t>
  </section> <!-- problem -->

  <section anchor="design" title="Design of the ACL Model">
    <t>Although different vendors have different ACL data models, there is a common understanding of what an access list is. An access list contains an ordered list of rules called access list entries – ACEs. Actions on the first matching ACE are applied with no processing of subsequent ACEs. Each ACE has a group of match criteria and a group of action criteria. The match criteria consist of packet header matching and metadata matching. Packet header matches apply to fields visible in the packet such as address or class of service or port numbers.  Metadata matching applies to fields associated with the packet, but not in the packet header such as input interface, packet length, or source or destination prefix length. The actions can be any sort of thing from logging to rate limiting or dropping to simply forwarding. There is a default ACE which applies if a packet does not match any of the other ACEs. As some devices fail closed (reject), some fail open (accept) with no explicit configuration, this model defines daufault action, ACE which applies if a packet does not match any of the other ACEs. This will help with cross platform conformitiy and for that reason this draft specifies deny as default action. There is overall operational state for the ACL and operational state for each ACE, and depending on the action, operational state for each action. Access-lists can also have notifications such as logging, configuration changing, activation state changes. The ACL can be applied to targets within the device which may be interfaces of a networked device, applications or features running in the device, or other objects. When applied to interfaces of the networked device, the ACL is applied in a direction which indicates if it should be applied to packet entering (input) or leaving the device (output).</t>
  <t>This draft tries to address the commonalities between all vendors and create a common model, which can be augmented with proprietary models. The base model is very simple and with this design we hope to achieve needed flexibility for each vendor to extend the base model.</t>
    

    <section anchor="aclmodules" title="ACL Modules">
      <t>There are three YANG modules in the model. The first module, "ietf-acl", defines generic ACL aspects which are common to all ACLs regardless of their type or vendor. In effect, the module can be viewed as providing a generic ACL "superclass". It imports module "packet-headers" into the match container. The packet headers can be extended with different types and fragments.The packet headers modules can easily be extended to reuse definitions from other modules such as IPFIX <xref target="RFC5101"/> or migrate proprietary augmented module definitions into the standard module.</t>
      <figure>
        <artwork>
module: ietf-acl
   +--rw access-list
      +--rw acl-name?              string
      +--rw acl-oper-data
      |  +--rw match-counter?    ietf:counter64
      |  +--rw permit-counter?   ietf:counter64
      |  +--rw deny-counter?     ietf:counter64
      |  +--rw targets*          string
      +--rw access-list-entries* [rule-name]
      |  +--rw rule-name        string
      |  +--rw matches
      |  |  +--rw (ace-type)?
      |  |  |  +--:(ace-ip)
      |  |  |  |  +--rw source-port-range
      |  |  |  |  |  +--rw lower-port    inet:port-number
      |  |  |  |  |  +--rw upper-port?   inet:port-number
      |  |  |  |  +--rw destination-port-range
      |  |  |  |  |  +--rw lower-port    inet:port-number
      |  |  |  |  |  +--rw upper-port?   inet:port-number
      |  |  |  |  +--rw dscp?                           inet:dscp
      |  |  |  |  +--rw ip-protocol?                    uint8
      |  |  |  |  +--rw (ace-ip-version)?
      |  |  |  |     +--:(ace-ipv4)
      |  |  |  |     |  +--rw destination-ipv4-address?       inet:ipv4-prefix
      |  |  |  |     |  +--rw source-ipv4-address?            inet:ipv4-prefix
      |  |  |  |     +--:(ace-ipv6)
      |  |  |  |        +--rw destination-ipv6-address?       inet:ipv6-prefix
      |  |  |  |        +--rw source-ipv6-address?            inet:ipv6-address
      |  |  |  |        +--rw flow-label?                     inet:ipv6-flow-label
      |  |  |  +--:(ace-eth)
      |  |  |     +--rw destination-mac-address?        yang:mac-address
      |  |  |     +--rw destination-mac-address-mask?   yang:mac-address
      |  |  |     +--rw source-mac-address?             yang:mac-address
      |  |  |     +--rw source-mac-address-mask?        yang:mac-address
      |  |  +--rw input-interface?                string
      |  |  +--rw absolute
      |  |     +--rw start?    yang:date-and-time
      |  |     +--rw end?      yang:date-and-time
      |  |     +--rw active?   boolean
      |  +--rw actions
      |  |  +--rw (packet-handling)?
      |  |     +--:(deny)
      |  |     |  +--rw deny?     empty
      |  |     +--:(permit)
      |  |        +--rw permit?   empty
      |  +--rw ace-oper-data
      |     +--rw match-counter?   ietf:counter64
      +--rw default-actions
         +--rw deny?   empty
        </artwork>
      </figure>
      <t>Two other module "newco-acl" is example of company proprietary model, that augments the ietf-acl module with definitions that are specific to match criteria and company proprietary extensions to match and action criteria. The model below is shown just an example and it is expected from vendors to create their own propietary models, based on the example below.
      </t>
      <figure>
        <artwork>
module: newco-acl
augment /ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:matches:
   +--rw (protocol_payload_choice)?
      +--:(protocol_payload)
         +--rw protocol_payload* [value_keyword]
            +--rw value_keyword    enumeration
augment /ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:actions:
   +--rw (action)?
      +--:(count)
      |  +--rw count?                   string
      +--:(policer)
      |  +--rw policer?                 string
      +--:(hiearchical-policer)
         +--rw hierarchitacl-policer?   string
        </artwork>
      </figure>
    </section> <!-- aclmodules -->
  </section> <!-- designandinfo -->

  <section anchor="yangmodel" title="ACL YANG Models">
    <section anchor="ietfacl" title="IETF-ACL module">
      <t>"ietf-acl" is the standard top level module for Access lists. It has
    a container for "access-list" to store access list information.
    This container has information identifying the access list by a
    name("acl-name") and a list("access-list-entries") of rules associated
    with the "acl-name".
    Each of the entries in the list("access-list-entries") indexed by the
    string "rule-name" have containers defining "matches" and "actions".
    The "matches" define criteria used to identify patterns in
    "packet-fields".
    The "actions" define behavior to undertake once a "match" has been
    identified.</t>
      <figure>
        <artwork>
module ietf-acl {
    yang-version 1;

    namespace "urn:ietf:params:xml:ns:yang:ietf-acl";

    prefix ietf-acl;
    
    import ietf-yang-types {
        prefix "ietf";
    }

    import packet-fields {
        prefix "packet-fields";
    }

    revision 2014-05-20{
        description "creating base model for netmod";
    }

    typedef acl-ref {
        description "This type is used by data models that need to referenced an acl";
        type leafref {
            path "/ietf-acl:access-list/ietf-acl:acl-name";
        }
    }

    container access-list {
        description "
                     An access list (acl) is an ordered list of access list     
                     entries (ace). Each ace has a sequence number to define    
                     the order, list of match criteria, and a list of actions.  
                     Since there are several kinds of acls implementeded        
                     with different attributes for each and different for       
                     each vendor, this model accomodates customizing acls       
                     for each kind and for each vendor.                         
                     ";
        leaf acl-name {
            description "name of access-list";
            type string;
        }

        container acl-oper-data {
            description "Overall ACL operational data";
            leaf match-counter {
                description "Total match count for ACL";
                type ietf:counter64;
            }
            leaf permit-counter {
                description "Total permit count for ACL";
                type ietf:counter64;
            }
            leaf deny-counter {
                description "Total deny count";
                type ietf:counter64;
            }
            leaf-list targets {
                description "List of targets where ACL is applied";
                type string;
            }
        }

        list access-list-entries {
            key rule-name;
            ordered-by user;
            leaf rule-name {
                description "Entry name";
                type string;
            }

            container matches {
                description "Define match criteria";
                choice ace-type {
                    case ace-ip {
                        uses packet-fields:acl-ip-header-fields;
                        choice ace-ip-version {
                            case ace-ipv4 {
                                uses packet-fields:acl-ipv4-header-fields;
                            }
                            case ace-ipv6 {
                                uses packet-fields:acl-ipv6-header-fields;
                            }
                        }
                    }
                    case ace-eth {
                        uses packet-fields:acl-eth-header-fields;
                    }
                }
                uses packet-fields:metadata;
            }

            container actions {
                description "Define action criteria";
                choice packet-handling {
                    default deny;
                    case deny {
                        leaf deny {
                            type empty;
                        }
                    }
                    case permit {
                        leaf permit {
                            type empty;
                        }
                    }
                }      
            }

            container ace-oper-data {
                description "Per ace operational data";
                leaf match-counter {
                    description "Number of matches for an ace";
                    type ietf:counter64;
                }
            }
        }

        container default-actions {
            description "Actions that occur if no access-list entry is matched.";
            leaf deny {
                type empty;
            }
        }
    }
}

        </artwork>
      </figure>
      </section> <!--ietfacl -->
      <section anchor="pktheaders" title="Packet Header module">
	<t>The packet fields module defines the necessary groups for matching on fields in the packet including ethernet, ipv4, ipv6, transport layer fields and metadata.  These groupings can be augmented to include other proprietary matching criteria.  Since the number of match criteria is very large, the base draft does not include these directly but references them by "uses" to keep the base module simple.</t>
	<figure>
	  <artwork>
module packet-fields {
    yang-version 1;

    namespace "urn:ietf:params:xml:ns:yang:packet-fields";

    prefix packet-fields;

    import ietf-inet-types {
        prefix "inet";
    }
                    
    import ietf-yang-types {
        prefix "yang";
    }

    revision 2014-06-25 {
        description "Initial version of packet fields used by access-lists";
    }

    grouping acl-transport-header-fields {
        description "Transport header fields";

        container source-port-range {
             description "inclusive range of source ports";
             leaf lower-port {
                 mandatory true;
                 type inet:port-number;
             }
             leaf upper-port {
                 type inet:port-number;
             }
        }       

        container destination-port-range {
             description "inclusive range of destination ports";
             leaf lower-port {
                 mandatory true;
                 type inet:port-number;
             }
             leaf upper-port {
                 type inet:port-number;
             }
        }       
    }

    grouping acl-ip-header-fields {
        description "Header fields common to ipv4 and ipv6";

        uses acl-transport-header-fields;

        leaf dscp {
            type inet:dscp;
        }

        leaf ip-protocol {
            type uint8;
        }

    }

    grouping acl-ipv4-header-fields {
        description "fields in IPv4 header";

        leaf destination-ipv4-address {
            type inet:ipv4-prefix;
        }

        leaf source-ipv4-address {
            type inet:ipv4-prefix;
        }

    }

    grouping acl-ipv6-header-fields {
        description "fields in IPv6 header";

        leaf destination-ipv6-address {
            type inet:ipv6-prefix;
        }

        leaf source-ipv6-address {
            type inet:ipv6-address;
        }

        leaf flow-label {
            type inet:ipv6-flow-label;
        }

    }

    grouping acl-eth-header-fields {
        description "fields in ethernet header";

        leaf destination-mac-address {
            type yang:mac-address;
        }

        leaf destination-mac-address-mask {
            type yang:mac-address;
        }

        leaf source-mac-address {
            type yang:mac-address;
        }

        leaf source-mac-address-mask {
            type yang:mac-address;
        }
    }

    grouping timerange {
        description "Define time range entries to restrict 
            the access. The time range is identified by a name 
            and then referenced by a function, so that those 
            time restrictions are imposed on the function itself.";
        
        container absolute {
            description 
                "Absolute time and date that 
                the associated function starts
                going into effect.";
                
            leaf start {
                type yang:date-and-time; 
                description 
                "Start time and date";
            }
            leaf end {
                type yang:date-and-time; 
                description "Absolute end time and date";
            }
            leaf active {
                type boolean;
                default "true";
                description
                    "Specify the associated function
                    active or inactive state when
                    starts going into effect";
            }
        } // container absolute    
    } //grouping timerange

    grouping metadata {
        description "Fields associated with a packet but not in the header";

        leaf input-interface {
             description "Packet was received on this interface";
             type string;
        }
        uses timerange;
    }
}
          </artwork>
        </figure>
      </section> <!--pktheaders-->

      <section anchor="newcoacl" title="A company proprietary module example">
	<t>In the figure below is an example how proprietary models can be created on top of base ACL module. It is a simple example of how to use 'augment' with an XPath expression which extends instances of a particular type. In this example, all /ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:matches are augmented with a new choice, protocol-payload-choice. The protocol-payload-choice uses a grouping with an enumeration of all supported protocol values. In other example, /ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:actions are augmented with new choice of actions. Here is an inclusive list of cases listed within a choice statement.</t>
	<figure>
	  <artwork>
module newco-acl {
    yang-version 1;

    namespace "urn:newco:params:xml:ns:yang:newco-acl";

    prefix newco-acl;

    import ietf-acl {
      prefix "ietf-acl";
    }

    revision 2014-05-21{
      description "creating newo proprietary extensions to ietf-acl model";
    }

    augment "/ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:matches" {
      description "Newco proprietry simple filter matches";
         choice protocol-payload-choice {
           list protocol-payload {
             key value-keyword;
             ordered-by user;
             description "Match protocol payload";
             uses match-simple-payload-protocol-value;
           }
      }   
    }

    augment "/ietf-acl:access-list/ietf-acl:access-list-entries/ietf-acl:actions" {
      description "Newco proprietary simple filter actions";
      choice action {
         case count {
            description "Count the packet in the named counter";
               leaf count {
                  type string;
               }
            }
         case policer {
           description "Name of policer to use to rate-limit traffic";
            leaf policer {
               type string;
            }
         }
         case hiearchical-policer {
           description "Name of hierarchical policer to use to rate-limit traffic";
           leaf hierarchitacl-policer{
              type string;
           }
         }
      }
    }

  grouping match-simple-payload-protocol-value {
     leaf value-keyword {
       description "(null)";
       type enumeration {
         enum icmp {
           description "Internet Control Message Protocol";
         }
         enum icmp6 {
           description "Internet Control Message Protocol Version 6";
         }
         enum range {
           description "Range of values";
         }
       }
     }
   }
}
          </artwork>
        </figure>
	<t>Dratf authors expect that different vendors will provide their own yang models as in the example above, which is the extension of the base model</t>
      </section> <!--newcoacl-->
      <section anchor="example" title="An ACL Example">
	<t>Requirement: Deny All traffic from 1.1.1.1 bound for host 2.2.2.2 from leaving.</t>
	<t>In order to achieve the requirement, an name access control list is needed. The acl and aces can be described in CLI as the following:</t>
	<figure align="center" anchor="An_ACL_Example">
	  <artwork align="left">
	    access-list ip iacl
	    deny tcp 1.1.1.1 host 2.2.2.2
	  </artwork>
	</figure>
	<t>Here is the example acl configuration xml:</t>
	<figure align="center" anchor="An_ACL_XML_example">
	  <artwork align="left"><![CDATA[
	       <rpc message-id="101" xmlns:nc="urn:cisco:params:xml:ns:yang:ietf-acl:1.0"> 
		 // replace with IANA namespace when assigned
	       <edit-config>
		 <target>
		   <running/>
		 </target>
		 <config>
		   <top xmlns="http://example.com/schema/1.2/config">
		     <access-list>
		       <acl-name>sample-ip-acl</acl-name>
		       <access-list-entries>
			 <rule-name>telnet-block-rule</rule-name>
			 <matches>
			   <destination-ipv4-address>2.2.2.2</destination-ipv4-address>
			   <source-ipv4-address>1.1.1.1</source-ipv4-address>
			 </matches>
			 <actions>
			   <deny/>
			 <actions/>
		       </access-list-entries>
		     </access-list>
		   </top>
		 </config>
	       </edit-config>
	     </rpc>
	   ]]></artwork>
	 </figure>
      </section> <!--example -->
    </section> <!-- yangmodel -->

<section anchor="nftables" title="Linux nftables">
      <t>As Linux platform is becoming more popular as networking platform, the Linux data model is changing. Previously ACLs in Linux were highly protocol specific and different utilities were used for it (iptables, ip6tables, arptables, ebtables). Recently, this has changed and a single utility, nftables, has been provided. This utility follows very similarly the same base model as proposed in this draft. The nftables support input and output ACEs and each ACE can be defined with match and action.</t> 
    </section> <!-- nftables -->

  <section anchor="security" title="Security Considerations">
    <t>The YANG module defined in this memo is designed to be accessed via
   the NETCONF protocol [RFC6241] <xref target="RFC6241"/>.  The lowest NETCONF layer is the secure transport layer and the mandatory-to-implement secure transport is SSH [RFC6242] <xref target="RFC6242"/>.  The NETCONF access control model [RFC6536] <xref target="RFC6536"/> provides the means to restrict access for particular NETCONF users to a pre-configured subset of all available NETCONF protocol operations and content.</t>

   <t>There are a number of data nodes defined in the YANG module which are writable/creatable/deletable (i.e., config true, which is the default).  These data nodes may be considered sensitive or vulnerable in some network environments.  Write operations (e.g.,  <edit-config>) to these data nodes without proper protection can have a negative effect on network operations.</t>

   <t>TBD: List specific Subtrees and data nodes and their
   sensitivity/vulnerability.
    </t>
  </section> <!-- security -->

  <section anchor="iana" title="IANA Considerations">
    <t>This document registers a URI in the IETF XML registry [RFC3688] <xref target="RFC3688"/>.
   Following the format in RFC 3688, the following registration is
   requested to be made:</t>

   <t>        URI: urn:ietf:params:xml:ns:yang:ietf-acl</t>

   <t>        Registrant Contact: The IESG.</t>

   <t>        XML: N/A, the requested URI is an XML namespace.</t>

   <t>This document registers a YANG module in the YANG Module Names
   registry [RFC6020].</t>

   <t>name:         ietf-acl
     namespace:    urn:ietf:params:xml:ns:yang:ietf-acl
     prefix:       ietf-acl
     reference:    RFC XXXX
   </t>
  </section> <!-- iana -->

  <section anchor="ack" title="Acknowledgements">
    <t>
    </t>
  </section> <!-- ack -->
  <section anchor ="changes" title="Change log [RFC Editor: Please remove]">
    <t>
    </t>
  </section> <!-- changes -->
</middle>

<back>
  <references title="References">
    <?rfc include='reference.RFC.3688'?>
    <?rfc include='reference.RFC.5101'?>
    <?rfc include='reference.RFC.6020'?>
    <?rfc include='reference.RFC.6241'?>
    <?rfc include='reference.RFC.6242'?>
    <?rfc include='reference.RFC.6536'?>
  </references>
</back>


</rfc>

PAFTECH AB 2003-20262026-04-24 05:38:09