I2NSF Working Group                                             J. Jeong
Internet-Draft                                                    E. Kim
Intended status: Standards Track                 Sungkyunkwan University
Expires: May 8, September 12, 2019                                       T. Ahn
                                                           Korea Telecom
                                                                R. Kumar
                                                        Juniper Networks
                                                                S. Hares
                                                                  Huawei
                                                        November 4, 2018
                                                          March 11, 2019

            I2NSF Consumer-Facing Interface YANG Data Model
            draft-ietf-i2nsf-consumer-facing-interface-dm-02
            draft-ietf-i2nsf-consumer-facing-interface-dm-03

Abstract

   This document describes an information model and a YANG data model
   for the Consumer-Facing Interface between an Interface to Network
   Security Functions (I2NSF) User and Security Controller in an I2NSF
   system in a Network Functions Virtualization (NFV) environment.  The
   information model defines various managed objects and relationship
   among these objects needed to build the interface.  The information
   model is organized based on the "Event-condition-Event" (ECA) policy
   model defined by a capability information model for Interface to
   Network Security Functions (I2NSF)[draft-ietf-i2nsf-capability], and
   the data model is
   required defined for enabling different users of a given
   I2NSF system to define, manage, and monitor security policies for
   specific flows within an administrative domain.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://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 May 8, September 12, 2019.

