fix(caddy): let keycloak frame its own pages #647

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/keycloak-frame-sameorigin in i main 2026-10-10 18:30:59 +00:00
Ägare

What

The Keycloak vhost sends X-Frame-Options: SAMEORIGIN. Every other host keeps DENY.

The shared security_headers snippet now takes the frame policy as an argument, so each vhost states it.

Why

The account console checks third-party cookies by loading /realms/<realm>/protocol/openid-connect/3p-cookies/step1.html in a same-origin iframe. DENY blocked that iframe, so the console timed out with "Timeout when waiting for 3rd party check iframe message". A plain header override on the vhost did not work: the shared block deletes headers, so Caddy defers it and it runs last.

Keycloak still sends its own Content-Security-Policy: frame-ancestors 'self'.

Verification

Applied to staging with apply-reconcile.sh --tags caddy; it reconciled clean.

  • id.stg: step1.html and /realms/bitborg/account/ send SAMEORIGIN.
  • www.stg, git.stg and stg.bitborg.se send DENY.
## What The Keycloak vhost sends `X-Frame-Options: SAMEORIGIN`. Every other host keeps `DENY`. The shared `security_headers` snippet now takes the frame policy as an argument, so each vhost states it. ## Why The account console checks third-party cookies by loading `/realms/<realm>/protocol/openid-connect/3p-cookies/step1.html` in a same-origin iframe. `DENY` blocked that iframe, so the console timed out with "Timeout when waiting for 3rd party check iframe message". A plain `header` override on the vhost did not work: the shared block deletes headers, so Caddy defers it and it runs last. Keycloak still sends its own `Content-Security-Policy: frame-ancestors 'self'`. ## Verification Applied to staging with `apply-reconcile.sh --tags caddy`; it reconciled clean. - `id.stg`: `step1.html` and `/realms/bitborg/account/` send `SAMEORIGIN`. - `www.stg`, `git.stg` and `stg.bitborg.se` send `DENY`.
supernaut lade till 1 incheckning 2026-10-10 18:28:38 +00:00
fix(caddy): let keycloak frame its own pages
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m49s
177e84f8fd
The account console checks third-party cookies in a same-origin iframe.
X-Frame-Options DENY from the shared headers blocked it, so the console
timed out. The keycloak vhost now sends SAMEORIGIN; every other host
keeps DENY.
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-10 18:30:23 +00:00
supernaut sammanfogade incheckning 34532c7988 till main 2026-10-10 18:30:59 +00:00
supernaut tog bort grenen fix/keycloak-frame-sameorigin 2026-10-10 18:30:59 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-10-10 18:31:00 +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!647
Ingen beskrivning angiven.