Advertisement
Fhernd

control-acceso-notas.xml

Feb 26th, 2018
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.07 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Policy xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" PolicyId="Notes" RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable" Version="1.0">
  3.     <Target>
  4.         <AnyOf>
  5.             <AllOf>
  6.                 <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-regexp-match">
  7.                     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">http://id.uoc.edu/notas</AttributeValue>
  8.                     <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" />
  9.                 </Match>
  10.             </AllOf>
  11.         </AnyOf>
  12.     </Target>
  13.     <Rule Effect="Permit" RuleId="regla-1">
  14.         <Target>
  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">modificar</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.                     </Match>
  21.                 </AllOf>
  22.             </AnyOf>
  23.         </Target>
  24.         <Condition>
  25.             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
  26.                 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in">
  27.                     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">consultores</AttributeValue>
  28.                     <AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true" />
  29.                 </Apply>
  30.                 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:string-is-in">
  31.                     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">profesores</AttributeValue>
  32.                     <AttributeDesignator AttributeId="http://wso2.org/claims/role" Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="true" />
  33.                 </Apply>
  34.             </Apply>
  35.         </Condition>
  36.     </Rule>
  37.     <Rule Effect="Permit" RuleId="regla-2">
  38.         <Target>
  39.             <AnyOf>
  40.                 <AllOf>
  41.                     <Match MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
  42.                         <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">consultar</AttributeValue>
  43.                         <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" />
  44.                     </Match>
  45.                 </AllOf>
  46.             </AnyOf>
  47.         </Target>
  48.         <Condition>
  49.             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:or">
  50.                 <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
  51.                     <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
  52.                         <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" DataType="http://www.w3.org/2001/XMLSchema#time" MustBePresent="true" />
  53.                     </Apply>
  54.                     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">09:00:00</AttributeValue>
  55.                     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">18:00:00</AttributeValue>
  56.                 </Apply>
  57.             </Apply>
  58.         </Condition>
  59.     </Rule>
  60.     <Rule Effect="Deny" RuleId="regla-3" />
  61. </Policy>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement