Closed mikevbaker closed 1 year ago
I'm getting the same problem, did you solve it?
I switched to express-saml2. It also makes use of xml-crypto but doesn't seem to have the same problem with the signature.
Mike
@mikevbaker Please switch to samlify as soon as possible, the old version (express-saml2) is already deprecated and has security issue.
What if all you want to do is verify a signature?
Several such issues were fixed since this issue was reported in newer versions of xml-crypto
, passport-saml
, and node-saml
. Please try those versions and, if you are still having an issue, please reply to this issue but also please include the version numbers you are using.
Hi all, I'm working with passport-saml in Amazon Web Service Elastic Beanstalk NodeJS. I have this setup in config:
which is used in this strategy:
This is an excerpt from a samlp:Response that is sent from the IdP to my /sso/acs post handler.
I traced the operation down into xml-crypto and I found it stuffing this into the validationErrors.
invalid signature: for uri #Assertion-uuidf5cec21-015c-1744-8ab6-e42f35dbee20 calculated digest is 0xcAC4ltyxSDCKKE+miR6uge/gs= but the xml to validate supplies digest DZSPFDmb1ag4wvxjOKdcpFxGa2c=
I also found that the hash algorithm name that was selected was
http://www.w3.org/2000/09/xmldsig#sha1
I've read everything I can find on the topic. The enveloped-signature is first in the transforms, I modified the code to force samlp to be included in the PrefixList, I forced the PrefixList to exactly match what's in the test.js file, I dumped canonXml out to the log and made sure there aren't any trailing characters on line endings (it's all one line as far as I can tell). I also tried it with and without my private key. This is my first NodeJS SAML experience so I might be missing something obvious. Can anyone see a problem here? Do I need to change something in the setup to handle this? Do you need to see more code, the canonXml or perhaps the whole samlp:Response xml?
TIA Mike