-
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
Update docs/adfs/README.md and move to wiki #840
Conversation
added necessary parameters for ADFS added Microsoft reference for authnContext
docs/adfs/README.md
Outdated
@@ -57,6 +58,8 @@ passport.use( | |||
racComparison: "exact", // default to exact RequestedAuthnContext Comparison Type | |||
// From the metadata document | |||
audience: "https://adfs.acme_tools.com/FederationMetadata/2007-06/FederationMetadata.xml", | |||
// otherwise it will thow because of invalid document signature | |||
wantAuthnResponseSigned: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want any example code to disable security features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is very confusing since this is the exact configuration for AD FS and not working out of the box.
If possible it could also be mentioned how to adjust the ADFS configuration to work with it but for me there was no other oppertunity than setting wantAuthnResponseSigned
to false
AFAIK @markstos has proposed to move all IdP implementation specific guides to wiki section (like e.g. https://github.com/node-saml/passport-saml/wiki/How-to-use-with-Auth0 ) so this could be good moment to move ADFS specific guide also. @1nbuc about the change that you proposed
and especially about this code comment:
it would be better to tell why this happens. Reason why this happens is that your IdP is signing only assertion. I.e. it does not sign whole authnresponse. Starting from 4.0.0 passport-saml was changed to require by default response and assertion signatures and it is up to developer to configure passport-saml to be compatible with how IdP is signing OR to (re-)configure IdP side. I am not an ADFS user but based on quick web search it seems that it might be possible to configure ADFS to sign only assertion, only message or both. See e.g.:
So if your example is stating that ”otherwise you get invalid signature error” it might not be the case for someone else and in some case someone's ADFS might be configured to sign both in which case - when that someone has just copy pasted your example without understanding - his/her configuration would be less secure than what it could have been. Having said all that this is not ADFS specific problem at all. It is related to how well developers know authentication protocol that they are using to secure their site. They should be aware of signatures and other security related aspects before implementing SAML and there are far better sites for that documentation than passport-saml project. fwiw, there has been quite a few issues relating this new behaviour:
|
… on AD FS and removed insecure parameter in example
Forgot to mention that if someone's ADFS would have been configured to sign only message and that someone would have copy pasted proposed example configuration as-is then there would have been another issue about incorrect example configuration due signature validation error because assertion is not signed and passport-saml default for |
Honestly I didn't know about the possibility to change the signing behaviour, I added the powershell script to the docs and removed the insecure configuration. |
@1nbuc , for record-keeping purposes, can you please adjust the description of this PR to follow the directions? |
This document has been moved to the Wiki. |
Codecov Report
@@ Coverage Diff @@
## master #840 +/- ##
=======================================
Coverage 65.10% 65.10%
=======================================
Files 4 4
Lines 149 149
Branches 37 37
=======================================
Hits 97 97
Misses 29 29
Partials 23 23 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Description
Checklist: