Skip to content

Commit

Permalink
[ENH] Redefinition of environments
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Dufaure <clement.dufaure@insee.fr>
  • Loading branch information
clement-dufaure committed Sep 25, 2024
1 parent dc0239f commit 57d607d
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 19 deletions.
13 changes: 13 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ $ mvn clean install wildfly:deploy

## How to use it

### Environments

Up until version 6.2.0, the extension provided the so-called V1 and V2 environments, which correspond respectively to the historical FranceConnect "standard" and the FranceConnect Plus.

With the addition of the FranceConnect standard V2 and to clear up any ambiguities, the configurations are now named `STANDARD_V2` and `PLUS_V2`, while the previous ones will remain available for a few versions to allow for migration. Since the standard V1 offering will be discontinued in 2025, it will not be included in the new naming conventions.

Each offering is available in both INTEGRATION and PRODUCTION, resulting in the following:

- `INTEGRATION_V1` and `PRODUCTION_V1` : Historical FranceConnect standard "V1", which will be discontinued in 2025
- `INTEGRATION_V2` and `PRODUCTION_V2` : FranceConnect Plus under its old naming, maintained for backward compatibility
- `INTEGRATION_STANDARD_V2` and `PRODUCTION_STANDARD_V2` : FranceConnect standard V2
- `INTEGRATION_PLUS_V2` and `PRODUCTION_PLUS_V2` : FranceConnect Plus

### Requirements

