semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.
https://semaphoreui.com
MIT License
10.36k stars 1.04k forks source link

Logout from Keycloak session when logging out from Semaphore #1496

Open spomata opened 1 year ago

spomata commented 1 year ago

Hi all,

I am running a docker-based Semaphore setup successfully integrated with Keycloak.

I noticed that there's no option to logout from Keycloak when logging out from Semaphore which means that basically you can't simply switch users unless you manually logout from the SSO provider.

I guess for OIDC it boils down to visit a particular URL after closing the session

https://KEYCLOAK-HOST/auth/realms/YOUR-REALM/protocol/openid-connect/logout

Is my assumption correct?

I might even be able to contribute a patch if head developers feel it could be useful. Thanks

fiftin commented 6 months ago

Hi @spomata

could you test latest version of Semaphore with Keycloak?

spomata commented 6 months ago

Hi @fiftin

Just tried with the latest version. Clicking on logout brings me back to the login page of Semaphore, however the SSO button will grant immediately another session with the same user, i.e. behaviour has not changed.

I think that Semaphore is not visiting the OIDC logout endpoint as far as I could see from the API calls, but only: $URL/api/auth/logout