5e8dcac36216049ebd705f77ca8910fd34377b60
[policy/engine.git] / POLICY-SDK-APP / src / test / resources / Decision_TestDecisionPolicyWithRuleAlgorithms.1.xml
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2  <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:xacml:policy:id:b622d808-ba62-4392-93c8-eaff0cbfb63f" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:permit-overrides">
3      <Description>TestDecisionPolicyWithRuleAlgorithms@CreatedBy:rb7147@CreatedBy:@ModifiedBy:rb7147@ModifiedBy:</Description>
4      <Target>
5          <AnyOf>
6              <AllOf>
7                  <Match MatchId="org.onap.function.regex-match">
8                      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">com.Decision_TestDecisionPolicyWithRuleAlgorithms.1.xml</AttributeValue>
9                      <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="PolicyName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
10                  </Match>
11              </AllOf>
12              <AllOf>
13                  <Match MatchId="org.onap.function.regex-match">
14                      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Test</AttributeValue>
15                      <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ONAPName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
16                  </Match>
17                  <Match MatchId="org.onap.function.regex-match">
18                      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">test</AttributeValue>
19                      <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="SamplTest" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
20                  </Match>
21              </AllOf>
22          </AnyOf>
23      </Target>
24      <VariableDefinition VariableId="TestSettings">
25          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">test</AttributeValue>
26      </VariableDefinition>
27      <Rule RuleId="" Effect="Permit">
28          <Target>
29              <AnyOf>
30                  <AllOf>
31                      <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
32                          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DECIDE</AttributeValue>
33                          <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
34                      </Match>
35                  </AllOf>
36              </AnyOf>
37          </Target>
38          <Condition>
39              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
40                  <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
41                      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Sample</AttributeValue>
42                      <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
43                          <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="SamplTest" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
44                      </Apply>
45                  </Apply>
46                  <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
47                      <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">test</AttributeValue>
48                      <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
49                          <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="SamplTest" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
50                      </Apply>
51                  </Apply>
52              </Apply>
53          </Condition>
54      </Rule>
55      <Rule RuleId="" Effect="Deny">
56          <Target>
57              <AnyOf>
58                  <AllOf>
59                      <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
60                          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DECIDE</AttributeValue>
61                          <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
62                      </Match>
63                  </AllOf>
64              </AnyOf>
65          </Target>
66          <Condition>
67              <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
68                  <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
69                      <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
70                          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Sample</AttributeValue>
71                          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
72                              <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="SamplTest" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
73                          </Apply>
74                      </Apply>
75                      <Apply FunctionId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
76                          <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">test</AttributeValue>
77                          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
78                              <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="SamplTest" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
79                          </Apply>
80                      </Apply>
81                  </Apply>
82              </Apply>
83          </Condition>
84      </Rule>
85  </Policy>