Skip to content

Commit 1c3eac3

Browse files
committed
Ensure SPI works with keycloak 22, bump version to reflect change
Change-Id: Iac68a7f5121174540353dc0ef92744c9880b3e92
1 parent ccdedf8 commit 1c3eac3

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

.zuul.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
- project:
33
check:
44
jobs:
5-
- keycloak-extensions-maven-build
6-
- keycloak-extensions-test-deploy-21.0
5+
- keycloak-extensions-maven-build:
6+
vars:
7+
jdk_version: 17
8+
- keycloak-extensions-test-deploy-22.0:
9+
vars:
10+
jdk_version: 17
711
- keycloak-extensions-test-deploy-latest:
812
voting: false
913
gate:
1014
jobs:
11-
- keycloak-extensions-maven-build
12-
- keycloak-extensions-test-deploy-21.0
15+
- keycloak-extensions-maven-build:
16+
vars:
17+
jdk_version: 17
18+
- keycloak-extensions-test-deploy-22.0:
19+
vars:
20+
jdk_version: 17
1321
- keycloak-extensions-test-deploy-latest:
1422
voting: false

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ This custom attribute mapper can be used to fetch a user's public SSH key whenev
88
mvn clean install
99
```
1010

11+
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:
12+
13+
```
14+
<source>11</source>
15+
<target>11</target>
16+
```
17+
1118
# Prerequisites
1219

1320
A SQL database backend is required. The user attributes table must be manually modified to allow larger attributes like public keys.

demo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "Done."
1212
echo
1313

1414
echo "Building keycloak with github ssh key mapper ..."
15-
podman build -t test_kc_github_ssh_key_mapper --build-arg KEYCLOAK_VERSION=${KEYCLOAK_VERSION:-21.0} -f testing/Dockerfile .
15+
podman build -t test_kc_github_ssh_key_mapper --build-arg KEYCLOAK_VERSION=${KEYCLOAK_VERSION:-22.0} -f testing/Dockerfile .
1616
echo "Done."
1717
echo
1818

pom.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
~ See the License for the specific language governing permissions and
1515
~ limitations under the License.
1616
-->
17-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
17+
<project xmlns="http://maven.apache.org/POM/4.0.0"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1920
<groupId>org.softwarefactory.keycloak.social.github.sshkeysmapper</groupId>
20-
<version>1.0.19</version>
21+
<version>2.0.0</version>
2122

2223
<name>Keycloak: Github provider SSH keys mapper</name>
23-
<description/>
24+
<description />
2425
<modelVersion>4.0.0</modelVersion>
2526

2627
<artifactId>github-ssh-mapper</artifactId>
@@ -29,12 +30,12 @@
2930
<properties>
3031
<!-- general settings -->
3132
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32-
<java.version>11</java.version>
33+
<java.version>17</java.version>
3334
<maven.compiler.source>${java.version}</maven.compiler.source>
3435
<maven.compiler.target>${java.version}</maven.compiler.target>
3536

3637
<!-- dependency versions -->
37-
<keycloak.version>19.0.2</keycloak.version>
38+
<keycloak.version>22.0.0</keycloak.version>
3839

3940
<lombok.version>1.18.26</lombok.version>
4041
<auto-service.version>1.0-rc7</auto-service.version>
@@ -94,7 +95,8 @@
9495
<!-- This is required since we need to add the jboss module references
9596
to the resulting jar -->
9697
<manifestEntries>
97-
<!-- Adding explicit dependencies to avoid class-loading issues at runtime -->
98+
<!-- Adding explicit dependencies to avoid class-loading issues at
99+
runtime -->
98100
<Dependencies>
99101
<![CDATA[org.keycloak.keycloak-common,org.keycloak.keycloak-core,org.keycloak.keycloak-server-spi,org.keycloak.keycloak-server-spi-private,org.apache.httpcomponents,org.keycloak.keycloak-services,org.jboss.logging,javax.api,javax.jms.api,javax.transaction.api,com.fasterxml.jackson.core.jackson-core,com.fasterxml.jackson.core.jackson-annotations,com.fasterxml.jackson.core.jackson-databind]]></Dependencies>
100102
</manifestEntries>
@@ -103,4 +105,4 @@
103105
</plugin>
104106
</plugins>
105107
</build>
106-
</project>
108+
</project>

testing/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG KEYCLOAK_VERSION=21.0
1+
ARG KEYCLOAK_VERSION=22.0
22

33
FROM quay.io/keycloak/keycloak:$KEYCLOAK_VERSION as builder
44

testing/docker-compose.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ services:
2727
KC_DB_PASSWORD: keycloak
2828
KC_HTTP_PORT: 8082
2929
KC_HEALTH_ENABLED: true
30+
KC_LOG_LEVEL: debug
3031
JGROUPS_DISCOVERY_PROTOCOL: JDBC_PING
3132
command:
3233
- "start-dev"

0 commit comments

Comments
 (0)