Advertisement
Guest User

Politica 2

a guest
Nov 18th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.64 KB | None | 0 0
  1. <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"  PolicyId="politica_basica" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
  2.     <Target>
  3.     </Target>
  4.     <Rule Effect="Permit" RuleId="permitir_leitura">
  5.         <Target>
  6.             <AnyOf>
  7.                 <AllOf>
  8.                     <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  9.                         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">intranet</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">
  11.                         </AttributeDesignator>
  12.                     </Match>
  13.                 </AllOf>
  14.             </AnyOf>
  15.             <AnyOf>
  16.                 <AllOf>
  17.                     <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  18.                         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">leitura</AttributeValue>
  19.                         <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">
  20.                         </AttributeDesignator>
  21.                     </Match>
  22.                 </AllOf>
  23.             </AnyOf>
  24.         </Target>
  25.         <Condition>
  26.             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
  27.                 <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal"></Function>
  28.                 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Aluno</AttributeValue>
  29.                 <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">
  30.                 </AttributeDesignator>
  31.             </Apply>
  32.         </Condition>
  33.     </Rule>
  34.     <Rule Effect="Permit" RuleId="permitir_escrita">
  35.         <Target>
  36.             <AnyOf>
  37.                 <AllOf>
  38.                     <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  39.                         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">intranet</AttributeValue>
  40.                         <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">
  41.                         </AttributeDesignator>
  42.                     </Match>
  43.                 </AllOf>
  44.             </AnyOf>
  45.             <AnyOf>
  46.                 <AllOf>
  47.                     <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  48.                         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">escrita</AttributeValue>
  49.                         <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">
  50.                         </AttributeDesignator>
  51.                     </Match>
  52.                 </AllOf>
  53.             </AnyOf>
  54.         </Target>
  55.         <Condition>
  56.             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:any-of">
  57.                 <Function FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  58.                 </Function>
  59.                 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Administrador</AttributeValue>
  60.                 <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Professor</AttributeValue>
  61.                 <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">
  62.                 </AttributeDesignator>
  63.             </Apply>
  64.         </Condition>
  65.     </Rule>
  66.     <Rule Effect="Deny" RuleId="negar_outros">
  67.     </Rule>
  68. </Policy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement