fix(keycloak): trust both bitborg-id subnets as proxy sources #750

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/keycloak-trusted-proxy in i main 2026-10-14 18:24:14 +00:00
Ägare

Refs #670.

Problem

On staging, isolated Keycloak ignored X-Forwarded-*. Rootlessport connects to Keycloak from the container's own address on either of its networks. Staging used the bitborg-id-data address (10.89.11.3), but only the bitborg-id subnet was trusted.

Effects:

  • "Non-secure context detected" warnings, so cookies lost Secure.
  • The account console at id.stg.bitborg.se showed an error.
  • Events logged 10.89.11.3 instead of the client address.

Change

  • KC_PROXY_TRUSTED_ADDRESSES lists both bitborg-id subnets when keycloak_isolated is true. The non-isolated value does not change, so prod is unchanged.
  • The runbook note is updated to match.

Verified

Applied to staging from this branch (--tags keycloak). The dry-run showed one changed task, and the health gate passed. After the restart, events show the real client IP, and there are no non-secure-context warnings.

Refs #670. ## Problem On staging, isolated Keycloak ignored `X-Forwarded-*`. Rootlessport connects to Keycloak from the container's own address on either of its networks. Staging used the `bitborg-id-data` address (`10.89.11.3`), but only the `bitborg-id` subnet was trusted. Effects: - "Non-secure context detected" warnings, so cookies lost `Secure`. - The account console at `id.stg.bitborg.se` showed an error. - Events logged `10.89.11.3` instead of the client address. ## Change - `KC_PROXY_TRUSTED_ADDRESSES` lists both `bitborg-id` subnets when `keycloak_isolated` is true. The non-isolated value does not change, so prod is unchanged. - The runbook note is updated to match. ## Verified Applied to staging from this branch (`--tags keycloak`). The dry-run showed one changed task, and the health gate passed. After the restart, events show the real client IP, and there are no non-secure-context warnings.
supernaut lade till 1 incheckning 2026-10-14 18:13:58 +00:00
fix(keycloak): trust both bitborg-id subnets as proxy sources
Alla kontroller lyckades
ci / ci (pull_request) Successful in 2m53s
dbdadced73
Rootlessport connects to Keycloak from its own address on either network. On staging that was the
bitborg-id-data address, so Keycloak ignored X-Forwarded-*: cookies lost Secure, the account
console failed, and events logged 10.89.11.3 instead of the client address. Refs #670.
supernaut sammanfogade incheckning b196d4d9b2 till main 2026-10-14 18:24:14 +00:00
supernaut tog bort grenen fix/keycloak-trusted-proxy 2026-10-14 18:24:14 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-15 08:05:58 +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!750
Ingen beskrivning angiven.