blob: 817155b88b925d2e2ec4b5d629b3b7c366e7dc87 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
PolicyId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:policy"
RuleCombiningAlgId="urn:oasis:names:tc:xacml:3.0:rule-combining-algorithm:ordered-deny-overrides"
Version="1.0"
xsi:schemaLocation="urn:oasis:names:tc:xacml:3.0:policy:schema:os access_control-xacml-2.0-policy-schema-os.xsd">
<Description>
Policy for Conformance Test IID302.
Purpose: Case: Deny: RuleCombiningAlgorithm Ordered DenyOverrides
Also tests Dynamic Expressions in Obligations and Advice attached to Rules
This test in conjunction with IID303 demonstrates that the ordered-deny-overrides at the Rule level takes the first rule that matches.
</Description>
<Target/>
<Rule Effect="Deny" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:rule1">
<Description>
A subject whose name is J. Hibbert may not
read Bart Simpson's medical record. NOTAPPLICABLE
</Description>
<Target>
<AnyOf>
<AllOf>
<Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Julius Hibbert</AttributeValue>
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Match>
</AllOf>
</AnyOf>
</Target>
</Rule>
<Rule Effect="Permit" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:rule2">
<Description>
A subject who is at least 5 years older than Bart
Simpson may read Bart Simpson's medical record. PERMIT.
</Description>
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-subtract">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:age" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
</Apply>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:bart-simpson-age" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="true"/>
</Apply>
</Apply>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">5</AttributeValue>
</Apply>
</Condition>
</Rule>
<Rule Effect="Deny" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:rule4">
<Description>
A subject whose name is J. Hibbert may not
perform any action on any resource. DENY.
</Description>
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">J. Hibbert</AttributeValue>
</Apply>
</Condition>
<ObligationExpressions>
<ObligationExpression FulfillOn="Deny" ObligationId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:obligation-1">
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:assignment1">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicSingleValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicMultiValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:other-doctor"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
</ObligationExpression>
</ObligationExpressions>
<AdviceExpressions>
<AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:Advice-1">
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:assignment1">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment1</AttributeValue>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicSingleValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicMultiValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:other-doctor"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
</AdviceExpression>
</AdviceExpressions>
</Rule>
<Rule Effect="Permit" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:rule3">
<Description>
A subject whose "bogus" string equal attribute with bogus function
operating on "Zaphod Beeblebrox"
may perform any action on any resource. INDETERMINATE.
</Description>
<Target/>
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-tests:bogus" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Zaphod Beeblebrox</AttributeValue>
</Apply>
</Condition>
</Rule>
<Rule Effect="Deny" RuleId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:rule5">
<Description>
A subject whose name is J. Hibbert may not
perform any action on any resource. DENY.
</Description>
<Condition>
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-one-and-only">
<AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"/>
</Apply>
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">J. Hibbert</AttributeValue>
</Apply>
</Condition>
<ObligationExpressions>
<ObligationExpression FulfillOn="Deny" ObligationId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:obligation-2">
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:assignment2">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicSingleValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicMultiValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:other-doctor"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
</ObligationExpression>
</ObligationExpressions>
<AdviceExpressions>
<AdviceExpression AppliesTo="Deny" AdviceId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:Advice-2">
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:assignment2">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">assignment2</AttributeValue>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicSingleValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
<AttributeAssignmentExpression AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:IID302:dynamicMultiValue">
<AttributeDesignator
Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment"
AttributeId="urn:oasis:names:tc:xacml:2.0:conformance-test:other-doctor"
DataType="http://www.w3.org/2001/XMLSchema#string"
MustBePresent="true"/>
</AttributeAssignmentExpression>
</AdviceExpression>
</AdviceExpressions>
</Rule>
</Policy>