Compare commits

...

10 commits

Author SHA1 Message Date
dependabot[bot]
51f6eec0e7 chore(deps-dev): bump org.testcontainers:junit-jupiter
Bumps [org.testcontainers:junit-jupiter](https://github.com/testcontainers/testcontainers-java) from 1.19.4 to 1.19.5.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.4...1.19.5)

---
updated-dependencies:
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 08:20:50 +01:00
dependabot[bot]
83fec76743 chore: bump peter-evans/create-pull-request from 5 to 6
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 15:38:11 +01:00
dependabot[bot]
ab94ca4746 chore(deps): bump org.junit:junit-bom from 5.10.1 to 5.10.2
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.1 to 5.10.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 15:37:50 +01:00
dependabot[bot]
4ba3278c69 chore(deps-dev): bump org.assertj:assertj-core from 3.25.2 to 3.25.3
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.2 to 3.25.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.2...assertj-build-3.25.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 15:37:28 +01:00
Sven-Torben Janus
3a3cc59134 chore(deps): Update Keycloak dependencies to 23.0.6
Signed-off-by: Sven-Torben Janus <sven-torben@sven-torben.de>
2024-02-02 17:17:32 +01:00
Sven-Torben Janus
7f395b50d7 test: Add workflow with matrix tests 2024-01-30 19:42:04 +01:00
Sven-Torben Janus
8eb9cace47 chore(deps): Update Keycloak dependencies to 23.0.5
Signed-off-by: Sven-Torben Janus <sven-torben@sven-torben.de>
2024-01-30 18:37:24 +01:00
dependabot[bot]
6d425f0c5f chore(deps-dev): bump version.mockito from 5.9.0 to 5.10.0
Bumps `version.mockito` from 5.9.0 to 5.10.0.

Updates `org.mockito:mockito-core` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

Updates `org.mockito:mockito-junit-jupiter` from 5.9.0 to 5.10.0
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.9.0...v5.10.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 16:36:08 +01:00
dependabot[bot]
1503b5e727 chore(deps-dev): bump org.assertj:assertj-core from 3.25.1 to 3.25.2
Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.25.1 to 3.25.2.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.25.1...assertj-build-3.25.2)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 14:50:36 +01:00
dependabot[bot]
79712d1676 chore(deps-dev): bump org.testcontainers:junit-jupiter
Bumps [org.testcontainers:junit-jupiter](https://github.com/testcontainers/testcontainers-java) from 1.19.3 to 1.19.4.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.3...1.19.4)

---
updated-dependencies:
- dependency-name: org.testcontainers:junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 14:49:47 +01:00
11 changed files with 53 additions and 14 deletions

View file

@ -38,7 +38,7 @@ body:
label: Version
description: |
examples:
- **Keycloak**: 23.0.4
- **Keycloak**: 23.0.6
- **This extension**: 23.0.0
value: |
- Keycloak:

View file

@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
keycloak_version: [ 22.0.5, 23.0.0, 23.0.1, 23.0.2, 23.0.3, 23.0.4, latest ]
keycloak_version: [ 22.0.5, 23.0.0, 23.0.1, 23.0.2, 23.0.3, 23.0.4, 23.0.5, 23.0.6, latest ]
keycloak_dist: [quarkus]
experimental: [false]
include:

29
.github/workflows/matrix.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Compatibility Matrix
on:
workflow_dispatch:
jobs:
compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
keycloak_version: [ 21.0.2, 21.1.2, 22.0.5, 23.0.6, latest, nightly ]
extension_version: [ 20.0.1, 21.0.0, 22.0.0, 23.0.0 ]
steps:
- uses: actions/checkout@v4
with:
ref: v${{ matrix.extension_version }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Clean and compile
run: mvn -B -U clean test-compile --file pom.xml
- name: Download extension
run: curl -L -o target/keycloak-restrict-client-auth.jar https://github.com/sventorben/keycloak-restrict-client-auth/releases/download/v${{ matrix.extension_version }}/keycloak-restrict-client-auth.jar
- name: Compatibility tests
run: mvn -B -U failsafe:integration-test failsafe:verify --file pom.xml -Dkeycloak.version=${{ matrix.keycloak_version }} -DuseJar=true

View file

@ -48,7 +48,7 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore(release): Prepare next version"
delete-branch: "true"

View file

@ -3,7 +3,7 @@
This is a simple Keycloak authenticator to restrict user authorization on clients.
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/sventorben/keycloak-restrict-client-auth?sort=semver)
![Keycloak Dependency Version](https://img.shields.io/badge/Keycloak-23.0.4-blue)
![Keycloak Dependency Version](https://img.shields.io/badge/Keycloak-23.0.6-blue)
![GitHub Release Date](https://img.shields.io/github/release-date-pre/sventorben/keycloak-restrict-client-auth)
![Github Last Commit](https://img.shields.io/github/last-commit/sventorben/keycloak-restrict-client-auth)

View file

@ -2,7 +2,7 @@ version: '3'
services:
keycloak:
container_name: keycloak
image: quay.io/keycloak/keycloak:23.0.4
image: quay.io/keycloak/keycloak:23.0.6
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin

12
pom.xml
View file

@ -51,13 +51,14 @@
<maven.compiler.release>17</maven.compiler.release>
<!-- For compilation -->
<version.keycloak>23.0.4</version.keycloak>
<version.keycloak>23.0.6</version.keycloak>
<!-- For compatibility tests -->
<keycloak.version>${version.keycloak}</keycloak.version>
<keycloak.dist>quarkus</keycloak.dist>
<useJar>false</useJar>
<version.mockito>5.9.0</version.mockito>
<version.mockito>5.10.0</version.mockito>
</properties>
<build>
@ -87,6 +88,7 @@
<org.jboss.logging.provider>log4j2</org.jboss.logging.provider>
<keycloak.version>${keycloak.version}</keycloak.version>
<keycloak.dist>${keycloak.dist}</keycloak.dist>
<useJar>${useJar}</useJar>
</systemPropertyVariables>
</configuration>
</plugin>
@ -157,7 +159,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.10.1</version>
<version>5.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -218,13 +220,13 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.1</version>
<version>3.25.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.19.3</version>
<version>1.19.5</version>
<scope>test</scope>
</dependency>
<dependency>

View file

@ -34,7 +34,6 @@ class ClientPolicyIT {
@Container
private static final KeycloakContainer KEYCLOAK_CONTAINER = FullImageName.createContainer()
.withProviderClassesFrom("target/classes")
.withExposedPorts(KEYCLOAK_HTTP_PORT)
.withLogConsumer(new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams())
.withRealmImportFile("/test-realm.json")

View file

@ -26,7 +26,6 @@ class ConfigIT {
@Container
private static final KeycloakContainer KEYCLOAK_CONTAINER = FullImageName.createContainer()
.withProviderClassesFrom("target/classes")
.withExposedPorts(KEYCLOAK_HTTP_PORT)
.withLogConsumer(new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams())
.withStartupTimeout(Duration.ofSeconds(90))

View file

@ -4,6 +4,9 @@ import dasniko.testcontainers.keycloak.KeycloakContainer;
import org.testcontainers.images.ImagePullPolicy;
import org.testcontainers.images.PullPolicy;
import java.io.File;
import java.util.List;
import static de.sventorben.keycloak.authorization.client.FullImageName.Distribution.quarkus;
import static java.lang.module.ModuleDescriptor.Version;
@ -20,6 +23,8 @@ class FullImageName {
private static final String NIGHTLY_VERSION = "nightly";
private static final String KEYCLOAK_VERSION = System.getProperty("keycloak.version", LATEST_VERSION);
private static final boolean USE_JAR = Boolean.parseBoolean(System.getProperty("useJar", "false"));
static String get() {
String imageName = "keycloak";
@ -61,8 +66,14 @@ class FullImageName {
if (isLatestVersion() || isNightlyVersion()) {
pullPolicy = PullPolicy.alwaysPull();
}
return new KeycloakContainer(fullImage)
KeycloakContainer keycloakContainer = new KeycloakContainer(fullImage)
.withImagePullPolicy(pullPolicy);
if (USE_JAR) {
keycloakContainer = keycloakContainer.withProviderLibsFrom(List.of(new File("target/keycloak-restrict-client-auth.jar")));
} else {
keycloakContainer = keycloakContainer.withProviderClassesFrom("target/classes");
}
return keycloakContainer;
}
}

View file

@ -33,7 +33,6 @@ class LoginIT {
@Container
private static final KeycloakContainer KEYCLOAK_CONTAINER = FullImageName.createContainer()
.withProviderClassesFrom("target/classes")
.withExposedPorts(KEYCLOAK_HTTP_PORT)
.withLogConsumer(new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams())
.withRealmImportFile("/test-realm.json")