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

Invalid Signature While integrating passport-saml with OAM #835

Closed
bharatsahulw opened this issue Jan 5, 2023 · 7 comments
Closed

Invalid Signature While integrating passport-saml with OAM #835

bharatsahulw opened this issue Jan 5, 2023 · 7 comments
Labels

Comments

@bharatsahulw
Copy link

Hi All,

Is there any way to integrate the node js with passport-saml by using the OAM metadata file instead of ADFS metadata file? I am using below keys from the metadata file in the passport-saml.

passport.use(/login, new SamlStrategy({
path: "login_file_path",
entryPoint: "Entry url from the metadata file or IDP/SP entry url",
issuer: "my application url",
cert: "x509:certificate from the metadata file",
disableRequestedAuthnContext: true,
authnContext: 'http://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/windows'
}, function(user, done) {
if (user && user.nameID) {
done (null, user)
} else {
done(null, null);
}
}));

Getting Invalid signature error.

@srd90
Copy link

srd90 commented Jan 5, 2023

You did not share any information about version numbers of your SW stack. Not in the discussion #834 or in this particular issue ( #835 ). Difference between discussion item and this issue seems to be that in this issue you say that passport-saml reports invalid signature (without any stacktrace for extra information).

Most probably you used @node-saml/passport-saml >= 4.0.0 and if so your problem is most probably related/duplicate of these (if you are 100% sure you configured correct IdP cert):

@bharatsahulw
Copy link
Author

bharatsahulw commented Jan 5, 2023

Thank you for your reply.

I am using the below stack:
"passport-saml": "^0.20.0",
Node version: 10

I am using the highlighted in yellow as a cert key from the OAM metadata file.

@srd90
Copy link

srd90 commented Jan 5, 2023

^0.20.0 ... unbelievable.

All versions of passport-saml prior to 4.0.0 are deprecated.

There is/has been huge number of security fixes over the years since 0.20.0 (e.g. for dependencies like xmldom and for passport-saml). Some of those are critical.

I presume that node 10 is also EOLed.

@srd90
Copy link

srd90 commented Jan 5, 2023

@bharatsahulw one more thing: You had masked entityid from the picture you had attached to previous message.

That picture contains also IdP certificate which most probably has some information about IdP also (maybe domain name etc). So one could run that picture through OCR and examine content of certificate with any tool that is capable of transforming it to human readable format.

If you considered entityid to be worth masking consider masking also certificate from that picture. Note: github remembers edits if you do not explicitly delete old versions.

@bharatsahulw
Copy link
Author

Thanks for your concern. I have already in the process of upgradation of the packages and node version.

Though I was facing the issue with the current stack. Will it get resolved after upgrading the package ?

@srd90
Copy link

srd90 commented Jan 5, 2023

Will it get resolved after upgrading the package ?

I do not know. You'll find out sooner or later. At least after upgrade you are using version(s) which are somewhat supported. I am quite sure that no one would have invested their free time to investigate 0.20.0

fwiw: if you click small arrow next to ”edited” text at the header of this comment #835 (comment) you are still able to see content of the message which had that unmasked information. Consider clicking delete for that particular version.

@cjbarth
Copy link
Collaborator

cjbarth commented Jan 11, 2023

@srd90 is correct, I won't be spending time looking into problems on deprecated versions, and I doubt anyone else will either. We also won't do a release for any version that old. If there is a serious problem with v3, we may do a release, but otherwise issues and PRs should be against the v4 branch.

Please re-open when you meet that baseline if you still have issues.

@cjbarth cjbarth closed this as completed Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants