feat(keycloak): publish keycloak on the host-only address #677

Sammanfogat
supernaut sammanfogade 1 incheckning från feat/keycloak-isolation-3 in i main 2026-10-11 18:18:34 +00:00
Ägare

Keycloak still runs as the shared service user. This also publishes it on the host-only address 10.90.0.1 (:8080 and :9000) and points Caddy, the portal and billing (keycloak_internal_url) and vmagent at it. It proves the cross-user network path on staging before Keycloak moves to the bitborg-id user. Part of #670.

  • Keycloak keeps 127.0.0.1:18080 for the admin forward, the reconciler and the health gate (ADR 0015).
  • KC_PROXY_TRUSTED_ADDRESSES stays the bitborg subnet.
  • The bitborg-id-data subnet is pinned at 10.89.11.0/24. A host that already has the network needs a one-time recreate (runbook, "Keycloak on the host-only address"). Nothing is attached to it yet.
  • Prod needs the podman role from #661 applied first, so the address exists before Keycloak binds to it.
  • Known gap until Keycloak moves to its own user: no boot ordering against the address unit. A first start before the address exists fails and Restart=always retries.

Not in this PR: the user move, its own Postgres, unit metrics, backups.

Verification:

  • syntax-check, ansible-lint (production profile), prettier, markdownlint: clean.
  • --check --diff on staging shows only the expected changes (it also picks up #666 and #672, not yet applied on staging).
  • To do after merge on staging: reach test from Caddy, portal fetch, up{job="keycloak"}, sign-in, sign-up, a billing tier write, and the real client IP in the Keycloak login event.

Apply order: tags podman,keycloak,web,billing,caddy,monitoring-agent. Keycloak restarts once (1 to 2 minutes of sign-in downtime).

Refs #670

Keycloak still runs as the shared service user. This also publishes it on the host-only address `10.90.0.1` (`:8080` and `:9000`) and points Caddy, the portal and billing (`keycloak_internal_url`) and vmagent at it. It proves the cross-user network path on staging before Keycloak moves to the `bitborg-id` user. Part of #670. - Keycloak keeps `127.0.0.1:18080` for the admin forward, the reconciler and the health gate (ADR 0015). - `KC_PROXY_TRUSTED_ADDRESSES` stays the `bitborg` subnet. - The `bitborg-id-data` subnet is pinned at `10.89.11.0/24`. A host that already has the network needs a one-time recreate (runbook, "Keycloak on the host-only address"). Nothing is attached to it yet. - Prod needs the `podman` role from #661 applied first, so the address exists before Keycloak binds to it. - Known gap until Keycloak moves to its own user: no boot ordering against the address unit. A first start before the address exists fails and `Restart=always` retries. Not in this PR: the user move, its own Postgres, unit metrics, backups. Verification: - syntax-check, ansible-lint (production profile), prettier, markdownlint: clean. - `--check --diff` on staging shows only the expected changes (it also picks up #666 and #672, not yet applied on staging). - To do after merge on staging: reach test from Caddy, portal fetch, `up{job="keycloak"}`, sign-in, sign-up, a billing tier write, and the real client IP in the Keycloak login event. Apply order: tags `podman,keycloak,web,billing,caddy,monitoring-agent`. Keycloak restarts once (1 to 2 minutes of sign-in downtime). Refs #670
supernaut lade till 1 incheckning 2026-10-11 18:14:52 +00:00
feat(keycloak): publish keycloak on the host-only address
Väntande kontroller
ci / ci (pull_request) Has started running
6229aad1fd
Keycloak still runs as the shared service user. It now also publishes
8080 and 9000 on 10.90.0.1. Caddy, the portal, billing and vmagent
reach it there instead of by container name. This proves the cross-user
network path before Keycloak moves to the bitborg-id user.

Also pin the bitborg-id-data subnet at 10.89.11.0/24.

Refs #670
supernaut tvångsskickade feat/keycloak-isolation-3 från 6229aad1fd
Väntande kontroller
ci / ci (pull_request) Has started running
till a81e3a94a0
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m52s
2026-10-11 18:16:08 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-11 18:16:12 +00:00
supernaut sammanfogade incheckning 15e2e48235 till main 2026-10-11 18:18:34 +00:00
supernaut tog bort grenen feat/keycloak-isolation-3 2026-10-11 18:18:34 +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!677
Ingen beskrivning angiven.