From 1c3eac3b3fb1f508336acaee693996fc2718094a Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Thu, 20 Jul 2023 10:38:00 +0200 Subject: [PATCH] Ensure SPI works with keycloak 22, bump version to reflect change Change-Id: Iac68a7f5121174540353dc0ef92744c9880b3e92 --- .zuul.yaml | 16 ++++++++++++---- README.md | 7 +++++++ demo.sh | 2 +- pom.xml | 18 ++++++++++-------- testing/Dockerfile | 2 +- testing/docker-compose.yaml | 1 + 6 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 7e326b7..140d436 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -2,13 +2,21 @@ - project: check: jobs: - - keycloak-extensions-maven-build - - keycloak-extensions-test-deploy-21.0 + - keycloak-extensions-maven-build: + vars: + jdk_version: 17 + - keycloak-extensions-test-deploy-22.0: + vars: + jdk_version: 17 - keycloak-extensions-test-deploy-latest: voting: false gate: jobs: - - keycloak-extensions-maven-build - - keycloak-extensions-test-deploy-21.0 + - keycloak-extensions-maven-build: + vars: + jdk_version: 17 + - keycloak-extensions-test-deploy-22.0: + vars: + jdk_version: 17 - keycloak-extensions-test-deploy-latest: voting: false \ No newline at end of file diff --git a/README.md b/README.md index e7fd9ae..3caf293 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,13 @@ This custom attribute mapper can be used to fetch a user's public SSH key whenev mvn clean install ``` +To build the SPI for use with a version of Keycloak prior to 22.X, you need to use openjdk 11 and patch pom.xml to target java 11: + +``` +11 +11 +``` + # Prerequisites A SQL database backend is required. The user attributes table must be manually modified to allow larger attributes like public keys. diff --git a/demo.sh b/demo.sh index 16ede3c..cac997c 100755 --- a/demo.sh +++ b/demo.sh @@ -12,7 +12,7 @@ echo "Done." echo echo "Building keycloak with github ssh key mapper ..." -podman build -t test_kc_github_ssh_key_mapper --build-arg KEYCLOAK_VERSION=${KEYCLOAK_VERSION:-21.0} -f testing/Dockerfile . +podman build -t test_kc_github_ssh_key_mapper --build-arg KEYCLOAK_VERSION=${KEYCLOAK_VERSION:-22.0} -f testing/Dockerfile . echo "Done." echo diff --git a/pom.xml b/pom.xml index 51f0c32..5050d99 100644 --- a/pom.xml +++ b/pom.xml @@ -14,13 +14,14 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + org.softwarefactory.keycloak.social.github.sshkeysmapper - 1.0.19 + 2.0.0 Keycloak: Github provider SSH keys mapper - + 4.0.0 github-ssh-mapper @@ -29,12 +30,12 @@ UTF-8 - 11 + 17 ${java.version} ${java.version} - 19.0.2 + 22.0.0 1.18.26 1.0-rc7 @@ -94,7 +95,8 @@ - + @@ -103,4 +105,4 @@ - + \ No newline at end of file diff --git a/testing/Dockerfile b/testing/Dockerfile index 15f709d..c0e004a 100644 --- a/testing/Dockerfile +++ b/testing/Dockerfile @@ -1,4 +1,4 @@ -ARG KEYCLOAK_VERSION=21.0 +ARG KEYCLOAK_VERSION=22.0 FROM quay.io/keycloak/keycloak:$KEYCLOAK_VERSION as builder diff --git a/testing/docker-compose.yaml b/testing/docker-compose.yaml index e80d8b1..8004555 100644 --- a/testing/docker-compose.yaml +++ b/testing/docker-compose.yaml @@ -27,6 +27,7 @@ services: KC_DB_PASSWORD: keycloak KC_HTTP_PORT: 8082 KC_HEALTH_ENABLED: true + KC_LOG_LEVEL: debug JGROUPS_DISCOVERY_PROTOCOL: JDBC_PING command: - "start-dev"