-
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
Check user matches logout request before reporting logout success #619
Conversation
This is currently marked as a draft because it depends on the corresponding PR in node-saml landing first and being released to NPM, at least as a beta, so this code can point to it. |
Based on discussions at #419 and in this particular PR and implementation of espoon-voltti/evaka#738 it should be clear that there aren't any silver bullets which could be used to fix One solution would be to disable SLO feature by default and let developers to explicitly enable it if and when they understand the very specific conditions when SLO feature flag would
Another solution to increase awareness and create incentive to come up with solution of/to SLO weakness would be to create e.g Github Security Advisory (https://docs.github.com/en/code-security/security-advisories/creating-a-security-advisory) and request CVE number for it. This way issue would become more visible (e.g. npm might/could raise a warning about it) and once again client programs using (*) btw. that not so long ago fixed "missing cert configuration option allows authentication bypass" issue would be also a good candidate for GSA |
I feel like since I'll see about creating a CVE. |
@cjbarth you commented:
About nameids. There are different nameid formats and especially transient. See https://stackoverflow.com/questions/11693297/what-are-the-different-nameid-format-used-for About transient and Shibboleth:
source: https://wiki.shibboleth.net/confluence/display/CONCEPT/NameIdentifiers So there are quite a few (Shibboleth) IdPs which communicate identity of the user with some attribute (i.e. IdP and SP are aware which attribute that is) instead of nameid. So there are quite a few @cjbarth you wrote:
Unless session is reintroduced into session store due combination of some resave funtionality: https://github.com/expressjs/session/tree/0048bcac451ad867299d404aca94c79cc8bc751d#resave What I am trying to say is that passport-saml cannot be confident unless it is involved in authorization loop of each request or unless it delegate whole processing of logout to application. |
I think I've come to the same understanding you have. The only method that is truly in-scope for passport-saml is to delegate this to the application. See #619 (comment). It would be a braking change for sure, but at least it would call attention to the fact that a developer actually needs to think about their SLO flows, whereas right now it appears automatic to the developer. |
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.
The proposal here to verify the user doing logout is sound, but it appears that the PR could use a rebase or perhaps even a fresh start in a new branch.
The current PR adds over 1,000 lines and removes over 12,000. Surely that kind of churn isn't required to verify a user during logout.
Thanks, @cjbarth. It's looking better. |
@srd90 Has reported a bug with SLO in node-saml, passport-saml, here. This adjusts passport-saml to call node-saml correctly to get a success of fail response to send to the IdP. A logout is attempted no matter what, assuming that the SAML from the IdP is meant for us. However, a logout is only reported as successful if the user that is currently logged in matches the one that is specified in the logout request from the IdP.