Skip to content

Harden Keycloak admin bootstrap (use KC_BOOTSTRAP_*) and ensure persistent admin #165

Description

@danc094codetogether

Description

During first startup, Keycloak logs show deprecated env vars and a temporary admin being created:

KC-SERVICES0110: 'KEYCLOAK_ADMIN' is deprecated, use 'KC_BOOTSTRAP_ADMIN_USERNAME'
KC-SERVICES0110: 'KEYCLOAK_ADMIN_PASSWORD' is deprecated, use 'KC_BOOTSTRAP_ADMIN_PASSWORD'
KC-SERVICES0077: Created temporary admin user with username admin
  • We need a deterministic, persistent admin and updated docs.
  • Avoid ephemeral/temporary admin behavior.
  • Remove deprecation warnings on modern Keycloak.
  • Make first-run setup repeatable for customer installs.

Scope

  • Update compose + .env to use KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORD.

Acceptance Criteria

  • No deprecation warnings for admin env vars on startup.
  • Admin user is persistent (survives container restarts).
  • First login to https://<KEYCLOAK_FQDN>/admin/ works with the configured bootstrap admin.
  • Optional: a clean bootstrap test confirms no “temporary admin created” message appears when DB is empty (only the bootstrap message on initial creation).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: dockerIssues related to our template docker compose files.area: helmIssues related to our helm charts.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions