Closed turbo-xav closed 1 year ago
It seems that there is a change in behavior between the UBI 8 and UBI 9 images. Can you test UBI 9 locally? Or, can you see what else might be different?
One good resource for a 3rd-party check of sanity is https://www.samltool.com/. What results do you get from there checking signatures?
Frist few questions:
If answers are yes
then:
As mentioned at issue description https://github.com/node-saml/xml-crypto is unable to verify messages signature.
xml-crypto
uses OpenSSL behind the scenes .
Based on quick internet search RHEL8 is using OpenSSL 1.1.1<someting>
and RHEL9 is using OpenSSL 3.0.<something>
(*) so there is one big difference between those environments.
Without more information (stacktrace, information about certificate, signature algorithms etc.) it would be quite hard for anybody to help.
Note: OpenSSL 3.0.x has been around for a while. If this would be some systemic issue wth xml-crypto
and OpenSSL 3.0.x
then one could find quite a lot reports about it.
(*) https://www.redhat.com/en/blog/experience-bringing-openssl-30-rhel-and-fedora
Because this appears to consider a user environment and is not clearly a bug in this library, I'm moving this to discussions. If there's a clearly a bug with a SAML library, we can open an issue.
Hello,
I work with NestJs and passport SAML to authenticate users.
All is fine when i work locally, I work with Redhat UBI images to deploy my app into my cloud provider It works on "UBI 8" image (ex: https://catalog.redhat.com/software/containers/ubi8/nodejs-18/6278e5c078709f5277f26998)
But when i execute it into a Redhat "UBI 9" image (https://catalog.redhat.com/software/containers/ubi9/nodejs-18/62e8e7ed22d1d3c2dfe2ca01) All is right until the SAML IDP call my callback URl it trigger an error : [Nest] 1 - 04/21/2023, 8:38:12 AM ERROR [ExceptionsHandler] Invalid signature
I investigate and i found the line code into xml-crypto which verify the signature : Path is : "node_modules/xml-crypto/lib/signed-xml.js" Here is the concerned function :
This line should affect "true" value to "res" but it affects "false" value.
var res = signer.verifySignature(signedInfoCanon, this.signingKey, this.signatureValue, callback)
Do you have any idea why this doesn't work on redhat UBI9 images ? I couldn't find any information on the subject on Stack Overflow or any other source of information
Here is my dependencies into package.json :
Thanks in advance for your help