blob: b5206a89acade26fbe9da6a7c8f79fef049434ca [file] [log] [blame]
Guo Ruijing073cc182017-07-31 08:47:35 +00001<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<!--
3 ============LICENSE_START=======================================================
4 ONAP-XACML
5 ================================================================================
6 Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END=========================================================
20 -->
21
22<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="urn:com:xacml:policy:id:03e0d98f-90e4-4457-bd78-3ddec62e27d5" Version="1" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable">
23 <Description>Test Policies for the ProtoType PolicyEngineAPI</Description>
24 <Target/>
25 <VariableDefinition VariableId="ResetVM">
26 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
27 <Description>Check if the CPU Utilization or Memory reach the threshold values. </Description>
28 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than">
29 <Description>CPU</Description>
30 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
31 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:vm:cpu" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
32 </Apply>
33 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">95</AttributeValue>
34 </Apply>
35 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than">
36 <Description>Memory</Description>
37 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
38 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:vm:memory" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
39 </Apply>
40 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">95</AttributeValue>
41 </Apply>
42 </Apply>
43 </VariableDefinition>
44 <VariableDefinition VariableId="SpinOffVM">
45 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
46 <Description>Spinoff if the VM if CPU or memory value reaches the threshold</Description>
47 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than">
48 <Description>CPU</Description>
49 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
50 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:vm:cpu" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
51 </Apply>
52 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">90</AttributeValue>
53 </Apply>
54 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than">
55 <Description>Memory</Description>
56 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
57 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:vm:memory" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
58 </Apply>
59 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">90</AttributeValue>
60 </Apply>
61 </Apply>
62 </VariableDefinition>
63 <Rule RuleId="urn:com:xacml:rule:id:2a815211-f387-47ee-9b15-4b6a0f15b31f" Effect="Permit">
64 <Description>Json Test</Description>
65 <Target>
66 <AnyOf>
67 <AllOf>
68 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
69 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">JSON</AttributeValue>
70 <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"/>
71 </Match>
72 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
73 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
74 <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"/>
75 </Match>
76 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
77 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
78 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
79 </Match>
80 </AllOf>
81 </AnyOf>
82 </Target>
83 <AdviceExpressions>
84 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
85 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
86 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
87 </AttributeAssignmentExpression>
88 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
89 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_json.json</AttributeValue>
90 </AttributeAssignmentExpression>
91 </AdviceExpression>
92 </AdviceExpressions>
93 </Rule>
94 <Rule RuleId="urn:com:xacml:rule:id:2a815212-f387-47ee-9b15-4b6a0f15b31f" Effect="Permit">
95 <Description>Json + Config test</Description>
96 <Target>
97 <AnyOf>
98 <AllOf>
99 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
100 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">JSON</AttributeValue>
101 <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"/>
102 </Match>
103 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
104 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">JSONconfig</AttributeValue>
105 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
106 </Match>
107 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
108 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
109 <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"/>
110 </Match>
111 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
112 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
113 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
114 </Match>
115 </AllOf>
116 </AnyOf>
117 </Target>
118 <AdviceExpressions>
119 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
120 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
121 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
122 </AttributeAssignmentExpression>
123 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
124 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_json.json</AttributeValue>
125 </AttributeAssignmentExpression>
126 </AdviceExpression>
127 </AdviceExpressions>
128 </Rule>
129 <Rule RuleId="urn:com:xacml:rule:id:2a815211-f387-47ee-9b15-4bfa0f15f568" Effect="Permit">
130 <Description>XML test</Description>
131 <Target>
132 <AnyOf>
133 <AllOf>
134 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
135 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">XML</AttributeValue>
136 <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"/>
137 </Match>
138 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
139 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
140 <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"/>
141 </Match>
142 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
143 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
144 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
145 </Match>
146 </AllOf>
147 </AnyOf>
148 </Target>
149 <AdviceExpressions>
150 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
151 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
152 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
153 </AttributeAssignmentExpression>
154 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
155 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_xml.xml</AttributeValue>
156 </AttributeAssignmentExpression>
157 </AdviceExpression>
158 </AdviceExpressions>
159 </Rule>
160 <Rule RuleId="urn:com:xacml:rule:id:2a815212-f387-47ee-9b15-4bfa0f15f568" Effect="Permit">
161 <Description>XML + Config test</Description>
162 <Target>
163 <AnyOf>
164 <AllOf>
165 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
166 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">XML</AttributeValue>
167 <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"/>
168 </Match>
169 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
170 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">XMLConfig</AttributeValue>
171 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
172 </Match>
173 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
174 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
175 <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"/>
176 </Match>
177 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
178 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
179 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
180 </Match>
181 </AllOf>
182 </AnyOf>
183 </Target>
184 <AdviceExpressions>
185 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
186 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
187 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
188 </AttributeAssignmentExpression>
189 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
190 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_xml.xml</AttributeValue>
191 </AttributeAssignmentExpression>
192 </AdviceExpression>
193 </AdviceExpressions>
194 </Rule>
195 <Rule RuleId="urn:com:xacml:rule:id:2a815211-f387-47ee-9b15-4b6a5287f3af" Effect="Permit">
196 <Description>Properties Test</Description>
197 <Target>
198 <AnyOf>
199 <AllOf>
200 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
201 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Properties</AttributeValue>
202 <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"/>
203 </Match>
204 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
205 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
206 <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"/>
207 </Match>
208 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
209 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
210 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
211 </Match>
212 </AllOf>
213 </AnyOf>
214 </Target>
215 <AdviceExpressions>
216 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
217 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
218 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
219 </AttributeAssignmentExpression>
220 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
221 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_prop.properties</AttributeValue>
222 </AttributeAssignmentExpression>
223 </AdviceExpression>
224 </AdviceExpressions>
225 </Rule>
226 <Rule RuleId="urn:com:xacml:rule:id:2a815212-f387-47ee-9b15-4b6a5287f3af" Effect="Permit">
227 <Description>Properties + Config Test</Description>
228 <Target>
229 <AnyOf>
230 <AllOf>
231 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
232 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Properties</AttributeValue>
233 <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"/>
234 </Match>
235 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
236 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">PropConfig</AttributeValue>
237 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
238 </Match>
239 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
240 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
241 <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"/>
242 </Match>
243 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
244 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
245 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
246 </Match>
247 </AllOf>
248 </AnyOf>
249 </Target>
250 <AdviceExpressions>
251 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
252 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
253 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
254 </AttributeAssignmentExpression>
255 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
256 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_prop.properties</AttributeValue>
257 </AttributeAssignmentExpression>
258 </AdviceExpression>
259 </AdviceExpressions>
260 </Rule>
261 <Rule RuleId="urn:com:xacml:rule:id:2a815211-f387-47ee-9b15-4b7a5287f3af" Effect="Permit">
262 <Description>Other Test</Description>
263 <Target>
264 <AnyOf>
265 <AllOf>
266 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
267 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Other</AttributeValue>
268 <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"/>
269 </Match>
270 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
271 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
272 <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"/>
273 </Match>
274 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
275 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
276 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
277 </Match>
278 </AllOf>
279 </AnyOf>
280 </Target>
281 <AdviceExpressions>
282 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
283 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
284 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
285 </AttributeAssignmentExpression>
286 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
287 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_other.txt</AttributeValue>
288 </AttributeAssignmentExpression>
289 </AdviceExpression>
290 </AdviceExpressions>
291 </Rule>
292 <Rule RuleId="urn:com:xacml:rule:id:2a815212-f387-47ee-9b15-4b8a5287f3af" Effect="Permit">
293 <Description>Other + Config Test</Description>
294 <Target>
295 <AnyOf>
296 <AllOf>
297 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
298 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Other</AttributeValue>
299 <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"/>
300 </Match>
301 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
302 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">OtherConfig</AttributeValue>
303 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
304 </Match>
305 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
306 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
307 <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"/>
308 </Match>
309 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
310 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
311 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
312 </Match>
313 </AllOf>
314 </AnyOf>
315 </Target>
316 <AdviceExpressions>
317 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
318 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
319 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
320 </AttributeAssignmentExpression>
321 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
322 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_other.txt</AttributeValue>
323 </AttributeAssignmentExpression>
324 </AdviceExpression>
325 </AdviceExpressions>
326 </Rule>
327 <Rule RuleId="urn:com:xacml:rule:id:786aded3-49c4-43da-9e16-77be6b522f04" Effect="Permit">
328 <Description> JSON + Attributes </Description>
329 <Target>
330 <AnyOf>
331 <AllOf>
332 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
333 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">JSON</AttributeValue>
334 <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"/>
335 </Match>
336 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
337 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">JSONconfig</AttributeValue>
338 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
339 </Match>
340 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
341 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestSubject</AttributeValue>
342 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Subject.com:test:subject:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
343 </Match>
344 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
345 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
346 <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"/>
347 </Match>
348 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
349 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestJSON</AttributeValue>
350 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Action.com:test:action:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
351 </Match>
352 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
353 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
354 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
355 </Match>
356 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
357 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Test</AttributeValue>
358 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Resource.com:test:resource:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
359 </Match>
360 </AllOf>
361 </AnyOf>
362 </Target>
363 <AdviceExpressions>
364 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
365 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
366 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
367 </AttributeAssignmentExpression>
368 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
369 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_json.json</AttributeValue>
370 </AttributeAssignmentExpression>
371 </AdviceExpression>
372 </AdviceExpressions>
373 </Rule>
374 <Rule RuleId="urn:com:xacml:rule:id:6311eb9c-ec15-43d5-9f16-17c14b300e6d" Effect="Permit">
375 <Description> XML + Attributes </Description>
376 <Target>
377 <AnyOf>
378 <AllOf>
379 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
380 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">XML</AttributeValue>
381 <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"/>
382 </Match>
383 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
384 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">XMLConfig</AttributeValue>
385 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
386 </Match>
387 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
388 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestSubject</AttributeValue>
389 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Subject.com:test:subject:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
390 </Match>
391 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
392 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
393 <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"/>
394 </Match>
395 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
396 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestJSON</AttributeValue>
397 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Action.com:test:action:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
398 </Match>
399 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
400 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
401 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
402 </Match>
403 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
404 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Test</AttributeValue>
405 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Resource.com:test:resource:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
406 </Match>
407 </AllOf>
408 </AnyOf>
409 </Target>
410 <AdviceExpressions>
411 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
412 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
413 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
414 </AttributeAssignmentExpression>
415 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
416 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_xml.xml</AttributeValue>
417 </AttributeAssignmentExpression>
418 </AdviceExpression>
419 </AdviceExpressions>
420 </Rule>
421 <Rule RuleId="urn:com:xacml:rule:id:1148b345-4836-4853-96fc-84c1d37f4dbd" Effect="Permit">
422 <Description> Prop + Attributes </Description>
423 <Target>
424 <AnyOf>
425 <AllOf>
426 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
427 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Properties</AttributeValue>
428 <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"/>
429 </Match>
430 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
431 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">PropConfig</AttributeValue>
432 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
433 </Match>
434 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
435 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestSubject</AttributeValue>
436 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Subject.com:test:subject:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
437 </Match>
438 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
439 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
440 <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"/>
441 </Match>
442 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
443 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestJSON</AttributeValue>
444 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Action.com:test:action:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
445 </Match>
446 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
447 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
448 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
449 </Match>
450 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
451 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Test</AttributeValue>
452 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Resource.com:test:resource:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
453 </Match>
454 </AllOf>
455 </AnyOf>
456 </Target>
457 <AdviceExpressions>
458 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
459 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
460 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
461 </AttributeAssignmentExpression>
462 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
463 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_prop.properties</AttributeValue>
464 </AttributeAssignmentExpression>
465 </AdviceExpression>
466 </AdviceExpressions>
467 </Rule>
468 <Rule RuleId="urn:com:xacml:rule:id:786aded3-49c4-43da-9e16-77b86b522f04" Effect="Permit">
469 <Description> Other + Attributes </Description>
470 <Target>
471 <AnyOf>
472 <AllOf>
473 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
474 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Other</AttributeValue>
475 <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"/>
476 </Match>
477 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
478 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Otherconfig</AttributeValue>
479 <AttributeDesignator Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="ConfigName" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
480 </Match>
481 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
482 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestSubject</AttributeValue>
483 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Subject.com:test:subject:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
484 </Match>
485 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
486 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ACCESS</AttributeValue>
487 <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"/>
488 </Match>
489 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
490 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">TestJSON</AttributeValue>
491 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Action.com:test:action:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
492 </Match>
493 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
494 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Config</AttributeValue>
495 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
496 </Match>
497 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
498 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Test</AttributeValue>
499 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="Resource.com:test:resource:json" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
500 </Match>
501 </AllOf>
502 </AnyOf>
503 </Target>
504 <AdviceExpressions>
505 <AdviceExpression AdviceId="com.att.labs.onap.advice.config" AppliesTo="Permit">
506 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.key" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
507 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Configuration</AttributeValue>
508 </AttributeAssignmentExpression>
509 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.advice.value" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
510 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:5443/config/test_other.txt</AttributeValue>
511 </AttributeAssignmentExpression>
512 </AdviceExpression>
513 </AdviceExpressions>
514 </Rule>
515 <!-- <Rule RuleId="urn:com:xacml:rule:id:a5b3007a-853a-47f0-a4c2-56912b47d74a" Effect="Permit">
516 <Description>test if this is working </Description>
517
518 </Rule> -->
519 <Rule RuleId="urn:com:xacml:rule:id:596bb33b-c0ab-4840-9f8f-aebb0b603f37" Effect="Permit">
520 <Description>Permit to RESET VM if the values reach the threshold settings.</Description>
521 <Target>
522 <AnyOf>
523 <AllOf>
524 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
525 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Restart</AttributeValue>
526 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
527 </Match>
528 </AllOf>
529 </AnyOf>
530 </Target>
531 <Condition>
532 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:boolean-equal">
533 <Description>Restart VM if this condition is met</Description>
534 <VariableReference VariableId="ResetVM"/>
535 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#boolean">true</AttributeValue>
536 </Apply>
537 </Condition>
538 <ObligationExpressions>
539 <ObligationExpression ObligationId="com.att.labs.onap.obligation" FulfillOn="Permit">
540 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.obligation.restart" Category="urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject">
541 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Restart</AttributeValue>
542 </AttributeAssignmentExpression>
543 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.obligation.server" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
544 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:server:name" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
545 </AttributeAssignmentExpression>
546 </ObligationExpression>
547 </ObligationExpressions>
548 </Rule>
549 <Rule RuleId="urn:com:xacml:rule:id:596db34b-c0ab-4841-9f9d-aedb07603f39" Effect="Permit">
550 <Description>Permit to SpinOff VM if the values reach the threshold settings.</Description>
551 <Target>
552 <AnyOf>
553 <AllOf>
554 <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
555 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SpinOff</AttributeValue>
556 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
557 </Match>
558 </AllOf>
559 </AnyOf>
560 </Target>
561 <Condition>
562 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:boolean-equal">
563 <Description>SpinOff VM if this condition is met</Description>
564 <VariableReference VariableId="SpinOffVM"/>
565 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#boolean">true</AttributeValue>
566 </Apply>
567 </Condition>
568 <ObligationExpressions>
569 <ObligationExpression ObligationId="com.att.labs.onap.obligation" FulfillOn="Permit">
570 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.obligation.spinoff" Category="urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject">
571 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">SpinOff</AttributeValue>
572 </AttributeAssignmentExpression>
573 <AttributeAssignmentExpression AttributeId="performer" Category="urn:oasis:names:tc:xacml:1.0:subject-category:recipient-subject">
574 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">PDPAction</AttributeValue>
575 </AttributeAssignmentExpression>
576 <AttributeAssignmentExpression AttributeId="type" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
577 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">REST</AttributeValue>
578 </AttributeAssignmentExpression>
579 <AttributeAssignmentExpression AttributeId="com.att.labs.onap.obligation.server" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
580 <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="com:att:labs:onap:resource:server:name" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
581 </AttributeAssignmentExpression>
582 <AttributeAssignmentExpression AttributeId="method" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
583 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">GET</AttributeValue>
584 </AttributeAssignmentExpression>
585 <AttributeAssignmentExpression AttributeId="URL" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
586 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#anyURI">http://localhost:8635/RESTjson/PDP/VM/$com.att.labs.onap.obligation.spinoff/$com.att.labs.onap.obligation.server</AttributeValue>
587 </AttributeAssignmentExpression>
588 </ObligationExpression>
589 </ObligationExpressions>
590 </Rule>
591 <Rule RuleId="urn:com:xacml:rule:id:c2430bab-c2a1-4686-b885-67f8036a1e52" Effect="Deny">
592 <Description>Deny all the other requests.</Description>
593 <Target/>
594 </Rule>
595</Policy>