fix(keycloak): turn off full scope on the service-account clients #796

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/keycloak-service-account-full-scope in i main 2026-10-18 17:44:21 +00:00
Ägare

Keycloak logs a deprecation warning on every token request from a client with "Full scope allowed". The portal, billing and reconciler admin clients had the default true.

  • Set full_scope_allowed = false on the three service-account clients.
  • Map realm-management view-realm into the reconciler client's scope. The admin API checks admin roles against the token, so without the mapping the reconciler loses view-realm.
  • The portal and billing clients need no mapping. Their service accounts hold no admin role, and permissions v2 client policies match the token's client id, not its roles.

No permission is widened.

Apply in opentofu/keycloak: -target=keycloak_generic_role_mapper.reconciler_view_realm first, then a full plan. The plan must show only the three full_scope_allowed changes. Verify with the health-check gates, a reconciler run with status 0, and no "Full scope allowed" lines for these clients in the Keycloak logs. Rollback: flip the flag back.

The master-realm opentofu client is left as it is; it needs its own change.

Closes #785

Keycloak logs a deprecation warning on every token request from a client with "Full scope allowed". The portal, billing and reconciler admin clients had the default `true`. - Set `full_scope_allowed = false` on the three service-account clients. - Map realm-management `view-realm` into the reconciler client's scope. The admin API checks admin roles against the token, so without the mapping the reconciler loses `view-realm`. - The portal and billing clients need no mapping. Their service accounts hold no admin role, and permissions v2 client policies match the token's client id, not its roles. No permission is widened. Apply in `opentofu/keycloak`: `-target=keycloak_generic_role_mapper.reconciler_view_realm` first, then a full plan. The plan must show only the three `full_scope_allowed` changes. Verify with the health-check gates, a reconciler run with status 0, and no "Full scope allowed" lines for these clients in the Keycloak logs. Rollback: flip the flag back. The master-realm `opentofu` client is left as it is; it needs its own change. Closes #785
supernaut lade till 1 incheckning 2026-10-18 17:20:23 +00:00
fix(keycloak): turn off full scope on the service-account clients
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m34s
b3da4fbec3
Keycloak logs a deprecation warning for each client with full scope
allowed. Set full_scope_allowed = false on the portal, billing and
reconciler admin clients.

The admin API checks admin roles against the token, so the reconciler
gets a scope mapping for realm-management view-realm. Permissions v2
client policies match the token's client id, not its roles, and the
portal and billing service accounts hold no admin role, so they need no
mapping.

Closes #785
supernaut tvångsskickade fix/keycloak-service-account-full-scope från b3da4fbec3
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m34s
till 438ab85f85
Alla kontroller lyckades
ci / ci (pull_request) Successful in 3m29s
2026-10-18 17:40:25 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-18 17:40:37 +00:00
supernaut sammanfogade incheckning 7de11cf6ff till main 2026-10-18 17:44:21 +00:00
supernaut tog bort grenen fix/keycloak-service-account-full-scope 2026-10-18 17:44:21 +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!796
Ingen beskrivning angiven.