Files
infra-keycloak/k8s/keycloak
Stéphane Tailland 1b613768e7 Realign the realm seed with what Keycloak actually runs
This file is a bootstrap seed, not the live realm. Keycloak starts with
--import-realm under IGNORE_EXISTING and logs "Realm 'classic-models'
already exists. Import skipped", so editing it changes nothing on a
restart and the truth lives in Keycloak's database.

That divergence had already opened, in the direction that hurts: four
authorisations existed only in the running realm, granted through the
admin API while working out which audiences the gateway actually needs.

  classic-models-agent-catalogue  +catalog-api-audience
                                  +sales-api-audience
                                  +kong-token-exchange-broker-audience
  librechat                       +classic-models-agent-catalogue-audience

Rebuilding the realm from this file would have left the Catalogue agent
with two of its five scopes and no indication why it stopped working.

Compared object by object against the live realm: the inventories already
matched — 21 clients, 38 client scopes, none missing either way — so the
drift was in contents, not in the lists. optionalClientScopes are now
copied back for every client that differed, and a re-comparison reports no
remaining gap.

This closes today's drift; it does not fix the mechanism that allows it.
Keeping a seed honest by hand is the same arrangement the Flux entrypoints
had before they were made self-reconciling, and it will drift again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 09:18:09 +02:00
..