Auth0 as SAML 2.0 IdP with signing asserts

I am trying to configure Auth0 to check that login request SAML 2.0 request is signed correctly.
Using Addon: SAML2 Web App with the following signCert configuration:

{
   ...
  "signatureAlgorithm": "rsa-sha256",
  "digestAlgorithm": "sha256",
  "signResponse": true,
  "signingCert": "-----BEGIN PUBLIC KEY-----\nMIIBIzANBgkq . . .hkiG9w0==\n-----END PUBLIC KEY-----\n"
  ...
}

Getting error


"description": "PEM_read_bio_PUBKEY failed",

Does anyone have experience with working configuration?

Hey there @jaakkos, I apologize for the delay in response.

While investigating this it appears that a large number of people found success leveraging this function below for the conversation. Please let me know if this helps you or if you are still running into the challenge. Thanks!

function convertCertificate (cert) {
    //Certificate must be in this specific format or else the function won't accept it
    var beginCert = "-----BEGIN CERTIFICATE-----";
    var endCert = "-----END CERTIFICATE-----";

    cert = cert.replace("\n", "");
    cert = cert.replace(beginCert, "");
    cert = cert.replace(endCert, "");

    var result = beginCert;
    while (cert.length > 0) {

        if (cert.length > 64) {
            result += "\n" + cert.substring(0, 64);
            cert = cert.substring(64, cert.length);
        }
        else {
            result += "\n" + cert;
            cert = "";
        }
    }

    if (result[result.length ] != "\n")
        result += "\n";
    result += endCert + "\n";
    return result;
}

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.