Modifikationen am Style-Sheet für Bindungen

Die Variable 'xacml-subjects' wurde dem Style-Sheet apil-xacml-binding-new.xsl hinzugefügt. Sie beinhaltet die Erstellung des Betreffabschnitts ('Subjects') der Anforderung. Auf diese Variable wird später in der Datei sendToPDP.xsl zugegriffen.

<xsl:variable name="xacml-subjects">
<xacml-context:Subject SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject">
<!--
*************************************************
Ab hier: Verwenden Sie das MC-Ergebnis als Betreff.
**************************************************

sendToPDP.xsl

Dieses Style-Sheet ruft 'StoreXACMLFW' mithilfe von 'url-open' auf. Der Aufruf erfolgt in einer Box mit einer anderen XML-Firewall, sodass kein SSL-Proxy-Profil verwendet wird. Wäre es gewünscht gewesen, den Richtlinienentscheidungspunkt (PDP) in eine andere DataPower-Box zu versetzen, hätte ein SSL-Proxy-Profil erstellt und mit dem url-open-Aufruf verwendet werden können.
<xsl:param name="resource" />
<!--
<xsl:variable name="incoming_resource">
<xsl:value-of select="$resource" />
</xsl:variable>
<xsl:message dp:priority="debug">
*********** AUFRUF VON PDP ERFOLGT für RESSOURCE 'equal' *************
<xsl:value-of select="$incoming_resource" />
</xsl:message>
-->
- <!--
Erstellung der XACML-Anforderung für Maskierung
-->
<xsl:variable name="customized-request">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<xacml-context:Request xmlns:wsa="http://www.w3.org/2005/08/addressing" 
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xacml-context="urn:oasis:names:tc:xacml:2.0:context:schema:os" 
  xmlns:ws="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- <!--
Kopieren in Subjects, die aus der AAA-Anforderungsverarbeitung gespeichert wurden
-->
<xsl:copy-of select="dp:variable('var://context/snip/xacml/xacmlSubjects')/*" />
<xacml-context:Resource>
<xacml-context:ResourceContent>
<xsl:copy-of select="./soap:Envelope/soap:Body" />
</xacml-context:ResourceContent>
<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id"
DataType="http://www.w3.org/2001/XMLSchema#string">
<xacml-context:AttributeValue>PriceInfo</xacml-context:AttributeValue>
</xacml-context:Attribute>
</xacml-context:Resource>
<xacml-context:Action>
<xacml-context:Attribute AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"
DataType="http://www.w3.org/2001/XMLSchema#string">
<xacml-context:AttributeValue>View</xacml-context:AttributeValue>
</xacml-context:Attribute>
</xacml-context:Action>
<xacml-context:Environment>
<xacml-context:Attribute AttributeId="ContextId" DataType="http://www.w3.org/2001/XMLSchema#string"
Issuer="http://security.tivoli.ibm.com/policy/distribution">
<xacml-context:AttributeValue>StorePriceData</xacml-context:AttributeValue>
</xacml-context:Attribute>
</xacml-context:Environment>
</xacml-context:Request>
</soapenv:Body>
</soapenv:Envelope>
</xsl:variable>
- <!--
Verwenden von 'set-variable', sodass sie im Testmonitor (Probe) sichtbar ist, was nützlich ist.
-->
<dp:set-variable name="'var://context/snip/xacml/BacksideXacmlRequest'" value="$customized-request" />
- <!--
Aufzeichnen von XACML-REQUEST im Debugprotokoll
-->
<xsl:message dp:priority="debug">
<XACML-REQUEST>
<xsl:copy-of select="$customized-request" />
</XACML-REQUEST>
</xsl:message>
<xsl:variable name="headers">
<header name="SOAPAction">xacml:authorization</header>
</xsl:variable>
- <!--
Aufruf von XACML-PDP für Entscheidung
-->
<xsl:variable name="rtss-response">
<xsl:variable name="StoreGWURL">
<xsl:value-of select="concat('http://','127.0.0.1',':',$StoreGWPort,'/rtss/authz/services/AuthzService')" />
</xsl:variable>
<dp:url-open target="{$StoreGWURL}" http-headers="$headers" response="responsecode">
<xsl:copy-of select="$customized-request" />
</dp:url-open>
</xsl:variable>
- <!--
Verwenden von 'set-variable', sodass sie im Testmonitor (Probe) sichtbar ist, was nützlich ist.
-->
<dp:set-variable name="'var://context/snip/xacml/BacksideXacmlResponse'" value="$rtss-response" />
- <!--
Aufzeichnen von XACML-RESPONSE im Debugprotokoll
-->
<xsl:message dp:priority="debug">
<XACML-RESPONSE>
<xsl:value-of select="$rtss-response" />
</XACML-RESPONSE>
</xsl:message>
</xsl:template>
</xsl:stylesheet>
Bei der Untersuchung der Datei sendToPDP.xsl sind die folgenden Elemente zu beachten:
  1. Das Style-Sheet ruft den Port für XACMLFW aus der Datei soavars.xsl ab.
  2. Es wird erwartet, dass die Variable 'rtssResponse' genau das Format hat, das Runtime Security Services verwenden würden und somit auch das Format, das der PDP in der DataPower-Box verarbeiten kann.
  3. Das Style-Sheet konstruiert eine SOAP-Anforderung:
    • Die Betreffinformationen werden durch das vorherige Style-Sheet apil-binding.xsl konstruiert und durch die folgende copy-of-select-Anforderung abgerufen:
      <xsl:copy-of select="dp:variable('var://context/snip/xacml/xacmlSubjects')/*" /> 
  4. Die Aktion besteht einfach in der Anzeige der Aktion: <xacml-context:AttributeValue>View</xacml-context:AttributeValue>
  5. Die Umgebung sind die Geschäftspreisdaten 'StorePriceData', die in der Terminologie von IBM® Tivoli Security Policy Manager oder Runtime Security Services als Anwendungsobjekt (Application object) bezeichnet werden.
