Add a Prefix to SAML Response Signature Namespace - Auth0 as SAML IdP
Last Updated:
Overview
After configuring the Auth0 SAML Web App Addon, the authentication flow works.
However, the Service Provider application receives a SAML response with a Signature namespace that does not include the "ds:" prefix attribute.
According to the SAML 2.0 specification, we assume to receive the prefix in our SAML response:
=== > < ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" > instead of <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
Solution
There is an undocumented setting for the SAML addon > signatureNamespacePrefix. It can be used to add the ds: prefix like this:
- "signatureNamespacePrefix": "ds"
function changeSamlConfiguration(user, context, callback) {
if (context.clientID === 'YOUR-CLIENT-WITH-THE-ADDON') {
context.samlConfiguration = (context.samlConfiguration || {});
context.samlConfiguration.signatureNamespacePrefix = "ds";
}