Skip to content

Commit

Permalink
Bump Keycloak version to 17.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sberyozkin committed Mar 6, 2022
1 parent 2fa974b commit b8aecda
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 35 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Expand Up @@ -176,7 +176,7 @@
<jna.version>5.8.0</jna.version><!-- should satisfy both testcontainers and mongodb -->
<antlr.version>4.9.2</antlr.version>
<quarkus-security.version>1.1.4.Final</quarkus-security.version>
<keycloak.version>16.1.0</keycloak.version>
<keycloak.version>17.0.0</keycloak.version>
<logstash-gelf.version>1.15.0</logstash-gelf.version>
<checker-qual.version>3.21.3</checker-qual.version>
<error-prone-annotations.version>2.11.0</error-prone-annotations.version>
Expand Down
3 changes: 2 additions & 1 deletion build-parent/pom.xml
Expand Up @@ -96,8 +96,9 @@

<!-- The image to use for tests that run Keycloak -->
<!-- IMPORTANT: If this is changed you must also update bom/application/pom.xml and KeycloakBuildTimeConfig/DevServicesConfig in quarkus-oidc/deployment to match the version -->
<keycloak.version>16.1.0</keycloak.version>
<keycloak.version>17.0.0</keycloak.version>
<keycloak.docker.image>quay.io/keycloak/keycloak:${keycloak.version}</keycloak.docker.image>
<keycloak.docker.legacy.image>quay.io/keycloak/keycloak:${keycloak.version}-legacy</keycloak.docker.legacy.image>

<unboundid-ldap.version>6.0.3</unboundid-ldap.version>

Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/security-keycloak-authorization.adoc
Expand Up @@ -200,10 +200,10 @@ To start a Keycloak Server you can use Docker and just run the following command
[source,bash,subs=attributes+]
----
docker run --name keycloak -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -p 8180:8080 -p 8543:8443 quay.io/keycloak/keycloak:{keycloak version}
docker run --name keycloak -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -p 8180:8080 quay.io/keycloak/keycloak:{keycloak.version} start-dev
----
You should be able to access your Keycloak Server at http://localhost:8180/auth[localhost:8180/auth] or https://localhost:8543/auth[localhost:8543/auth].
where `keycloak.version` should be set to `17.0.0` or higher.
Log in as the `admin` user to access the Keycloak Administration Console.
Username should be `admin` and password `admin`.
Expand Down
Expand Up @@ -30,12 +30,10 @@ You will see in the console something similar to:
[source,shell]
----
KeyCloak Dev Services Starting:
2021-11-02 17:14:24,864 INFO [org.tes.con.wai.str.HttpWaitStrategy] (build-10) /unruffled_agnesi: Waiting for 60 seconds for URL: http://localhost:32781/auth (where port 32781 maps to container port 8080)
2021-11-02 17:14:24,864 INFO [org.tes.con.wai.str.HttpWaitStrategy] (build-10) /unruffled_agnesi: Waiting for 60 seconds for URL: http://localhost:32781 (where port 32781 maps to container port 8080)
2021-11-02 17:14:44,170 INFO [io.qua.oid.dep.dev.key.KeycloakDevServicesProcessor] (build-10) Dev Services for Keycloak started.
----

The `quay.io/keycloak/keycloak:15.0.2` image which contains a `Keycloak` distribution powered by `WildFly` is currently used to start a container by default. See the <<keycloak-initialization, Keycloak Initialization>> section for more details about the image selection.

[IMPORTANT]
====
When logging in the Keycloak admin console, the username is `admin` and the password is `admin`.
Expand Down Expand Up @@ -189,8 +187,8 @@ Please see xref:security-openid-connect.adoc#integration-testing-keycloak-devser
[[keycloak-initialization]]
=== Keycloak Initialization

The `quay.io/keycloak/keycloak-x:16.0.0` image which contains a `Keycloak-X` distribution powered by `Quarkus` is used to start a container by default.
`quarkus.keycloak.devservices.image-name` can be used to change the Keycloak image name. For example, set it to `quay.io/keycloak/keycloak:16.0.0` to use a `Keycloak` distribution powered by `WildFly`.
The `quay.io/keycloak/keycloak:17.0.0` image which contains a `Keycloak` distribution powered by `Quarkus` is used to start a container by default.
`quarkus.keycloak.devservices.image-name` can be used to change the Keycloak image name. For example, set it to `quay.io/keycloak/keycloak:17.0.0-legacy` to use a `Keycloak` distribution powered by `WildFly`.

`Dev Services for Keycloak` will initialize a launched Keycloak server next.

Expand Down
Expand Up @@ -253,10 +253,10 @@ To start a Keycloak Server you can use Docker and just run the following command

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

You should be able to access your Keycloak Server at http://localhost:8180/auth[localhost:8180/auth].
where `keycloak.version` should be set to `17.0.0` or higher.

Log in as the `admin` user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Expand Down
Expand Up @@ -176,10 +176,10 @@ To start a Keycloak Server you can use Docker and just run the following command

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

You should be able to access your Keycloak Server at http://localhost:8180/auth[localhost:8180/auth].
where `keycloak.version` should be set to `17.0.0` or higher.

Log in as the `admin` user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Expand Down
6 changes: 4 additions & 2 deletions docs/src/main/asciidoc/security-openid-connect.adoc
Expand Up @@ -185,10 +185,12 @@ To start a Keycloak Server you can use Docker and just run the following command

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

You should be able to access your Keycloak Server at http://localhost:8180/auth[localhost:8180/auth].
where `keycloak.version` should be set to `17.0.0` or higher.

You should be able to access your Keycloak Server at http://localhost:8180[localhost:8180].

Log in as the `admin` user to access the Keycloak Administration Console. Username should be `admin` and password `admin`.

Expand Down
2 changes: 1 addition & 1 deletion extensions/keycloak-authorization/deployment/pom.xml
Expand Up @@ -126,7 +126,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion extensions/oidc-client-filter/deployment/pom.xml
Expand Up @@ -108,7 +108,7 @@
<configuration>
<skip>false</skip>
<systemPropertyVariables>
<keycloak.docker.image>${keycloak.docker.image}</keycloak.docker.image>
<keycloak.docker.image>${keycloak.docker.legacy.image}</keycloak.docker.image>
<keycloak.use.https>false</keycloak.use.https>
</systemPropertyVariables>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion extensions/oidc-client/deployment/pom.xml
Expand Up @@ -160,7 +160,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion extensions/oidc/deployment/pom.xml
Expand Up @@ -135,7 +135,7 @@
<configuration>
<skip>false</skip>
<systemPropertyVariables>
<keycloak.docker.image>${keycloak.docker.image}</keycloak.docker.image>
<keycloak.docker.image>${keycloak.docker.legacy.image}</keycloak.docker.image>
<keycloak.use.https>false</keycloak.use.https>
</systemPropertyVariables>
</configuration>
Expand Down
Expand Up @@ -26,16 +26,17 @@ public class DevServicesConfig {
/**
* The container image name to use, for container based DevServices providers.
*
* Image with a Quarkus based Keycloak-X distribution is used by default.
* Image with a WildFly based Keycloak distribution can be selected instead, for example:
* 'quay.io/keycloak/keycloak:16.1.0'.
* Image with a Quarkus based distribution is used by default.
* Image with a WildFly based distribution can be selected instead, for example:
* 'quay.io/keycloak/keycloak:17.0.0-legacy'.
* <p>
* Note Keycloak-X and Keycloak images are initialized differently.
* By default, Dev Services for Keycloak will assume it is a Keycloak-X image if the image name contains a 'keycloak-x'
* Note Keycloak Quarkus and Keycloak WildFly images are initialized differently.
* By default, Dev Services for Keycloak will assume it is a Keycloak Quarkus image if the image version does not end with a
* '-legacy'
* string.
* Set 'quarkus.keycloak.devservices.keycloak-x-image' to override this check.
*/
@ConfigItem(defaultValue = "quay.io/keycloak/keycloak-x:16.1.0")
@ConfigItem(defaultValue = "quay.io/keycloak/keycloak:17.0.0")
public String imageName;

/**
Expand Down
Expand Up @@ -82,7 +82,7 @@ public class KeycloakDevServicesProcessor {

private static final int KEYCLOAK_PORT = 8080;

private static final String KEYCLOAK_X_IMAGE_NAME = "keycloak-x";
private static final String KEYCLOAK_LEGACY_IMAGE_VERSION_PART = "-legacy";

private static final String KEYCLOAK_ADMIN_USER = "admin";
private static final String KEYCLOAK_ADMIN_PASSWORD = "admin";
Expand Down Expand Up @@ -325,7 +325,7 @@ private RunningDevService startContainer(boolean useSharedNetwork, Optional<Dura
private static boolean isKeycloakX(DockerImageName dockerImageName) {
return capturedDevServicesConfiguration.keycloakXImage.isPresent()
? capturedDevServicesConfiguration.keycloakXImage.get()
: dockerImageName.getUnversionedPart().contains(KEYCLOAK_X_IMAGE_NAME);
: !dockerImageName.getVersionPart().endsWith(KEYCLOAK_LEGACY_IMAGE_VERSION_PART);
}

private String getSharedContainerUrl(ContainerAddress containerAddress) {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/keycloak-authorization/pom.xml
Expand Up @@ -220,7 +220,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/oidc-client-reactive/pom.xml
Expand Up @@ -225,7 +225,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/oidc-client/pom.xml
Expand Up @@ -194,7 +194,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/oidc-code-flow/pom.xml
Expand Up @@ -238,7 +238,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/oidc-tenancy/pom.xml
Expand Up @@ -202,7 +202,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
Expand Up @@ -42,7 +42,7 @@ public class KeycloakXTestResourceLifecycleManager implements QuarkusTestResourc
@SuppressWarnings("resource")
@Override
public Map<String, String> start() {
keycloak = new GenericContainer<>("quay.io/keycloak/keycloak-x:" + KEYCLOAK_VERSION)
keycloak = new GenericContainer<>("quay.io/keycloak/keycloak:" + KEYCLOAK_VERSION)
.withExposedPorts(8080, 8443)
.withEnv("KEYCLOAK_ADMIN", "admin")
.withEnv("KEYCLOAK_ADMIN_PASSWORD", "admin")
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/smallrye-jwt-oidc-webapp/pom.xml
Expand Up @@ -192,7 +192,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/smallrye-jwt-token-propagation/pom.xml
Expand Up @@ -209,7 +209,7 @@
<configuration>
<images>
<image>
<name>${keycloak.docker.image}</name>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
Expand Down

0 comments on commit b8aecda

Please sign in to comment.