Sehen Sie sich das Richtlinien-Style-Sheet für die Überarbeitung (Redaktion) an.

StorePrivateDataXACML.xml

<PolicySet PolicyCombiningAlgId="urn:oasis:names:tc:xacml:1.0:policy-combining-algorithm:deny-overrides"
PolicySetId="RPS:StorePrivateData:policy:dc703409-d408-49b3-acc1-16c89c844fce:rolec4a9f664-a0af-451b-b80b-
1cafdb9fd9f0:role:2884ab77-58d1-4b1d-8728-7d528169d608" Version="1.0">
<Target>
<Subjects>
<Subject>
<SubjectMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<xacml:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"
xmlns:xacml="urn:oasis:names:tc:xacml:2.0:policy:schema:os">MANAGER</xacml:AttributeValue>
<SubjectAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:2.0:subject:role"
DataType="http://www.w3.org/2001/XMLSchema#string" 
SubjectCategory="urn:oasis:names:tc:xacml:1.0:subject-category:accesssubject"
/>
</SubjectMatch>
</Subject>
</Subjects>
</Target>
<Policy PolicyId="PPS:StorePrivateData:dc703409-d408-49b3-acc1-16c89c844fce:
c4a9f664-a0af-451b-b80b-1cafdb9fd9f0:c4a9f664-a0af-451b-b80b-1cafdb9fd9f0:pps" 
RuleCombiningAlgId="urn:oasis:names:tc:xacml:1.0:rule-combining-algorithm:first-applicable"
Version="1.0">
<Target>
<Resources>
<Resource>
<ResourceMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<xacml:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"
xmlns:xacml="urn:oasis:names:tc:xacml:2.0:policy:schema:os">PriceInfo</xacml:AttributeValue>
<ResourceAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:resource:resource-id"
DataType="http://www.w3.org/2001/XMLSchema#string" />
</ResourceMatch>
</Resource>
</Resources>
<Actions>
<Action>
<ActionMatch MatchId="urn:oasis:names:tc:xacml:1.0:function:string-equal">
<xacml:AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string"
xmlns:xacml="urn:oasis:names:tc:xacml:2.0:policy:schema:os">View</xacml:AttributeValue>
<ActionAttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id"
DataType="http://www.w3.org/2001/XMLSchema#string" />
</ActionMatch>
</Action>
</Actions>
</Target>
<Rule Effect="Permit" RuleId="PPS:StorePrivateData:dc703409-d408-49b3-acc1-16c89c844fce:
c4a9f664-a0af-451b-b80b-1cafdb9fd9f0:c4a9f664-a0af-451b-b80b-1cafdb9fd9f0:pps:rules:0">
<Target />
</Rule>
</Policy>
</PolicySet>
</PolicySet>
Beachten Sie die folgenden Punkte:

Konzept Konzept

Feedback


Timestamp icon Letzt aktualisiert: 16. Oktober 2012


http://publib.boulder.ibm.com/infocenter/prodconn/v1r0m0/topic/com.ibm.scenarios.soawdpwsrr.doc/topics/csoa2_sample_bindings.htm