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

Provide backchannel SSO logout endpoint #33

Open
col-panic opened this issue May 13, 2024 · 11 comments
Open

Provide backchannel SSO logout endpoint #33

col-panic opened this issue May 13, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@col-panic
Copy link

Currently pressing Logoff in redmine only closes the redmine session. Optionally a full SSO logoff should be possible.

@picman picman added the enhancement New feature or request label May 13, 2024
@picman
Copy link
Collaborator

picman commented May 13, 2024

What do you mean with "optionally"?

@col-panic
Copy link
Author

At the moment when logging off in Redmine (after logging into it with redmine_oauth) only redmine
is logged out, while the OAUTH2 Session stays open.

There should be a configurable option (just like the don't show password login option) to perform SSO Logout on logging out in Redmine. So that both the redmine session and the SSO session are ended.

@picman
Copy link
Collaborator

picman commented Sep 6, 2024

But OAuth can be used from more than one application. E.g. You log out from Redmine but you don't want to be logged out from Azure too.
I can add a new plugin option, something like "Force log out", or shouldn't be it per user?

@col-panic
Copy link
Author

@picman you are right. If you end the session, then you only invalidate the redmine session, and as soon as you click the OpenId login (with a valid openid session) again, you will be logged into redmine again.

You could end the whole SSO session by calling the respective IdP endpoint, but if e.g. Azure is not configured to get the backchannel logout information, then it will stick as is.

So generally - every application after login has its own sesssion cookies running, and its a matter of how deep the specific application adopts SSO to what degree it will honor or prioritize SSO session information to its own session information.

Lets fix the scenario another way round:

You end your SSO session with the IdP directly - so you consider every application you logged in via SSO to end its current session. Maybe this should be the real feature we adopt - supporting backchannel logouts! Here you would have to provide an endpoint which gets called by the IdP telling you to logoff user X.

@col-panic col-panic changed the title Support SSO logoff Provide backchannel SSO logout endpoint Sep 8, 2024
@picman picman self-assigned this Sep 9, 2024
@picman picman added this to the 2.2.5 milestone Sep 9, 2024
@picman
Copy link
Collaborator

picman commented Sep 11, 2024

I've implemented 'OAuth logout' if checked out in the settings. Could you test the logout branch please?

@col-panic
Copy link
Author

Will check after #36 is integrated (easier ...)

@picman
Copy link
Collaborator

picman commented Sep 13, 2024

Merged into devel.

@col-panic
Copy link
Author

What is the "Backchannel logout URL" to configure to Keycloak?

grafik

@picman
Copy link
Collaborator

picman commented Sep 16, 2024

I think that you can configure here for example a URL for password change and as soon as a user call a password change, it will log them out. You should leave it empty it shouldn't have anything to do with Redmine logout.

@col-panic
Copy link
Author

Thank you @picman for the patch, i have several points/questions to this

  1. What does "Update login" effectively do?
  2. You implemented a SSO Logoff. That is, if I select the "OAuth logout" option, then I will logoff the SSO Session with Keycloak, which is good, but not the focus of this issue, resp. this is another feature (we should rename the issue for this).
  3. Backchannel logout would require an endpoint which is being called by Keycloak to invalidate my existing redmine session. The use-case is: I have a SSO Session with keycloak, and now I logout unter https://keycloak/user - now I want all associated services to respect this logout and make the sessions invalid. Here this would involve, that my redmine session gets invalidated.

@col-panic
Copy link
Author

I'm not sure about this at the moment, could we probably move this to 2.2.6 and give it some time to think about?! I could then re-arrange the issues with better descriptions feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants