Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keycloak 26.0.0 #1162

Merged
merged 37 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f5a47e8
Add support for keycloak 26.0.0.
ma1uta Oct 13, 2024
659ed73
Fix ci rule and bump minor version.
ma1uta Oct 13, 2024
77a0f6a
Update CHANGELOG.md. Bump Keycloak version to 26.0.1 (not libraries).
ma1uta Oct 18, 2024
cccd3ac
Merge remote-tracking branch 'adorsys/main'
ma1uta Oct 18, 2024
1e126e9
Added KEYCLOAK_LIB_VERSION to CI due to different release cycle for k…
ma1uta Oct 18, 2024
e4090cf
Revert compatibility profile rule in ci.yaml for keycloak 26.0.0 (fro…
ma1uta Oct 18, 2024
fa4e457
Add replace-keycloakmock execution to all pre-profiles.
ma1uta Oct 19, 2024
26600dc
Add keycloak.lib.version to the build-legacy job.
ma1uta Oct 19, 2024
4ac7b59
Remove released feature from unreleased list in CHANGELOG.md.
ma1uta Oct 19, 2024
8c36662
Fix keycloak-authz-client version conflict.
ma1uta Oct 19, 2024
3dcd100
Use keycloak version from env instead of hardcoded value.
ma1uta Oct 19, 2024
c187273
Merge remote-tracking branch 'adorsys/main'
ma1uta Oct 30, 2024
586eb4a
Get IdentityProviders and IdentityProviderMappers from separated API …
ma1uta Oct 30, 2024
b8eb8b5
Use keycloak-common and keycloak-core instead of not updated client-c…
ma1uta Oct 30, 2024
270827f
Renamed keycloak.lib.version to keycloak.client.version variable.
ma1uta Oct 30, 2024
3913d78
Renamed KEYCLOAK_LIB_VERSION to KEYCLOAK_CLIENT_VERSION variable.
ma1uta Oct 30, 2024
6c19077
Renamed KEYCLOAK_LIB_VERSION to KEYCLOAK_CLIENT_VERSION variable.
ma1uta Oct 30, 2024
6f6c764
Bump KEYCLOAK_CLIENT_VERSION variable in ci.
ma1uta Oct 30, 2024
2eab325
Fix checkstyle.
ma1uta Oct 30, 2024
535b6af
Copy test file for previous version.
ma1uta Oct 30, 2024
233dd9b
Use profiles to activate keycloak-client-common-synced dependency or …
ma1uta Oct 30, 2024
3a1ffe8
Removed keycloak-client-common-synced from pre-* profiles.
ma1uta Oct 30, 2024
54aa21d
Activate keycloak26 profile in CI.
ma1uta Oct 30, 2024
2d45b56
Revert "Activate keycloak26 profile in CI."
ma1uta Oct 30, 2024
f50d633
Revert "Removed keycloak-client-common-synced from pre-* profiles."
ma1uta Oct 30, 2024
86916df
Revert "Use profiles to activate keycloak-client-common-synced depend…
ma1uta Oct 30, 2024
21caf41
Update client library version to 26.0.2.
ma1uta Oct 31, 2024
9af69c3
Remove unnecessary dependency. Use the keycloak.version and keycloak.…
ma1uta Oct 31, 2024
0031aa1
Update keycloak to 26.0.5. Remove the extra braket in pom.xml. For id…
ma1uta Nov 5, 2024
a403ca0
Added check for keycloak26 client attributes. Rename exported realm f…
ma1uta Nov 5, 2024
55996a3
Added workaround to remove flow overrides before delete and restore a…
ma1uta Nov 11, 2024
b818383
Use temp auth flow instead remove overrides (remove the gap in import…
ma1uta Nov 13, 2024
8f2f5dc
Need to have at least one correct resource to create authorizationSet…
ma1uta Nov 13, 2024
cd40ca0
Fix checkstyle.
ma1uta Nov 13, 2024
d227235
Merge remote-tracking branch 'adorsys/main'
ma1uta Nov 13, 2024
f93f7ef
Fix client realm-management to create authorizationSettings without r…
ma1uta Nov 14, 2024
23ba5d1
Fix pre-26 clients attributes when created client-secret.
ma1uta Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Used in docker-compose
# shellcheck disable=SC2034
KEYCLOAK_VERSION=25.0.1
KEYCLOAK_VERSION=26.0.5
19 changes: 17 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ jobs:
env:
# we keep 18.0.2 for backwards compatibility with RH-SSO 7.6
- KEYCLOAK_VERSION: 18.0.2
KEYCLOAK_CLIENT_VERSION: 18.0.2
- KEYCLOAK_VERSION: 21.1.2
KEYCLOAK_CLIENT_VERSION: 21.1.2
- KEYCLOAK_VERSION: 22.0.4
KEYCLOAK_CLIENT_VERSION: 22.0.4
- KEYCLOAK_VERSION: 23.0.7
KEYCLOAK_CLIENT_VERSION: 23.0.7
- KEYCLOAK_VERSION: 24.0.5
KEYCLOAK_CLIENT_VERSION: 24.0.5
- KEYCLOAK_VERSION: 25.0.1
KEYCLOAK_CLIENT_VERSION: 25.0.1
- KEYCLOAK_VERSION: 26.0.5
KEYCLOAK_CLIENT_VERSION: 26.0.2
steps:
- uses: actions/[email protected]
with:
Expand All @@ -55,6 +63,11 @@ jobs:
key: ${{ runner.os }}-maven-${{ matrix.env.KEYCLOAK_VERSION }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-${{ matrix.env.KEYCLOAK_VERSION }}

- name: Adapt sources for Keycloak versions < 26.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '26.0.0' }}
run: |
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak26" >> $GITHUB_ENV

- name: Adapt sources for Keycloak versions < 23.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '23.0.0' }}
run: |
Expand All @@ -72,7 +85,7 @@ jobs:
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak19" >> $GITHUB_ENV

- name: Build & Test
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} ${ADJUSTED_RESTEASY_VERSION} clean verify -Pcoverage ${COMPATIBILITY_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.client.version=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }} ${ADJUSTED_RESTEASY_VERSION} clean verify -Pcoverage ${COMPATIBILITY_PROFILE}

- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down Expand Up @@ -140,6 +153,7 @@ jobs:
with:
build-args: |-
KEYCLOAK_VERSION=${{ matrix.env.KEYCLOAK_VERSION }}
KEYCLOAK_CLIENT_VERSION=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }}
MAVEN_CLI_OPTS=${{ env.MAVEN_CLI_OPTS }} ${{ env.ADJUSTED_RESTEASY_VERSION }} ${{ env.COMPATIBILITY_PROFILE }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -207,6 +221,7 @@ jobs:
matrix:
env:
- KEYCLOAK_VERSION: 19.0.3
KEYCLOAK_CLIENT_VERSION: 19.0.3
steps:
- uses: actions/[email protected]

Expand All @@ -232,7 +247,7 @@ jobs:
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
echo "ADJUSTED_RESTEASY_VERSION=-Dresteasy.version=4.7.7.Final" >> $GITHUB_ENV
- name: Build & Test
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.dockerTagSuffix="-legacy" ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.client.version=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }} -Dkeycloak.dockerTagSuffix="-legacy" ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE}

lint-other-files:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- Fix versioning in artifact to contain the correct keycloak version [#1097](https://github.com/adorsys/keycloak-config-cli/issues/1097)

- Updated CI to use Keycloak 26.0.5

### Fixed

- Allow executions of same provider with different configurations in Sub-Auth-Flows
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
ARG BUILDER_IMAGE=eclipse-temurin:21-jdk
ARG RUNTIME_IMAGE=eclipse-temurin:21-jre

FROM ${BUILDER_IMAGE} AS BUILDER

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (26.0.5, 26.0.2)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (25.0.1, 25.0.1)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (24.0.5, 24.0.5)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (18.0.2, 18.0.2)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (23.0.7, 23.0.7)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (21.1.2, 21.1.2)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (22.0.4, 22.0.4)

Stage names should be lowercase

StageNameCasing: Stage name 'BUILDER' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

WORKDIR /app/

ARG KEYCLOAK_VERSION=25.0.1
ARG KEYCLOAK_VERSION=26.0.5
ARG KEYCLOAK_CLIENT_VERSION=26.0.2
ARG MAVEN_CLI_OPTS="-ntp -B"

COPY .mvn .mvn
Expand All @@ -17,7 +18,8 @@

COPY src src

RUN ./mvnw ${MAVEN_CLI_OPTS} clean package -DskipTests -Dkeycloak.version=${KEYCLOAK_VERSION} \
RUN ./mvnw ${MAVEN_CLI_OPTS} clean package -DskipTests \
-Dkeycloak.version=${KEYCLOAK_VERSION} -Dkeycloak.client.version=${KEYCLOAK_CLIENT_VERSION} \
-Dlicense.skipCheckLicense -Dcheckstyle.skip -Dmaven.test.skip=true -Dmaven.site.skip=true \
-Dmaven.javadoc.skip=true -Dmaven.gitcommitid.skip=true

Expand All @@ -27,7 +29,7 @@
ENV JAVA_OPTS="" KEYCLOAK_SSL_VERIFY=true IMPORT_FILES_LOCATIONS=file:/config/*

# $0 represents the first CLI arg which is not inside $@
ENTRYPOINT exec java $JAVA_OPTS -jar /app/keycloak-config-cli.jar $0 $@

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (26.0.5, 26.0.2)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (25.0.1, 25.0.1)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (24.0.5, 24.0.5)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (18.0.2, 18.0.2)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (23.0.7, 23.0.7)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (21.1.2, 21.1.2)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

Check warning on line 32 in Dockerfile

View workflow job for this annotation

GitHub Actions / build (22.0.4, 22.0.4)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

COPY --from=BUILDER /app/target/keycloak-config-cli.jar /app/keycloak-config-cli.jar

Expand Down
112 changes: 110 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<groupId>de.adorsys.keycloak</groupId>
<artifactId>keycloak-config-cli</artifactId>
<packaging>jar</packaging>
<version>6.1.7-SNAPSHOT</version>
<version>6.2.0-SNAPSHOT</version>

<name>keycloak-config-cli</name>
<url>https://github.com/adorsys/keycloak-config-cli</url>
Expand Down Expand Up @@ -60,6 +60,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<keycloak.version>${keycloak.version}</keycloak.version>
<!-- According to a new policy of the keycloak libraries releases: https://www.keycloak.org/2024/10/release-updates.html -->
<keycloak.client.version>${keycloak.client.version}</keycloak.client.version>

<checkstyle-plugin.version>3.3.1</checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
Expand Down Expand Up @@ -177,6 +179,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>${keycloak.client.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -230,6 +233,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-client</artifactId>
<version>${keycloak.client.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -472,6 +476,7 @@
<configuration>
<systemPropertyVariables>
<keycloak.version>${keycloak.version}</keycloak.version>
<keycloak.client.version>${keycloak.client.version}</keycloak.client.version>
<java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
Expand Down Expand Up @@ -650,6 +655,28 @@
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -743,6 +770,28 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -805,6 +854,42 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
</plugins>
</build>
</profile>
<profile>
<id>pre-keycloak26</id>
<build>
<plugins>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>pre-keycloak23</id>
<build>
Expand All @@ -825,6 +910,28 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -936,7 +1043,8 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
</property>
</activation>
<properties>
<keycloak.version>25.0.1</keycloak.version>
<keycloak.version>26.0.5</keycloak.version>
<keycloak.client.version>26.0.2</keycloak.client.version>
</properties>
</profile>
<!-- Configure the JBoss GA Maven repository -->
Expand Down
Loading
Loading