Skip to content

Commit

Permalink
Change Keycloak admin login ENV variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jedla97 committed Jan 7, 2025
1 parent 9289bab commit 69f3713
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/security-keycloak-authorization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ To start a Keycloak server, use the following Docker command:
[source,bash,subs=attributes+]
----
docker run --name keycloak \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
-p 8543:8443 \
-v "$(pwd)"/config/keycloak-keystore.jks:/etc/keycloak-keystore.jks \
quay.io/keycloak/keycloak:{keycloak.version} \ <1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ For more information, see the <<bearer-token-tutorial-keycloak-dev-mode>> sectio
====
[source,bash,subs=attributes+]
----
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
docker run --name keycloak -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
----
====
* Where the `keycloak.version` is set to version `26.0.7` or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ To start a Keycloak server, use Docker and run the following command:

[source,bash,subs=attributes+]
----
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
docker run --name keycloak -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
----

where `keycloak.version` is set to `26.0.7` or later.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/security-openid-connect-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ To start a Keycloak Server, you can use Docker and just run the following comman

[source,bash,subs=attributes+]
----
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
docker run --name keycloak -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
----

Set `{keycloak.version}` to `26.0.7` or later.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ To start a Keycloak server, you can use Docker and run the following command:

[source,bash,subs=attributes+]
----
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
docker run --name keycloak -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
----

where `keycloak.version` is set to `26.0.7` or higher.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public class KeycloakDevServicesProcessor {

// Properties recognized by Quarkus-powered Keycloak
private static final String KEYCLOAK_QUARKUS_HOSTNAME = "KC_HOSTNAME";
private static final String KEYCLOAK_QUARKUS_ADMIN_PROP = "KEYCLOAK_ADMIN";
private static final String KEYCLOAK_QUARKUS_ADMIN_PASSWORD_PROP = "KEYCLOAK_ADMIN_PASSWORD";
private static final String KEYCLOAK_QUARKUS_ADMIN_PROP = "KC_BOOTSTRAP_ADMIN_USERNAME";
private static final String KEYCLOAK_QUARKUS_ADMIN_PASSWORD_PROP = "KC_BOOTSTRAP_ADMIN_PASSWORD";
private static final String KEYCLOAK_QUARKUS_START_CMD = "start --http-enabled=true --hostname-strict=false "
+ "--spi-user-profile-declarative-user-profile-config-file=/opt/keycloak/upconfig.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public KeycloakContainer(DockerImageName keycloakImageName) {
withExposedPorts(8080, 8443);
// Keycloak env vars
withEnv("KC_HTTP_ENABLED", "true");
withEnv("KEYCLOAK_ADMIN", "admin");
withEnv("KEYCLOAK_ADMIN_PASSWORD", "admin");
withEnv("KC_BOOTSTRAP_ADMIN_USERNAME", "admin");
withEnv("KC_BOOTSTRAP_ADMIN_PASSWORD", "admin");
withEnv("KC_HOSTNAME_STRICT", "false");
withEnv("KC_HOSTNAME_STRICT_HTTPS", "false");
withEnv("KC_STORAGE", "chm");
Expand Down

0 comments on commit 69f3713

Please sign in to comment.