You must have a [France Connect account](https://franceconnect.gouv.fr/partenaires) to retrieve plugin configuration information (clientId, clientSecret, authorized redirect uri, ...)
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ $ mvn clean install wildfly:deploy
## Utilisation

### France Connect

#### Environnements

Jusqu'en version 6.2.0, l'extension propose les environnement dits `V1` et `V2` qui correspondent réellement respectivement à l'offre FranceConnect standard "historique" et à l'offre FranceConnect Plus.

Suite à l'ajout de l'offre FranceConnect standard V2 et afin de lever les ambiguités, les configurations se nomment désormais `STANDARD_V2` et `PLUS_V2`, les anciens restant pendant quelques versions le temps d'effectuer la migration.
L'offre standard V1 devant s'arrêter en 2025, elle ne sera pas reprise dans les nouveaux nommages.

Chaque offre est proposée en `INTEGRATION` et en `PRODUCTION`, ce qui donne donc :

- `INTEGRATION_V1` et `PRODUCTION_V1` : Offre historique FranceConnect standard "V1" devant s'arrêter en 2025
- `INTEGRATION_V2` et `PRODUCTION_V2` : Offre FranceConnect Plus dans son ancien nommage, maintenu pour retro compatibilité
- `INTEGRATION_STANDARD_V2` et `PRODUCTION_STANDARD_V2` : Offre FranceConnect standard V2
- `INTEGRATION_PLUS_V2` et `PRODUCTION_PLUS_V2` : Offre FranceConnect Plus

#### Prérequis

Vous devez créer un [compte France Connect](https://franceconnect.gouv.fr/partenaires) afin de récupérer les informations nécessaires à la configuration de cette extension (clientId, clientSecret, configuration de l'url de redirection autorisée, ...).
Expand Down
2 changes: 1 addition & 1 deletion 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>6.2.0-SNAPSHOT</version>
<version>6.5.0-SNAPSHOT</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>France Connect Openid-Connect Provider for Keycloak</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@
import java.util.Properties;

enum FCEnvironment {

// Legacy V1 , should stop in 2025
INTEGRATION_V1("france-connect.integration.v1"),
PRODUCTION_V1("france-connect.production.v1"),
INTEGRATION_V2("france-connect.integration.v2"),
PRODUCTION_V2("france-connect.production.v2");
// Names left for retro compatibility, prefer now "Plus"
INTEGRATION_V2("france-connect.plus.integration.v2"),
PRODUCTION_V2("france-connect.plus.production.v2"),
// FranceConnect V2, called standard in this project to differentiate with "Plus"
INTEGRATION_STANDARD_V2("france-connect.standard.integration.v2"),
PRODUCTION_STANDARD_V2("france-connect.standard.production.v2"),
// FranceConnect Plus V2
INTEGRATION_PLUS_V2("france-connect.plus.integration.v2"),
PRODUCTION_PLUS_V2("france-connect.plus.production.v2");

static final String ENVIRONMENT_PROPERTY_NAME = "fc_environment";
private static final Properties PROPERTIES = Utils.loadProperties("france-connect.properties");
Expand Down
54 changes: 39 additions & 15 deletions src/main/resources/france-connect.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# FC V1 legacy

france-connect.integration.v1.authorization.url=https://fcp.integ01.dev-franceconnect.fr/api/v1/authorize
france-connect.integration.v1.token.url=https://fcp.integ01.dev-franceconnect.fr/api/v1/token
france-connect.integration.v1.userinfo.url=https://fcp.integ01.dev-franceconnect.fr/api/v1/userinfo
Expand All @@ -8,18 +10,40 @@ france-connect.production.v1.token.url=https://app.franceconnect.gouv.fr/api/v1/
france-connect.production.v1.userinfo.url=https://app.franceconnect.gouv.fr/api/v1/userinfo
france-connect.production.v1.logout.url=https://app.franceconnect.gouv.fr/api/v1/logout

france-connect.integration.v2.authorization.url=https://auth.integ01.dev-franceconnect.fr/api/v2/authorize
france-connect.integration.v2.token.url=https://auth.integ01.dev-franceconnect.fr/api/v2/token
france-connect.integration.v2.userinfo.url=https://auth.integ01.dev-franceconnect.fr/api/v2/userinfo
france-connect.integration.v2.logout.url=https://auth.integ01.dev-franceconnect.fr/api/v2/session/end
france-connect.integration.v2.issuer.url=https://auth.integ01.dev-franceconnect.fr/api/v2
france-connect.integration.v2.jwks.url=https://auth.integ01.dev-franceconnect.fr/api/v2/jwks
france-connect.integration.v2.use.jwks.url=true

france-connect.production.v2.authorization.url=https://auth.franceconnect.gouv.fr/api/v2/authorize
france-connect.production.v2.token.url=https://auth.franceconnect.gouv.fr/api/v2/token
france-connect.production.v2.userinfo.url=https://auth.franceconnect.gouv.fr/api/v2/userinfo
france-connect.production.v2.logout.url=https://auth.franceconnect.gouv.fr/api/v2/session/end
france-connect.production.v2.issuer.url=https://auth.franceconnect.gouv.fr/api/v2
france-connect.production.v2.jwks.url=https://auth.franceconnect.gouv.fr/api/v2/jwks
france-connect.production.v2.use.jwks.url=true
## FC standard V2

# https://fcp-low.integ01.dev-franceconnect.fr/api/v2/.well-known/openid-configuration
france-connect.standard.integration.v2.authorization.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2/authorize
france-connect.standard.integration.v2.token.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2/token
france-connect.standard.integration.v2.userinfo.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2/userinfo
france-connect.standard.integration.v2.logout.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2/session/end
france-connect.standard.integration.v2.issuer.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2
france-connect.standard.integration.v2.jwks.url=https://fcp-low.integ01.dev-franceconnect.fr/api/v2/jwks
france-connect.standard.integration.v2.use.jwks.url=true

# https://oidc.franceconnect.gouv.fr/api/v2/.well-known/openid-configuration
france-connect.standard.production.v2.authorization.url=https://oidc.franceconnect.gouv.fr/api/v2/authorize
france-connect.standard.production.v2.token.url=https://oidc.franceconnect.gouv.fr/api/v2/token
france-connect.standard.production.v2.userinfo.url=https://oidc.franceconnect.gouv.fr/api/v2/userinfo
france-connect.standard.production.v2.logout.url=https://oidc.franceconnect.gouv.fr/api/v2/session/end
france-connect.standard.production.v2.issuer.url=https://oidc.franceconnect.gouv.fr/api/v2
france-connect.standard.production.v2.jwks.url=https://oidc.franceconnect.gouv.fr/api/v2/jwks
france-connect.standard.production.v2.use.jwks.url=true

## FC + V2

france-connect.plus.integration.v2.authorization.url=https://auth.integ01.dev-franceconnect.fr/api/v2/authorize
france-connect.plus.integration.v2.token.url=https://auth.integ01.dev-franceconnect.fr/api/v2/token
france-connect.plus.integration.v2.userinfo.url=https://auth.integ01.dev-franceconnect.fr/api/v2/userinfo
france-connect.plus.integration.v2.logout.url=https://auth.integ01.dev-franceconnect.fr/api/v2/session/end
france-connect.plus.integration.v2.issuer.url=https://auth.integ01.dev-franceconnect.fr/api/v2
france-connect.plus.integration.v2.jwks.url=https://auth.integ01.dev-franceconnect.fr/api/v2/jwks
france-connect.plus.integration.v2.use.jwks.url=true

france-connect.plus.production.v2.authorization.url=https://auth.franceconnect.gouv.fr/api/v2/authorize
france-connect.plus.production.v2.token.url=https://auth.franceconnect.gouv.fr/api/v2/token
france-connect.plus.production.v2.userinfo.url=https://auth.franceconnect.gouv.fr/api/v2/userinfo
france-connect.plus.production.v2.logout.url=https://auth.franceconnect.gouv.fr/api/v2/session/end
france-connect.plus.production.v2.issuer.url=https://auth.franceconnect.gouv.fr/api/v2
france-connect.plus.production.v2.jwks.url=https://auth.franceconnect.gouv.fr/api/v2/jwks
france-connect.plus.production.v2.use.jwks.url=true

0 comments on commit 57d607d

Please sign in to comment.