Security Policy Translation in Interface to Network Security Functions
Department of Computer Engineering
Sungkyunkwan University2066 Seobu-Ro, Jangan-GuSuwonGyeonggi-Do16419Republic of Korea+82 10 8520 8039jin.hyuk@skku.edu
Department of Software
Sungkyunkwan University2066 Seobu-Ro, Jangan-GuSuwonGyeonggi-Do16419Republic of Korea+82 31 299 4957+82 31 290 7996pauljeong@skku.eduhttp://iotlab.skku.edu/people-jaehoon-jeong.php
Department of Computer Engineering
Sungkyunkwan University2066 Seobu-Ro, Jangan-GuSuwonGyeonggi-Do16419Republic of Korea+82 10 8273 0930timkim@skku.edu
Security
I2NSF Working GroupInternet-Draft
This document proposes a scheme of security policy translation (i.e., Security Policy Translator) in Interface to Network Security Functions (I2NSF) Framework. When I2NSF User delivers a high-level security policy for a security service, Security Policy Translator in Security Controller translates it into a low-level security policy for Network Security Functions (NSFs).
This document defines a scheme of a security policy translation in Interface to Network Security Functions (I2NSF) Framework . First of all, this document explains the necessity of a security policy translator (shortly called policy translator) in the I2NSF framework.
The policy translator resides in Security Controller in the I2NSF framework and translates a high-level security policy to a low-level security policy for Network Security Functions (NSFs). A high-level policy is specified by I2NSF User in the I2NSF framework and is delivered to Security Controller via Consumer-Facing Interface . It is translated into a low-level policy by Policy Translator in Security Controller and is delivered to NSFs to execute the rules corresponding to the low-level policy via NSF-Facing Interface .
This document uses the terminology specified in .
Security Controller acts as a coordinator between I2NSF User and NSFs. Also, Security Controller has capability information of NSFs that are registered via Registration Interface by Developer's Management System . As a coordinator, Security Controller needs to generate a low-level policy in the form of security rules intended by the high-level policy, which can be understood by the corresponding NSFs.
A high-level security policy is specified by RESTCONF/YANG , and a low-level security policy is specified by NETCONF/YANG . The translation from a high-level security policy to the corresponding low-level security policy will be able to rapidly elevate I2NSF in real-world deployment. A rule in a high-level policy can include a broad target object, such as employees in a company for a security service (e.g., firewall and web filter). Such employees may be from human resource (HR) department, software engineering department, and advertisement department. A keyword of employee needs to be mapped to these employees from various departments. This mapping needs to be handled by a policy translator in a flexible way while understanding the intention of a policy specification. Let us consider the following two policies:
Block my son's computers from malicious websites. Drop packets from the IP address 10.0.0.1 and 10.0.0.3 to harm.com and illegal.com
The above two sentences are examples of policies for blocking malicious websites. Both policies are for the same operation. However, NSF cannot understand the first policy, because the policy does not have any specified information for NSF. To set up the policy at an NSF, the NSF MUST receive at least the source IP address and website address for an operation. It means that the first sentence is NOT compatible for an NSF policy.
Conversely, when I2NSF users request a security policy to the system, they never make a security policy like the second example. For generating a security policy like the second sentence, the user MUST know that the NSF needs to receive the specified information, source IP address and website address. It means that the user understands the NSF professionally, but there are not many professional users in a small size of company or at a residential area.
In conclusion, the I2NSF user prefers to issue a security policy in the first sentence, but an NSF will require the same policy as the second sentence with specific information. Therefore, an advanced translation scheme of security policy is REQUIRED in I2NSF.
This document proposes an approach using Automata theory for the policy tranlation, such as Deterministic Finite Automaton (DFA) and Context-Free Grammar (CFG). Note that Automata theory is the foundation of programming language and compiler. Thus, with this approach, I2NSF User can easily specify a high-level security policy that will be enforced into the corresponding NSFs with a compatibly low-level security policy with the help of Policy Translator. Also, for easy management, a modularized translator structure is proposed.
Common security policies are created by Extensible Markup Language (XML) files. A popular way to change the format of an XML file is to use an Extensible Stylesheet Language Transformation (XSLT) document. XSLT is an XML-based language to transform an input XML file into another output XML file. However, the use of XSLT makes it difficult to manage the policy translator and to handle the registration of new capabilities of NSFs. With the necessity for a policy translator, this document describes a policy translator based on Automata theory .
shows the overall design for Policy Translator in Security Controller. There are three main components for Policy Translator: Data Extractor, Data Converter, and Policy Generator.
Extractor is a DFA-based module for extracting data from a high-level policy which I2NSF User delivered via Consumer-Facing Interface. Data Converter converts the extracted data to the capabilities of target NSFs for a low-level policy. It refers to NSF Database (DB) in order to convert an abstract subject or object into the corresponding concrete subject or object (e.g., IP address and website URL). Policy Generator generates a low-level policy which will execute the NSF capabilities from Converter.
shows a design for Data Extractor in the policy translator. If a high-level policy contains data along the hierarchical structure of the standard Consumer-Facing Interface YANG data model , data can be easily extracted using the state transition machine, such as DFA. The extracted data can be processed and used by an NSF to understand it. Extractor can be constructed by designing a DFA with the same hierarchical structure as a YANG data model.
After constructing a DFA, Data Extractor can extract all of data in the enterred high-level policy by using state transitions. Also, the DFA can easily detect the grammar errors of the high-level policy. The extracting algorithm of Data Extractor is as follows:
Start from the 'accepter' state. Read the next tag from the high-level policy. Transit to the corresponding state. If the current state is in 'extractor', extract the corresponding data, and then go back to step 2. If the current state is in 'middle', go back to step 2. If there is no possible transition and arrived at 'accepter' state, the policy has no grammar error. Otherwise, there is a grammar error, so stop the process with failure.
To explain the Data Extractor process by referring to an example scenario, assume that Security Controller received a high-level policy for a web-filtering as shown in . Then we can construct DFA-based Data Extractor by using the design as shown in . shows the architecture of Data Extractor that is based on the architection in along with the input high-level policy in . Data Extractor can automatically extract all of data in the high-level policy according to the following process:
Start from the 'accepter' state. Read the first opening tag called '<I2NSF>', and transit to the 'middle 1' state. Read the second opening tag called '<name>', and transit to the 'extractor 1' state. The current state is an 'extractor' state. Extract the data of 'name' field called 'block_web'. Read the second closing tag called '</name>', and go back to the 'middle 1' state. Read the third opening tag called '<cond>', and transit to the 'middle 2' state. Read the fourth opening tag called '<src>', and transit to the 'extractor 2' state. The current state is an 'extractor' state. Extract the data of 'src' field called 'Son's_PC'. Read the fourth closing tag called '</src>', and go back to the 'middle 2' state. Read the fifth opening tag called '<dest>', and transit to the 'extractor 3' state. The current state is an 'extractor' state. Extract the data of 'dest' field called 'malicious'. Read the fifth closing tag called '</dest>', and go back to the 'middle 2' state. Read the third closing tag called '</cond>', and go back to the 'middle 1' state. Read the sixth opening tag called '<action>', and transit to the 'extractor 4' state. The current state is an 'extractor' state. Extract the data of 'action' field called 'block'. Read the sixth closing tag called '</action>', and go back to the 'middle 1' state. Read the first closing tag called '</I2NSF>', and go back to the 'accepter' state. There is no further possible transition, and the state is finally on 'accepter' state. There is no grammar error in so the scanning for data extraction is finished.
The above process is constructed by an extracting algorithm. After finishing all the steps of the above process, Data Extractor can extract all of data in , 'block_web', 'Son's_PC', 'malicious', and 'block'.
Since the translator is modularized into a DFA structure, a visual understanding is feasible. Also, The performance of Data Extractor is excellent compared to one-to-one searching of data for a particular field. In addition, the management is efficient because the DFA completely follows the hierarchy of Consumer-Facing Interface. If I2NSF User wants to modify the data model of a high-level policy, it only needs to change the connection of the relevant DFA node.
Every NSF has its own unique capabilities. The capabilities of an NSF are registered into Security Controller by a Developer's Management System, which manages the NSF, via Registration Interface. Therefore, Security Controller already has all information about the capabilities of NSFs. This means that Security Controller can find target NSFs with only the data (e.g., subject and object for a security policy) of the high-level policy by comparing the extracted data with all capabilities of each NSF. This search process for appropriate NSFs is called by policy provisioning, and it eliminates the need for I2NSF User to specify the target NSFs explicitly in a high-level security policy.
Data Converter selects target NSFs and converts the extracted data into the capabilities of selected NSFs. If Security Controller uses this data convertor, it can provide the policy provisioning function to the I2NSF User automatically. Thus, the translator design provides big benefits to the I2NSF Framework.
shows an example for describing a data conversion in Data Converter. High-level policy data MUST be converted into low-level policy data which are compatible with NSFs. If a ystem administrator attaches a database to Data Converter, it can convert contents by referring to the database with SQL queries. Data conversion in is based on the following list:
'Rule Name' field does NOT need the conversion. 'Source' field SHOULD be converted into a list of target IPv4 addresses. 'Destination' field SHOULD be converted into a URL category list of malicious websites. 'Action' field SHOULD be converted into the corresponding action(s) in NSF capabilities.
Generator searches for proper NSFs which can cover all of capabilities in the high-level policy. Generator searches for target NSFs by comparing only NSF capabilities which is registered by Vendor Management System. This process is called by "policy provisioning" because Generator finds proper NSFs by using only the policy. If target NSFs are found by using other data which is not included in a user's policy, it means that the user already knows the specific knowledge of an NSF in the I2NSF Framework. shows an example of policy provisioning. In this example, log-keeper NSF and web-filter NSF are selected for covering capabilities in the security policy. All of capabilities can be covered by two selected NSFs.
Generator makes low-level security policies for each target NSF with the extracted data. We constructed Generator by using a Context-Free Grammar called CFG. CFG is a set of production rules which can describe all possible strings in a given formal language(e.g., programming language). The low-level policy also has its own language based on a YANG data model of NSF-Facing Interface. Thus, we can construct the productions based on the YANG data model. The productions that makes up the low-level security policy are categorized into two types, 'Content Production' and 'Structure Production'.
Content Production is for injecting data into low-level policies to be generated. A security manager(i.e., a person (or software) to make productions for security policies) can construct Content Productions in the form of an expression as the following productions:
[cont_prod] -> [cont_prod][cont_prod] (Where duplication is allowed.)[cont_prod] -> <cont_tag>[cont_data]</cont_tag>[cont_data] -> data_1 | data_2 | ... | data_n
Square brackets mean non-terminal state. If there are no non-terminal states, it means that the string is completely generated. When the duplication of content tag is allowed, the security manager adds the first production for a rule. If there is no need to allow duplication, the first production can be skipped because it is an optional production.
The second production is the main production for Content Production because it generates the tag which contains data for low-level policy. Last, the third production is for injecting data into a tag which is generated by the second production. If data is changed for an NSF, the security manager needs to change "only the third production" for data mapping in each NSF.
For example, if the security manager wants to express a low-level policy for source IP address, Content Production can be constructed in the following productions:
[cont_ipv4] -> [cont_ipv4][cont_ipv4] (Allow duplication.)[cont_ipv4] -> <ipv4>[cont_ipv4_data]</ipv4>[cont_ipv4_data] -> 10.0.0.1 | 10.0.0.3
Structure Production is for grouping other tags into a hierarchy. The security manager can construct Structure Production in the form of an expression as the following production:
[struct_prod] -> <struct_tag>[prod_1]...[prod_n]</struct_tag>
Structure Production can be expressed as a single production. The above production means to group other tags by the name of a tag which is called by 'struct_tag'. [prod_x] is a state for generating a tag which wants to be grouped by Structure Production. [prod_x] can be both Content Production and Structure Production. For example, if the security manager wants to express the low-level policy for the I2NSF tag, which is grouping 'name' and 'rules', Structure Production can be constructed as the following production where [cont_name] is the state for Content Production and [struct_rule] is the state for Structure Production.
[struct_i2nsf] -> <I2NSF>[cont_name][struct_rules]</I2NSF>
The security manager can build a generator by combining the two productions which are described in and . shows the CFG-based Generator construction of the web-filter NSF. It is constructed based on the NSF-Facing Interface Data Model in . According to , the security manager can express productions for each clause as in following CFG:
[cont_name] -> <rule-name>[cont_name_data]</rule-name>[cont_name_data] -> block_web[cont_ipv4] -> [cont_ipv4][cont_ipv4] (Allow duplication)[cont_ipv4] -> <ipv4>[cont_ipv4_data]</ipv4>[cont_ipv4_data] -> 10.0.0.1 | 10.0.0.3[cont_url] -> [cont_url][cont_url] (Allow duplication)[cont_url] -> <url>[cont_url_data]</url>[cont_url_data] -> harm.com | illegal.com[cont_action] -> <action>[cont_action_data]</action>[cont_action_data] -> drop[struct_packet] -> <packet>[cont_ipv4]</packet>[struct_payload] -> <payload>[cont_url]</payload>[struct_cond] -> <condition>[struct_packet][struct_payload]</condition>[struct_rules] -> <rules>[struct_cond][cont_action]</rules>[struct_i2nsf] -> <I2NSF>[cont_name][struct_rules]</I2NSF>
Then, Generator generates a low-level policy by using the above CFG. The low-level policy is generated by the following process:
Start: [struct_i2nsf]Production 15: <I2NSF>[cont_name][struct_rules]</I2NSF>Production 1: <I2NSF><rule-name>[cont_name_data]</rule-name>[struct_rules]</I2NSF>Production 2: <I2NSF><rule-name>block_web</rule-name>[struct_rules]</I2NSF>Production 14: <I2NSF><rule-name>block_web</rule-name><rules>[struct_cond][cont_action]</rules></I2NSF>Production 13: <I2NSF><rule-name>block_web</rule-name><rules><condition>[struct_packet][struct_payload]</condition>[cont_action]</rules></I2NSF>Production 11: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet>[cont_ipv4]</packet>[struct_payload]</condition>[cont_action]</rules></I2NSF>Production 3: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet>[cont_ipv4][cont_ipv4]</packet>[struct_payload]</condition>[cont_action]</rules></I2NSF>Production 4: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>[cont_ipv4_data]</ipv4><ipv4>[cont_ipv4_data]</ipv4></packet>[struct_payload]</condition>[cont_action]</rules></I2NSF>Production 5: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet>[struct_payload]</condition>[cont_action]</rules></I2NSF>Production 12: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload>[cont_url]</payload></condition>[cont_action]</rules></I2NSF>Production 6: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload>[cont_url][cont_url]</payload></condition>[cont_action]</rules></I2NSF>Production 7: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload><url>[cont_url_data]</url><url>[cont_url_data]</url></payload></condition>[cont_action]</rules></I2NSF>Production 8: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload><url>harm.com</url><url>illegal.com</url></payload></condition>[cont_action]</rules></I2NSF>Production 9: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload><url>harm.com</url><url>illegal.com</url></payload></condition><action>[cont_action_data]</action></rules></I2NSF>Production 10: <I2NSF><rule-name>block_web</rule-name><rules><condition><packet><ipv4>10.0.0.1</ipv4><ipv4>10.0.0.3</ipv4></packet><payload><url>harm.com</url><url>illegal.com</url></payload></condition><action>drop</action></rules></I2NSF>
The last production has no non-terminal state, and the low-level policy is completely generated. shows the generated low-level policy where tab characters and newline characters are added.
First, by showing a visualized translator structure, the security manager can handle various policy changes. Translator can be shown by visualizing DFA and Context-Free Grammar so that the manager can easily understand the structure of Policy Translator.
Second, if I2NSF User only keeps the hierarchy of the data model, I2NSF User can freely create high-level policies. In the case of DFA, data extraction can be performed in the same way even if the order of input is changed. The design of the policy translator is more flexible than the existing method that works by keeping the tag 's position and order exactly.
Third, the structure of Policy Translator can be updated even while Policy Translator is operating. Because Policy Translator is modularized, the translator can adapt to changes in the NSF capability while the I2NSF framework is running. The function of changing the translator's structure can be provided through Registration Interface.
There is no security concern in a security policy translator proposed in this document as long as the I2NSF interfaces (i.e., Consumer-Facing Interface, NSF-Facing Interface, and Registration Interface) are protected by secure communication channels.
This work was supported by Institute for Information & communications Technology Promotion (IITP) grant funded by the Korea MSIT (Ministry of Science and ICT) (R-20160222-002755, Cloud based Security Intelligence Technology Development for the Customized Security Service Provisioning).
This work was supported in part by the MSIT under the ITRC (Information Technology Research Center) support program (IITP-2018-2017-0-01633) supervised by the IITP.
Formal Languages and Automata, 6th EditionYANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)RESTCONF ProtocolNetwork Configuration Protocol (NETCONF)Framework for Interface to Network Security FunctionsOn Views and XML (Extensible Markup Language)W3CInterface to Network Security Functions (I2NSF) TerminologyI2NSF Consumer-Facing Interface YANG Data ModelI2NSF Network Security Function-Facing Interface YANG Data ModelI2NSF Registration Interface YANG Data ModelExtensible Stylesheet Language Transformations (XSLT) Version 1.0W3C
The following changes are made from draft-yang-i2nsf-security-policy-translation-01:
In , an example is added to emphasis the necessity of a security policy translator. Also, the citation for Automata theory is added.
In and , some grammatical errors are corrected.
In , NSF DB component is added.
In , an extraction scenario is added for clearer explanation.
In , an example of data conversion is added for clearer explanation. Also, the detailed description and the schematic diagram of policy provisioning is added.
In , the expression for each conversion is changed.
In , an example of CFG is added for clearer explanation. Also, the detailed description and the schematic diagram of CFG-based Generator is added.
is added for describing "Security Considerations".
The References section is divided into two subsections, such as, Normative References and Informative References. Also, the references for Automata theory and XML (Extensible Markup Langage) are added to Normative References. In addition, the reference of XSLT (Extensible Stylesheet Language Transformations) is added to Informative References.