Skip to content

Commit

Permalink
Merge branch 'master' into keycloak-20
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-dufaure authored Aug 19, 2023
2 parents c8d55e5 + e4da9f2 commit e0985dd
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
java-package: 'jdk'

- name: Build with Maven
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
java-version: 17
java-package: 'jdk'

- id: get_version
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
7 changes: 4 additions & 3 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ This [Keycloak](https://www.keycloak.org) plugin adds an identity provider allow
Starting from version 19 and the use of the new graphical administration interface of Keycloak, it is no longer possible to properly configure this extension via the UI. However, the provided version allows you to maintain the functionality of the plugin if it has been configured in a previous version, with configurations to be done manually in SQL if necessary.
A version is currently under development to restore the configuration of the plugin, which will require breaking changes in the usage of this plugin.

* The version 5.0.0 and above of this plugin is compatible with Keycloak `21.0.0` and higher.
* The version 4.0.0 and above of this plugin is compatible with Keycloak `15.0.0` until `20.0.0`.
* The version 2.1 up to 3.0.0 of this plugin is compatible with Keycloak `9.0.2` and higher.
* The version 6.0.0 and above of this plugin is compatible with Keycloak `22.0.0` and higher.
* The version 5.0.0 and above of this plugin is compatible with Keycloak `21.x.y`.
* The version 4.0.0 and above of this plugin is compatible with Keycloak `15.0.0` until `20.0.0`.
* The version 2.1 up to 3.0.0 of this plugin is compatible with Keycloak `9.0.2` until `15.0.0`.
* The version 2.0 of this plugin is compatible with Keycloak `8.0.1` until `9.0.2`.

## Migration
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ Pour toutes questions sur l'utilisation de cette extension, n'hésitez pas à ou
A partir de la version 19 et de l'usage de la nouvelle interface graphique d'administration de Keycloak, il n'est plus possible de paramétrer correctement cette extension via ihm. Cela étant la version fourni permet de conserver la fonctionalité du plugin s'il a été configuré dans une version précedente, les manipulation de configuration devant se faire manuellement en sql si nécessaire.
Une version est en cours de développement pour rétablir la configuration du plugin, elle nécessitera des changements disruptifs dans l'usage de ce plugin.

- La version 5.0.0 est compatible avec Keycloak `21.0.0` et supérieur.
- La version 6.0.0 est compatible avec Keycloak `22.0.0` et supérieur.
- La version 5.0.0 est compatible avec Keycloak `21.x.y`.
- La version 4.0.0 est compatible avec Keycloak `15.0.0` jusqu'à `20.0.0`.
- La version 2.1 jusqu'à 3.0.0 est compatible avec Keycloak `9.0.2` et supérieur.
- La version 2.1 jusqu'à 3.0.0 est compatible avec Keycloak `9.0.2` jusqu'à `15.0.0`.
- La version 2.0 est compatible avec Keycloak `8.0.1` jusqu'à `9.0.0`.

## Migration
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>fr.insee.keycloak</groupId>
<artifactId>keycloak-franceconnect</artifactId>
<version>5.0.0-SNAPSHOT</version>
<version>6.0.0-SNAPSHOT</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>France Connect Openid-Connect Provider for Keycloak</description>
Expand Down Expand Up @@ -56,8 +56,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<maven.clean.plugin.version>3.3.1</maven.clean.plugin.version>
<maven.compiler.plugin.version>3.11.0</maven.compiler.plugin.version>
Expand All @@ -68,10 +68,10 @@
<maven.source.plugin.version>3.3.0</maven.source.plugin.version>
<maven.javadoc.plugin.version>3.5.0</maven.javadoc.plugin.version>

<keycloak.version>21.0.1</keycloak.version>
<keycloak.version>22.0.0</keycloak.version>

<!-- Testing Tools -->
<junit.jupiter.version>5.9.3</junit.jupiter.version>
<junit.jupiter.version>5.10.0</junit.jupiter.version>
<assertj.version>3.24.2</assertj.version>
<mockito.version>5.4.0</mockito.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import fr.insee.keycloak.providers.common.AbstractBaseIdentityProvider;
import fr.insee.keycloak.providers.common.Utils;
import javax.ws.rs.core.UriBuilder;
import jakarta.ws.rs.core.UriBuilder;
import org.keycloak.OAuth2Constants;
import org.keycloak.broker.provider.AuthenticationRequest;
import org.keycloak.models.KeycloakSession;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

import static fr.insee.keycloak.providers.common.Utils.transcodeSignatureToDER;
import static org.keycloak.util.JWKSUtils.getKeyWrappersForUse;
import static org.keycloak.util.JWKSUtils.getKeysForUse;

import java.nio.charset.StandardCharsets;
import java.security.PublicKey;
import java.security.Signature;
import java.util.Optional;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;

import org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider;
import org.keycloak.broker.oidc.OIDCIdentityProvider;
Expand All @@ -40,6 +33,13 @@
import org.keycloak.services.resources.IdentityBrokerService;
import org.keycloak.services.resources.RealmsResource;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriBuilder;
import jakarta.ws.rs.core.UriInfo;

public abstract class AbstractBaseIdentityProvider<T extends AbstractBaseProviderConfig>
extends OIDCIdentityProvider implements SocialIdentityProvider<OIDCIdentityProviderConfig> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package fr.insee.keycloak.providers.franceconnect;

import static fr.insee.keycloak.providers.common.EidasLevel.EIDAS1;
import static javax.ws.rs.core.Response.Status.OK;
import static jakarta.ws.rs.core.Response.Status.OK;

import com.fasterxml.jackson.databind.JsonNode;
import fr.insee.keycloak.providers.common.AbstractBaseIdentityProvider;
import fr.insee.keycloak.providers.common.Utils;
import java.io.IOException;
import java.util.Optional;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriBuilder;
import javax.xml.bind.DatatypeConverter;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.UriBuilder;
import jakarta.xml.bind.DatatypeConverter;
import org.keycloak.OAuth2Constants;
import org.keycloak.broker.oidc.mappers.AbstractJsonUserAttributeMapper;
import org.keycloak.broker.provider.AuthenticationRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import org.keycloak.models.KeycloakSession;
import org.mockito.Mockito;

import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.MediaType;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.keycloak.representations.JsonWebToken;
import org.mockito.Mockito;

import javax.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.HttpHeaders;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.Map;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/fr/insee/keycloak/utils/KeycloakFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.keycloak.vault.DefaultVaultStringSecret;
import org.keycloak.vault.VaultTranscriber;

import javax.ws.rs.core.UriInfo;
import jakarta.ws.rs.core.UriInfo;
import java.security.Security;
import java.util.Optional;

Expand Down

0 comments on commit e0985dd

Please sign in to comment.