I2NSF Registration Interface YANG Data Model for NSF Capability Registration
Sangwon Hyun, Ed.
Department of Computer Engineering
Myongji University
116 Myongji-ro, Cheoin-gu
Yongin
Gyeonggi-do
17058
Republic of Korea
shyun@mju.ac.kr
Jaehoon Paul Jeong, Ed.
Department of Computer Science and Engineering
Sungkyunkwan University
2066 Seobu-Ro, Jangan-Gu
Suwon
Gyeonggi-Do
16419
Republic of Korea
+82 31 299 4957
+82 31 290 7996
pauljeong@skku.edu
http://iotlab.skku.edu/people-jaehoon-jeong.php
Taekyun Roh
Department of Electronic, Electrical and Computer Engineering
Sungkyunkwan University
2066 Seobu-Ro, Jangan-Gu
Suwon
Gyeonggi-Do
16419
Republic of Korea
+82 31 290 7222
+82 31 299 6673
tkroh0198@skku.edu
Sarang Wi
Department of Electronic, Electrical and Computer Engineering
Sungkyunkwan University
2066 Seobu-Ro, Jangan-Gu
Suwon
Gyeonggi-Do
16419
Republic of Korea
+82 31 290 7222
+82 31 299 6673
dnl9795@skku.edu
Jung-Soo Park
Electronics and Telecommunications Research Institute
218 Gajeong-Ro, Yuseong-Gu
Daejeon
305-700
Republic of Korea
+82 42 860 6514
pjs@etri.re.kr
8 September 2022
Security
I2NSF Working Group
Internet-Draft
This document defines an information model and a YANG data model for Registration Interface between Security Controller and Developer's Management System (DMS) in the Interface to Network Security Functions (I2NSF) framework to register Network Security Functions (NSF) of the DMS with the Security Controller. The objective of these information and data models is to support NSF capability registration and query via I2NSF Registration Interface.

Introduction
A number of Network Security Functions (NSF) may exist in the Interface to Network Security Functions (I2NSF) framework [RFC8329]. Since each of these NSFs likely has different security capabilities from each other, it is important to register the security capabilities of the NSF with the security controller. In addition, it is required to search NSFs of some required security capabilities on demand. As an example, if additional security capabilities are required to serve some security service request(s) from an I2NSF user, the security controller SHOULD be able to request the DMS for NSFs that have the required security capabilities.
As the main focus of the YANG module defined in [I-D.ietf-i2nsf-capability-data-model] is to define the security capabilities of an NSF, it lacks in some information (e.g., network access information to an NSF) needed by the Security Controller. Hence, this document provides extended information for the I2NSF Registration Interface.
This document describes an information model (see Section 4) and an augmented YANG [RFC7950] data model from I2NSF Capability YANG data model [I-D.ietf-i2nsf-capability-data-model] (see Section 5) for the I2NSF Registration Interface [RFC8329] between the security controller and the developer's management system (DMS) to support NSF capability registration and query via the registration interface. It also describes the operations which SHOULD be performed by the security controller and the DMS via the Registration Interface using the defined model.

Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119][RFC8174] when, and only when, they appear in all capitals, as shown here.
This document uses the following terms defined in [RFC3444], [RFC8329] and [I-D.ietf-i2nsf-capability-data-model].
- Network Security Function (NSF): A function that is responsible for a specific treatment of received packets. A Network Security Function can act at various layers of a protocol stack (e.g., at the network layer or other OSI layers). Sample Network Security Service Functions are as follows: Firewall, Intrusion Prevention/Detection System (IPS/IDS), Deep Packet Inspection (DPI), Application Visibility and Control (AVC), network virus and malware scanning, sandbox, Data Loss Prevention (DLP), Distributed Denial of Service (DDoS) mitigation and TLS proxy.
- Data Model: Data Models define managed objects at a lower level of abstraction, which include implementation- and protocol-specific details, e.g., rules that explain how to map managed objects onto lower-level protocol constructs [RFC3444].
- Information Model: Information Models are primarily useful for designers to describe the managed environment, for operators to understand the modeled objects, and for implementers as a guide to the functionality that must be described and coded in the Data Models [RFC3444].
- YANG: This document follows the guidelines of [RFC8407], uses the common YANG types defined in [RFC6991], and adopts the Network Management Datastore Architecture (NMDA) [RFC8342]. The meaning of the symbols in tree diagrams is defined in [RFC8340].

Objectives
- Registering NSFs with the I2NSF framework: Developer's Management System (DMS) in I2NSF framework is typically run by an NSF vendor, and uses Registration Interface to provide NSFs developed by the NSF vendor to Security Controller. Since there may be multiple vendors that provide NSFs for a target network, the I2NSF Registration Interface can be used as a standard interface for the DMSs to provide NSFs capability information to the Security Controller. For the registered NSFs, Security Controller maintains a catalog of the capabilities of those NSFs to select appropriate NSFs for the requested security services.
- Updating the capabilities of registered NSFs: After an NSF is registered with Security Controller, some modifications on the capability of the NSF MAY be required later. In this case, DMS uses Registration Interface to update the capability of the NSF, and this update SHOULD be reflected in the catalog of NSFs.
- Asking DMS about some required capabilities: In cases that some security capabilities are required to serve the security service request from an I2NSF user, Security Controller searches through the registered NSFs to find ones that can provide the required capabilities. But Security Controller might fail to find any NSFs having the required capabilities among the registered NSFs. In this case, Security Controller needs to request DMS for additional NSF(s) that can provide the required security capabilities via Registration Interface.

Information Model
The I2NSF registration interface is used by Security Controller and Developer's Management System (DMS) in I2NSF framework. The following summarizes the operations done through the registration interface:
1. DMS registers NSFs and their capabilities with Security Controller via the registration interface. DMS also uses the registration interface to update the capabilities of the NSFs registered previously.
2. In case that an I2NSF user requests a certain security service, and the Security Controller fails to find some of the required security capabilities from any registered NSFs, the Security Controller queries DMS about an additional NSF(s) having the required security capabilities via the registration interface.
Figure 1 shows the information model of the I2NSF registration interface, which consists of two submodels: NSF capability registration and NSF capability query. Each submodel is used for the operations listed above. The remainder of this section will provide in-depth explanations of each submodel.

I2NSF Registration Interface Information Model

  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |      I2NSF Registration Interface Information Model       |
  |                                                           |
  |         +-+-+-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+-+-+          |
  |         | NSF Capability  |  | NSF Capability  |          |
  |         | Registration    |  | Query           |          |
  |         +-+-+-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+-+-+          |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

NSF Capability Registration
This submodel is used by DMS to register an NSF with Security Controller. Figure 2 shows how this submodel is constructed. The most important part in Figure 2 is the NSF capability, and this specifies the set of capabilities that the NSF to be registered can offer. The NSF Name contains a unique name of this NSF with the specified set of capabilities. When registering the NSF, DMS additionally includes the network access information of the NSF which is required to enable network communications with the NSF.
The following will further explain the NSF capability information and the NSF access information in more detail.

NSF Capability Registration Sub-Model

                       +-+-+-+-+-+-+-+-+-+
                       | NSF Capability  |
                       | Registration    |
                       +-+-+-+-+^+-+-+-+-+
                                |
          +---------------------+--------------------+
          |                     |                    |
          |                     |                    |
    +-+-+-+-+-+-+       +-+-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+
    |   NSF     |       | NSF Capability|      | NSF Access  |
    |   Name    |       | Information   |      | Information |
    +-+-+-+-+-+-+       +-+-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+

NSF Capability Information
NSF Capability Information basically describes the security capabilities of an NSF. In Figure 3, we show capability objects of an NSF. Following the information model of NSF capabilities defined in [I-D.ietf-i2nsf-capability-data-model], we share the same I2NSF security capabilities: Directional Capabilities, Event Capabilities, Condition Capabilities, Action Capabilities, Resolution Strategy Capabilities, Default Action Capabilities. Also, NSF Capability Information additionally contains the specification of an NSF as shown in Figure 3.

NSF Capability Information

                          +-+-+-+-+-+-+-+-+-+
                          | NSF Capability  |
                          |   Information   |
                          +-+-+-+-^-+-+-+-+-+
                                  |
                                  |
           +----------------------+----------------------+
           |                                             |
           |                                             |
   +-+-+-+-+-+-+-+-+                             +-+-+-+-+-+-+-+-+
   |     I2NSF     |                             |      NSF      |
   | Capabilities  |                             | Specification |
   +-+-+-+-+-+-+-+-+                             +-+-+-+-+-+-+-+-+
           |
    +------+-------------+----------------+----------------+-------+
    |                    |                |                |       |
+-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+ |
| Directional |  |    Event    |  |  Condition  |  |    Action   | |
| Capabilities|  | Capabilities|  | Capabilities|  | Capabilities| |
+-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+ |
                                                                   |
                 +--------------------+--------------------+-------+
                 |                    |
           +-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+
           | Resolution  |      |   Default   |
           | Strategy    |      |   Action    |
           | Capabilities|      | Capabilities|
           +-+-+-+-+-+-+-+      +-+-+-+-+-+-+-+

NSF Specification
This information represents the processing capability of an NSF. Assuming that the current workload status of each NSF is being collected through NSF monitoring [I-D.ietf-i2nsf-nsf-monitoring-data-model], this capability information of the NSF can be used to determine whether the NSF is in congestion by comparing it with the current workload of the NSF. Moreover, this information can specify an available amount of each type of resource, such as processing power which are available on the NSF. (The registration interface can control the usages and limitations of the created instance and make the appropriate request according to the status.) As illustrated in Figure 4, this information consists of two items: Processing and Bandwidth. Processing information describes the NSF's available processing power. Bandwidth describes the information about available network amount in two cases, outbound, inbound. These two information can be used for the NSF's instance request.

NSF Specification Overview

                   +-+-+-+-+-+-+-+-+-+
                   |       NSF       |
                   |  Specification  |
                   +-+-+-+-^-+-+-+-+-+
                           |
               +----------------------------+
               |                            |
               |                            |
       +-+-+-+-+-+-+-+-+            +-+-+-+-+-+-+-+
       |  Processing   |            |  Bandwidth  |
       +-+-+-+-+-+-+-+-+            +-+-+-+-+-+-+-+

NSF Access Information
NSF Access Information contains the following that are required to communicate with an NSF through NETCONF [RFC6241] or RESTCONF [RFC8040]: an IP address (i.e., IPv4 or IPv6 address) and a port number. Note that TCP is used as a transport layer protocol due to either NETCONF or RESTCONF. In this document, NSF Access Information is used to identify a specific NSF instance. That is, NSF Access Information is the signature (i.e., unique identifier) of an NSF instance in the overall I2NSF system.

NSF Capability Query
Security Controller MAY require some additional capabilities to serve the security service request from an I2NSF user, but none of the registered NSFs has the required capabilities. In this case, Security Controller makes a description of the required capabilities by using the NSF capability information submodel in Section 4.1.1, and sends DMS a query about which NSF(s) can provide these capabilities.

Data Model

YANG Tree Diagram
This section provides the YANG Tree diagram of the I2NSF registration interface.

Definitions of Symbols in Tree Diagrams
A simplified graphical representation of the data model is used in this section. The meaning of the symbols used in the following diagrams [RFC8431] is as follows:
Brackets "[" and "]" enclose list keys.
Abbreviations before data node names: "rw" means configuration (read-write) and "ro" state data (read-only).
Symbols after data node names: "?" means an optional node and "*" denotes a "list" and "leaf-list".
Parentheses enclose choice and case nodes, and case nodes are also marked with a colon (":").
Ellipsis ("...") stands for contents of subtrees that are not shown.

YANG Tree of I2NSF Registration Interface
The I2NSF registration interface is used by the Developer's Management System (DMS) to register NSFs and their capabilities with the Security Controller. In case that the Security Controller fails to find any NSF among the registered NSFs which can provide some required capabilities, Security Controller uses the registration interface to query DMS about NSF(s) having the required capabilities.
The following sections describe the YANG data models to support these operations.

NSF Capability Registration
This section describe the YANG tree for the NSF capability registration.

YANG Tree of NSF Capability Registration Module

  NSF Capability Registration
  augment /i2nsfcap:nsf:
    +--rw nsf-specification
    |  +--rw processing
    |  |  +--rw processing-average?   uint16
    |  |  +--rw processing-peak?      uint16
    |  +--rw bandwidth
    |     +--rw outbound
    |     |  +--rw outbound-average?   uint32
    |     |  +--rw outbound-peak?      uint32
    |     +--rw inbound
    |        +--rw inbound-average?   uint32
    |        +--rw inbound-peak?      uint32
    +--rw nsf-access-info
       +--rw ip?                    inet:ip-address-no-zone
       +--rw port?                  inet:port-number
       +--rw management-protocol?   enumeration

When registering an NSF with Security Controller, DMS uses the augmented I2NSF Capability YANG Data Model [I-D.ietf-i2nsf-capability-data-model] to describe what capabilities the NSF can offer. DMS includes the access information of the NSF which is required to make a network connection with the NSF as well as the specification of the NSFs. The NSF access information consists of ip, port, and management-protocol. The field of ip can have either an IPv4 address or an IPv6 address. The port field is used to get the transport protocol port number. As I2NSF uses a YANG data model, the management protocol can be either NETCONF or RESTCONF.
The DMS can also include the resource capacity information in terms of processing power and network bandwidth of the NSF. Detailed overview of NSF specification can be seen in Section 4.1.1.1.

NSF Capability Query
This section describe the YANG tree for the NSF capability query.

YANG Tree of NSF Capability Query Module

  I2NSF Capability Query
  rpcs:
    +---x nsf-capability-query
       +---w input
       |  +---w query-nsf-capability
       |     +---w directional-capabilities*           identityref
       |     +---w event-capabilities
       |     |  +---w system-event-capability*   identityref
       |     |  +---w system-alarm-capability*   identityref
       |     +---w condition-capabilities
       |     |  +---w generic-nsf-capabilities
       |     |  |  +---w ethernet-capability*   identityref
       |     |  |  +---w ipv4-capability*       identityref
       |     |  |  +---w ipv6-capability*       identityref
       |     |  |  +---w icmpv4-capability*     identityref
       |     |  |  +---w icmpv6-capability*     identityref
       |     |  |  +---w tcp-capability*        identityref
       |     |  |  +---w udp-capability*        identityref
       |     |  |  +---w sctp-capability*       identityref
       |     |  |  +---w dccp-capability*       identityref
       |     |  +---w advanced-nsf-capabilities
       |     |  |  +---w anti-ddos-capability*             identityref
       |     |  |  +---w ips-capability*                   identityref
       |     |  |  +---w anti-virus-capability*            identityref
       |     |  |  +---w url-filtering-capability*         identityref
       |     |  |  +---w voip-vocn-filtering-capability*   identityref
       |     |  +---w context-capabilities
       |     |     +---w time-capabilities*                 identityref
       |     |     +---w application-filter-capabilities*   identityref
       |     |     +---w device-type-capabilities*          identityref
       |     |     +---w user-condition-capabilities*       identityref
       |     |     +---w geographic-capabilities*           identityref
       |     +---w action-capabilities
       |     |  +---w ingress-action-capability*   identityref
       |     |  +---w egress-action-capability*    identityref
       |     |  +---w log-action-capability*       identityref
       |     +---w resolution-strategy-capabilities*   identityref
       |     +---w default-action-capabilities*        identityref
       +--ro output
          +--ro nsf-access-info
             +--ro nsf-name?              string
             +--ro ip?                    inet:ip-address-no-zone
             +--ro port?                  inet:port-number
             +--ro management-protocol?   enumeration

Security Controller MAY require some additional capabilities to provide the security service requested by an I2NSF user, but none of the registered NSFs has the required capabilities. In this case, Security Controller makes a description of the required capabilities using this module and then queries DMS about which NSF(s) can provide these capabilities. Use NETCONF RPCs to send a NSF capability query. Input data is query-i2nsf-capability-info and output data is nsf-access-info. In Figure 6, the ietf-i2nsf-capability refers to the module defined in [I-D.ietf-i2nsf-capability-data-model].

YANG Data Module
This section provides a YANG module of the data model for the registration interface between Security Controller and Developer's Management System, as defined in Section 4.
This YANG module imports from [RFC6991] and [I-D.ietf-i2nsf-capability-data-model]. It makes references to [RFC6241] [RFC8040]

Registration Interface YANG Data Model

<CODE BEGINS> file "ietf-i2nsf-registration-interface@2022-09-08.yang"
module ietf-i2nsf-registration-interface {
  yang-version 1.1;

  namespace
    "urn:ietf:params:xml:ns:yang:ietf-i2nsf-registration-interface";

  prefix
    i2nsfri;

  //RFC Ed.: replace occurences of XXXX with actual RFC number and
  //remove this note

  import ietf-inet-types {
    prefix inet;
    reference "RFC 6991";
  }
  import ietf-i2nsf-capability {
    prefix i2nsfcap;
  // RFC Ed.: replace YYYY with actual RFC number of
  // draft-ietf-i2nsf-capability-data-model and remove this note.
    reference "RFC YYYY: I2NSF Capability YANG Data Model";
  }

  organization
   "IETF I2NSF (Interface to Network Security Functions)
    Working Group";

  contact
    "WG Web: <https://datatracker.ietf.org/wg/i2nsf>
     WG List: <mailto:i2nsf@ietf.org>

     Editor: Sangwon Hyun
     <mailto:shyun@mju.ac.kr>

     Editor: Jaehoon Paul Jeong
     <mailto:pauljeong@skku.edu>";

