This forum doesn't seem to allow attachments so I'll try to describe how you can achieve this.
In your AAA configuration on "Identity Extraction" tab you'll select two methods, or example "Subject DN of TLS certificate from connection peer" and "Custom processing". For "Custom processing" you can use for example this stylesheet or something else that better suits your requirements:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions"
xmlns:dpconfig="http://www.datapower.com/param/config"
extension-element-prefixes="dp dpconfig">
<xsl:output method="xml"/>
<xsl:template match="/">
<!-- Create output that contains extracted credentials -->
<dn>
<xsl:value-of select="dp:request-header('auth-header')"/>
</dn> <!-- Fill if you have dn -->
<issuer /> <!-- Fill if you have issuer -->
<cert /> <!-- Fill if you have cert details -->
<serial/> <!-- Fill if you have serial -->
</xsl:template>
</xsl:stylesheet>
The combined identity extraction methods provide the following XML that is processed as an input of an authenticate action:
<identity xmlns:dp="http://www.datapower.com/schemas/management" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<entry type="client-ssl">
<dn>dn entry in here</dn>
<issuer>issuer entry in here</issuer>
<cert>XXXXXXXX</cert>
<serial>111111111111111111</serial>
</entry>
<entry type="custom" url="local:///extract-id-from-header.xsl">
<dn>dn extracted from http header here</dn>
<issuer/>
<cert/>
<serial/>
</entry>
</identity>
The DN entries in XML can then be validated using for example a custom stylesheet in "Authentication" step. You can modify the following example:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dp="http://www.datapower.com/extensions"
xmlns:dpconfig="http://www.datapower.com/param/config" xmlns:aaa="http://www.datapower.com/AAAInfo"
xmlns:dpfunc="http://www.datapower.com/extensions/functions"
extension-element-prefixes="dp dpconfig">
<xsl:output method="xml"/>
<xsl:template match="/">
<!-- Extract the second DN (for demo purposes) -->
<xsl:variable name="dn" select="/*[local-name()='identity']/*[local-name()='entry'][='custom']/*[local-name()='dn']/text()"/>
<!--Get the contents of aaa file -->
<xsl:variable name="aaa" select="document('local:///aaa.xml')"/>
<!-- Verify that the dn exists in aaa file (for demo purposes) -->
<xsl:if test="$aaa//*[local-name()='DN'][text()=$dn]">
<aaa:OutputCredential>
<xsl:value-of select="$aaa//*[local-name()='DN'][text()=$dn]/following-sibling::*[local-name()='OutputCredential']/text()"/>
</aaa:OutputCredential>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
--Hermanni
#DataPower#Support#SupportMigration