SovereignCloudStack / issues

This repository is used for issues that are cross-repository or not bound to a specific repository.
https://github.com/orgs/SovereignCloudStack/projects/6
2 stars 1 forks source link

Horizon logout doesn't logout federated OIDC user (in proxy realm setup) #347

Closed reqa closed 11 months ago

reqa commented 1 year ago

As a federated OIDC user, I want Horizon logout to also logout from the OIDC IdP so that I need to enter a password again instead of automatic re-use the access token from the cookie.

Current Situation: @JuanPTM has created a PoC setup with Federation to a Keycloak "Proxy realm" ("OSISM") and configuring the Keycloak extension https://github.com/sventorben/keycloak-home-idp-discovery to route the user to the customer-specific Keycloak realm based on their email.

Login Flow:

Plan of work:

Definition of Ready:

Definition of Done:

reqa commented 1 year ago

We noticed from experiment that

  1. We are also still "logged in" after logout, even when we additionally remove the sessions in Keycloak (as admin). So that looks more like a thing between user browser and keystone?

  2. The cookie mod_auth_openidc_session seems to be the credential that keeps us logged in even after logout. That cookie remains in the browser storage and if we remove that too then transparent re-login is not performed any longer.

  3. At first glance it doesn't seem to be related on the "second OIDC hop" from the Keycloak "proxy realm" to the customer-specific realm.

This suggests that maybe mod_auth_openidc either doesn't get informed of the horizon logout or it doesn't properly handle it.

Maybe interesting info:

reqa commented 1 year ago

@JuanPTM has made some progress and found a creative alternative logout solution:

JuanPTM commented 1 year ago

After today SIG meeting, I use the propose from @jnull to improve the solution 2 into a new one.

garloff commented 1 year ago

Will need to go to osism/cfg-generics after successful test on testbed.

JuanPTM commented 1 year ago

There is a merge request in the testbed to fix the logout corner cases ( SIG IAM 11-08) https://github.com/osism/testbed/pull/1717

JuanPTM commented 1 year ago

Merged

JuanPTM commented 1 year ago

Found a new issue on a fresh testbed deploy. A PR has been created on the testbed to fix it. MR testbed

Issues:

JuanPTM commented 1 year ago

PR has been merged

garloff commented 11 months ago

Nice, this one is done.