Copyright Notice

   Copyright (c) 2018 2019 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
   (https://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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2   3
   2.  Requirements Language . . . . . . . . . . . . . . . . . . . .   3   5
   3.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3   5
   4.  Data Modeling for Security Policies  Information Model for Consumer-Facing
       Interface Policy  . . . . . . . . . . . . . . . .   5
     4.1.  Event Sub-Model . . . . . . . . . .   3
     4.1.  YANG Data Model for Security Policies for Consumer-Facing
           Interface . . . . . . . . . . .   6
     4.2.  Condition Sub-Model . . . . . . . . . . . . .   8
   5.  Use Case: Policy Instance Example for VoIP/VoLTE Security
       Services . . . . . .   7
     4.3.  Action Sub-Model  . . . . . . . . . . . . . . . . . . . .  33
     5.1.  Policy Instance YANG Example   9
   5.  Information Model for VoIP/VoLTE Security
           Services  . . . . Multi-Tenancy . . . . . . . . . . . . .   9
     5.1.  Policy-Domain . . . . . . .  35
   6.  Example XML Output for Various Use Cases . . . . . . . . . .  45
     6.1.  Case 1: VoIP Security Service . . . . .  10
     5.2.  Policy-Tenant . . . . . . . . .  45
     6.2.  Case 2: DDoS-Attack Mitigation . . . . . . . . . . . . .  47
     6.3.  Case 3: Time-Based Firewall  11
     5.3.  Policy-Role . . . . . . . . . . . . . . .  48
     6.4.  Case 4: Time-Based Web-Filter . . . . . . . .  12
     5.4.  Policy-User . . . . . .  49
     6.5.  Case 5: Threat-Feed Configuration . . . . . . . . . . . .  50
   7.  Security Considerations . . . . .  12
     5.5.  Policy Management Authentication Method . . . . . . . . .  13
   6.  Information Model for Policy Endpoint Groups  . . . . .  51
   8.  References . . .  14
     6.1.  User Group  . . . . . . . . . . . . . . . . . . . . . .  51
     8.1.  Normative References .  15
     6.2.  Device-Group  . . . . . . . . . . . . . . . . .  51
     8.2.  Informative References . . . . .  16
     6.3.  Location-Group  . . . . . . . . . . . .  52
   Appendix A.  Changes from draft-ietf-i2nsf-consumer-facing-
                interface-dm-01 . . . . . . . . .  16
   7.  Information Model for Threat Prevention . . . . . . . . .  53
   Appendix B.  Acknowledgments . .  17
     7.1.  Threat-Feed . . . . . . . . . . . . . . . .  53
   Appendix C.  Contributors . . . . . . .  18
     7.2.  Payload-content . . . . . . . . . . . . .  53
   Authors' Addresses . . . . . . . .  19
   8.  Role-Based Acess Control (RBAC) . . . . . . . . . . . . . . .  53

1.  Introduction

   This document provides a  19
   9.  YANG [RFC6020] data model that defines the
   required data Data Model for the Consumer-Facing Interface between an Interface
   to Network Security Functions (I2NSF) User and Security Controller in
   an I2NSF system [i2nsf-framework] in a Network Functions
   Virtualization (NFV) environment.  The data model is required for
   enabling different users of a given I2NSF system to define, manage
   and monitor security policies Policies for specific flows within an
   administrative domain.  This document defines a YANG data model based
   on the information model of I2NSF Consumer-Facing
       Interface
   [client-facing-inf-im].

   Data models are defined at a lower level of abstraction and provide
   many details.  They provide details about the implementation . . . . . . . . . . . . . . . . . . . . . . . . . .  20
   10. Example XML Output for Various Scenarios  . . . . . . . . . .  37
     10.1.  DB registration: Information of a
   protocol's specification, e.g., rules that explain how to map managed
   objects onto lower-level protocol constructs.  Since conceptual
   models can be implemented in different ways, multiple data models can
   be derived by a single information model.

   The efficient positions and flexible provisioning of network functions by NFV
   leads devices
            (Endpoint group) . . . . . . . . . . . . . . . . . . . .  38
     10.2.  Scenario 1: Block SNS access during business hours . . .  38
     10.3.  Scenario 2: Block malicious VoIP/VoLTE packets coming to a rapid advance in the network industry.  As practical
   applications, network security functions (NSFs), such as firewall,
   intrusion detection system (IDS)/intrusion protection system (IPS),
   and attack mitigation, can also be provided as virtual network
   functions (VNF) in the NFV system.  By
            the efficient virtual
   technology, these VNFs might be automatically provisioned company  . . . . . . . . . . . . . . . . . . . . . .  40
     10.4.  Scenario 3: Mitigate HTTP and
   dynamically migrated based HTTPS flood attacks on real-time security requirements.  This
   document presents a YANG data model to implement security functions
   based on NFV.

2.  Requirements Language

   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 RFC 2119 [RFC3444].

3.  Terminology

   This document uses the terminology described in
   [i2nsf-terminology][client-facing-inf-im][client-facing-inf-req].

4.  Data Modeling for Security Policies for Consumer-Facing Interface

   The main objective of this data model is to fully transform the
   information model [client-facing-inf-im] into a YANG data model that
   can be used for delivering control and management messages via the
   Consumer-Facing Interface between an I2NSF User and Security
   Controller for the I2NSF User's high-level security policies.

   The semantics of the data model must be aligned with the information
   model of the Consumer-Facing Interface.  The transformation of the
   information model was performed so that this YANG data model can
   facilitate the efficient delivery of the control or management
   messages.

   This data model is designed to support the I2NSF framework that can
   be extended according to the security needs.  In other words, the
   model design is independent of the content and meaning of specific
   policies as well as the implementation approach.  This document
   suggests a VoIP/VoLTE security service as a use case for policy rule
   generation.

   Multi-tenancy in this document enables multiple administrative
   domains in order to manage application resources.  An Enterprise
   organization may have multiple tenants or departments such as human
   resources (HR), finance, and legal departments.  Thus, we need an
   object which defines a set of permissions assigned to a user in an
   organization that wants to manage its own
            company web Server . . . . . . . . . . . . . . . . . . .  41

   11. Security Policies.  You can
   think of it as a way to assign policy users to a job function or a
   set of permissions within the organization.  The policy-role object
   SHALL have Name, Date and access-profile to grant or deny permissions
   for the perpose of security policy management.

module: policy-general
    +--rw policy
    |  +--rw rule* [rule-id]
    |     +--rw rule-id                      uint16
    |     +--rw name?                        string
    |     +--rw date?                        yang:date-and-time
    |     +--rw case?                        string
    |     +--rw event* [event-id]
    |     |  +--rw event-id                  string
    |     |  +--rw name?                     string
    |     |  +--rw date?                     yang:date-and-time
    |     |  +--rw event-type?               string
    |     |  +--rw time-information?         string
    |     |  +--rw event-map-group?    -> /threat-feed/event-map-group
    |     |                               /event-map-group-id
    |     |  +--rw enable?                   boolean
    |     +--rw condition* [condition-id]
    |     |  +--rw condition-id              string
    |     |  +--rw source?                   string
    |     |  +--rw destination?              string
    |     |  +--rw match?                    boolean
    |     |  +--rw match-direction?          string
    |     |  +--rw exception?                string
    |     +--rw policy-action* [policy-action-id]
    |        +--rw policy-action-id          string
    |        +--rw name?                     string
    |        +--rw date?                     yang:date-and-time
    |        +--rw primary-action?           string
    |        +--rw secondary-action?         string
    |        +--rw owner?                    string
    +--rw multi-tenancy
    |  +--rw policy-domain* [policy-domain-id]
    |  |  +--rw policy-domain-id             uint16
    |  |  +--rw name                         string
    |  |  +--rw address?                     string
    |  |  +--rw contact                      string
    |  |  +--rw date                         yang:date-and-time
    |  |  +--rw policy-tenant* [policy-tenant-id]
    |  |  |  +--rw policy-tenant-id          uint16
    |  |  |  +--rw name                      string
    |  |  |  +--rw date                      yang:date-and-time
    |  |  |  +--rw domain?               ->  /multi-tenancy
    |  |  |                                  /policy-domain
    |  |  |                                  /policy-domain-id
    |  |  +--rw authentication-method?   ->  /multi-tenancy
    |  |                                     /policy-mgnt-auth-method
    |  |                                     /policy-mgnt-auth-method-id
    |  +--rw policy-role* [policy-role-id]
    |  |  +--rw policy-role-id               uint16
    |  |  +--rw name                         string
    |  |  +--rw date                         yang:date-and-time
    |  |  +--rw access-profile               string
    |  +--rw policy-user* [policy-user-id]
    |  |  +--rw policy-user-id               uint16
    |  |  +--rw name                         string
    |  |  +--rw date                         yang:date-and-time
    |  |  +--rw password                     string
    |  |  +--rw email                        string
    |  |  +--rw scope-type?                  string
    |  |  +--rw scope-reference?             string
    |  |  +--rw role                         string
    |  +--rw policy-mgnt-auth-method* [policy-mgnt-auth-method-id]
    |     +--rw policy-mgnt-auth-method-id   uint16
    |     +--rw name                         string
    |     +--rw date                         yang:date-and-time
    |     +--rw authentication-method        enumeration
    |     +--rw mutual-authentication        boolean
    |     +--rw token-server                 inet:ipv4-address
    |     +--rw certificate-server           inet:ipv4-address
    |     +--rw single-sing-on-server        inet:ipv4-address
    +--rw endpoint-group
    |  +--rw meta-data-source* [meta-data-source-id]
    |  |  +--rw meta-data-source-id          uint16
    |  |  +--rw name                         string
    |  |  +--rw date                         yang:date-and-time
    |  |  +--rw tag-type?                    boolean
    |  |  +--rw tag-server-information?      inet:ipv4-address
    |  |  +--rw tag-application-protocol?    string
    |  |  +--rw tag-server-credential?       string
    |  +--rw user-group* [user-group-id]
    |  |  +--rw user-group-id                uint16
    |  |  +--rw name?                        string
    |  |  +--rw date?                        yang:date-and-time
    |  |  +--rw group-type?                  enumeration
    |  |  +--rw meta-data-server?            inet:ipv4-address
    |  |  +--rw group-member?                string
    |  |  +--rw risk-level?                  uint16
    |  +--rw device-group* [device-group-id]
    |  |  +--rw device-group-id              uint16
    |  |  +--rw name?                        string
    |  |  +--rw date?                        yang:date-and-time
    |  |  +--rw group-type?                  enumeration
    |  |  +--rw meta-data-server?            inet:ipv4-address
    |  |  +--rw group-member?                string
    |  |  +--rw risk-level?                  uint16
    |  +--rw application-group* [application-group-id]
    |  |  +--rw application-group-id         uint16
    |  |  +--rw name?                        string
    |  |  +--rw date?                        yang:date-and-time
    |  |  +--rw group-type?                  enumeration
    |  |  +--rw meta-data-server?            inet:ipv4-address
    |  |  +--rw group-member?                string
    |  |  +--rw risk-level?                  uint16
    |  +--rw location-group* [location-group-id]
    |     +--rw location-group-id            uint16
    |     +--rw name?                        string
    |     +--rw date?                        yang:date-and-time
    |     +--rw group-type?                  enumeration
    |     +--rw meta-data-server?            inet:ipv4-address
    |     +--rw group-member?                string
    |     +--rw risk-level?                  uint16
    +--rw threat-feed
    |  +--rw threat-feed* [threat-feed-id]
    |  |  +--rw threat-feed-id               uint16
    |  |  +--rw name?                        string
    |  |  +--rw date?                        yang:date-and-time
    |  |  +--rw feed-type                    enumeration
    |  |  +--rw feed-server?                 inet:ipv4-address
    |  |  +--rw feed-priority?               uint16
    |  +--rw custom-list* [custom-list-id]
    |  |  +--rw custom-list-id               uint16
    |  |  +--rw name?                        string
    |  |  +--rw date?                        yang:date-and-time
    |  |  +--rw list-type                    enumeration Considerations . . . . . . . . . . . . . . . . . . .  43
   12. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  43
   13. References  . . . . . . . . . . . . . . . . . . . . . . . . .  43
     13.1.  Normative References . . . . . . . . . . . . . . . . . .  43
     13.2.  Informative References . . . . . . . . . . . . . . . . .  43
   Appendix A.  Changes from draft-ietf-i2nsf-consumer-facing-
                interface-dm-02  . . . . . . . . . . . . . . . . . .  46
   Appendix B.  Acknowledgments  . . . . . . . . . . . . . . . . . .  46
   Appendix C.  Contributors . . . . . . . . . . . . . . . . . . . .  47
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  48

1.  Introduction

   In I2NSF framework, each vendor can register their NSFs using the
   Vendor Management System (VMS).  Assuming that vendors also provide
   the front-end web applications registered with the I2NSF provider,
   the Consumer-Facing Interface is required because the web
   applications developed by each vendor need to have a standard
   interface specifying the data types used when I2NSF user and security
   controller communicate using this interface.  Therefore, this
   document specifies the required information, their data types, and
   encoding schemes so that any data (security policy) transferred
   through the Consumer-Facing Interface can easily be translated by the
   security controller into low-level security policies.  The translated
   policies are delivered to Network Security Functions (NSFs) according
   to their respective security capabilities for securiy enforcement.

   The Consumer-Facing Interface would be built using a set of objects,
   with each object capturing a unique set of information from Security
   Admin (i.e., I2NSF User [RFC8329]) needed to express a Security
   Policy.  An object may have relationship with various other objects
   to express a complete set of requirement.  An information model
   captures the managed objects and relationship among these objects.
   The information model proposed in this document is structured in
   accordance with the "Event-Condition-Event" (ECA) policy model.

   An NSF Capability model is proposed in [draft-ietf-i2nsf-capability]
   as the basic model for both the NSF-Facing interface and Consumer-
   Facing Interface security policy model of this document.

   [RFC3444] explains differences between an information and data model.
   This document use the guidelines in [RFC3444] to define both the
   information and data model for Consumer-Facing Interface.  Figure 1
   shows a high-level abstraction of Consumer-Facing Interface.  A data
   model, which represents an implementation of the information model in
   a specific data representation language, is also defined in the later
   sections of this document (see section 10).

                       +-----------------+    +-----------------+
                       | Consumer-facing |  +--rw list-property                enumeration    | Consumer-facing |  +--rw list-content?                string
                       |  +--rw malware-scan-group* [malware-scan-group-id]    Interface    +--->+    Interface    |
                       |Information Model|    |  +--rw malware-scan-group-id        uint16    Data Model   |
                       +--------+--------+    +-----------------+
                                ^
                                |  +--rw name?                        string
                  +-------------+-------------+------------+
                  |             |  +--rw date?                        yang:date-and-time             |            |  +--rw signature-server?            inet:ipv4-address
             +----+----+  +-----+----+  +-----+----+  +----+----+
             |  Multi  |  +--rw file-types?                  string  |  Policy  |  +--rw malware-signatures?          string  |  +--rw event-map-group* [event-map-group-id] Endpoint |     +--rw event-map-group-id           uint16  |     +--rw name?                        string Threat  |     +--rw date?                        yang:date-and-time
             |     +--rw security-events?             string Tenancy |     +--rw threat-map?                  string
    +--rw telemetry-data
       +--rw telemetry-data* [telemetry-data-id]  |  +--rw telemetry-data-id            uint16          |  +--rw name?                        string  |  +--rw date?                        yang:date-and-time  groups  |  +--rw logs?                        boolean  |  +--rw syslogs?                     boolean  feed   |  +--rw snmp?                        boolean
             +---------+  +-----+----+  +----------+  +---------+
                                ^
                                |  +--rw sflow?                       boolean
                         +------+------+
                         |  +--rw netflow?                     boolean     Rule    |  +--rw interface-stats?             boolean
       +--rw telemetry-source* [telemetry-source-id]
                         +------+------+
                                ^
                                |  +--rw telemetry-source-id          uint16
               +----------------+----------------+
               |  +--rw name?                        string                |  +--rw date?                        yang:date-and-time                |  +--rw source-type?                 enumeration
        +------+------+  +------+------+  +------+------+
        |  +--rw nsf-source?                  inet:ipv4-address    Event    |  +--rw nsf-credentials?             string  |  +--rw collection-interval?         uint16  Condition  |  +--rw collection-method?           enumeration  |  +--rw heartbeat-interval?          uint16    Action   |  +--rw qos-marking?                 uint16
       +--rw telemetry-destination* [telemetry-destination-id]
          +--rw telemetry-destination-id     uint16
          +--rw name?                        string
          +--rw date?                        yang:date-and-time
          +--rw collector-source?            inet:ipv4-address
          +--rw collector-credentials?       string
          +--rw data-encoding?               string
          +--rw data-transport?              enumeration
        +-------------+  +-------------+  +-------------+

      Figure 1: Generic Data Model for Security Policies Diagram for cf High-level Abstraction of Consumer-Facing
                                 Interface

4.1.

   Data models are defined at a lower level of abstraction and provide
   many details.  They provide details about the implementation of a
   protocol's specification, e.g., rules that explain how to map managed
   objects onto lower-level protocol constructs.  Since conceptual
   models can be implemented in different ways, multiple data models can
   be derived by a single information model.

   The efficient and flexible provisioning of network functions by NFV
   leads to a rapid advance in the network industry.  As practical
   applications, network security functions (NSFs), such as firewall,
   intrusion detection system (IDS)/intrusion protection system (IPS),
   and attack mitigation, can also be provided as virtual network
   functions (VNF) in the NFV system.  By the efficient virtual
   technology, these VNFs might be automatically provisioned and
   dynamically migrated based on real-time security requirements.  This
   document presents a YANG data model to implement security functions
   based on NFV.

2.  Requirements Language

   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 RFC 2119 [RFC3444]
   RFC8174 [RFC8174].

3.  Terminology

   This document uses the terminology described in
   [i2nsf-terminology][client-facing-inf-im][client-facing-inf-req].

   This document follows the guidelines of [RFC6087], uses the common
   YANG Data types defined in [RFC6991], and adopts the Network Management
   Datastore Architecture (NMDA).  The meaning of the symbols in tree
   diagrams is defined in [RFC8340].

4.  Information Model for Policy

   A Policy object represents a mechanism to express a Security Policies for Policy
   by Security Admin (i.e., I2NSF User) using Consumer-Facing Interface

   This section describes a YANG data model for Consumer-Facing
   Interface, based
   toward Security Controller; the policy would be enforced on an NSF.
   Figure 2 shows the information model XML instance of Consumer-Facing
   Interface to security controller [client-facing-inf-im].

<CODE BEGINS> file "policy-general.yang"
module ietf-policy-general {
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-policy-general";
  prefix
    cf-interface;

  import ietf-yang-types{
    prefix yang;
  }

  import ietf-inet-types{
    prefix inet;
  }

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

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

     WG Chair: Adrian Farrel
     <mailto:Adrain@olddog.co.uk>

     WG Chair: Linda Dunbar
     <mailto:Linda.duhbar@huawei.com>

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

  description
    "This module defines the Policy object.  The Policy
   object SHALL have following information:

      Name:  This field identifies the name of this object.

      Date:  Date when this object was created or last modified.

      Rules: This field contains a list of rules.  If the rule does not
             have a user-defined precedence, then any conflict must be
             manually resolved.

            +--rw policy
               +--rw policy-name?               string
               +--rw rule* [rule-name]
               +--rw event
               +--rw condition
               +--rw action

                      Figure 2: Policy YANG data module for consumer-facing
     interface to security controller.";

  revision "2018-11-04"{
    description "fourth revision";
    reference
      "draft-kumar-i2nsf-client-facing-interface-im-04";
  }
  //Groupings
  container Data tree

   A policy {
    description
    "This object is a policy instance container of Rules.  In order to express a Rule, a Rule
   must have complete information such as where and when a policy need needs
   to be applied.";

    list applied.  This is done by defining a set of managed objects and
   relationship among them.  A Policy Rule may be related segmentation,
   threat mitigation or telemetry data collection from an NSF in the
   network, which will be specified as the sub-model of the policy model
   in the subsequent sections.  Figure 3 shows the XML instance of the
   Rule object.  The rule {
     key "rule-id";
     leaf rule-id {
     type uint16;
     description
     "This is ID for rules.";
    }
      description
      "This is a container for rules.";
      leaf name {
       type string;
        description
         "This object SHALL have the following information:

      Name:  This field idenfifies identifies the name of this object.";
      }
      leaf object.

      Date:  This field indicates the date {
       type yang:date-and-time;
        description
         "Date when this object was created
             or last
          modified";
      }
      leaf case {
       type string;
        description
         "to identify modified.

      Event: This field includes the information to determine whether
             the Rule Condition can be evaluated or not.  See details in
             Section 3.1.

      Condition:  This field contains all the checking conditions to
             apply to the objective traffic.  See details in
             Section 4.2.

      Action:  This field identifies the action taken when a rule belongs is
             matched.  There is always an implicit action to
         web filter or enterprise mode.";
      }
      list event {
       key "event-id";
       description
       "This represents drop
             traffic if no rule is matched for a traffic type.  See
             details in Section 4.3.

      Owner: This field contains the onwer of the rule.  For example,
             the person who created it, and eligible for modifying it.

           +--rw rule* [rule-name]
              +--rw rule-name    string
              +--rw date?        yang:date-and-time
              +--rw event* [name]
              +--rw condition
              +--rw action
              +--rw owner?       string

                     Figure 3: YANG Data tree for Rule

4.1.  Event Sub-Model

   The Event Object contains information related to scheduling a Rule.
   The Rule could be activated based on a time calendar or security
   event including threat level changes.  Figure 4 shows the XML
   instance of a
       policy-rule.";

       leaf event-id {
       type string;
       mandatory true;
       description
       "This represents the event-id.";
       }
       leaf name {
        type string;
         description
          "This Event object.  Event object SHALL have following
   information:

      Name:  This field idenfifies identifies the name of this object.";
       }
       leaf object.

      Date:  This field indicates the date {
        type yang:date-and-time;
        description
         "Date when this object was created
             or last
          modified";
       }
       leaf event-type {
        type string;
         description
          "This modified.

      Event-Type:  This field identifies whether the event of
          policy enforcement trigger type.";
       }
       leaf time-information {
        type string;
        description
         "This event of triggering
             policy enforcement is "ADMIN-ENFORCED", "TIME-ENFORCED" or
             "EVENT-ENFORCED".

      Time-Information:  This field contains a time calendar such as
         BEGIN-TIME
             "BEGIN-TIME" and END-TIME "END-TIME" for one time enforcement or
             recurring time calendar for periodic enforcement.";
       }
       leaf event-map-group {
        type leafref {
        path "/threat-feed/event-map-group/event-map-group-id";
        }
        description
        "This field contains security events or threat
        map in order to determine when a policy need
        to be activated. This is a reference to
        Evnet-Map-Group.";
       }
       leaf enable {
        type boolean;
         description
          "This determines whether the condition
          matches the security enforcement.

               +--rw event or not.";
       }
     }
     list condition {
      key "condition-id";
      description
      "This represents the condition of a
      policy-rule.";

      leaf condition-id {
       type string;
       description
       "This represents the condition-id.";
      }
      leaf source {
       type string;
        description
        "This field identifies the source of
        the traffic.
                  +--rw name?                     string
                  +--rw date?                     yang:date-and-time
                  +--rw event-type                enumeration
                  +--rw time-information
                     +--rw time
                     |  +--rw begin-time          begin-time-type
                     |  +--rw end-time            end-time-type
                     +--rw recursive
                        +--rw recur               boolean
                        +--rw recursive-type?     enumeration

                 Figure 4: Event sub-model YANG data tree

4.2.  Condition Sub-Model

   This could be reference to
        either 'Policy Endpoint Group' or
        'Threat-Feed' or 'Custom-List' if object represents Conditions that Security Admin wants to specify apply
   the source; otherwise, checking on the default is traffic in order to match all traffic.";
      }
      leaf destination {
       type string;
        description
         "This field identifies determine whether the source set of
   actions in the traffic. This could Rule can be reference to
          either 'Policy Endpoint Group' or
          'Threat-Feed' executed or 'Custom-List' if Security
          Admin wants to specify the source; otherwise, not.  The condition sub-model
   consists of 3 different types of three containers each representing
   different cases, such as general firewall and ddos-mitigation cases,
   and a case when the default condition is to match all traffic.";
      }
      leaf match {
       type boolean;
        description
         "This field identifies based on the match criteria used payload strings of
   packets.  Each containers have source-target and destination-target
   to
         evaluate whether represent the specified action need to be
         taken or not.  This could be either a Policy-
         Endpoint-Group identifying a Application set or a
         set source and destination for each case.  Figure 5
   shows the XML instance of traffic rules.";
      }
      leaf match-direction {
       type string;
        description
         "This the Condition object.The Condition submodel
   SHALL have following information:

      Firewall-condition:  This field identifies if represents the match criteria general firewall
             case, where a security admin can set up firewall conditions
             using the information present in this field.  The source
             and destination is represented as source-target and
             destination-target, each referring to evaluated for both direction of the traffic or
         only in one direction with default of allowing IP-address-based
             groups defined in the other direction for stateful match conditions. endpoint-group.

      DDoS-condition:  This field represents the condition for DDoS
             mitigation, where a security admin can set up DDoS
             mitigation conditions using the information present in this
             field.  The source and destination is optional represented as
             source-target and by default rule should apply destination-target, each referring to the
             device-groups defined and registered in both directions.";
      }
      leaf exception {
       type string;
        description
         "This the endpoint-group.

      Custom-condition:  This field identifies contains the exception
         consideration payload string
             information.  This information is useful when a security rule
             condition is evaluated for a
         given communication.  This could be reference to
         Policy-Endpoint-Group object or set based on the string contents of traffic
         matching criteria.";
      }
     }
     list policy-action {
      key "policy-action-id";
      leaf policy-action-id {
      type string;
      mandatory true;
       description
        "this represents incoming or
             outgoing packets.  The source and destination is
             represented as source-target and destination-target, each
             referring to the policy-action-id.";
      }
      description
       "This payload-groups defined and registered in
             the endpoint-group.

           +--rw condition
             +--rw firewall-condition
              |  +--rw source-target
              |  |  +--rw src-target?   -> /policy
              |  |                         /endpoint-group
              |  |                         /user-group
              |  |                         /name
              |  +--rw destination-target
              |  |  +--rw dest-target*  -> /policy
              |  |                         /endpoint-group
              |  |                         /user-group
              |  |                         /name
              +--rw ddos-condition
              |  +--rw source-target
              |  |  +--rw src-target*   -> /policy
              |  |                         /endpoint-group
              |  |                         /device-group
              |  |                         /name
              |  +--rw destination-target
              |  |  +--rw dest-target*  -> /policy
              |  |                         /endpoint-group
              |  |                         /device-group
              |  |                         /name
              |  +--rw rate-limit
              |     +--rw packet-per-second?   uint8
              +--rw custom-condition
              |  +--rw source-target
              |  |  +--rw src-target*   -> /policy
              |  |                         /threat-prevention
              |  |                         /payload-content
              |  |                         /name
              |  +--rw destination-target
              |  |  +--rw dest-target?  -> /policy
              |  |                         /threat-prevention
              |  |                         /payload-content
              |  |                         /name
              +--rw threat-feed-condition
                 +--rw source-target
                 |  +--rw src-target*   -> /policy
                 |                         /threat-prevention
                 |                         /threat-feed-list
                 |                         /name
                 +--rw destination-target
                    +--rw dest-target?  -> /policy
                                           /threat-prevention
                                           /threat-feed-list
                                           /name

               Figure 5: Condition sub-model YANG data tree

4.3.  Action Sub-Model

   This object represents actions that a Security Admin wants to perform
   based on
       a certain traffic class.";

      leaf name {
       type string;
        description
         "The class.  Figure 6 shows the XML instance of
   the Action object.  The Action object SHALL have following
   information:

      Name:  This field identifies the name of this object.

      Date:  This field indicates the policy-action object.";
      }
      leaf date {
       type yang:date-and-time;
        description
         "When the when this object was created
             or last
         modified.";
      }
      leaf primary-action {
       type string;
        description
         "This modified.

      Action:  This field identifies the action when a rule is matched
             by an NSF.  The action could be one of
         'PERMIT', 'DENY', 'RATE-LIMIT', 'TRAFFIC-CLASS',
         'AUTHENTICATE-SESSION', 'IPS, 'APP-FIREWALL', etc.";
      }
      leaf secondary-action {
       type string;
        description
         "This field identifies additional actions if
         a rule "PASS", "DROP",
             "ALERT", "MIRROR", and "LOG".

           +--rw action
              +--rw name            string
              +--rw date            yang:date-and-time
              +--rw action          string

                 Figure 6: Action sub-model YANG data tree

5.  Information Model for Multi-Tenancy

   Multi-tenancy is matched. This an important aspect of any application that enables
   multiple administrative domains in order to manage application
   resources.  An Enterprise organization may have multiple tenants or
   departments such as Human Resources (HR), Finance, and Legal, with
   each tenant having a need to manage their own Security Policies.  In
   a Service Provider, a tenant could be one represent a Customer that wants to
   manage its own Security Policies.  There are multiple managed objects
   that constitute multi-tenancy aspects as shown in Figure 7.  This
   section lists these objects and any relationship among these objects.
   Below diagram shows an example of 'LOG',
         'SYSLOG', 'SESSION-LOG', etc.";
      }
      leaf owner {
       type string;
        description
         "This field multi-tenancy in an Enterprise
   domain.

                             +-------------------+
       (Multi-Tenancy)       |       Domain      |
                             |(e.g., Enterprise) |
                             +---------+---------+
                                       ^
                                       |
                  +--------------------+--------------------+
                  |                    |                    |
         +--------+-------+  +---------+--------+  +--------+--------+
         |  Department 1  |  |   Department 2   |  |  Department n   |
         +--------+-------+  +---------+--------+  +--------+--------+
                  ^                    ^                    ^
                  |                    |                    |
         +--------+--------+  +-----------------+  +--------+--------+
         | Sub-domain 1..n |  | Sub-domain 1..n |  | Sub-domain 1..n |
         +--------+--------+  +--------+--------+  +--------+--------+
                  ^                    ^                    ^
                  |                    |                    |
         +--------+--------+  +--------+--------+  +--------+--------+
         |   Tenant 1..n   |  |   Tenant 1..n   |  |   Tenant 1..n   |
         +-----------------+  +-----------------+  +-----------------+

                      Figure 7: Multi-tenancy Diagram

5.1.  Policy-Domain

   This object defines a boundary for the owner purpose of this
         policy. Only policy management
   within a Security Controller.  This may vary based on how the owner
   Security Controller is authorized to
         modify deployed and hosted.  For example, if an
   Enterprise hosts a Security Controller in their network; the contents of domain
   in this case could just be the policy.";

      }
     }
    }
 }
     container multi-tenancy {
        description
          "The descriptions of multi-tenancy.";

        list policy-domain {
          key "policy-domain-id";

          leaf policy-domain-id {
            type uint16;
            description
              "This one that represents the list of domains.";
          }
          description
          "this that Enterprise.
   But if a Cloud Service Provider hosts managed services, then a domain
   could represent a single customer of that Provider.  Figure 8 shows
   the list XML instance of policy domains";
          leaf name {
            type string;
            mandatory true;
            description
              "Name the Policy-domain object.  Multi-tenancy model
   should be able to work in all such environments.  The Policy-Domain
   object SHALL have following information:

      Name:  Name of the organization or customer representing this domain.";
          }
          leaf address {
            type string;
            description
              "address
             domain.

      Address:  Address of an the organization or customer.";
          }
          leaf contact {
            type string;
            mandatory true;
            description
              "contact customer.

      Contact:  Contact information of the organization or customer.";
          }
          leaf date {
            type yang:date-and-time;
            mandatory true;
            description
              "The date customer.

      Date:  Date when this account was created or last modified.";
          }
          list policy-tenant {
            key "policy-tenant-id";
            leaf policy-tenant-id {
              type uint16;
              description
                "The policy tenant id.";
            }
            description
            "This represents modified.

      Authentication-Method:  Authentication method to be used for this
             domain.  It should be a reference to a "Policy-Management-
             Authentication-Method" object.

         +--rw policy-domain* [name]
            +--rw name                     string
            +--rw date?                    yang:date-and-time
            +--rw address?                 string
            +--rw contact?                 string
            +--rw policy-tenant* [name]
            +--rw authentication-method?   -> /policy
                                              /multi-tenancy
                                              /policy-mgnt-auth-method
                                              /name
               ...
               ...

                  Figure 8: Policy domain YANG data tree

5.2.  Policy-Tenant

   This object defines an entity within an organization.  The entity
   could be a department or business unit within an Enterprise
   organization that would like to manage its own Policies due to
   regulatory compliance or business reasons.  Figure 9 shows the list XML
   instance of tenants";

            leaf name {
              type string;
              mandatory true;
              description
                "Name the Policy-tenant object.  The Policy-Tenant object SHALL
   have following information:

      Name:  Name of the Department or Division within an organization.";
            }
            leaf date {
              type yang:date-and-time;
              mandatory true;
              description
                "Date this account was created or last modified.";
            }
            leaf domain {
              type leafref {
                path "/multi-tenancy/policy-domain/policy-domain-id";
              }
              description
              "This organization.

      Date:  Date when this account was created or last modified.

      Domain:  This field identifies the domain to which this tenant
             belongs.  This should be reference to a
              'Policy-Domain' object.";
            }
          }
          leaf authentication-method {
            type leafref {
              path "/multi-tenancy/policy-mgnt-auth-method/policy-mgnt-auth-method-id";
            }
            description
            "Authentication method to be used for this domain.
            It should be a reference to a 'policy-mgmt-auth-method'
            object.";
          }
        }
        list policy-role {
          key "policy-role-id";

          leaf policy-role-id {
          type uint16;
          mandatory true;
          description
            "This Policy-Domain
             object.

           +--rw policy-tenant* [name]
              +--rw name      string
              +--rw date?     yang:date-and-time
              +--rw domain?   -> /policy
                                 /multi-tenancy
                                 /policy-domain
                                 /name

                  Figure 9: Policy tenant YANG data tree

5.3.  Policy-Role

   This object defines a set of permissions assigned to a user in an
   organization that want wants to manage its own Security Policies.";
          }
          description
          "This represents Policies.  It
   provides a convenient way to assign policy users to a job function or
   a set of permissions within the list organization.  Figure 10 shows the
   XML instance of policy roles.";

          leaf name {
            type string;
            mandatory true;
            description
              "This the Policy-role object.  The Policy-Role object SHALL
   have the following information:

      Name:  This field identifies the name of the role.";
          }
          leaf date {
            type yang:date-and-time;
            mandatory true;
            description
              "Date role.

      Date:  Date when this role was created or last modified.";
          }
          leaf access-profile {
            type string;
            mandatory true;
            description
              "This modified.

      Access-Profile:  This field identifies the access profile for the
             role.  The profile grants or denies access the permissions to policy
              objects.  Multiple
             access profiles can be
              concatenated together.";
          }
        }
        list policy-user {
          key "policy-user-id";

          leaf policy-user-id {
          type uint16;
          description
            "This represents Endpoint Groups for the policy-user-id.";
          }
          description
          "This purpose of policy management
             or may restrict certain operations related to policy
             managements.  There are two permission types, read-only and
             read-and-write, to choose from for each access-profile.

             +--rw policy-role
             |  +--rw name?             string
             |  +--rw date?             yang:date-and-time
             |  +--rw access-profile* [name]
             |     +--rw name               string
             |     +--rw date?              yang:date-and-time
             |     +--rw permission-type?   identityref

                   Figure 10: Policy role YANG data tree

5.4.  Policy-User

   This object represents a unique identity of a user within an
   organization.  The identity authenticates with Security Controller
   using credentials such as a password or token in order to perform
   policy management.  A user may be an individual, system, or
   application requiring access to Security Controller.  Figure 11 shows
   the list XML instance of policy users.";
          leaf name {
            type string;
            mandatory true;
            description
              "The name the Policy-user object.  The Policy-User object
   SHALL have the following information:

      Name:  Name of a user.";
          }
          leaf date {
            type yang:date-and-time;
            mandatory true;
            description
              "Date user.

      Date:  Date when this user was created or last modified";

          }
          leaf password {
            type string;
            mandatory true;
            description
              "User modified.

      Password:  User password for basic authentication";
          }
          leaf email {
            type string;
            mandatory true;
            description
              "The email account authentication.

      Email: E-mail address of a user";
          }
          leaf scope-type {
            type string;
            description
              "identifies the user.

      Scope-Type:  This field identifies whether a the user has domain-wide domain-
             wide or tenant-wide privileges";
          }
          leaf scope-reference {
            type string;
            description
              "This references policy-domain or policy-tenant privileges.

      Role:  This field should be a reference to identify a Policy-Role object
             that defines the scope.";
          }
          leaf role {
            type string;
            mandatory true;
            description
              "This references policy-role to define specific
              permissions";
          }
        }
        list policy-mgnt-auth-method {
          key "policy-mgnt-auth-method-id";

          leaf policy-mgnt-auth-method-id {
          type uint16;
          description
            "This permissions.

         +--rw policy-user* [name]
         |  +--rw name          string
         |  +--rw date?         yang:date-and-time
         |  +--rw password?     string
         |  +--rw email?        string
         |  +--rw scope-type?   identityref
         |  +--rw role?         -> /policy
                                   /multi-tenancy
                                   /policy-role
                                   /access-profile
                                   /name

                   Figure 11: Policy user YANG data tree

5.5.  Policy Management Authentication Method

   This object represents the authentication method id.";
          }
          description
          "The descriptions schemes supported by Security
   Controller.  Figure 12 shows the XML instance of policy management
            authentication methods.";
          leaf the Policy
   Management Authentication Method onject.  This Policy-Management-
   Authentication-Method object SHALL have the following information:

      Name:  This field identifies name {
            type string;
            mandatory true;
            description
              "name of the authentication method";
          }
          leaf date {
            type yang:date-and-time;
            mandatory true;
            description
              "date this object.

      Date:  Date when the authentication method this object was created";
          }
          leaf authentication-method {
            type enumeration{
              enum password{
                description
                  "password-based authentication.";
              }
              enum token{
                description
                  "token-based authentication.";
              }
              enum certificate{
                description
                  "certificate-based authentication.";
              }
            }
            mandatory true;
            description
              "The description of created or last modified.

      Authentication-Method:  This field identifies the authentication method;
             methods.  It could be a password-based, token-based, password, certificate,
              single-sign-on";
          }
          leaf mutual-authentication {
            type boolean;
            mandatory true;
            description
              "To identify
             certificate-based or single sign-on authentication.

      Mutual-Authentication:  This field indicates whether the mutual
             authentication is mutual";
          }
          leaf token-server {
            type inet:ipv4-address; mandatory true;
            description
              "The token-server information if or not.

      Token-Server:  This field stores the
              authentication method is token-based";
          }
          leaf certificate-server {
            type inet:ipv4-address;
            mandatory true;
            description
              "The certificate-server information if about server that
             validates the token submitted as credentials.

      Certificate-Server:  This field stores the authentication method is certificate-based";
          }
          leaf single-sing-on-server {
            type inet:ipv4-address;
            mandatory true;
            description
              "The single-sign-on-server information
              if about
             server that validates certificates submitted as
             credentials.

      Single Sign-on-Server:  This field stores the information about
             server that validates user credentials.

         +--rw policy-mgnt-auth-method* [name]
            +--rw name                     string
            +--rw date?                    yang:date-and-time
            +--rw mutual-authentication?   boolean
            +--rw password
            |  +--rw password?             password-type
            +--rw token
            |  +--rw token?                string
            |  +--rw token-server?         inet:ipv4-address
            +--rw certificate
            |  +--rw certificate?          certificate-type
            |  +--rw certificate-server?   inet:ipv4-address
            +--rw single-sign-on
               +--rw credential?           certificate-type
               +--rw certificate-server?   inet:ipv4-address

     Figure 12: Policy management authentication method YANG data tree

6.  Information Model for Policy Endpoint Groups

   The Policy Endpoint Group is
              single-sign-on-based";
          }
        }
     }
container endpoint-group {
        description
          "A a very important part of building User-
   construct based policies.  Security Admin would create and use these
   objects to represent a logical entity in their business environment,
   where a security policy Security Policy is to be applied.";

        list meta-data-source {
          key "meta-data-source-id";
          leaf meta-data-source-id {
          type uint16;
          mandatory true;
          description
            "This represents the meta-data source id.";
          }
          description
          "This represents the meta-data source.";

          leaf name {
            type string;
            mandatory true;
            description
              "This identifies the name of the
              meta-datas-ource.";
          }
          leaf date {
            type yang:date-and-time;
            mandatory true;
            description
              "This identifies the date this object was
              created or last modified.";
          }
          leaf tag-type {
            type boolean;
            description
              "This identifies applied.  There are multiple managed
   objects that constitute a Policy Endpoint Group as shown in
   Figure 13.  Figure 14 shows the group type; user group,
              app group or device group.";
          }
          leaf tag-server-information {
            type inet:ipv4-address;
            description
              "The description XML instance of suthentication method;
              token-based, password, certificate,
              single-sign-on";
          }
          leaf tag-application-protocol {
            type string;
            description
              "This filed identifies the protocol e.g. LDAP,
              Active Directory, or CMDB";
          }
          leaf tag-server-credential {
            type string;
            description
              "This field identifies the credential
              information needed to access endpoint-group
   object. shows the tag server";
          }
        }
        list user-group{
          key "user-group-id";

          leaf user-group-id {
          type uint16;
          mandatory true;
          description
            "This XML instance of the User-group object.. This
   section lists these objects and relationship among them.

                      +-------------------+
                      |  Endpoint Group   |
                      +---------+---------+
                                ^
                                |
                 +--------------+----------------+
          1..n   |      1..n    |       1..n     |
           +-----+----+  +------+-----+  +-------+------+
           |User-group|  |Device-group|  |Location-group|
           +----------+  +------------+  +--------------+

                     Figure 13: Endpoint Group Diagram

           +--rw endpoint-group
              +--rw user-group* [name]
              |  ...
              +--rw device-group* [name]
              |  ...
              +--rw location-group* [name]
                 ...

                 Figure 14: Endpoint Group YANG data tree

6.1.  User Group

   This object represents a User-group.  Figure 15 shows the XML
   instance of the user group id.";
          }
          description
          "This represents User-group object.The User-Group object SHALL have
   the user group.";

          leaf name {
            type string;
            description
              "This following information:

      Name:  This field identifies the name of user-group.";
          }
          leaf date {
            type yang:date-and-time;
            description
              "when this user-group object.

      Date:  Date when this object was created or last modified.";
          }
          leaf group-type {
            type enumeration{
              enum user-tag{
                description
                  "The user group is based on user-tag.";
              }
              enum user-name{
                description
                  "The user group is based on user-name.";
              }
              enum ip-address{
                description
                  "The user group is based on ip-address.";
              }
            }
            description
              "This describes the group type; User-tag,
              User-name or IP-address.";
          }
          leaf meta-data-server {
            type inet:ipv4-address;
            description
              "This references metadata source";
          }

          leaf group-member {
            type string;
            description
              "This describes the user-tag information";
          }

          leaf risk-level {
            type uint16;
            description
              "This represents modified.

      IP-Address:  This field identifies the threat level; valid range
               may be 0 to 9.";
          }
        }
        list device-group {
          key "device-group-id";
          leaf device-group-id {
          type uint16;
           description
            "This represents IP address of a device user.

      Range-IP-Address:  This field is a range of IP addresses of users.

      +--rw user-group* [name]
         +--rw name                         string
         +--rw date?                        yang:date-and-time
         +--rw (match-type)?
            +--:(exact-match)
            |  +--rw ip-address*            inet:ipv4-address
            +--:(range-match)
               +--rw range-ip-address* [start-ip-address end-ip-address]
                  +--rw start-ip-address    inet:ipv4-address
                  +--rw end-ip-address      inet:ip-address

                   Figure 15: User group id.";
          }
          description
            "This YANG data tree

6.2.  Device-Group

   This object represents a device group.";
          leaf name {
            type string;
          description
              "This Device-group.  Figure 16 shows the XML
   instance of the Device-group object.The Device-Group object SHALL
   have the following information:

      Name:  This field identifies the name of
              a device-group.";

          }
          leaf date {
            type yang:date-and-time;
            description
            "The date this object.

      Date:  Date when this group object was create created or last modified.";
          }
          leaf group-type {
            type enumeration{
              enum device-tag{
                description
                  "The device group modified.

      IP-Address:  This field identifies the IP address of a device.

      Range-IP-Address:  This field is based on device-tag.";
              }
              enum device-name{
                description
                  "The device a range of IP addresses of
             devices.

       +--rw device-group* [name]
          +--rw name                        string
          +--rw date?                       yang:date-and-time
          +--rw (match-type)?
            +--:(exact-match)
            |  +--rw ip-address*            inet:ipv4-address
            +--:(range-match)
               +--rw range-ip-address* [start-ip-address end-ip-address]
                  +--rw start-ip-address    inet:ipv4-address
                  +--rw end-ip-address      inet:ip-address

                  Figure 16: Device group is based on device-name.";
              }
              enum ip-address{
                description
                  "The device YANG data tree

6.3.  Location-Group

   This object represents a location group is based on ip-address.";
              }
            }
            description
              "This describes the group type; device-tag,
              device-name either tag or IP-address.";
          }
          leaf meta-data-server {
            type inet:ipv4-address;
            description
              "This references meta-data-source
              object.";
          }
          leaf group-member {
            type string;
            description
              "This describes other
   information.  Figure 17 shows the device-tag, device-name or
              IP-address information";
          }
          leaf risk-level {
            type uint16;
            description
              "This represents XML instance of the threat level; valid range
              may be 0 to 9.";
          }
        }
        list application-group{
          key "application-group-id";
          leaf application-group-id {
          type uint16;
          description
          "This represents an application group id.";
          }
          description
          "This represents an application group.";
          leaf name {
            type string;
            description
            "This Location-group
   object.  The Location-group object SHALL have the following
   information:

      Name:  This field identifies the name of
            an application group";
          }
          leaf date {
            type yang:date-and-time;
            description
            "The date this object.

      Date:  Date when this group object was created or last modified.";
          }
          leaf group-type {
            type enumeration{
              enum application-tag{
                description
                  "The application group is based on application-tag.";
              }
              enum device-name{
                description
                  "The application modified.

      continent:  to identify which continent the location group member
             is based on application-name.";
              }
              enum ip-address{
                description
                  "The application at.

        +--rw location-group* [name]
           +--rw name         string
           +--rw date?        yang:date-and-time
           +--rw continent?   identityref

                 Figure 17: Location group is based on ip-address.";
              }
            }
            description
              "This identifies YANG data tree

7.  Information Model for Threat Prevention

   The threat prevention plays an important part in the group type;
              application-tag, application-name or
              IP-address.";
          }
          leaf meta-data-server {
            type inet:ipv4-address;
            description
              "This references meta-data-source
              object.";
          }
          leaf group-member {
            type string;
            description
              "This describes overall security
   posture by reducing the attack surfaces.  This information could come
   from various threat feeds (i.e., sources for obtaining the application-tag,
              application-name threat
   information), such as EmergingThreats.com or IP-address information";
          }
          leaf risk-level {
            type uint16;
            description
              "This represents AlienVault.com.  There
   are multiple managed objects that constitute this category.  This
   section lists these objects and relationship among them.  Figure 19
   shows the threat level; valid range
               may be 0 to 9.";
          }
        }
        list location-group{
          key "location-group-id";
          leaf location-group-id {
          type uint16;
          description
          "This represents XML instance of a location group id.";
          }
          description
          "This Threat-prevention object.

                            +-------------------+
                            | Threat Prevention |
                            +---------+---------+
                                      ^
                                      |
                            +---------+---------+
                    1..n    |         1..n      |
                     +------+------+   +--------+--------+
                     | Threat-feed |   | payload-content |
                     +-------------+   +-----------------+

                   Figure 18: Threat Prevention Diagram

       +--rw threat-prevention
       |  +--rw threat-feed-list* [name]
       |   ...
       |  +--rw payload-content* [name]
       |   ...

                Figure 19: Threat Prevention YANG data tree

7.1.  Threat-Feed

   This object represents a location group.";

          leaf name {
            type string;
            description
            "This threat feed which provides signatures of
   malicious activities.  Figure 20 shows the XML instance of a Threat-
   feed-list.  The Threat-Feed object SHALL have the following
   information:

      Name:  This field identifies the name of
            a location group";
          }
          leaf date {
            type yang:date-and-time;
            description
            "The date this object.

      Date:  Date when this group object was created or last modified.";
          }
          leaf group-type {
            type enumeration{
              enum location-tag{
                description
                  "The location group is based on location-tag.";
              }
              enum location-name{
                description
                  "The location group is based on location-name.";
              }
              enum ip-address{
                description
                  "The location group is based on ip-address.";
              }
            }
            description
              "This modified.

      Threat-feed-Server:  This field identifies the group type;
              location-tag, location-name information about
             the feed provider, it may be an external service or
              IP-address.";
          }
          leaf meta-data-server {
            type inet:ipv4-address;
            description
              "This references meta-data-source
              object.";
          }
          leaf group-member {
            type string;
            description
              "This describes local
             server.

      Threat-file-types:  This field identifies the information about
             the file types identified and reported by the threat-feed.

      signatures:  This field contains the location-tag,
              location-name signatures of malicious
             programs or IP-address information";
          }
          leaf risk-level {
            type uint16;
            description
              "This activities provided by the threat-feed.

    +--rw threat-feed-list* [name]
       +--rw name                           string
       +--rw date?                          yang:date-and-time
       +--rw threat-feed-server
       |  +--rw (match-type)?
       |  |  +--:(exact-match)
       |  |  |  +--rw ip-address*           inet:ipv4-address
       |  |  +--:(range-match)
       |  |     +--rw range-ip-address* [start-ip-address end-ip-address]
       |  |        +--rw start-ip-address   inet:ipv4-address
       |  |        +--rw end-ip-address     inet:ip-address
       |  +--rw threat-feed-description?    string
       +--rw threat-file-types*             identityref
       +--rw signatures*                    string

                   Figure 20: Threat feed YANG data tree

7.2.  Payload-content

   This object represents a custom list created for the threat level; valid range
               may be 0 purpose of
   defining exception to 9.";
          }
        }
    }
    container threat-feed {
      description
      "this describes threat feeds.  Figure 21 shows the list XML instance
   of threat-feed.";

        list threat-feed {
          key "threat-feed-id";
          leaf threat-feed-id {
          type uint16;
          mandatory true;
          description
            "This represents the threat-feed-id.";
          }
          description
            "This represents a Payload-content list.  The Payload-content object SHALL have the threat feed within
   following information:

      Name:  This field identifies the
            threat-prevention-list.";
          leaf name {
            type string;
            description
              "Name of the theat feed.";
          }
          leaf date {
            type yang:date-and-time;
            description
              "when the threat-feed this object.

      Date:  Date when this object was created.";
          }
          leaf feed-type {
            type enumeration {
              enum unknown {
                description
                  "feed-type is unknown.";
              }
              enum ip-address {
                description
                  "feed-type is IP address.";
              }
              enum url {
                description
                  "feed-type is URL.";
              }
            }
            mandatory true;
            description
              "This determined whether the feed-type is created or last modified.

      List-Content:  This field contains contents such as IP address
              based addresses
             or URL based.";
          }
          leaf feed-server {
            type inet:ipv4-address;
            description
              "this contains threat feed names.

        +--rw payload-content*  [name]
        |  +--rw name           string
        |  +--rw date?          yang:date-and-time
        |  +--rw content*       string

               Figure 21: Payload-content in YANG data tree

8.  Role-Based Acess Control (RBAC)

   Role-Based Access Control (RBAC) provides a powerful and centralized
   control within a network.  It is a policy neutral access control
   mechanism defined around roles and privileges.  The components of
   RBAC, such as role-permissions, user-role and role-role
   relationships, make it simple to perform user assignments.

     +--------------+
     |              |
     |    User 1    + (has many)
     |              |\
     +--------------+ \     +---------------+            +-------------+
             .         \    |               | (has many) |             |
             .          --->+ List of roles +----------->+ Permissions |
     +--------------+  /    |               |            |             |
     |              | /     +---------------+            +-------------+
     |    User n    +/
     |              | (has many)
     +--------------+

                          Figure 22: RBAC Diagram

   As shown in Figure 22, a role represents a collection of permissions
   (e.g., accessing a file server information.";
          }
          leaf feed-priority {
            type uint16;
            description
              "this describes or other particular resources).  A
   role may be assigned to one or multiple users.  Both roles and
   permissions can be organized in a hirarchy.  A role may consists of
   other roles and permissions.

   Following are the priority steps required to build RBAC:

     1.      Defining roles and permissions.

     2.      Establishing relations among roles and permissions.

     3.      Defining users.

     4.      Associating rules with roles and permissions.

     5.      assigning roles to users.

9.  YANG Data Model for Security Policies for Consumer-Facing Interface

   The main objective of the threat from
              0 this data model is to 5, where 0 means fully transform the threat is minimum
   information model [client-facing-inf-im] into a YANG data model that
   can be used for delivering control and
              5 meaning management messages via the maximum.";
          }
      }
      list custom-list {
          key "custom-list-id";
          leaf custom-list-id {
          type uint16;
          description
          "this describes
   Consumer-Facing Interface between an I2NSF User and Security
   Controller for the custom-list-id.";
          }
          description
          "this describes I2NSF User's high-level security policies.

   The semantics of the threat-prevention custom list.";
          leaf name {
            type string;
            description
              "Name data model must be aligned with the information
   model of the custom-list.";
          }
          leaf date {
            type yang:date-and-time;
            description
              "when Consumer-Facing Interface.  The transformation of the custom list
   information model was created.";
          }
          leaf list-type {
            type enumeration {
              enum unknown {
                description
                  "list-type is unknown.";
              }
              enum ip-address {
                description
                  "list-type is IP address.";
              }
              enum mac-address {
                description
                  "list-type is MAC address.";
              }
              enum url {
                description
                  "list-type is URL.";
              }
            }
            mandatory true;
            description
              "This determined whether performed so that this YANG data model can
   facilitate the feed-type is IP address
              based efficient delivery of the control or URL based.";
          }
         leaf list-property {
            type enumeration {
              enum unknown {
                description
                  "list-property is unknown.";
              }
              enum blacklist {
                description
                  "list-property is blacklist.";
              }
              enum whitelist {
                description
                  "list-property management
   messages.

   This data model is whitelist.";
              }
            }
            mandatory true;
            description
              "This determined whether designed to support the I2NSF framework that can
   be extended according to the security needs.  In other words, the list-type
   model design is blacklist
              or whitelist.";
          }
          leaf list-content {
            type string;
            description
              "This independent of the content and meaning of specific
   policies as well as the implementation approach.  This document
   suggests a VoIP/VoLTE security service as a use case for policy rule
   generation.

   This section describes a YANG data model for Consumer-Facing
   Interface, based on the contents information model of the custom-list.";
          }
      }
      list malware-scan-group {
          key "malware-scan-group-id";
          leaf malware-scan-group-id {
          type uint16;
          mandatory true;
          description
          "This is the malware-scan-group-id.";
          }
          description
          "This represents the malware-scan-group.";
          leaf name Consumer-Facing
   Interface to security controller [client-facing-inf-im].

<CODE BEGINS> file "ietf-cfi-policy.yang"
module ietf-i2nsf-cfi-policy {
            type string;
            description
              "Name
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-i2nsf-cfi-policy";
  prefix
    cfi-policy;

  import ietf-yang-types{
    prefix yang;
    reference
    "Section 3 of the malware-scan-group.";
          }
          leaf date {
            type yang:date-and-time;
            description
              "when the malware-scan-group was created."; RFC 6991";
  }
          leaf signature-server {
            type inet:ipv4-address;
            description
              "This describes the signature server

  import ietf-inet-types{
    prefix inet;
    reference
    "Section 4 of the
              malware-scan-group."; RFC 6991";
  }
          leaf file-types {
            type string;

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

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

     WG Chair: Adrian Farrel
     <mailto:Adrain@olddog.co.uk>

     WG Chair: Linda Dunbar
     <mailto:Linda.duhbar@huawei.com>

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

  description
   "This contains module is a list of file types needed to
              be scanned YANG module for Consumer-Facing Interface.
   Copyright (c) 2018 IETF Trust and the virus.";
          }
          leaf malware-signatures {
            type string;
            description
              "This contains a list persons identified as
   authors of malware signatures the code. All rights reserved.
   Redistribution and use in source and binary forms, with or hash.";
          }
      }
      list event-map-group {
          key "event-map-group-id";
          leaf event-map-group-id {
          type uint16;
          mandatory true;
          description
          "This
   without modification, is permitted pursuant to, and subject
   to the event-map-group-id.";
          }
          description
          "This represents license terms contained in, the event map group.";

          leaf name {
            type string;
            description
              "Name Simplified BSD License
   set forth in Section 4.c of the event-map.";
          }
          leaf date {
            type yang:date-and-time;
            description
              "when the event-map was created.";
          }
          leaf security-events {
            type string;
            description
              "This contains a list IETF Trust's Legal Provisions
   Relating to IETF Documents
   (http://trustee.ietf.org/license-info).
   This version of security events.";
          }
          leaf threat-map {
            type string; this YANG module is part of RFC XXXX; see
   the RFC itself for full legal notices.";

  revision "2019-03-11"{
    description
              "This contains a list of threat levels.";
          }
      } "latest revision";
    reference
      "draft-ietf-consumer-facing-interface-dm-02";
  }
    container telemetry-data
  identity permission-type {
    description
      "Telemetry provides visibility into the network
      activities which can be tapped
      "Base identity for further
      security analytics, e.g., detecting potential
      vulnerabilities, malicious activities, etc.";

      list telemetry-data {
        key "telemetry-data-id";

        leaf telemetry-data-id the permission types.";
  }

  identity read-only {
        type uint16;
        mandatory true;
    base permission-type;
    description
        "This is ID
      "Identity for telemetry-data-id."; read-only permission.";
  }
  identity read-and-write {
    base permission-type;
    description
        "This is ID
      "Identity for telemetry-data.";
        leaf name read permission.";
  }

  identity scope-type {
          type string;
    description
            "Name of the telemetry-data object.";
      "Base Identity for scope-type.";
  }
        leaf date
  identity tenant-wide {
          type yang:date-and-time;
    base scope-type;
    description
            "This field states when the telemery-data
            object was created.";
      "Base Identity for tenant-wide scope type.";
  }
        leaf logs
  identity domain-wide {
          type boolean;
    base scope-type;
    description
            "This field identifies whether logs
            need to be collected.";
      "Base Identity for domain-wide scope type.";
  }
        leaf syslogs

  identity malware-file-type {
          type boolean;
    description
            "This field identifies whether System logs
            need to be collected.";
      "Base identity for malware file types.";
  }
        leaf snmp
  identity executable-file {
          type boolean;
    base malware-file-type;
    description
            "This field identifies whether 'SNMP traps' and
            'SNMP alarms' need to be collected.";
      "Identity for executable file types.";
  }
        leaf sflow
  identity doc-file {
          type boolean;
    base malware-file-type;
    description
            "This field identifies whether 'sFlow' data
            need to be collected.";
      "Identity for Microsoft document file types.";
  }
        leaf netflow
  identity html-app-file {
          type boolean;
    base malware-file-type;
    description
            "This field identifies whether 'NetFlow' data
            need to be collected.";
      "Identity for html application file types.";
  }
        leaf interface-stats
  identity javascript-file {
          type boolean;
    base malware-file-type;
    description
            "This field identifies whether 'Interface' data
            such as packet bytes and counts need to be
            collected.";
        }
      "Identity for Javascript file types.";
  }
      list telemetry-source {
        key "telemetry-source-id";
        leaf telemetry-source-id
  identity pdf-file {
        type uint16;
        mandatory true;
    base malware-file-type;
    description
        "This is ID
      "Identity for telemetry-source-id."; pdf file types.";
  }
  identity dll-file {
    base malware-file-type;
    description
        "This is ID
      "Identity for telemetry-source.";
        leaf name dll file types.";
  }
  identity msi-file {
          type string;
    base malware-file-type;
    description
            "This identifies the name of this object.";
      "Identity for Microsoft installer file types.";
  }
        leaf date

  identity security-event-type {
          type yang:date-and-time;
    description
              "Date this object was created or last modified";
      "Base identity for security event types.";
  }
        leaf source-type {
          type enumeration {
            enum network-nsf
  identity ddos {
    base malware-file-type;
    description
                "NSF telemetry source type is network-nsf.";
      "Identity for DDoS event types.";
  }

            enum firewall-nsf
  identity spyware {
    base malware-file-type;
    description
                "NSF telemetry source type is firewall-nsf.";
      "Identity for spyware event types.";
  }
            enum ids-nsf
  identity trojan {
    base malware-file-type;
    description
                "NSF telemetry source type is ids-nsf.";
      "Identity for Trojan infection event types.";
  }
            enum ips-nsf
  identity ransomeware {
    base malware-file-type;
    description
                "NSF telemetry source type is ips-nsf.";
      "Identity for ransomeware infection event types.";
  }
            enum proxy-nsf
  identity continent {
    description
                "NSF telemetry source type is proxy-nsf.";
    "Base Identity for continent types.";
  }
            enum other-nsf

  identity africa {
    base continent;
    description
                "NSF telemetry source type is other-nsf.";
            }
    "Identity for africa.";
  }
  identity asia {
    base continent;
    description
            "This should have one of the following type of
            the NSF telemetry source: NETWORK-NSF,
            FIREWALL-NSF, IDS-NSF, IPS-NSF,
            PROXY-NSF, VPN-NSF, DNS, ACTIVE-DIRECTORY,
            IP Reputation Authority, Web Reputation
            Authority, Anti-Malware Sandbox, Honey Pot,
            DHCP, Other Third Party, ENDPOINT";
    "Identity for asia.";
  }
        leaf nsf-source
  identity europe {
          type inet:ipv4-address;
    base continent;
    description
            "This field contains information such as
            IP address and protocol (UDP or TCP) port
            number of the NSF providing telemetry data.";
    "Identity for europe.";
  }
        leaf nsf-credentials
  identity north-america {
          type string;
    base continent;
    description
            "This field contains username and password
            to authenticate with the NSF.";
    "Identity for north-america.";
  }
        leaf collection-interval
  identity south-america {
          type uint16;
          units seconds;
          default 5000;
    base continent;
    description
            "This field contains time in milliseconds
             between each data collection. For example,
             a value of 5000 means data is streamed to
             collector every 5 seconds. Value of 0 means
             data streaming is event-based";
    "Identity for south-america.";
  }
        leaf collection-method
  identity oceania {
    base continent;
    description
    "Identity for Oceania";
  }
  typedef certificate-type {

    type enumeration {
      enum unknown cer {
        description
                "collection-method
           "The extension type is unknown."; '.cer'.";
      }
      enum push-based crt {
        description
                "collection-method
           "The extension type is PUSH-based."; '.crt'.";
      }
      enum pull-based key {
        description
                "collection-method
           "The extension type is PULL-based."; '.key'.";
      }
    }
    description
          "This field contains a method
      "CRT certificate extension, which is used for certificates.
      The certificates may be encoded as binary DER or as ASCII PEM.
      The CER and CRT extensions are nearly synonymous.  Most common
      among *nix systems. CER certificate extension, which is an
      alternate form of collection,
          i.e., whether it .crt (Microsoft Convention) You can use MS to
      convert .crt to .cer (.both DER encoded .cer, or base64[PEM]
      encoded .cer). The KEY extension is PUSH-based used both for public and
      private PKCS#8 keys. The keys may be encoded as binary DER or PULL-based.";
      as ASCII PEM.";
  }
        leaf heartbeat-interval

grouping meta {
          type uint16;
          units seconds;
  description
          "time in seconds the source sends telemetry
          heartbeat.";
        }
    "The purpose of this grouping is to avoid repetition of same fields, such as 'name' and 'date'.";
  leaf qos-marking name {
    type uint16; string;
    description
          "DSCP value must be contained in this field.";
        } "This is the name for an entity.";
  }
      list telemetry-destination {
        key "telemetry-destination-id";
  leaf telemetry-destination-id date {
    type uint16; yang:date-and-time;
    description
        "this represents "This is the date when the telemetry-destination-id"; entity is created or modified.";
  }
}

grouping ip-address {
  description
        "This object contains information related
    "There are two types to
        telemetry destination. The destination is
        usually a collector which is either configure a part of
        Security Controller or external system security policy
    for IPv4 address, such as Security Information exact match and Event
        Management (SIEM).";
        leaf name range match.";
    choice match-type {
      description
        "User can choose between 'exact match' and 'range match'.";
      case exact-match {
        leaf-list ip-address {
          type string; inet:ipv4-address;
          description
            "This identifies
          "Exactly matches the name of this object."; IP address specified.";
        }
      }
      case range-match {
        list range-ip-address {
          key "start-ip-address end-ip-address";
          leaf date start-ip-address {
            type yang:date-and-time; inet:ipv4-address;
            description
            "Date this object was created or last
            modified";
              "Start IP address for a range match.";
          }
          leaf end-ip-address {
            type inet:ip-address;
            description
              "End IP address for a range match.";
          }
          description
            "Range match for an IP-address.";
        }
      }
    }
}
          leaf collector-source

grouping user-group {
            type inet:ipv4-address;
  description
    "This field contains information such as
                IP address grouping is to remove repetition of
    'name' and protocol (UDP or TCP) port
                number for the collector's destination."; 'ip-address' fields.";
  uses meta;
  uses ip-address;
}
          leaf collector-credentials

grouping device-group {
            type string;
  description
    "This field contains the username grouping is to remove repetition of
    'name', 'ip-address', and
             password for the collector.";
          }
          leaf data-encoding 'protocol' fields.";
  uses meta;
  uses ip-address;
  leaf-list protocol {
    type string;
    description
    "This field contains the telemetry data encoding
              in represents the form port numbers of schema."; devices.";
  }
}

grouping location-group {
  description
    "This grouping is to remove repetition of
    'name' and 'continent' fields.";
  uses meta;
  leaf data-transport continent {
    type enumeration{
              enum grpc identityref {
                description
                  "telemetry data protocol is grpc.";
      base continent;
        }
              enum buffer-over-udp{
    description
                  "telemetry data protocol is buffer over UDP.";
      "location-group-based on geo-ip of
      respective continent.";
  }

}

grouping payload-string {
  description
    "This field contains streaming telemetry data
            protocols. This could be gRPC, protocol
            buffer over UDP, etc.";
          }
      }
    }
  }
<CODE ENDS>

                     Figure 2: YANG for policy-general

5.  Use Case: Policy Instance Example for VoIP/VoLTE Security Services

   A common scenario for VoIP/VoLTE policy enforcement could be that a
   malicious call grouping is made to a benign user remove repetition of any telecommunication
   company.  For example, imagine a case wherea company "A" employs a
   hacker with a malicious attempt to hack a user's phone with malware.
   The company "A" is located in a country, such as Africa,
    'name' and 'content' fields.";
  uses meta;
  leaf-list content {
    type string;
    description
    "This represents the
   user's hacked phone to call the company.  The hacked user is unaware
   of the company "A" so complains about the international call that was
   made to the company "B", payload string content.";
  }
}

container policy {
    leaf policy-name {
      type string;
      description
        "The name which is the user's telecommunications
   company.  The company "A" charges the company "B" for the
   international call.  The company "B" cannot charge the user for the
   call, and has no choice but to pay the company "A".  The following
   shows the example data tree model for the VoIP/VoLTE services.
   Multi-tenancy, endpoint groups, threat prevention, and telemetry data
   components are general part of identifies the tree model, so we policy.";
    }
    description
    "There can just modify
   the policy instance be a multiple number of security rules in order to generate and enforce high-level
   policies.  The policy-calendar can act as
    a scheduler policy object. This object is a policy instance to set the star
    have complete information such as where and end time when a
    policy need to block calls which uses suspicious ids, or calls from
   other countries.

  module: policy-voip
      +--rw policy-voip
      |  +--rw rule-voip* [rule-voip-id]
      |  |  +--rw rule-voip-id           uint16
      |  |  +--rw name?                  string
      |  |  +--rw date?                  yang:date-and-time
      |  |  +--rw event* [event-id]
      |  |  |  +--rw event-id            string
      |  |  |  +--rw name?               string
      |  |  |  +--rw date?               yang:date-and-time
      |  |  |  +--rw event-type?         string
      |  |  |  +--rw Time-Information?   string
      |  |  |  +--rw event-map-group?    -> /threat-feed/event-map-group
      |  |  |                               /event-map-group-id
      |  |  |  +--rw enable?             boolean
      |  |  +--rw condition* [condition-id]
      |  |  |  +--rw condition-id        string
      |  |  |  +--rw source-caller?      -> /threat-feed/threat-feed
      |  |  |                               /threat-feed-id
      |  |  |  +--rw destination-callee? -> /threat-feed/custom-list
      |  |  |                               /custom-list-id
      |  |  |  +--rw match?              boolean
      |  |  |  +--rw match-direction?    string
      |  |  |  +--rw exception?          string
      |  |  +--rw action* [action-id]
      |  |  |  +--rw action-id           string
      |  |  |  +--rw name?               string
      |  |  |  +--rw date?               yang:date-and-time
      |  |  |  +--rw primary-action?     string
      |  |  |  +--rw secondary-action?   string
      |  |  +--rw precedence?            uint16
      |  +--rw owner* [owner-id]
      |     +--rw owner-id               string
      |     +--rw name?                  string
      |     +--rw date?                  yang:date-and-time
      +--rw threat-feed
         +--rw threat-feed* [threat-feed-id]
         |  +--rw threat-feed-id         uint16
         |  +--rw name?                  string
         |  +--rw date?                  yang:date-and-time
         |  +--rw feed-type              enumeration
         |  +--rw feed-server?           inet:ipv4-address
         |  +--rw feed-priority?         uint16
         +--rw custom-list* [custom-list-id]
         |  +--rw custom-list-id         uint16
         |  +--rw name?                  string
         |  +--rw date?                  yang:date-and-time
         |  +--rw list-type              enumeration
         |  +--rw list-property          enumeration
         |  +--rw list-content?          string
         +--rw malware-scan-group* [malware-scan-group-id]
         |  +--rw malware-scan-group-id  uint16
         |  +--rw name?                  string
         |  +--rw date?                  yang:date-and-time
         |  +--rw signature-server?      inet:ipv4-address
         |  +--rw file-types?            string
         |  +--rw malware-signatures?    string
         +--rw event-map-group* [event-map-group-id]
            +--rw event-map-group-id     uint16
            +--rw name?                  string
            +--rw date?                  yang:date-and-time
            +--rw security-events?       string
            +--rw threat-map?            string

    Figure 3: Policy Instance Example for VoIP/VoLTE Security Services

5.1.  Policy Instance YANG Example be applied.";

    list rule {
      leaf rule-name {
        type string;
        mandatory true;
        description
        "This represents the name for VoIP/VoLTE Security Services

   The following YANG data model is rules.";
      }
      key "rule-name";
      description
        "There can be a single or multiple number of rules.";

      leaf date {
       type yang:date-and-time;
        description
         "Date this object was created or last
          modified";
      }
      list event {
        uses meta;
        key "name";
          description
          "This represents the event map group name.";

        leaf security-event {
          type identityref {
            base security-event-type;
          }
          description
            "This contains the description of security events.";
        }
        leaf enforce-type {
          type enumeration{
            enum admin-enforced {
              description
                "The enforcement type is admin-enforced.";
            }
            enum time-enforced {
              description
                "The enforcement type is time-enforced.";
            }
            enum event-enforced {
              description
                "The enforcement type is event-enforced.";
            }
          }
          description
            "This field identifies the event of
            policy instance enforcement trigger type.";
        }
       container time-information {
        description
          "The container for time-information.";
           leaf begin-time {
             type string;
             description
             "This is start time for time zone";
           }
           leaf end-time {
             type string;
             description
             "This is end time for time zone";
           }
           }
       container recursive {
        description
          "The container to represent the recursiveness
          of the rule.";
         leaf recur {
           type boolean;
           description
           "recursive enforcement";

         }
         leaf recursive-type{
           type enumeration{
             enum daily {
              description
                "The recursive type is daily.";
             }
             enum weekly {
              description
                "The recursive type is weekly.";
             }
             enum monthly {
              description
                "The recursive type is monthly.";
             }
           }
           description
            "This leaf identifies the recursive type.";
         }
       }
      }
      container condition {
        description
          "The conditions for general security policies.";
            container firewall-condition {
              description
                "The general firewall condition.";
              container source-target {
                description
                  "This represents the source.";
                leaf src-target {
                  type leafref {
                    path "/policy/endpoint-group/user-group/name";
                  }
                  description
                   "This describes the paths to
                   the source reference.";
                }
              }
              container destination-target {
                description
                  "This represents the destination.";
                  leaf-list dest-target {
                    type leafref {
                      path "/policy/endpoint-group/user-group/name";
                    }
                    description
                      "This describes the paths to the
                      destination target reference.";
                  }
                }
            }
            container ddos-condition {
              description
                "The condition for VoIP/VoLTE
   security services.  The policy-calendar can act as a scheduler DDoS mitigation.";
              container source-target {
                description
                  "This represents the source.";
                leaf-list src-target {
                    type leafref {
                      path "/policy/endpoint-group/device-group/name";
                    }
                    description
                      "This describes the path to set the start time and end time
                      source target references.";
                }
              }
              container destination-target {
                description
                  "This represents the target.";
                leaf-list dest-target {
                  type leafref {
                    path "/policy/endpoint-group/device-group/name";
                  }
                  description
                    "This describes the path to block malicious calls which use
   suspicious IDs, or calls from other countries.

   <CODE BEGINS> file "ietf-i2nsf-cf-interface-voip.yang"

     module ietf-policy-voip the
                    destination target references.";
                }
              }
              container rate-limit {
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-policy-voip";
     prefix
       "cf-interface";

     import ietf-yang-types{
       prefix yang;
                description "This describes the rate-limit.";
                leaf packet-per-second {
                  type uint8;
                  description
                  "The rate-limit limits the amount of incoming packets.";
                }
     import ietf-inet-types{
       prefix inet;
              }
     organization
       "IETF I2NSF (Interface to Network Security Functions)
        Working Group";

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

        WG Chair: Adrian Farrel
        <mailto:Adrain@olddog.co.uk>

        WG Chair: Linda Dunbar
        <mailto:Linda.duhbar@huawei.com>

        Editor: Jaehoon Paul Jeong
        <mailto:pauljeong@skku.edu>";
            }
            container custom-condition {
              description
                "The condition based on packet contents.";
              container source-target {
                description
                  "This module defines a YANG data module for consumer-facing
        interface to security controller.";

     revision "2018-11-04"{ represents the source.";
                leaf-list src-target {
                  type leafref {
                    path "/policy/threat-prevention/payload-content/name";
                  }
                  description "sixth revision";
       reference
         "draft-kumar-i2nsf-client-facing-interface-im-07";
                   "Describes the payload string
                   content condition source.";
                }
              }
              container policy-voip destination-target {
                description
                  "This object is a policy instance to have
               complete information such as where and when
               a policy need to be applied.";
       list rule-voip represents the destination.";
                leaf dest-target {
                  type leafref {
                    path "/policy/threat-prevention/payload-content/name";
                  }
                  description
                   "Describes the payload string
                  content condition destination.";
                }
              }
            }
            container threat-feed-condition {
              description
                "The condition based on the threat-feed information.";
              container source-target {
                description
                  "This represents the source.";
                leaf-list src-target {
                  type leafref {
                    path "/policy/threat-prevention/threat-feed-list/name";
                  }
                  description "Describes the threat-feed
                  condition source.";
                }
              }
              container destination-target {
                description
                  "This represents the destination.";
                leaf dest-target {
                  type leafref {
                    path "/policy/threat-prevention/threat-feed-list/name";
                  }
                  description "Describes the threat-feed
                  condition destination.";
                }
              }
            }
      }
      container action {
             key "rule-voip-id";
        description
          "This is the action container.";
        leaf rule-voip-id primary-action {
          type uint16; string;
          mandatory true;
          description
            "This field identifies the action when a rule
            is ID for rules."; matched by NSF. The action could be one of
            'PERMIT', 'DENY', 'RATE-LIMIT', 'TRAFFIC-CLASS',
            'AUTHENTICATE-SESSION', 'IPS, 'APP-FIREWALL', etc.";
        }
        leaf secondary-action {
          type string;
          description
            "This is field identifies additional actions if
            a container for rules."; rule is matched. This could be one of 'LOG',
            'SYSLOG', 'SESSION-LOG', etc.";
        }
      }
      leaf name owner {
        type string;
          description
           "This field idenfifies defines the name owner of this object.";
           policy. Only the owner is authorized to
           modify the contents of the policy.";
      }
             leaf date
    }

container multi-tenancy {
               type yang:date-and-time;
    description
                 "Date this object was created or last
                 modified";
             }
      "The multi-tenant environment information
       in which the policy is applied. The Rules
       in the Policy can refer to sub-objects
       (e.g., domain, tenant, role, and user) of it.";

    list event policy-domain {
      uses meta;
      key "event-id"; "name";
      leaf address {
        type string;
        description
             "This represents the security event
          "The address details of a
                 policy-rule."; the organization
          or customer.";
      }
      leaf event-id contact {
        type string;
               mandatory true;
        description
          "contact information of the organization
           or customer.";
      }
      list policy-tenant {
        uses meta;
        key "name";
        description
        "This represents the event-id.";
             } list of tenants";
        leaf name domain {
          type string; leafref {
            path "/policy/multi-tenancy/policy-domain/name";
          }
          description
          "This field idenfifies identifies the name of domain to which this
          tenant belongs. This should be reference to a
          'Policy-Domain' object.";
        }
      }
      leaf date authentication-method {
        type yang:date-and-time; leafref {
          path "/policy/multi-tenancy/policy-mgnt-auth-method/name";
        }
        description
                 "Date
        "Authentication method to be used for this object was created or last
                 modified"; domain.
        It should be a reference to a 'policy-mgmt-auth-method'
        object.";
      }
             leaf event-type {
               type string;
      description
        "This field identifies represents the event event type
                 ."; list of policy domains.";
    }
             leaf Time-Information
    container policy-role {
               type string;
      uses meta;
      description
      "This field contains time calendar such as
                BEGIN-TIME and END-TIME for one time
                enforcement or recurring time calendar for
                periodic enforcement.";
             }
             leaf event-map-group represents the list of policy roles.";
      list access-profile {
               type leafref{
                 path "/threat-feed/event-map-group/event-map-group-id";
             }
        uses meta;
        key "name";
        description
          "This field contains security events identifies the access profile for the
          role. The profile grants or threat
               map in order denies access to determine when a policy need
               to be activated. This is a reference to
               Evnet-Map-Group.";
             }
          objects.";
        leaf enable permission-type {
          type boolean; identityref {
            base permission-type;
          }
          default read-only;
          description
                 "This determines whether the condition
                 matches the security event
            "Permission type for access-profile: read-only
            or not."; read-and-write.";

        }
      }
    }
    list condition policy-user {
      uses meta;
      key "condition-id"; "name";
      description
      "This represents the condition of a
                 policy-rule."; policy users.";
      leaf condition-id password {
        type string;
        description
                 "This represents the condition-id.";
          "User password for basic authentication";
      }
      leaf source-caller email {
        type leafref string;
        description
          "The email account of a user";
      }
      leaf scope-type {
                 path "/threat-feed/threat-feed/threat-feed-id";
        type identityref {
          base scope-type;
        }
        default tenant-wide;
        description
                 "This field identifies the source of
                 the traffic. This could be reference to
                 either 'Policy Endpoint Group' or
                 'Threat-Feed'
          "identifies whether a user has domain-wide
          or 'Custom-List' if Security
                 Admin wants to specify the source; otherwise,
                 the default is to match all traffic."; tenant-wide privileges";
      }
      leaf destination-callee role {
        type leafref {
          path "/threat-feed/custom-list/custom-list-id"; "/policy/multi-tenancy/policy-role/access-profile/name";
        }
        description
          "This field identifies the source of represents the traffic. This could be reference to
                 either 'Policy Endpoint Group' or
                 'Threat-Feed' or 'Custom-List' if Security
                 Admin wants to specify the source; otherwise,
                 the default is to match all traffic.";
          access-profiles.";
      }
    }
    list policy-mgnt-auth-method {
      uses meta;
      key "name";
      leaf match mutual-authentication {
        type boolean;
          description
                 "This field identifies the match criteria used to
                evaluate
          "To identify whether the specified action need to be
                taken or not.  This could be either a Policy-
                Endpoint-Group identifying a Application set or a
                set of traffic rules.";
             }
             leaf match-direction {
               type string;
               description
                 "This field identifies if the match criteria is
                to evaluated for both direction of the traffic or
                only in one direction with default of allowing in
                the other direction for stateful match conditions.
                This authentication
          is optional and by default rule should apply
                in both directions."; mutual.";
      }
      container password {
        leaf exception password {
          type string;
          description
            "This field identifies the exception
                 consideration when a rule is evaluated for a
                 given communication.  This could be reference to
                 Policy-Endpoint-Group object or set of traffic
                 matching criteria."; should be defined using the
            regular expression.";
        }
        description
          "This represents the password method.";
      }
           list action
      container token {
             key "action-id";
        leaf action-id token {
          type string;
             mandatory true;
          description
               "this represents
            "This should be defined according to
            the policy-action-id."; token scheme.";
        }
        description
          "This object represents actions that a
               Security Admin wants to perform based on
               a certain traffic class."; the token method.";
        leaf name token-server {
          type string; inet:ipv4-address;
            description
              "The name of token-server information if the policy-action object.";
              authentication method is token-based";
          }

             leaf date
        }
      container certificate {
               type yang:date-and-time;
        description
                 "When
          "This represents the object was created or last
                 modified.";
             } certificate method.";
        leaf primary-action certificate {
          type string; certificate-type;
          description
            "This field identifies represents the action when a rule
                 is matched by NSF. The action could be one of
                 'PERMIT', 'DENY', 'RATE-LIMIT', 'TRAFFIC-CLASS',
                 'AUTHENTICATE-SESSION', 'IPS, 'APP-FIREWALL', etc."; certificate-type.";
        }
        leaf secondary-action certificate-server {
          type string; inet:ipv4-address;
            description
                 "This field identifies additional actions
              "The certificate-server information if
                 a rule
               the authentication method is matched. This could be one of 'LOG',
                 'SYSLOG', 'SESSION-LOG', etc.";
               certificate-based";
        }
      }
      container single-sign-on {
        description
          "This represents the authentication method
          for single-sing-on.";
        leaf precedence credential {
          type uint16; certificate-type;
          description
            "This field identifies represents the precedence
                 assigned to this rule by Security Admin.
                 This is helpful in conflict resolution
                 when two or more rules match a given
                 traffic class.";
           } authentication
            using user credentials.";

        }
       list owner {
             key "owner-id";
        leaf owner-id certificate-server {
          type string;
             mandatory true; inet:ipv4-address;
            description
               "this represents
              "The certificate-server information if
              the owner-id."; authentication method is
              certificate-based";
        }
      }
    description
      "This field defines the owner of this policy.
               Only represents the owner policy managegement method.";
  }
}
container endpoint-group {
        description
          "A logical entity in their business
          environment, where a security policy
          is authorized to modify the
               contents of the policy.";
             leaf name be applied.";
        list user-group {
               type string;
          uses user-group;
          key "name";
          description
                 "The name of
            "This represents the owner."; user group.";
        }
             leaf date
        list device-group {
               type yang:date-and-time;
          uses device-group;
          key "name";
          description
                 "When
            "This represents the object was created or last
                 modified."; device group.";
        }
        list location-group{
          uses location-group;
          key "name";
          description
            "This represents the location group.";
        }

}
container threat-feed threat-prevention {
      description
      "this describes the list of threat-feed."; threat-prevention.";
      list threat-feed threat-feed-list {
        uses meta;
        key "threat-feed-id";
             leaf threat-feed-id {
             type uint16;
             mandatory true;
             description
               "This represents the threat-feed-id.";
             } "name";
          description
          "This represents the threat feed within the
               threat-prevention-list.";
             leaf name list.";
        container threat-feed-server {
               type string;
          uses ip-address;
          description
                 "Name of
            "This describes the theat feed.";
             } threat-feed server.";
          leaf date threat-feed-description {
            type yang:date-and-time; string;
            description
                 "when the
            "This object containes threat-feed was created.";
            description.";
          }

             leaf feed-type {
               type enumeration {
                 enum unknown {
                   description
                     "feed-type is unknown.";
        }
                 enum ip-address
        leaf-list threat-file-types {
                   description
                     "feed-type is IP address.";
                 }
                 enum url
          type identityref {
                   description
                     "feed-type is URL.";
                 }
            base malware-file-type;
          }
               mandatory true;
          default executable-file;
          description
            "This determined whether contains a list of file types needed to
            be scanned for the feed-type is IP address
                 based or URL based."; virus.";
        }

             leaf feed-server
        leaf-list signatures {
          type inet:ipv4-address; string;
          description
                 "this
            "This contains threat feed server information.";
             }

             leaf feed-priority {
               type uint16;
               description
                 "this describes the priority a list of signatures or hash
            of the threat from
                 0 to 5, where 0 means the threat is minimum and
                 5 meaning the maximum."; threats.";
        }
      }
      list custom-list payload-content {
          uses payload-string;
          key "custom-list-id";
             leaf custom-list-id {
             type uint16; "name";
          description
             "this describes
            "This represents the custom-list-id."; payload-string group.";
      }
             description
             "this
    }
  }
}
<CODE ENDS>

                    Figure 23: YANG for policy-general

10.  Example XML Output for Various Scenarios

   This section describes the threat-prevention custom list.";
             leaf name {
               type string;
               description
                 "Name XML instances for different policies
   examples that are delivered through Consumer-Facing Interface.  The
   considered use cases are: VoIP/VoLTE security service, DDoS-attack
   mitigation, time-based firewall as a web-filter.

10.1.  DB registration: Information of positions and devices (Endpoint
       group)

   In order to create a rule of a security policy, it is essential to
   first register data (those which are used to form such rule) to the
   database.  For example, The endpoint group consists of three
   different groups: user-group, device-group, and payload-group.  Each
   of these groups have separate group members with information other
   than meta ("name" or "date"), such as ip-addresses or protocols used
   by devices.  Figure 24 shows an example XML representation of the custom-list.";
             }

             leaf date {
               type yang:date-and-time;
               description
                 "when
   registered information for the user-group and device-group.

         <?xml version="1.0" encoding="UTF-8" ?>
           <ietf-i2nsf-cfi-policy:endpoint-group>
             <user-group>
               <name>employees</name>
               <range-ip-address>
                 <start-ip-address>221.159.112.1</start-ip-address>
                 <end-ip-address>221.159.112.90</end-ip-address>
               </range-ip-address>
             </user-group>
             <device-group>
               <name>webservers</name>
               <range-ip-address>
                 <start-ip-address>221.159.112.91</start-ip-address>
                 <end-ip-address>221.159.112.97</end-ip-address>
               </range-ip-address>
               <protocol>http</protocol>
               <protocol>https</protocol>
             </device-group>
           </ietf-i2nsf-cfi-policy:endpoint-group>

      Figure 24: Registering user-group and device-group information

10.2.  Scenario 1: Block SNS access during business hours

   The first example scenario is to "block SNS access during business
   hours" using a time-based firewall policy.  In this scenario, all
   users registered as "employee" in the custom user-group list was created.";
             }

             leaf list-type {
               type enumeration {
                 enum unknown {
                   description
                     "list-type is unknown.";
                 }
                 enum ip-address {
                   description
                     "list-type is IP address.";
                 }
                 enum mac-address {
                   description
                     "list-type is MAC address.";
                 }
                 enum url {
                   description
                     "list-type is URL.";
                 }
               }
               mandatory true;
               description
                 "This determined whether are unable to
   access Social Networking Services (SNS) during the feed-type office hours.  The
   XML instance is IP address
                 based or URL based.";
             }
            leaf list-property {
               type enumeration {
                 enum unknown {
                   description
                     "list-property described below:

   <?xml version="1.0" encoding="UTF-8" ?>
   <ietf-i2nsf-cfi-policy:policy>
     <policy-name>security_policy_for_blocking_sns</policy-name>
     <rule>
       <rule-name>block_access_to_sns_during_office_hours</rule-name>
       <event>
         <time-information>
           <begin-time>09:00</begin-time>
           <end-time>18:00</end-time>
         </time-information>
       </event>
       <condition>
         <firewall-condition>
           <source-target>
             <src-target>employees</src-target>
           </source-target>
         </firewall-condition>
         <custom-condition>
           <destination-target>
             <dest-target>sns-websites</dest-target>
           </destination-target>
         </custom-condition>
       </condition>
       <action>
         <primary-action>drop</primary-action>
       </action>
     </rule>
   </ietf-i2nsf-cfi-policy:policy>

             Figure 25: An XML Example for Time-based Firewall

   Time-based-condition Firewall

   1.  The policy name is unknown.";
                 }
                 enum blacklist {
                   description
                     "list-property "security_policy_for_blocking_sns".

   2.  The rule name is blacklist.";
                 }
                 enum whitelist {
                   description
                     "list-property "block_access_to_sns_during_office_hours".

   3.  The Source-target is whitelist.";
                 }
               }
               mandatory true;
               description
                 "This determined whether the list-type "employees".

   4.  The destination target is blacklist
                 or whitelist.";
             }

             leaf list-content {
               type string;
               description
                 "This describes the contents of the custom-list.";
             }
         }
         list malware-scan-group {
             key "malware-scan-group-id";
             leaf malware-scan-group-id {
             type uint16;
             mandatory true;
             description
             "This "sns-websites". "sns-websites" is the malware-scan-group-id.";
             }
             description
             "This
       key which represents the malware-scan-group.";
             leaf name {
               type string;
               description
                 "Name of the malware-scan-group.";
             }

             leaf date {
               type yang:date-and-time;
               description
                 "when the malware-scan-group was created.";
             }

             leaf signature-server {
               type inet:ipv4-address;
               description
                 "This describes list containing the signature server of information, such as
       URL, about sns-websites.

   5.  The action required is to "drop" any attempt to connect to
       websites related to Social networking.

10.3.  Scenario 2: Block malicious VoIP/VoLTE packets coming to the
                 malware-scan-group.";
             }

             leaf file-types {
               type string;
               description
                 "This contains a list of file types needed
       company

   The second example scenario is to "block malicious VoIP/VoLTE packets
   coming to
                 be scanned for the virus.";
             }

             leaf malware-signatures {
               type string;
               description
                 "This contains company" using a list VoIP policy.  In this scenario, the
   calls comming from from VOIP and/or VOLTE sources with VOLTE IDs that
   are classified as malicious are dropped.  The IP addresses of malware signatures or hash.";
             }
         }
         list event-map-group {
             key "event-map-group-id";
             leaf event-map-group-id {
             type uint16;
             mandatory true;
             description
             "This is the event-map-group-id.";
             }
             description
             "This represents
   employees and malicious VOIP IDs should be blocked are stored in the event map group.";
             leaf name {
               type string;
               description
                 "Name
   database or datastore of the event-map.";
             }

             leaf date {
               type yang:date-and-time;
               description
                 "when enterprise.  Here and the event-map was created.";
             }

             leaf security-events {
               type string;
               description
                 "This contains a list rest of the
   cases assume that the security events.";
             }

             leaf threat-map {
               type string;
               description
                 "This contains a list administrators or someone responsible
   for the existing and newly generated policies, are not aware of threat levels.";
             }
         }
       }
   }
   <CODE ENDS> which
   and/or how many NSFs are needed to meet the security requirements.
   Figure 4: Policy Instance YANG Example for VoIP Security Services

6.  Example XML Output for Various Use Cases

   In this section, we present an XML example for various use cases.
   Here, we show 26 represents the XML document generated from YANG discussed
   in previous sections.  Once a high-level seucurity policy examples that can be is created
   by a security admin, it is delivered by the Consumer-Facing
   Interface, through
   consumer-facing interface.  For now, RESTCONF server, to the considered use cases are:
   VoIP security service, DDoS-attack mitigation, time-based firewall,
   and web-filter.

6.1.  Case 1: controller.  The
   XML instance is described below:

<?xml version="1.0" encoding="UTF-8" ?>
<ietf-i2nsf-cfi-policy:policy>
  <policy-name>security_policy_for_blocking_malicious_voip_packets</policy-name>
  <rule>
    <rule-name>Block_malicious_voip_and_volte_packets</rule-name>
    <condition>
      <custom-condition>
        <source-target>
          <src-target>malicious-id</src-target>
        </source-target>
      </custom-condition>
      <firewall-condition>
        <destination-target>
          <dest-target>employees</dest-target>
        </destination-target>
      </firewall-condition>
    </condition>
    <action>
      <primary-action>drop</primary-action>
    </action>
  </rule>
</ietf-i2nsf-cfi-policy:policy>

            Figure 26: An XML Example for VoIP Security Service

   Custom-condition Firewall

   1.  The first example policy name is
       "security_policy_for_blocking_malicious_voip_packets".

   2.  The rule name is "Block_malicious_voip_and_volte_packets".

   3.  The Source-target is "malicious-id".  This can be a VoIP policy.  Here, we single ID or
       a list of IDs, depending on how the ID are stored in the
       database.  The "malicious-id" is the key so that the security
       admin can read every stored malicious VOIP IDs that are named as
       "malicious-id".

   4.  The destination target is "employees". "employees" is the key
       which represents the list containing information about employees,
       such as IP addresses.

   5.  The action required is "drop" when any incoming packets are going to drop calls
   commin from
       "malicious-id".

10.4.  Scenario 3: Mitigate HTTP and HTTPS flood attacks on a country with an Ip from South Africa that is classified
   as malicious.  The below figure shows the XML document generated by
   using the YANG data tree as shown in the previous section.

<?xml version="1.1" encoding="UTF-8"?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:restconf:base:1.0">
 <edit-config>
  <target>
   <running/>
  </target>
   <config>
    <i2nsf-cf-interface-voip-req nc:operation="create">
        <policy-voip>
            <rule-voip>
                <rule-voip-id>01</rule-voip-id>
                <rule-voip-name>voip-policy-example</rule-voip-name>
                <rule-voip-date>2017.10.25/20:30:32</rule-voip-date>
                <event>
                    <event-id>01</event-id>
                    <event-name>voip_call</event-name>
                    <event-date>2017.10.25/20:30:32</event-date>
                    <event-type>malicious</event-type>
                    <event-map-group>19</event-map-group>
                    <enable>True</enable>
                </event>
                <condition>
                    <condition-id>01</condition-id>
                    <source-caller>105.176.0.0</source-caller>
                    <destination-callee>192.168.171.35</destination-callee>
                    <time-information>
                        <begin-time>22:00</begin-time>
                        <end-time>08:00</end-time>
                    </time-information>
                    <match-direction>default</match-direction>
                    <exeption>00</exeption>
                </condition>
                <action>
                    <action-id>01</action-id>
                    <action-name>action-voip</action-name>
                    <action-date>2017.10.25/20:30:32</action-date>
                    <primary-action>DENY</primary-action>
                    <secondary-action>LOG</secondary-action>
                </action>
                <precedence>none</precedence>
              <owner>
                <owner-id>01</owner-id>
                <name>i2nsf-admin</name>
              </owner>
            </rule-voip>
        </policy-voip>
    </i2nsf-cf-interface-voip-req>
   </config>
 </edit-config>
</rpc>
            Figure 5: An XML Example for VoIP Security Service

6.2.  Case 2: DDoS-Attack Mitigation company
       web Server

   The second third example scenario is to "Mitigate HTTP and HTTPS flood
   attacks on a company web Server" using a DDoS-attack mitigation
   policy.  Here, the time information is not set because the service
   provided by the network should be maintained at all times.  If the
   packets sent by any sources are more than the set threshold, then the
   admin can set the percentage of the packets to be dropped to safely
   maintain the service.

   <?xml version="1.1" encoding="UTF-8"?>
   <rpc message-id="2" xmlns="urn:ietf:params:xml:ns:restconf:base:1.0">
    <edit-config>
     <target>
      <running/>
     </target>
      <config>
       <i2nsf-cf-interface-ddos-req nc:operation="create">
           <policy-ddos>
               <rule-ddos>
                   <rule-ddos-id>03</rule-ddos-id>
                   <rule-ddos-name>ddos-policy-example</rule-ddos-name>
                   <rule-ddos-date>2018.10.25/11:25:32</rule-ddos-date>
                   <event>
                       <event-id>03</event-id>
                       <event-name>ddos</event-name>
                       <event-date>2018.10.25/11:25:32</event-date>
                       <event-type>ddos</event-type>
                       <event-map-group>03</event-map-group>
                       <enable>True</enable>
                   </event>
                   <condition>
                       <condition-id>03</condition-id>
                       <source-ip>Any</source-ip>
                       <destination-ip>192.168.173.37</destination-ip>
                       <threshold>30</threshold>
                       <time-information>
                           <begin-time>--:--</begin-time>
                           <end-time>--:--</end-time>
                       </time-information>
                       <match-direction>default</match-direction>
                       <exeption>00</exeption>
                   </condition>
                   <action>
                       <action-id>03</action-id>
                       <action-name>action-ddos</action-name>
                       <action-date>2018.10.25/11:25:32</action-date>
                       <primary-action>REJECT</primary-action>
                       <secondary-action>LOG</secondary-action>
                   </action>
                   <precedence>none</precedence>
                 <owner>
                   <owner-id>03</owner-id>
                   <name>i2nsf-admin</name>
                 </owner>
               </rule-ddos>
           </policy-ddos>
       </i2nsf-cf-interface-ddos-req>
      </config>
    </edit-config>
   </rpc>

            Figure 6: An XML Example for DDoS-attack Mitigation

6.3.  Case 3: Time-Based Firewall

   The third example is a time-based firewall policy.  Consider a Smart
   Factory which operates from 9 am to 7 pm during the working days.
   During these hours, only the admin responsible for operating  In this scenario, the
   factory source is allow set as "any"
   to access a control system.  The below figure show
   that block any access during outside the operating hours is rejected.

   <?xml version="1.1" encoding="UTF-8"?>
   <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:restconf:base:1.0">
    <edit-config>
     <target>
      <running/>
     </target>
      <config>
       <i2nsf-cf-interface-fw-req nc:operation="create">
           <policy-fw>
               <rule-fw>
                   <rule-fw-id>01</rule-fw-id>
                   <rule-fw-name>fw-policy-example</rule-fw-name>
                   <rule-fw-date>2018.10.25/11:19:05</rule-fw-date>
                   <event>
                       <event-id>01</event-id>
                       <event-name>invalid_access</event-name>
                       <event-date>2018.10.25/11:19:05</event-date>
                       <event-type>invalid</event-type>
                       <event-map-group>02</event-map-group>
                       <enable>True</enable>
                   </event>
                   <condition>
                       <condition-id>02</condition-id>
                       <source-ip>115.176.0.1</source-ip>
                       <destination-ip>192.168.173.41</destination-ip>
                       <time-information>
                           <begin-time>09:00</begin-time>
                           <end-time>17:00</end-time>
                       </time-information>
                       <match-direction>default</match-direction>
                       <exeption>00</exeption>
                   </condition>
                   <action>
                       <action-id>02</action-id>
                       <action-name>action-fw</action-name>
                       <action-date>2018.10.25/11:19:05</action-date>
                       <primary-action>PASS</primary-action>
                       <secondary-action>LOG</secondary-action>
                   </action>
                   <precedence>none</precedence>
                 <owner>
                   <owner-id>02</owner-id>
                   <name>i2nsf-admin</name>
                 </owner>
               </rule-fw>
           </policy-fw>
       </i2nsf-cf-interface-fw-req>
      </config>
    </edit-config>
   </rpc>

             Figure 7: An XML Example for Time-based Firewall

6.4.  Case 4: Time-Based Web-Filter sources which send abnormal amount of packets.  The last example
   destination is a time-based web-filter policy.  Let us suppose
   that a owner of an enterprise wants to forbid access to a specific set of websites, such as Facebook, Youtube, Instagram, etc.  The
   below figure shows an example policy an admin of a sector or
   department can deploy.

 <?xml version="1.1" encoding="UTF-8"?>
 <rpc message-id="4" xmlns="urn:ietf:params:xml:ns:restconf:base:1.0">
  <edit-config>
   <target>
    <running/>
   </target>
    <config>
     <i2nsf-cf-interface-wf-req nc:operation="create">
         <policy-wf>
             <rule-wf>
                 <rule-wf-id>03</rule-wf-id>
                 <rule-wf-name>wf-policy-example</rule-wf-name>
                 <rule-wf-date>2018.10.26/14:03:17</rule-wf-date>
                 <event>
                     <event-id>04</event-id>
                     <event-name>wf</event-name>
                     <event-date>2018.10.26/14:03:17</event-date>
                     <event-type>wf</event-type>
                     <event-map-group>04</event-map-group>
                     <enable>True</enable>
                 </event>
                 <condition>
                     <condition-id>04</condition-id>
                     <source-ip>192.168.1.3</source-ip>
                     <destination-url>www.facebook.com</destination-url>
                     <time-information>
                         <begin-time>09:00</begin-time>
                         <end-time>18:00</end-time>
                     </time-information>
                     <match-direction>default</match-direction>
                     <exeption>00</exeption>
                 </condition>
                 <action>
                     <action-id>04</action-id>
                     <action-name>action-wf</action-name>
                     <action-date>2018.10.26/14:03:17</action-date>
                     <primary-action>REJECT</primary-action>
                     <secondary-action>LOG</secondary-action>
                 </action>
                 <precedence>none</precedence>
               <owner>
                 <owner-id>03</owner-id>
                 <name>i2nsf-admin</name>
               </owner>
             </rule-wf>
         </policy-wf>
     </i2nsf-cf-interface-wf-req>
    </config>
  </edit-config>
 </rpc>

            Figure 8: An XML Example for Time-based Web-filter

6.5.  Case 5: Threat-Feed Configuration

   The threat-feed container described above can convey various sources
   containing information concerning security threats.  One good example
   can be STIX.  STIX (Structured Threat Information Expression) "web_server01".  Once the rule is a
   language set and serialization format used to exchange cyber threat
   intelligence (CTI).  It is a lanauge to describe threat information
   in a standardized format to enable exchanging
   delivered and sharing them.  The
   blow figure show enforced to the necessary configuration, which can be generated
   and delivered nsfs by consumer-facing interface.

      ...
      ...
        <configuration-tf>
            <threat-feed>
                <threat-feed-id>02</threat-feed-id>
                <threat-feed-name>stix</threat-feed-name>
                <threat-feed-date>2018.10.25/11:25:32</threat-feed-date>
                <threat-feed-type>ip-address</threat-feed-type>
                <feed-server>105.134.171.24</feed-server>
                <feed-priority>ip-address</feed-priority>
            </threat-feed>
        </configuration-tf>
    ...
    ... the securiy controller, the
   NSFs will monitor the incoming packet amounts and the destination to
   act according to the rule set.  The XML instance is described below:

   <?xml version="1.0" encoding="UTF-8" ?>
   <ietf-i2nsf-cfi-policy:policy>
     <policy-name>security_policy_for_ddos_attacks</policy-name>
     <rule>
       <rule-name>100_packets_per_second</rule-name>
       <condition>
         <ddos-condition>
           <destination-target>
             <dest-target>webservers</dest-target>
           </destination-target>
           <rate-limit>
             <packet-per-second>100</packet-per-second>
           </rate-limit>
         </ddos-condition>
       </condition>
       <action>
         <primary-action>drop</primary-action>
       </action>
     </rule>
   </ietf-i2nsf-cfi-policy:policy>

           Figure 9: 27: An XML Example for Threat-feed Configuration

   Usually, STIX can be obtained from a TAXII server DDoS-attack Mitigation

   DDoS-condition Firewall

   1.  The policy name is "security_policy_for_ddos_attacks".

   2.  The rule name is "100_packets_per_second".

   3.  The destination target is "webservers". "webservers" is the key
       which contains a
   collection of cyber threat information formatted in STIX.  Here, represents the
   "feed-server" leaf contains list containing information, such as IP
       addresses and ports, about web-servers.

   4.  The rate limit exists to limit the ip-address incoming amount of packets per
       second.  In this case the TAXII server, so
   that recent threat related information can be collected when rate limit is "100" packets per second.
       This amount depends on the packet receiving capacity of the
   configuration
       server devices.

   5.  The Source-target is set.

7. all sources which send abnormal amount of
       packets.

   6.  The action required is to "drop" packet reception is more than
       100 packets per second.

11.  Security Considerations

   The data model for the I2NSF Consumer-Facing Interface is derived
   from the I2NSF Consumer-Facing Interface Information Model
   [client-facing-inf-im], so the same security considerations with the
   information model should be included in this document.  The data
   model needs to support a mechanism to protect Consumer-Facing
   Interface to Security Controller.

8.

12.  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-cfi-policy
            Registrant Contact: The I2NSF.
            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].

           name: ietf-i2nsf-cfi-policy
           namespace: urn:ietf:params:xml:ns:yang:ietf-i2nsf-cfi-policy
           prefix: cfi-policy
           reference: RFC 7950

