Environment variables 'KEYCLOAK_ADMIN' and 'KEYCLOAK_ADMIN_PASSWORD' are deprecated #19

Open
opened 2025-02-21 00:32:29 +00:00 by cgalo5758 · 2 comments
https://github.com/keycloak/keycloak/issues/31229
Owner

Ty for the report @cgalo5758. I remember seeing something about the deprecation in release notes. Do you happen to know if there are 1:1 replacements we can switch to? Or we'd need to change the initial set-up instructions?

Ty for the report @cgalo5758. I remember seeing something about the deprecation in release notes. Do you happen to know if there are 1:1 replacements we can switch to? Or we'd need to change the initial set-up instructions?
Author

Yes, @3wordchant! We can replace them with KC_BOOTSTRAP_ADMIN_USERNAME and KC_BOOTSTRAP_ADMIN_PASSWORDas described in the (configuration documentation)[https://www.keycloak.org/server/configuration#_creating_the_initial_admin_user]:

Keycloak parses these values at first startup to create an initial user with administrative rights. Once the first user with administrative rights exists, you can use the Admin Console or the command line tool kcadm.[sh|bat] to create additional users.

If the initial administrator already exists and the environment variables are still present at startup, an error message stating the failed creation of the initial administrator is shown in the logs. Keycloak ignores the values and starts up correctly.

The main difference it seems to me is that these credentials are only used at first start and the interface makes it explicit that it is a temporary account.

Yes, @3wordchant! We can replace them with `KC_BOOTSTRAP_ADMIN_USERNAME` and `KC_BOOTSTRAP_ADMIN_PASSWORD`as described in the (configuration documentation)[https://www.keycloak.org/server/configuration#_creating_the_initial_admin_user]: >Keycloak parses these values at first startup to create an initial user with administrative rights. Once the first user with administrative rights exists, you can use the Admin Console or the command line tool `kcadm.[sh|bat]` to create additional users. > >If the initial administrator already exists and the environment variables are still present at startup, an error message stating the failed creation of the initial administrator is shown in the logs. Keycloak ignores the values and starts up correctly. The main difference it seems to me is that these credentials are only used **at first start** and the interface makes it explicit that it is a temporary account.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/keycloak#19
No description provided.