Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canonicalization algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' is not supported #139

Closed
cherchyk opened this issue Feb 8, 2016 · 2 comments

Comments

@cherchyk
Copy link

cherchyk commented Feb 8, 2016

Hi,

Saml strategy works well for my until I'm trying to use SAML response validation.

I added cert and signatureAlgorithm params to SamlStrategy

{
            path: config.passport.saml.path,
            entryPoint: config.passport.saml.entryPoint,
            issuer: config.passport.saml.issuer,

            cert: config.passport.saml.cert,
            signatureAlgorithm: config.passport.saml.signatureAlgorithm
        }

/callback writes this to response

canonicalization algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' is not supported

Can someone help me with this problem?

@cherchyk
Copy link
Author

cherchyk commented Feb 8, 2016

more details:

canonicalization algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' is not supported" err="Error: canonicalization algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' is not supported
    at SignedXml.findCanonicalizationAlgorithm (c:\\Bohdan\\bohdan-test1\\node_modules\\xml-crypto\\lib\\signed-xml.js:288:14)
    at SignedXml.getCanonXml (c:\\Bohdan\\bohdan-test1\\node_modules\\xml-crypto\\lib\\signed-xml.js:595:26)
    at SignedXml.validateReferences (c:\\Bohdan\\bohdan-test1\\node_modules\\xml-crypto\\lib\\signed-xml.js:324:25)
    at SignedXml.checkSignature (c:\\Bohdan\\bohdan-test1\\node_modules\\xml-crypto\\lib\\signed-xml.js:257:13)
    at SAML.validateSignature (c:\\Bohdan\\bohdan-test1\\node_modules\\passport-saml\\lib\\passport-saml\\saml.js:498:14)
    at c:\\Bohdan\\bohdan-test1\\node_modules\\passport-saml\\lib\\passport-saml\\saml.js:528:35
    at _fulfilled (c:\\Bohdan\\bohdan-test1\\node_modules\\q\\q.js:794:54)
    at Promise.then.Q.nextTick.self.promiseDispatch.done (c:\\Bohdan\\bohdan-test1\\node_modules\\q\\q.js:823:30)
    at Promise.__dirname.Promise.promise.promiseDispatch (c:\\Bohdan\\bohdan-test1\\node_modules\\q\\q.js:756:13)
    at c:\\Bohdan\\bohdan-test1\\node_modules\\q\\q.js:516:49
    at flush (c:\\Bohdan\\bohdan-test1\\node_modules\\q\\q.js:110:17)
    at doNTCallback0 (node.js:430:9)
    at process._tickCallback (node.js:359:13)

@cherchyk
Copy link
Author

I fixed this problem

with

xmlCrypto.SignedXml.CanonicalizationAlgorithms['http://www.w3.org/TR/2001/REC-xml-c14n-20010315'] = 
    xmlCrypto.SignedXml.CanonicalizationAlgorithms['http://www.w3.org/2001/10/xml-exc-c14n#'];

passport.use(new SamlStrategy(.............));

@cherchyk cherchyk changed the title using cert to validate SAML response canonicalization algorithm 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315' is not supported Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant