Create accounts through the Keycloak admin API #311
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-web#311
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?
Replace
src/lib/kanidm.tswith a Keycloak admin client.src/lib/keycloak.ts: client-credentials token forbitborg-web-admin. Create user (username, email, display name, email unverified, groups), send action email for first enrolment, look up by exact email, delete on sign-up rollback, group and role writes. Map 409 and 400 to the existing UI messages.ent_renovaterole mapping, thentriggerReconcile.session.ts: groups are bare names. Readentitlementsfor the panel.identity-rules.ts: drop the Kanidm name rules, keep the Forgejo intersection, add Keycloak username rules.oidc.ts: issuerhttps://auth.bitborg.se/realms/bitborg, check client auth and RS256, logout through the end-session endpoint.KEYCLOAK_URL,KEYCLOAK_REALM,KEYCLOAK_ADMIN_CLIENT_ID,KEYCLOAK_ADMIN_CLIENT_SECRETreplaceKANIDM_*.web_image_tagto the current release before merging, test on staging, unpin at cutover (prod trackslatest).Done when: sign-up, sign-in and logout work against staging Keycloak.
Depends on: bitborg/bitborg-infra#571
Depends on: web#309
Epic: bitborg/bitborg-docs#127
While moving provisioning to the Keycloak admin API, fix the order in
src/pages/api/signup.ts.Today the account is created first and the consent row second. If the consent write fails, the retry returns
takenbefore the consent write. The row is never written and the user is told the name is taken.Fix: write the consent row first with
onConflictDoNothing. Delete it if provisioning fails and this call inserted it. Add a test where the consent write throws and the retry succeeds.Done when a failed consent write followed by a retry ends with exactly one account and one consent row.
Reopened: merged in #328 and running on staging (login redirects to the staging realm). Done-when still needs sign-up, sign-in and logout verified on staging.
Done on staging, 2026-10-11:
supernautlanded on its existing Forgejo account./accountends the Bitborg-id session without a confirm page, after #343 (CSPform-action).Forgejo sign-out keeps the Bitborg-id session by design for now; single logout is bitborg/bitborg-infra#646.