fix(keycloak): assign kc-admin-api scope for 26.8.2 #915

Sammanfogat
supernaut sammanfogade 2 incheckningar från fix/keycloak-admin-api-scope in i main 2026-11-29 18:46:24 +00:00
Ägare

Keycloak 26.8.2 fixes CVE-2026-19688 (GHSA-5624-rq7x-6m4q, upstream keycloak/keycloak#54902). The admin REST API now returns 401 for tokens without the new kc-admin-api client scope. The migration assigns that scope only to admin-cli, security-admin-console and bootstrap clients, so our opentofu client and the service accounts lost admin access. That was the failure behind the revert in #914.

Changes:

  • Assign kc-admin-api as a default scope to opentofu (master) and to the three service-account clients. The list is shared in local.admin_api_default_scopes and keeps the defaults the clients already had.
  • Bump keycloak_image_tag to 26.8.2-1.
  • Runbook: "From 26.8.1 to 26.8.2" under Upgrades. The scope exists only after the migration, so the rollout needs a temporary bootstrap client. Run all four steps in one sitting, on staging first.

Verified locally on the real images with a split hostname/hostname-admin setup: 26.8.1-1 gives 200, 26.8.2-1 gives 401, and 200 after the scope is assigned. A bootstrap service client on 26.8.2 gets the scope and can apply. Not yet run on staging or prod.

Refs bitborg/bitborg-keycloak#33

Keycloak 26.8.2 fixes CVE-2026-19688 (GHSA-5624-rq7x-6m4q, upstream keycloak/keycloak#54902). The admin REST API now returns 401 for tokens without the new `kc-admin-api` client scope. The migration assigns that scope only to `admin-cli`, `security-admin-console` and bootstrap clients, so our `opentofu` client and the service accounts lost admin access. That was the failure behind the revert in #914. Changes: - Assign `kc-admin-api` as a default scope to `opentofu` (master) and to the three service-account clients. The list is shared in `local.admin_api_default_scopes` and keeps the defaults the clients already had. - Bump `keycloak_image_tag` to `26.8.2-1`. - Runbook: "From 26.8.1 to 26.8.2" under Upgrades. The scope exists only after the migration, so the rollout needs a temporary bootstrap client. Run all four steps in one sitting, on staging first. Verified locally on the real images with a split hostname/hostname-admin setup: 26.8.1-1 gives 200, 26.8.2-1 gives 401, and 200 after the scope is assigned. A bootstrap service client on 26.8.2 gets the scope and can apply. Not yet run on staging or prod. Refs bitborg/bitborg-keycloak#33
supernaut lade till 2 incheckningar 2026-11-29 14:46:50 +00:00
Keycloak 26.8.2 rejects admin API tokens without the kc-admin-api
audience (CVE-2026-19688). Assign the scope to opentofu and the
service-account clients, bump the image to 26.8.2-1 and document the
upgrade order.
fix(keycloak): share the admin scope list and tighten the 26.8.2 runbook steps
Alla kontroller lyckades
ci / ci (pull_request) Successful in 23m10s
f1c95bb968
supernaut sammanfogade incheckning 7f51970d04 till main 2026-11-29 18:46:24 +00:00
supernaut tog bort grenen fix/keycloak-admin-api-scope 2026-11-29 18:46:24 +00:00
supernaut refererade denna ändringsförfrågan från en incheckning 2026-11-29 18:46:25 +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!915
Ingen beskrivning angiven.