45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# Correction du problème OIDC PKCE
|
|
|
|
## Problème identifié
|
|
|
|
L'erreur `Missing parameter: code_challenge_method` indiquait que Keycloak attendait le paramètre PKCE (Proof Key for Code Exchange) mais Quarkus ne l'envoyait pas.
|
|
|
|
## Solution appliquée
|
|
|
|
### Configuration OIDC ajoutée dans `application.properties`
|
|
|
|
```properties
|
|
# Configuration Keycloak OIDC pour le client
|
|
quarkus.oidc.enabled=true
|
|
quarkus.oidc.auth-server-url=https://security.lions.dev/realms/btpxpress
|
|
quarkus.oidc.client-id=btpxpress-frontend
|
|
quarkus.oidc.application-type=web-app
|
|
quarkus.oidc.authentication.redirect-path=/
|
|
quarkus.oidc.authentication.restore-path-after-redirect=true
|
|
quarkus.oidc.authentication.cookie-path=/
|
|
quarkus.oidc.authentication.cookie-domain=localhost
|
|
quarkus.oidc.authentication.session-age-extension=PT30M
|
|
quarkus.oidc.token.issuer=https://security.lions.dev/realms/btpxpress
|
|
quarkus.oidc.discovery-enabled=true
|
|
quarkus.oidc.tls.verification=required
|
|
|
|
# Configuration PKCE (Proof Key for Code Exchange) - REQUIS pour btpxpress-frontend
|
|
quarkus.oidc.authentication.pkce-required=true
|
|
quarkus.oidc.authentication.code-challenge-method=S256
|
|
|
|
# Sécurité activée
|
|
quarkus.security.auth.enabled=true
|
|
quarkus.security.auth.proactive=false
|
|
```
|
|
|
|
### Port corrigé
|
|
|
|
Le port HTTP a été corrigé de 8082 à 8081 pour correspondre aux logs.
|
|
|
|
## Vérification
|
|
|
|
Après redémarrage de l'application, l'authentification OIDC devrait fonctionner correctement avec PKCE.
|
|
|
|
**Date** : 16 janvier 2025
|
|
|