Skip to main content
Version: 1.1

XML Parser sample configuration

In this example, the source is embedded as dynamic, base64-encoded XML content that decodes to <users><alice><role>manager</role></alice></users>. The attribute connector is configured to extract values from the source using the XPath expression /users/##1##/role/text(). The value for the parameter ##1## comes from the attribute pip.username.

Finally, the extracted values are provided to the connector host in the attribute pip.role.

<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://www.axiomatics.com/attributeconnector/parser/xml/configuration"
identifier="xml-parser">
<source encoded="true">
<xacmlAttribute AttributeId="pip.payload"
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
DataType="http://www.w3.org/2001/XMLSchema#string"/>
</source>
<mapping>
<xacmlAttribute AttributeId="pip.role"
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
DataType="http://www.w3.org/2001/XMLSchema#string"/>
<xPath>/users/##1##/role/text()</xPath>
<key>
<xacmlAttribute AttributeId="pip.username"
Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject"
DataType="http://www.w3.org/2001/XMLSchema#string"/>
</key>
</mapping>
</configuration>