keycloak: turn off full scope on the master-realm opentofu client #800

Stängd
öppnade 2026-10-18 18:38:21 +00:00 av supernaut · 0 kommentarer
Ägare

The master-realm opentofu client (opentofu/keycloak/master.tofu) still has the default full_scope_allowed = true. Keycloak logs a deprecation warning on every token request from it, and the switch will be removed in a future release.

#785 turned it off for the three service-account clients in the bitborg realm and left this one out on purpose: OpenTofu manages the realm with this client, so a wrong scope mapping on the master admin composite role would lock OpenTofu out of the realm.

  • Set full_scope_allowed = false on the opentofu client and map the roles its token needs (keycloak_openid_client_service_account_realm_role.opentofu_admin grants master admin).
  • Apply with a -target on the mapping first, then the flag, and keep a recovery path ready (the Keycloak admin bootstrap or the host-local admin) before applying.

Done when a full tofu plan in opentofu/keycloak still works after the change and Keycloak logs no "Full scope allowed" warning for opentofu.

The master-realm `opentofu` client (`opentofu/keycloak/master.tofu`) still has the default `full_scope_allowed = true`. Keycloak logs a deprecation warning on every token request from it, and the switch will be removed in a future release. #785 turned it off for the three service-account clients in the `bitborg` realm and left this one out on purpose: OpenTofu manages the realm with this client, so a wrong scope mapping on the master `admin` composite role would lock OpenTofu out of the realm. - Set `full_scope_allowed = false` on the `opentofu` client and map the roles its token needs (`keycloak_openid_client_service_account_realm_role.opentofu_admin` grants master `admin`). - Apply with a `-target` on the mapping first, then the flag, and keep a recovery path ready (the Keycloak admin bootstrap or the host-local admin) before applying. Done when a full `tofu plan` in `opentofu/keycloak` still works after the change and Keycloak logs no "Full scope allowed" warning for `opentofu`.
supernaut 2026-10-19 19:13:27 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
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#800
Ingen beskrivning angiven.