Skip to content

Commit

Permalink
Bump Keycloak version to 19.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sberyozkin committed Aug 22, 2022
1 parent 25ad6fd commit 517c971
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 88 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,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>18.0.2</keycloak.version>
<keycloak.version>19.0.1</keycloak.version>
<logstash-gelf.version>1.15.0</logstash-gelf.version>
<checker-qual.version>3.24.0</checker-qual.version>
<error-prone-annotations.version>2.15.0</error-prone-annotations.version>
Expand Down
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

<!-- 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>18.0.2</keycloak.version>
<keycloak.version>19.0.1</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>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ public class DevServicesConfig {
*
* 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:18.0.2-legacy'.
* 'quay.io/keycloak/keycloak:19.0.1-legacy'.
* <p>
* 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:18.0.2")
@ConfigItem(defaultValue = "quay.io/keycloak/keycloak:19.0.1")
public String imageName;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public class KeycloakDevServicesProcessor {
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_START_CMD = "start --http-enabled=true --hostname-strict=false --hostname-strict-https=false";
private static final String KEYCLOAK_QUARKUS_START_CMD = "start --storage=chm --http-enabled=true --hostname-strict=false --hostname-strict-https=false";

private static final String JAVA_OPTS = "JAVA_OPTS";
private static final String KEYCLOAK_DOCKER_REALM_PATH = "/tmp/realm.json";
Expand Down Expand Up @@ -547,10 +547,13 @@ private void createDefaultRealm(String keycloakUrl, Map<String, String> users, S
private void createRealm(String keycloakUrl, RealmRepresentation realm) {
WebClient client = OidcDevServicesUtils.createWebClient(vertxInstance);
try {
LOG.tracef("Getting admin token before creating the realm %s", realm.getRealm());

String token = OidcDevServicesUtils.getPasswordAccessToken(client,
keycloakUrl + "/realms/master/protocol/openid-connect/token",
"admin-cli", null, "admin", "admin", null, oidcConfig.devui.webClientTimeout);

LOG.tracef("Creating the realm %s", realm.getRealm());
HttpResponse<Buffer> createRealmResponse = client.postAbs(keycloakUrl + "/admin/realms")
.putHeader(HttpHeaders.CONTENT_TYPE.toString(), "application/json")
.putHeader(HttpHeaders.AUTHORIZATION.toString(), "Bearer " + token)
Expand Down
83 changes: 0 additions & 83 deletions integration-tests/oidc-client-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,89 +216,6 @@
</plugins>
</build>
</profile>

<profile>
<id>docker-keycloak</id>
<activation>
<property>
<name>start-containers</name>
</property>
</activation>
<properties>
<keycloak.url>http://localhost:8180/auth</keycloak.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${keycloak.docker.legacy.image}</name>
<alias>quarkus-test-keycloak</alias>
<run>
<ports>
<port>8180:8080</port>
</ports>
<env>
<KEYCLOAK_USER>admin</KEYCLOAK_USER>
<KEYCLOAK_PASSWORD>admin</KEYCLOAK_PASSWORD>
</env>
<log>
<prefix>Keycloak:</prefix>
<date>default</date>
<color>cyan</color>
</log>
<wait>
<!-- good docs found at: https://dmp.fabric8.io/#build-healthcheck -->
<http>
<url>http://localhost:8180</url>
</http>
<time>100000</time>
</wait>
</run>
</image>
</images>
<allContainers>true</allContainers>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-prune</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${basedir}/../../.github/docker-prune.sh</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jakarta-rewrite</id>
<activation>
Expand Down

0 comments on commit 517c971

Please sign in to comment.