2015-11-25 1 views
2

Considérons que je reçois l'exemple de requête xacml. Comment puis-je modifier le même pour évaluer sur plusieurs décisions sur plusieurs actions.Peut-on avoir plusieurs actions dans une seule requête XACML, si oui comment?

<Request xmlns="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17" 
CombinedDecision="false" ReturnPolicyIdList="false"> 
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource"> 
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" 
     IncludeInResult="false"> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Resource</AttributeValue> 
    </Attribute> 
</Attributes> 
<Attributes 
    Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"> 
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" 
     IncludeInResult="false"> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Subject</AttributeValue> 
    </Attribute> 
</Attributes> 
<Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action"> 
    <Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" 
     IncludeInResult="true"> 
     <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Action</AttributeValue> 
    </Attribute> 
</Attributes> 

Répondre

1

Oui bien sûr, cela est un manuel d'utilisation des demandes de décision multiples telles que définies dans la décision XACML v3.0 multiples Profil Version 1.0 (standard | blog post).

Tout ce que vous devez faire est de répéter la catégorie d'action à plusieurs reprises (l'élément <Attributes/>)-à-dire répéter cet élément entier:

<xacml-ctx:Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" > 
     <xacml-ctx:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" IncludeInResult="true"> 
     <xacml-ctx:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">View</xacml-ctx:AttributeValue> 
     </xacml-ctx:Attribute> 
    </xacml-ctx:Attributes> 

Et changer les attributs à l'intérieur-à-dire ajouter/supprimer autant de <Attribute/> éléments à l'intérieur comme vous aimez.

<xacml-ctx:Request ReturnPolicyIdList="false" CombinedDecision="false" xmlns:xacml-ctx="urn:oasis:names:tc:xacml:3.0:core:schema:wd-17"> 
    <xacml-ctx:Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" > 
     <xacml-ctx:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" IncludeInResult="true"> 
     <xacml-ctx:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Edit</xacml-ctx:AttributeValue> 
     </xacml-ctx:Attribute> 
    </xacml-ctx:Attributes> 
    <xacml-ctx:Attributes Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" > 
     <xacml-ctx:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:subject:subject-id" IncludeInResult="true"> 
     <xacml-ctx:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Alice</xacml-ctx:AttributeValue> 
     </xacml-ctx:Attribute> 
    </xacml-ctx:Attributes> 
    <xacml-ctx:Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" > 
     <xacml-ctx:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" IncludeInResult="true"> 
     <xacml-ctx:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">View</xacml-ctx:AttributeValue> 
     </xacml-ctx:Attribute> 
    </xacml-ctx:Attributes> 
    <xacml-ctx:Attributes Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" > 
     <xacml-ctx:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id" IncludeInResult="false"> 
     <xacml-ctx:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">Resource</xacml-ctx:AttributeValue> 
     </xacml-ctx:Attribute> 
    </xacml-ctx:Attributes> 
</xacml-ctx:Request> 

Dans l'administration des politiques Axiomatique Point, c'est à quoi il ressemble:

Simulation of a Multiple Decision Request in Axiomatics