  description
    "This module defines a YANG data model for I2NSF
     Registration Interface.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this
     document are to be interpreted as described in BCP 14
     (RFC 2119) (RFC 8174) when, and only when, they appear
     in all capitals, as shown here.

     Copyright (c) 2022 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 Revised BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

  revision "2022-09-08" {
    description "Initial revision";
    reference
      "RFC XXXX: I2NSF Registration Interface YANG Data Model";
    // RFC Ed.: replace XXXX with actual RFC number and remove
    // this note
  }

  grouping nsf-specification {
    description
      "Description of the specification of an NSF";

    container processing {
      description
        "Processing power of an NSF in the unit of GHz (gigahertz)";

      leaf processing-average {
        type uint16;
        units "GHz";
        description
          "Average processing power";
      }
      leaf processing-peak {
        type uint16;
        units "GHz";
        description
          "Peak processing power";
      }
    }

    container bandwidth {
      description
        "Network bandwidth available on an NSF
         in the unit of Mbps (megabits per second)";

      container outbound {
        description
          "Outbound network bandwidth";
        leaf outbound-average {
          type uint32;
          units "Mbps";
          description
            "Average outbound bandwidth";
        }
        leaf outbound-peak {
          type uint32;
          units "Mbps";
          description
            "Peak outbound bandwidth";
        }
      }

      container inbound {
        description
          "Inbound network bandwidth";
        leaf inbound-average {
          type uint32;
          units "Mbps";
          description
            "Average inbound bandwidth";
        }
        leaf inbound-peak {
          type uint32;
          units "Mbps";
          description
            "Peak inbound bandwidth";
        }
      }
    }
  }

  grouping nsf-access-info {
    description
      "Information required to access an NSF";
    leaf ip {
      type inet:ip-address-no-zone;
      description
        "Either an IPv4 address or an IPv6 address of this NSF";
    }
    leaf port {
      type inet:port-number;
      description
        "Port available on this NSF";
    }
    leaf management-protocol {
      type enumeration {
        enum NETCONF {
          description
            "Represents the management protocol NETCONF";
          reference
            "RFC 6241: Network Configuration Protocol (NETCONF)";
        }
        enum RESTCONF {
          description
            "Represents the management protocol RESTCONF";
          reference
            "RFC 8040: RESTCONF Protocol";
        }
      }
      description
        "The management protocol used to manage the NSF";
    }
  }

  augment "/i2nsfcap:nsf" {
    description
      "Augmented information of an NSF's capability that DMS
       registers with Security Controller";
    reference
      "draft-ietf-i2nsf-capability-data-model-32: I2NSF Capability
       YANG Data Model";
    container nsf-specification {
      description
        "The specification of an NSF";
      uses nsf-specification;
    }
    container nsf-access-info {
      description
        "Network access information of this NSF";
      uses nsf-access-info;
    }
  }

  rpc nsf-capability-query {
    description
      "Description of the capabilities that the
       Security Controller requests to the DMS";
    input {
      container query-nsf-capability {
        description
          "Description of the capabilities to request";
        uses i2nsfcap:nsf-capabilities;
        reference "RFC YYYY: I2NSF Capability YANG Data Model";
      //RFC Ed.: replace YYYY with actual RFC number of
      //draft-ietf-i2nsf-capability-data-model and remove this note.
      }
    }
    output {
      container nsf-access-info {
        description
          "Network access information of an NSF
           with the requested capabilities";
        leaf nsf-name {
          type string;
          description
          "The name of this registered NSF. The NSF name MUST be
           unique to identify the NSF with the capability. The name
           can be an arbitrary string including FQDN (Fully Qualified
           Domain Name).";
        }
        uses nsf-access-info;
      }
    }
  }
}
<CODE ENDS>

IANA Considerations
This document requests IANA to register the following URI in the "IETF XML Registry" [RFC3688]:

URI: urn:ietf:params:xml:ns:yang:ietf-i2nsf-registration-interface
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.

This document requests IANA to register the following YANG module in the "YANG Module Names" registry [RFC7950][RFC8525]:

Name: ietf-i2nsf-registration-interface
Namespace: urn:ietf:params:xml:ns:yang:ietf-i2nsf-registration-interface
Prefix: i2nsfri
Reference: RFC XXXX

// RFC Ed.: replace XXXX with actual RFC number and remove
// this note

