keycloak: end the bitborg-id session on forgejo sign-out #646
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#646
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
Signing out of Forgejo ends only the Forgejo session. The Bitborg-id (Keycloak) session stays, so the next "Sign in with Bitborg-id" signs the person straight back in. The portal already ends the Keycloak session on logout (#333 in bitborg-web).
Why
On a shared computer, a person who signs out of Forgejo expects to be signed out. The FAQ explains the gap for now.
Fix
Prototype single logout without patching Forgejo: after Forgejo's logout, send the browser to Keycloak's
end_sessionendpoint withclient_idand apost_logout_redirect_uriback togit.*. Candidates are a Caddyhandle_responseon Forgejo's logout response, or a small custom Forgejo template change. Check how Forgejo issues the logout request first.Done when
After cutover (#575).
Seen on staging on 2026-10-14 with isolated Keycloak. Sign-out returns 200 (
POST /user/logout). Forgejo then goes/→/explore(303) →/user/oauth2/Bitborg-id→ callback. The open Keycloak session signs the user in again. A red flash blinks too briefly to read.