I have a custom xsl for AAA to pick the authenticated value(Output credential ) and to pass it on for authorization.
Am using the AAAinfo.xml file for this.
AAAinfo.xml :
<?xml version="1.0" encoding="UTF-8"?>
<AAAInfo xmlns="http://www.datapower.com/AAAInfo">
<Authenticate>
<OU>****</OU>
<OutputCredential>****</OutputCredential>
<OutputCredential>****</OutputCredential>
</Authenticate>
<Authenticate>
<OU>****</OU>
<OutputCredential>****</OutputCredential>
<OutputCredential>****</OutputCredential>
</Authenticate>
<Authorize>
<InputCredential>****</InputCredential>
<InputResource>/****</InputResource>
<Access>****</Access>
</Authorize>
<Authorize>
<InputCredential>****</InputCredential>
<InputResource>/****</InputResource>
<Access>allow</Access>
</Authorize>
</AAAInfo>
In the below xsl , am unable to loop into <Authenticate>
tag.....
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions" xmlns:regexp="http://exslt.org/regular-expressions" xmlns:str="http://exslt.org/strings" version="1.0" extension-element-prefixes="dp str regexp" exclude-result-prefixes="dp str regexp">
<xsl:template match="/">
<xsl:variable name="AAA_File" select="document('local:///TEST/AAA_data.xml')" />
<xsl:variable name="DN">
<xsl:value-of select="dp:variable('var://context/AAA-internal-debug/EI')/identity/entry/dn" />
</xsl:variable>
<xsl:variable name="OU_Split1" select="substring-after(normalize-space($DN),'OU=')" />
<xsl:variable name="OU_Split2" select="substring-before(normalize-space($OU_Split1),'/CN')" />
<xsl:variable name="OU_Name">
<xsl:value-of select="regexp:replace($OU_Split2,'/OU=','g','|')" />
</xsl:variable>
<xsl:for-each select="$AAA_File/AAA_data/Authenticate">
<xsl:variable name="OU_File_Name">
<xsl:value-of select="OU" />
</xsl:variable>
<xsl:if test="contains($OU_Name,$OU_File_Name)">
<xsl:for-each select="OutputCredential">
<OutputCredential>
<xsl:value-of select="." />
</OutputCredential>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Let me know how to handle <AAAInfo xmlns="http://www.datapower.com/AAAInfo">
while looping.