Advertisement
ManZzup

XACML 3.0 policy

Mar 25th, 2016
1,133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.01 KB | None | 0 0
  1. <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"  PolicyId="auth_admin" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
  2.    <Description>sample policy</Description>
  3.    <Target></Target>
  4.    <Rule Effect="Permit" RuleId="primary-group-customer-rule">
  5.       <Target>
  6.          <AnyOf>
  7.             <AllOf>
  8.                <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
  9.                   <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">http://127.0.0.1/service/very_secure/</AttributeValue>
  10.                   <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
  11.                </Match>
  12.                <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  13.                   <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">read</AttributeValue>
  14.                   <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
  15.                </Match>
  16.             </AllOf>
  17.          </AnyOf>
  18.       </Target>
  19.       <Condition>
  20.          <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-subset">
  21.             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-bag">
  22.                <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">admin</AttributeValue>
  23.             </Apply>
  24.             <AttributeDesignator AttributeId="group" Category="urn:oasis:names:tc:xacml:3.0:group" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true"></AttributeDesignator>
  25.          </Apply>
  26.       </Condition>
  27.    </Rule>
  28.    <Rule Effect="Deny" RuleId="deny-rule"></Rule>
  29. </Policy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement