feat(kanidm): rename the portal oauth2 client to bitborg-web #406
Inga granskare
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
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!406
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "feat/rename-1b-oidc-client"
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?
ADR 0039 §1b, first of three identifiers. Renames the production portal OAuth2 client
gitborg-web→bitborg-web.Two sites, not one
The rename plan lists
web_oidc_client_idas a single variable. It is actually duplicated:group_vars/all/vars.yml—web_oidc_client_id, which feeds the portal'sOIDC_CLIENT_IDand (viaweb_oidc_issuer) itsOIDC_ISSUERroles/kanidm/defaults/main.yml— a hardcoded- name:inkanidm_oauth2_clients, which is what Kanidm actually createsNothing derives one from the other. Moving only the first would leave the portal authenticating against a client id that does not exist — SSO fails closed, with no error until a user tries to sign in. Both are now cross-referenced in comments so the next reader cannot move one alone.
Mechanics
Same as the dev client in tranche 1. A client id is not renamable in place and kanidm-provision runs
--no-auto-remove, so this declaration createsbitborg-weband leavesgitborg-weblive. That is deliberate — the old client keeps serving until the orphan is deleted by hand, which keeps the cutover reversible until that final step.The new client gets a fresh random basic secret (upstream has no API to set one), so
vault_web_oidc_client_secretis re-vaulted fromshow-basic-secretand the web role re-applied.Apply sequencing
Deliberately two applies rather than one, to shrink the outage:
--tags kanidm— creates the new client. Portal untouched, still using the old client and its existing secret. Zero user-visible impact.--tags web— one portal restart onto the new client id + secret.A single apply would have restarted the portal with the new id but the old secret, leaving SSO broken for the whole re-vault interval.
Dry-run note
site.yml --checkreportsfailed=1on the #275 OAuth2 scope-map drift gate:live=[] declared=[forgejo_users]forbitborg-web. This is a check-mode artefact, not a defect —scripts/apply-reconcile.py blindlistskanidm : Provision entitlement groupsasansible.builtin.command skipped in check mode, so the client is never created during a dry run and the later live-read sees nothing. Provisioning (tasks/main.yml:370) runs before the drift check (:541), so a real apply creates the client first. The pre-change baseline wasfailed=0because the then-declared client existed live.Baseline before this change was verified
changed=0on both hosts, so the singlechangedtask in the dry run (Render the kanidm provisioning state) is attributable to this change alone.Scope
Only identifier ① of §1b. The provision service account and the entry-manager group are untouched, so sign-up provisioning and
signup:drillare unaffected. Also corrects four comments the rename makes untrue; the drift-measurement table atdefaults:370is deliberately left, since it records a live reading taken at a point in time.