Hi,
I'm using herasaf-xacml-core-1.0.0-M2 and don't understand its behavior. In the simple example below there are two Resources with the MustBePresent set to true. Still the example request matches the policy. In my understanding, the correct result would be "NotApplicable". Is this a bug or do I lag fundamental understanding of the topic?
Policy<?xml version="1.0" encoding="UTF-8"?>
<Policy xmlns="urn:oasis:names:tc:xacml:2.0:policy:schema:os" PolicyId="policy:test_multiple_different_resources" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:permit-overrides">
<Description />
<Target>
<Resources>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">ID=10</AttributeValue>
<ResourceAttributeDesignator AttributeId="NEST:Person:ID" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true" />
</ResourceMatch>
</Resource>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Position</AttributeValue>
<ResourceAttributeDesignator AttributeId="NEST:Person:Attribut" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true" />
</ResourceMatch>
</Resource>
</Resources>
</Target>
<Rule Effect="Permit" RuleId="rule:test_multiple_different_resources">
<Description />
</Rule>
</Policy>
Request<?xml version="1.0" encoding="UTF-8"?>
<Request xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oasis:names:tc:xacml:2.0:context:schema:os
access_control-xacml-2.0-context-schema-os.xsd">
<Subject />
<Resource>
<Attribute AttributeId="NEST:Person:ID"
DataType="http://www.w3.org/2001/XMLSchema#string">
<AttributeValue>ID=10</AttributeValue>
</Attribute>
</Resource>
<Action />
<Environment />
</Request>
Response<Response xmlns="urn:oasis:names:tc:xacml:2.0:context:schema:os" xmlns:ns2="urn:oasis:names:tc:xacml:2.0:policy:schema:os">
<Result>
<Decision>Permit</Decision>
<Status>
<StatusCode Value="urn:oasis:names:tc:xacml:1.0:status:ok"/>
</Status>
</Result>
</Response>
Regards,
Erik