Security Considerations
The YANG module specified in this document defines a data schema designed to be accessed through network management protocols such as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport layer, and the required secure transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the required secure transport is TLS [RFC8446].
The NETCONF access control model [RFC8341] provides a means of restricting access to specific NETCONF or RESTCONF users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.
There are a number of data nodes defined in this YANG module that 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. These are the subtrees and data nodes and their sensitivity/vulnerability:
- nsf-registration: The attacker MAY exploit this to register a compromised or malicious NSF instead of a legitimate NSF with the Security Controller.
- nsf-specification: The attacker MAY provide incorrect information of the specification of any target NSF by illegally modifying this.
- nsf-capability-info: The attacker MAY provide incorrect information of the security capability of any target NSF by illegally modifying this.
- nsf-access-info: The attacker MAY provide incorrect network access information of any target NSF by illegally modifying this.
Some of the readable data nodes in this YANG module MAY be considered sensitive or vulnerable in some network environments. It is thus important to control read access (e.g., via get, get-config, or notification) to these data nodes. These are the subtrees and data nodes and their sensitivity/vulnerability:
- nsf-registration: The attacker MAY try to gather some sensitive information of a registered NSF by sniffing this.
- nsf-specification: The attacker MAY gather the specification information of any target NSF and misuse the information for subsequent attacks.
- nsf-capability-info: The attacker MAY gather the security capability information of any target NSF and misuse the information for subsequent attacks.
- nsf-access-info: The attacker MAY gather the network access information of any target NSF and misuse the information for subsequent attacks.
The RPC operation in this YANG module MAY be considered sensitive or vulnerable in some network environments. It is thus important to control access to this operation. The following is the operation and its sensitivity/vulnerability:
- nsf-capability-query: The attacker MAY exploit this RPC operation to deteriorate the availability of the DMS and/or gather the information of some interested NSFs from the DMS.

Normative References

Informative References
[nfv-framework]

Network Functions Virtualisation (NFV); Architectureal Framework
ETSI NFV ISG
October 2013
ETSI GS NFV 002 ETSI GS NFV 002 V1.1.1
[RFC8329]
[I-D.ietf-i2nsf-capability-data-model]
[RFC7950]
[RFC2119]
[RFC8174]
[RFC3444]
[RFC8407]
[RFC6991]
[RFC8342]
[RFC8340]
[I-D.ietf-i2nsf-nsf-monitoring-data-model]
[RFC6241]
[RFC8040]
[RFC8431]
[RFC3688]
[RFC8525]
[RFC6242]
[RFC8446]
[RFC8341]
[RFC5737]
[RFC3849]

XML Examples of an NSF Registration with I2NSF Registration Interface Data Model
This section shows XML examples of the I2NSF Registration Interface data model for registering the capabilities in either IPv4 networks [RFC5737] or IPv6 networks [RFC3849] with Security Controller.

Configuration XML for Registration of a General Firewall in an IPv4 Network

<nsf
  xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-capability"
  xmlns:i2nsfri="urn:ietf:params:xml:ns:yang
                 :ietf-i2nsf-registration-interface">
  <nsf-name>ipv4_general_firewall</nsf-name>
  <condition-capabilities>
    <generic-nsf-capabilities>
      <ipv4-capability>next-header</ipv4-capability>
      <ipv4-capability>source-address</ipv4-capability>
      <ipv4-capability>destination-address</ipv4-capability>
      <tcp-capability>source-port-number</tcp-capability>
      <tcp-capability>destination-port-number</tcp-capability>
    </generic-nsf-capabilities>
  </condition-capabilities>
  <action-capabilities>
    <ingress-action-capability>pass</ingress-action-capability>
    <ingress-action-capability>drop</ingress-action-capability>
    <ingress-action-capability>mirror</ingress-action-capability>
    <egress-action-capability>pass</egress-action-capability>
    <egress-action-capability>drop</egress-action-capability>
    <egress-action-capability>mirror</egress-action-capability>
  </action-capabilities>
  <i2nsfri:nsf-specification>
    <i2nsfri:processing>
      <i2nsfri:processing-average>1000</i2nsfri:processing-average>
      <i2nsfri:processing-peak>5000</i2nsfri:processing-peak>
    </i2nsfri:processing>
    <i2nsfri:bandwidth>
      <i2nsfri:outbound>
        <i2nsfri:outbound-average>1000</i2nsfri:outbound-average>
        <i2nsfri:outbound-peak>5000</i2nsfri:outbound-peak>
      </i2nsfri:outbound>
      <i2nsfri:inbound>
        <i2nsfri:inbound-average>1000</i2nsfri:inbound-average>
        <i2nsfri:inbound-peak>5000</i2nsfri:inbound-peak>
      </i2nsfri:inbound>
    </i2nsfri:bandwidth>
  </i2nsfri:nsf-specification>
  <i2nsfri:nsf-access-info>
    <i2nsfri:ip>192.0.2.11</i2nsfri:ip>
    <i2nsfri:port>49152</i2nsfri:port>
    <i2nsfri:management-protocol>
      i2nsfri:NETCONF
    </i2nsfri:management-protocol>
  </i2nsfri:nsf-access-info>
</nsf>

Figure 8 shows the configuration XML for registering a general firewall in an IPv4 network [RFC5737] and its capabilities as follows.
1. The instance name of the NSF is ipv4_general_firewall.
2. The NSF can inspect IPv4 protocol header field, source address(es), and destination address(es).
3. The NSF can inspect the port number(s) for the transport layer protocol, i.e., TCP.
4. The NSF can determine whether the packets are allowed to pass, drop, or mirror.
5. The NSF can have processing power and bandwidth.
6. The IPv4 address of the NSF is 192.0.2.11.
7. The port of the NSF is 49152.

Configuration XML for Registration of a General Firewall in an IPv6 Network

<nsf
  xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-capability"
  xmlns:i2nsfri="urn:ietf:params:xml:ns:yang
                 :ietf-i2nsf-registration-interface">
  <nsf-name>ipv6_general_firewall</nsf-name>
  <condition-capabilities>
    <generic-nsf-capabilities>
      <ipv6-capability>next-header</ipv6-capability>
      <ipv6-capability>source-address</ipv6-capability>
      <ipv6-capability>destination-address</ipv6-capability>
      <tcp-capability>source-port-number</tcp-capability>
      <tcp-capability>destination-port-number</tcp-capability>
    </generic-nsf-capabilities>
  </condition-capabilities>
  <action-capabilities>
    <ingress-action-capability>pass</ingress-action-capability>
    <ingress-action-capability>drop</ingress-action-capability>
    <ingress-action-capability>mirror</ingress-action-capability>
    <egress-action-capability>pass</egress-action-capability>
    <egress-action-capability>drop</egress-action-capability>
    <egress-action-capability>mirror</egress-action-capability>
  </action-capabilities>
  <i2nsfri:nsf-specification>
    <i2nsfri:processing>
      <i2nsfri:processing-average>1000</i2nsfri:processing-average>
      <i2nsfri:processing-peak>5000</i2nsfri:processing-peak>
    </i2nsfri:processing>
    <i2nsfri:bandwidth>
      <i2nsfri:outbound>
        <i2nsfri:outbound-average>1000</i2nsfri:outbound-average>
        <i2nsfri:outbound-peak>5000</i2nsfri:outbound-peak>
      </i2nsfri:outbound>
      <i2nsfri:inbound>
        <i2nsfri:inbound-average>1000</i2nsfri:inbound-average>
        <i2nsfri:inbound-peak>5000</i2nsfri:inbound-peak>
      </i2nsfri:inbound>
    </i2nsfri:bandwidth>
  </i2nsfri:nsf-specification>
  <i2nsfri:nsf-access-info>
    <i2nsfri:ip>2001:db8:0:1::11</i2nsfri:ip>
    <i2nsfri:port>49152</i2nsfri:port>
    <i2nsfri:management-protocol>
      i2nsfri:NETCONF
    </i2nsfri:management-protocol>
  </i2nsfri:nsf-access-info>
</nsf>

In addition, Figure 9 shows the configuration XML for registering a general firewall in an IPv6 network [RFC3849] and its capabilities as follows.
1. The instance name of the NSF is ipv6_general_firewall.
2. The NSF can inspect IPv6 next header, flow direction, source address(es), and destination address(es)
3. The NSF can inspect the port number(s) and flow direction for the transport layer protocol, i.e., TCP and UDP.
4. The NSF can determine whether the packets are allowed to pass, drop, or mirror.
5. The NSF can have processing power and bandwidth.
6. The IPv6 address of the NSF is 2001:db8:0:1::11.
7. The port of the NSF is 49152.

XML Examples of an NSF Query with I2NSF Registration Interface Data Model
This section shows an XML example of the Security Controller requesting an additional NSF with a certain capability. In this example, an I2NSF user requests a security service that is able to block the specified websites. When the Security Controller checks that no registered NSF can provide such a service, it makes a query to the DMS with the following XML:

XML for NSF Query of a Web Filter

