Keycloak role, database and Caddy vhost #570
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#570
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?
Run Keycloak 26 on staging behind Caddy with its own database role.
keycloak: Quadlet unit, image tag with Renovate annotation,MemoryHigh=896M,MemoryMax=1G,DropCapability=ALL, env from vault,start --optimized.KC_DB=postgres,KC_HOSTNAME,KC_HTTP_ENABLED=true(internal network only),KC_PROXY_HEADERS=xforwarded, health and metrics on the management port (not published)./health/ready(closes the class of infra#475).kc.sh bootstrap-admin service, then remove the temporary admin. Document break-glass in the runbook.keycloakand rolekeycloak, password in vault, ownpg_hbaentry, no access to other databases.reverse_proxy keycloak:8080. Block/admin*and/metrics. Keep theauthandauth_credentialsrate-limit zones, retargeted to/realms/bitborg/login-actions/*and the token endpoint.Done when: Keycloak is ready on staging,
/adminreturns blocked from outside, and the database role cannot reach other databases.Depends on: #568
Depends on: bitborg/bitborg-keycloak#1
Epic: bitborg/bitborg-docs#127
Applied to staging from
main(#599, #600) and verified. Prod is unchanged:keycloak_enabledis false there.--tags keycloak,caddy:failed=0, and the health gate passes withkeycloak. A second apply giveschanged=0.--tags base:failed=0. The sshd forward assertion passes.bitborg-keycloak:26.8.0-1runs withReadonlyRootfs=true.MemoryHigh896M andMemoryMax1G.127.0.0.1:18080listens. Port 9000 is not published.client_credentialstoken forbootstrap-opentofureturns200, sosslRequired=externalaccepts the rootless port forward.10.89.0.16. That address is outsideKC_PROXY_TRUSTED_ADDRESSES, soX-Forwarded-Forsent through the tunnel is ignored.-L …:127.0.0.1:18080returns200.-L …:127.0.0.1:5432is refused withadministratively prohibited.kc.stg.bitborg.se):/admin/,/realms/master/,/metrics,/health/readyand/get Caddy's empty 404./realms/bitborg/is proxied. Keycloak returns JSON 404 until the realm exists (#571).Still open, carried to #571:
X-Frame-Options);The
keycloak_credentialszone stays off (caddy_ratelimit_auth_credentials_enableddefaults to false) until login traffic has been measured.