Hi.
I am trying to verify a SAML2 response by sending a POST request to my SP setup. The token has a SignatureValue in it. It seems that the validateSignature function inside passport-saml/lib/passport-saml/saml.is never finds the needed signature object and returns false
`var xpathSigQuery = ".//*[local-name(.)='Signature' and " +
"namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']";
var signatures = xpath(currentNode, xpathSigQuery);
// This function is expecting to validate exactly one signature, so if we find more or fewer
// than that, reject.
if (signatures.length != 1)
return false;`
My token looks like this
`<?xml version="1.0" encoding="UTF-8"?>
Islyklar3IHF2lkJL3gxyJ99C7z1lZGI6SBT5U9ZfwV3TBQNl4M=CD7KFLp3j0UizzWRTri/pOX+5nfai0BOmT/5KMwGOWViIyX74j/WXI7XdVjTS/Zfiziepimbo8eiWFKtgYlxLIzMHoICK8WYz+r7bZGdecvHV6xeTlVQcwDwna6grrOGzzvrWbrbiO8IDRld459bGg1KKqM0AM3Zpr/Kagnce+5egRGDeAWLPwGWyHfLF37BvAweZ9+sYV4LBEGXtILkgJqxQWsh/Yfe8qz49hxaIp3E5YYmvtBqRSfwyPJHjgGYeioz1JanO5v5hHihas+ZKCK7SRRY6QojY0wChB8pxbpivCwvZ3/BOY8lzdtpQryAmmQkPmB0HZa9yG3h6LGvkg==MIIGDDCCBPSgAwIBAgICHRwwDQYJKoZIhvcNAQEFBQAwgZIxCzAJBgNVBAYTAklTMRMwEQYDVQQFEwo1MjEwMDAyNzkwMRYwFAYDVQQKEw1BdWRrZW5uaSBlaGYuMSMwIQYDVQQLExpVdGdlZmFuZGkgYnVuYWRhcnNraWxyaWtqYTEWMBQGA1UECxMNTWlsbGlza2lscmlraTEZMBcGA1UEAxMQVHJhdXN0dXIgYnVuYWR1cjAeFw0xNjA3MTQxNTExMzdaFw0xODA3MTQxNTExMzdaMIHCMQswCQYDVQQGEwJJUzEeMBwGA1UECgwVw55qw7PDsHNrcsOhIMONc2xhbmRzMRgwFgYDVQQLEw9CdW5hZGFyc2tpbHJpa2kxJTAjBgNVBAsMHFVuZGlycml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S5pcy9za2lscmlraS90cmF1c3R1cmJ1bmFkdXIucDdiMAsGA1UdDwQEAwIF4DAfBgNVHSMEGDAWgBRv7NsRLAEDaxtgrrb4aNlAAc2OODBCBgNVHR8EOzA5MDegNaAzhjFodHRwOi8vY3JsLmF1ZGtlbm5pLmlzL3RyYXVzdHVyYnVuYWR1ci9sYXRlc3QuY3JsMB0GA1UdDgQWBBTXlBUp1axlTP9Rp2js7gSEmHKVzDANBgkqhkiG9w0BAQUFAAOCAQEABbDwqym5k1pmai/UL49pceeJnWSTvpZOabAYXOb/CeOM6iombgSgi/F8nXtZ49QCAZEdlB7S+jKL/6btqnWvE3FtaZpDzU1LdkzvUlJSYJlWCRgQV8g2uLz78QibychcIjlT2j0tx32TTg9kd64KX+k7/YjP+QJ1rpPkvWT7DNdJTrnLhCE01/qgGza2D+3c7Tav7WpqSv1CN7AY0RtDsEDBoH4os+5SRCX0+oOQ7ucv+nbaOYggzz06w7yfUdUQtrxS97fJwuH7hspD50lRdSlzKR38GPcL9E54OMz6Znw8ntw2htNZ1p0K/97sYJUUaHJWSM7u5655JyvpeEjKeA==Islyklarwww.digidoktor.isurn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient2402596139Bragi Leifur HaukssonRafræn skilríki10.121.57.251106773249Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36`
Also, my IDP posts this saml response to my POST binding using a variable named "_token_" and not "_SAMLResponse_". Can I configure this somehow using the framework?
Hi. I am trying to verify a SAML2 response by sending a POST request to my SP setup. The token has a SignatureValue in it. It seems that the validateSignature function inside passport-saml/lib/passport-saml/saml.is never finds the needed signature object and returns false `var xpathSigQuery = ".//*[local-name(.)='Signature' and " + "namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']";
var signatures = xpath(currentNode, xpathSigQuery);
// This function is expecting to validate exactly one signature, so if we find more or fewer // than that, reject. if (signatures.length != 1) return false;`
My token looks like this `<?xml version="1.0" encoding="UTF-8"?>