Rename ecosplay client, fix redirect URIs, set admin user real name

- Rename OIDC client ecosplay-web -> ecosplay_web in the realm import
  JSON. The client is used by the internal e-cosplay site for OAuth.
- Replace wildcard redirect URIs with the two exact callbacks:
  https://www.e-cosplay.fr/oauth/keycloak and
  https://cos.local/oauth/keycloak. webOrigins and post-logout URIs
  follow the same hosts.
- Add helpers to sync.sh (client_internal_id, rename_client,
  set_client_uris) and a reconciliation step that renames any legacy
  ecosplay-web -> ecosplay_web and idempotently re-applies the URIs
  on every run, so live installs are migrated automatically.
- Set the bootstrap admin user's real first/last name (jovann Serreau)
  in both the env vars and the realm import JSON.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-04-10 11:59:06 +02:00
parent 6176a4fad9
commit 8069fce9e3
3 changed files with 50 additions and 10 deletions

View File

@@ -71,8 +71,8 @@
{
"username": "jovann@siteconseil.fr",
"email": "jovann@siteconseil.fr",
"firstName": "Jovann",
"lastName": "SiteConseil",
"firstName": "jovann",
"lastName": "Serreau",
"enabled": true,
"emailVerified": true,
"credentials": [
@@ -92,19 +92,19 @@
"clients": [
{
"clientId": "ecosplay-web",
"clientId": "ecosplay_web",
"name": "E-Cosplay Web",
"description": "Application web principale e-cosplay.fr",
"description": "Application web principale e-cosplay.fr (login site interne)",
"enabled": true,
"publicClient": false,
"secret": "change-me-in-admin-console",
"redirectUris": [
"https://www.e-cosplay.fr/*",
"https://e-cosplay.fr/*"
"https://www.e-cosplay.fr/oauth/keycloak",
"https://cos.local/oauth/keycloak"
],
"webOrigins": [
"https://www.e-cosplay.fr",
"https://e-cosplay.fr"
"https://cos.local"
],
"protocol": "openid-connect",
"standardFlowEnabled": true,
@@ -113,7 +113,7 @@
"serviceAccountsEnabled": false,
"frontchannelLogout": true,
"attributes": {
"post.logout.redirect.uris": "https://www.e-cosplay.fr/*##https://e-cosplay.fr/*",
"post.logout.redirect.uris": "https://www.e-cosplay.fr/*##https://cos.local/*",
"pkce.code.challenge.method": "S256"
}
}