13.  References

8.1.

13.1.  Normative References

   [RFC3444]  Pras, A., "On the Difference between Information Models
              and Data Models", RFC 3444, January 2003.

8.2.

13.2.  Informative References

   [client-facing-inf-im]
              Kumar, R., Lohiya, A., Qi, D., Bitar, N., Palislamovic,
              S., and L. Xia, "Information model for Client-Facing
              Interface to Security Controller", draft-kumar-i2nsf-
              client-facing-interface-im-07 (work in progress), July
              2018.

   [client-facing-inf-req]
              Kumar, R., Lohiya, A., Qi, D., Bitar, N., Palislamovic,
              S., Lohiya, A., Qi, D., Bitar, N., Palislamovic,
              S., and L. Xia, "Requirements for Client-Facing Interface
              to Security Controller", draft-ietf-i2nsf-client-facing-
              interface-req-05 (work in progress), May 2018.

   [draft-ietf-i2nsf-capability]
              Xia, L., Strassner, J., Huawei, Basile, C., PoliTo, Lopez,
              D., and TID, "Information Model of NSFs Capabilities",
              draft-ietf-i2nsf-capability-04 (work in progress), October
              2018.

   [i2nsf-terminology]
              Hares, S., Strassner, J., Lopez, D., Birkholz, H., and L.
              Xia, "Information model for Client-Facing Interface to
              Security Controller", draft-ietf-i2nsf-terminology-07
              (work in progress), January 2019.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6020]  Bjorklund, M., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", RFC 6020,
              October 2010.

   [RFC6087]  Bierman, A., "Guidelines for Authors and Reviewers of YANG
              Data Model Documents", RFC 6087, DOI 10.17487/RFC6087,
              January 2011, <https://www.rfc-editor.org/info/rfc6087>.

   [RFC6991]  Schoenwaelder, J., Ed., "Common YANG Data Types",
              RFC 6991, DOI 10.17487/RFC6991, July 2013,
              <https://www.rfc-editor.org/info/rfc6991>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8192]  Hares, S., Lopez, D., Zarny, M., Jacquenet, C., Kumar, R.,
              and L. Xia, "Requirements for Client-Facing Interface J. Jeong, "Interface to Network Security Controller", draft-ietf-i2nsf-client-facing-
              interface-req-05 (work in progress), May 2018.

   [i2nsf-framework] Functions
              (I2NSF): Problem Statement and Use Cases", RFC 8192,
              DOI 10.17487/RFC8192, July 2017,
              <https://www.rfc-editor.org/info/rfc8192>.

   [RFC8329]  Lopez, D., Lopez, E., Dunbar, L., Strassner, J., and R.
              Kumar, "Framework for Interface to Network Security
              Functions", RFC 8329, DOI 10.17487/RFC8329, February 2018.

   [i2nsf-terminology]
              Hares, S., Strassner, J., Lopez, D., Birkholz, H., 2018,
              <https://www.rfc-editor.org/info/rfc8329>.

   [RFC8340]  Bjorklund, M. and L.
              Xia, "Information model for Client-Facing Interface to
              Security Controller", draft-ietf-i2nsf-terminology-06
              (work in progress), July 2018.

   [RFC6020]  Bjorklund, M., Berger, Ed., "YANG - A Data Modeling Language for the
              Network Configuration Protocol (NETCONF)", Tree Diagrams",
              BCP 215, RFC 6020,
              October 2010. 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