<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <rock-the-house
  xmlns="urn:ietf:params:xml:ns:yang:ietf-i2nsf-registration-interface">
    <nsf-capability-query>
      <query-nsf-capability>
        <condition-capabilities>
          <advanced-nsf-capabilities>
            <url-filtering-capability>
              user-defined
            </url-filtering-capability>
          </advanced-nsf-capabilities>
        </condition-capabilities>
        <action-capabilities>
          <ingress-action-capability>drop</ingress-action-capability>
          <egress-action-capability>drop</egress-action-capability>
        </action-capabilities>
      </query-nsf-capability>
    </nsf-capability-query>
  </rock-the-house>
</rpc>

Figure 10 shows the XML for requesting an unregistered web filter with its capabilities as follows.
1. The NSF can inspect a URL matched from a user-defined URL where the user can specify their own URL.
2. The NSF can control the network by dropping the packets that match the condition. It can drop packets that are entering or leaving the target network.
After receiving a query given in Figure 10, the DMS can reply with following XML:

XML for the Reply of NSF Query of a Web Filter

<rpc-reply message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <nsf-access-info>
    <nsf-name>web_filter</nsf-name>
    <ip>192.0.2.13</ip>
    <port>49152</port>
    <management-protocol>NETCONF</management-protocol>
  </nsf-access-info>
</rpc-reply>

In the reply shown in Figure 11, the additional NSF called web_filter can be used by accessing the NSF with the IPv4 address of 192.0.2.13 and the port number of 49152, using the NETCONF management protocol.

NSF Lifecycle Management in NFV Environments
Network Functions Virtualization (NFV) can be used to implement I2NSF framework. In NFV environments, NSFs are deployed as virtual network functions (VNFs). Security Controller can be implemented as an Element Management (EM) of the NFV architecture, and is connected with the VNF Manager (VNFM) via the Ve-Vnfm interface [nfv-framework]. Security Controller can use this interface for the purpose of the lifecycle management of NSFs. If some NSFs need to be instantiated to enforce security policies in the I2NSF framework, Security Controller could request the VNFM to instantiate them through the Ve-Vnfm interface. Or if an NSF, running as a VNF, is not used by any traffic flows for a time period, Security Controller MAY request deinstantiating it through the interface for efficient resource utilization.

Acknowledgments
This document is a product by the I2NSF Working Group (WG) including WG Chairs (i.e., Linda Dunbar and Yoav Nir) and Diego Lopez. This document took advantage of the review and comments from the following people: Roman Danyliw, Reshad Rahman (YANG doctor), and Tom Petch. We authors sincerely appreciate their sincere efforts and kind help.
This work was supported by Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea MSIT (Ministry of Science and ICT) (No. 2016-0-00078, Cloud Based Security Intelligence Technology Development for the Customized Security Service Provisioning). This work was supported in part by the IITP (2020-0-00395-003, Standard Development of Blockchain based Network Management Automation Technology).

Contributors
The following are co-authors of this document:
Patrick Lingga -
Department of Electrical and Computer Engineering,
Sungkyunkwan University,
2066 Seo-ro Jangan-gu,
Suwon, Gyeonggi-do 16419,
Republic of Korea.
EMail: patricklink@skku.edu
Jinyong (Tim) Kim -
Department of Electronic, Electrical and Computer Engineering,
Sungkyunkwan University,
2066 Seo-ro Jangan-gu,
Suwon, Gyeonggi-do 16419,
Republic of Korea.
EMail: timkim@skku.edu
Chaehong Chung -
Department of Electronic, Electrical and Computer Engineering,
Sungkyunkwan University,
2066 Seo-ro Jangan-gu,
Suwon, Gyeonggi-do 16419,
Republic of Korea.
EMail: darkhong@skku.edu
Susan Hares -
Huawei,
7453 Hickory Hill,
Saline, MI 48176,
USA.
EMail: shares@ndzh.com
Diego R. Lopez -
Telefonica I+D,
Jose Manuel Lara, 9,
Seville, 41013,
Spain.
EMail: diego.r.lopez@telefonica.com

Changes from draft-ietf-i2nsf-registration-interface-dm-20
The following changes are made from draft-ietf-i2nsf-registration-interface-dm-20:
- The updates are made following Qin Wu's comments. The important updates are as follows:
  1. This version clarifies the third objective (i.e., an query to an NSF for a given security capability) discussed in Section 3.
  2. This version provides a new XML example for requesting additional NSF via the I2NSF Registration Interface, that is, an query to an NSF for a given security capability in Appendix B.
  3. This version updates the information model and data model for NSF registration by using the "augment" statement instead of reusing the "grouping" from the [I-D.ietf-i2nsf-capability-data-model].