-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix IDP-initiated Logout #334
Conversation
Thanks for this @DylannCordel cool stuff |
@schiessle @blizzz if you test with onelogin be sure to configure it so that the SLO url configured in one login points to |
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.
looks good, didn't test though
logic looks good, but didn't tested it yet. One security concern: We accept now logout request from everywhere without verifying if it is a valid logout request. I wonder if we could use the data from the 'SAMLRequest' parameter to verify if it is a valid request (https://github.com/nextcloud/user_saml/pull/334/files#diff-08ab8d6da860d4cc7a5530b6414b0f6eR323)? |
@schiessle you right. Last commit should solve this problem. I investigate a little deeper in code and saw processSLO was able to not perform the redirect itself. Now, session logout will only be called if performSLO was a success (that means IDP request was valid). I still have a problem with a loop login redirection when disconnecting from nextcloud (but not from IDP, and it works if I reload the page 😱...) due to |
Hey there! |
just merged with master to stay up to date for testing. |
@DylannCordel you need to sign your commits 😉 |
It would have been better to rebase to master instead of pulling master :) |
Signed-off-by: Dylann Cordel <d.cordel@webu.coop>
just corrected noise I introduced in commits 😉 |
Pushed and rebased! |
Signed-off-by: Dylann Cordel <d.cordel@webu.coop>
Tests are greeeen :D @DylannCordel do you think you could add a few tests for your changes? |
Thanks a lot @DylannCordel for tackling this issue. I tested in on my instance and it works just fine! |
@DylannCordel let's get this in? |
@fri-sch thanks for feed-back. @skjnldsv yes I can check how tests works in Nextcloud and try to add some soon. Concerning modifications of @fri-sch it looks good. How do you want to proceed ? Do I cherry-pick its commit to add it on the PR (or maybe @fri-sch can PR into webu/user_saml repo ?) or do you want two distinct PR on nextcloud/user_saml ? |
@DylannCordel can you open a pr against this one? |
@skjnldsv I'm sorry, I don't understand what I must do:
Sorry for time loss 😳 |
No worries :) Regarding @fri-sch's pr, both are fine really. |
Done, let's not wait too long :) |
cf #161
With those websites configured to use SSO:
IDP
: the IDP / SSO serviceN
: nextcloud instanceO
: an other website using the SSOWhen user disconnect from site
O
, it send a request toIDP
.IDP
send a request toN
(and all other websites where current user as a session opened) to disconnect the user on those websites too.This PR fix this behaviour which was not working because of CRSF check which can not be valid in this scenario: validation must be done via the validation of the IDP SAML request.