Appendix A.  Changes from draft-ietf-i2nsf-consumer-facing-interface-
             dm-01
             dm-02

   The following changes have been made from draft-ietf-i2nsf-consumer-
   facing-interface-dm-01:
   facing-interface-dm-02:

   o  In Section 6, four additional XML output examples (VoIP, DDoS-
      attack, Time-based Firewall this version of the WG draft, we merged the
      [client-facing-inf-im] and Web-filter) draft-ietf-i2nsf-consumer-facing-
      interface-dm-02 drafts.  In sections 4 to 9, we describe the
      information model for the security policies
      are added.  Also, an example XML output for Threat-feed
      configuration is added using STIX delivered through the
      Consumer-Facing Interface.  In sections 10 to 12, we provide and TAXII as a threat-feed
      example.

   o  The overall organization of
      discuss the YANG data model and its data types example XML outputs of security
      policies for various use cases.

   o  In Section 10, the following changes have also been reviewed made: For "time-
      information" container in event sub-module list, the enforcement
      type is defined into three different types (admin-enforced, time-
      enforced, and corrected, event-enforced).  Also, begin-time and end-time type
      has been defined seperately.  The security policies can now be set
      recursively (daily, weekly, and produced monthly).

   o  "policy-role" now has the
      corresponding data tree access-profile container, and previlege
      can be set separately per profile.

   o  "policy-user" information, such as shown email and password is newly
      defined by regular expressions.

   o  "authentication-method" in "policy-mgnt-auth-method" has been
      modified.  More specifically, the Sections 4 authentication-method type has
      been changed from string to choice so that one can choose between
      password, token, and 5. certificate.  If not selected, password is
      used as a default.

   o  Overall editorial errors have  "Certificate-type" has been corrected. re-defined to include common
      certificate extensions, such as ".CRT", "CER", and "KEY".

   o  Used groupings to represent the groups in the Endpoint groups.

   o  Added examples for registering information (i.e., endpoint-groups,
      threat-prevention, and multi-tenancy.)

Appendix B.  Acknowledgments

   This work was supported by Institute for Information & communications
   Technology Promotion(IITP) grant funded by the Korea government(MSIP)
   (No.R-20160222-002755, Cloud based Security Intelligence Technology
   Development for the Customized Security Service Provisioning).

Appendix C.  Contributors

   This document is made by the group effort of I2NSF working group.
   Many people actively contributed to this document, such as Mahdi F.
   Dachmehchi and Daeyoung Hyun.  The authors sincerely appreciate their
   contributions.

   The following are considered co-
   authors:

   o co-authors of this document:

   Hyoungshick Kim (Sungkyunkwan University)

   o
   Department of Software
   2066 Seo-ro Jangan-gu
   Suwon, Gyeonggi-do 16419
   Republic of Korea

   EMail: hyoung@skku.edu

   Seungjin Lee (Sungkyunkwan University)

   o
   Department of Electrical and Computer Engineering
   2066 Seo-ro Jangan-gu
   Suwon, Gyeonggi-do 16419
   Republic of Korea

   EMail: jine33@skku.edu

   Jinyong Tim Kim (Sungkyunkwan University)
   Department of Electrical and Computer Engineering
   2066 Seo-ro Jangan-gu
   Suwon, Gyeonggi-do 16419
   Republic of Korea

   EMail: timkim@skku.edu

   Anil Lohiya
   Juniper Networks
   1133 Innovation Way
   Sunnyvale, CA 94089
   US

   EMail: alohiya@juniper.net

   Dave Qi
   Bloomberg
   731 Lexington Avenue
   New York, NY 10022
   US

   EMail: DQI@bloomberg.net

   Nabil Bitar
   Nokia
   755 Ravendale Drive
   Mountain View, CA 94043
   US

   EMail: nabil.bitar@nokia.com

   Senad Palislamovic
   Nokia
   755 Ravendale Drive
   Mountain View, CA 94043
   US

   EMail: senad.palislamovic@nokia.com

   Liang Xia
   Huawei
   101 Software Avenue
   Nanjing, Jiangsu 210012
   China

   EMail: Frank.Xialiang@huawei.com

