-
Notifications
You must be signed in to change notification settings - Fork 475
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
[BUG] validateInResponseTo = true does not validate responses #874
Comments
I personally think that adding Please also create a PR here to remove references to |
IMHO this issue should have fwiw, I would suggest that default would be |
Agree with @srd90 . This is a vulnerability and it is not obvious to new users that The easiest fix imo is to update this repo's docs, default in node-saml config should be "always" (it is currently false), and enforce the enums. |
I agree with this. We can land the PR to force a selection of an enum type on |
As a note, I'm working on getting some things sorted out with |
With the changes in #886 and the updates to |
Found out that the responseTo was not being validated despite setting validateInResponseTo to true in the config. After some digging around, turns out setting validateInResponseTo to a truthy value is not enough. node-saml expects one of the valid values "never", "ifPresent", or "always". We tried setting it to "always" and now responses are actually validated properly.
I checked @node-saml/node-saml/lib/saml.js and found this method
Commit that changed behaviour in dependency: node-saml/node-saml@496c54e
To Reproduce
Follow the guide in the Readme and setup a basic auth. We noticed that responseTo was not being validated when we were setting up the cacheProvider and saw that it was never used, so that's one way to verify it without testing custom responses.
Expected behavior
Either validateInResponseTo = true should be equivalent to setting it to "always" or the documentation needs to be updated to reflect the values that are actually valid
Environment
passport-saml
version: 4.0.4The text was updated successfully, but these errors were encountered: