feat(identity): serve keycloak as bitborg-id on id.* #638

Sammanfogat
supernaut sammanfogade 4 incheckningar från feat/identity-id-domain in i main 2026-10-10 05:58:02 +00:00
Ägare

Serve Keycloak as Bitborg-id at id.bitborg.se and id.stg.bitborg.se.

  • keycloak_domain is id.*. kanidm_domain stays auth.* while Kanidm runs.
  • With kanidm_enabled: false, Caddy redirects auth.* to id.* (301).
  • WebAuthn relying party ID comes from webauthn_rp_id: bitborg.se in prod, stg.bitborg.se on staging.
  • Forgejo source name, portal issuer, Grafana sign-in URLs and the auth probe derive from kanidm_enabled. Turning Kanidm off switches them all.
  • The Forgejo OIDC source is updated in place by id, then the role waits for Forgejo to come back.
  • The Forgejo callback path is /user/oauth2/Bitborg-id/callback.

Applied on staging. Prod and monitoring dry runs show changed=0.

Cutover hand steps are on #575.

Refs #575

Serve Keycloak as Bitborg-id at `id.bitborg.se` and `id.stg.bitborg.se`. - `keycloak_domain` is `id.*`. `kanidm_domain` stays `auth.*` while Kanidm runs. - With `kanidm_enabled: false`, Caddy redirects `auth.*` to `id.*` (301). - WebAuthn relying party ID comes from `webauthn_rp_id`: `bitborg.se` in prod, `stg.bitborg.se` on staging. - Forgejo source name, portal issuer, Grafana sign-in URLs and the auth probe derive from `kanidm_enabled`. Turning Kanidm off switches them all. - The Forgejo OIDC source is updated in place by id, then the role waits for Forgejo to come back. - The Forgejo callback path is `/user/oauth2/Bitborg-id/callback`. Applied on staging. Prod and monitoring dry runs show `changed=0`. Cutover hand steps are on #575. Refs #575
supernaut lade till 3 incheckningar 2026-10-10 05:48:43 +00:00
Keycloak gets its own name, keycloak_domain: id.bitborg.se on prod and
id.stg.bitborg.se on staging. Kanidm keeps auth.*, so both can run side
by side until the cutover. With Kanidm off, Caddy answers auth.* with a
permanent redirect to the Keycloak name.

- Forgejo finds its single OAuth2 source by type and renames it in place
  by id, so linked accounts stay linked. Staging names it Bitborg-id.
- The forgejo client callback follows the new slug.
- WebAuthn relying party ID per environment: bitborg.se on prod,
  stg.bitborg.se on staging.
- The health gate checks Kanidm and Keycloak independently.
- The portal's PUBLIC_AUTH_URL points at whichever provider is live.

Prod renders unchanged: keycloak_enabled is false there.

Refs bitborg/bitborg-docs#127
The system webhook check called the API while Forgejo was still starting
and failed with 502.

Refs bitborg/bitborg-docs#127
refactor(identity): derive identity settings from kanidm_enabled
En del kontroller misslyckades
ci / ci (pull_request) Failing after 1m8s
9808c0e8c0
The portal issuer and client secret, the Forgejo source name, Grafana's
OIDC endpoints, secret, label and admin group, and the Kanidm blackbox
probe now follow the switch. The cutover needs no override for them,
and the staging overrides they replace are gone.

The portal's KANIDM_PUBLIC_URL renders only while Kanidm runs; the
portal no longer reads it. The runbook cutover gains the monitoring tag,
the realm precondition and the rollback caveat for new accounts.

Refs bitborg/bitborg-docs#127
supernaut lade till 1 incheckning 2026-10-10 05:55:21 +00:00
fix(ci): give the alert rule resolver ansible's bool filter
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m4s
496d231a7c
forgejo_oidc_source_name is now derived with `| bool`, which the fixed-point
resolver could not render, so the rule annotation kept raw Jinja and vmalert
rejected it.
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-10 05:56:01 +00:00
supernaut sammanfogade incheckning 30fd0f791a till main 2026-10-10 05:58:02 +00:00
supernaut tog bort grenen feat/identity-id-domain 2026-10-10 05:58:02 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-10 05:58:03 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-infra!638
Ingen beskrivning angiven.