Authors' Addresses

   Jaehoon Paul Jeong
   Department of Software
   Sungkyunkwan University
   2066 Seobu-Ro, Jangan-Gu
   Suwon, Gyeonggi-Do  16419
   Republic of Korea

   Phone: +82 31 299 4957
   Fax:   +82 31 290 7996
   EMail: pauljeong@skku.edu
   URI:   http://iotlab.skku.edu/people-jaehoon-jeong.php
   Eunsoo Kim
   Department of Electrical and Computer Engineering
   Sungkyunkwan University
   2066 Seobu-Ro, Jangan-Gu
   Suwon, Gyeonggi-Do  16419
   Republic of Korea

   Phone: +82 31 299 4104
   EMail: eskim86@skku.edu
   URI:   http://seclab.skku.edu/people/eunsoo-kim/

   Tae-Jin Ahn
   Korea Telecom
   70 Yuseong-Ro, Yuseong-Gu
   Daejeon  305-811
   Republic of Korea

   Phone: +82 42 870 8409
   EMail: taejin.ahn@kt.com

   Rakesh Kumar
   Juniper Networks
   1133 Innovation Way
   Sunnyvale, CA  94089
   USA

   EMail: rkkumar@juniper.net

   Susan Hares
   Huawei
   7453 Hickory Hill
   Saline, MI  48176
   USA

   Phone: +1-734-604-0332
   EMail: shares@ndzh.com