Set-OPS-Public/roles/serveur_keycloak/templates/keycloak.conf.j2
Daniel Allaire fa6ef8b031 Zéro-confiance : Keycloak→PG en verify-full + root_ca lisible (0644)
- client_pki : root_ca.crt en 0644 (un cert racine est PUBLIC ; requis pour
  que les clients TLS non-root — keycloak, forgejo… — puissent vérifier).
- serveur_keycloak : db-url-properties sslmode=verify-full + sslrootcert.

Incident maîtrisé : 1er essai, keycloak (user keycloak) ne pouvait pas lire
root_ca 0600 → SSO down → restauré en <1 min → corrigé (0644) → verify-full OK.
Prouvé : realm 200, sslmode=verify-full, aucune erreur SSL/DB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 18:45:16 -04:00

25 lines
980 B
Django/Jinja

# Gere par Set-OPS (role serveur_keycloak). Ne pas editer a la main.
db=postgres
db-url-host={{ serveur_keycloak_db_host }}
db-url-database={{ serveur_keycloak_entree.base }}
{% if serveur_keycloak_db_sslmode | default('') %}
db-url-properties=?sslmode={{ serveur_keycloak_db_sslmode }}&sslrootcert={{ serveur_keycloak_db_sslrootcert }}
{% endif %}
db-username={{ serveur_keycloak_entree.proprietaire }}
# Derriere serveur_nginx (TLS termine a l'edge).
hostname={{ serveur_keycloak_hostname }}
proxy-headers=xforwarded
http-enabled=true
{% if not serveur_keycloak_theme_cache | default(true) %}
# Lab : cache de themes desactive pour iterer le thème sans casse-cache navigateur.
spi-theme-static-max-age=-1
spi-theme-cache-themes=false
spi-theme-cache-templates=false
{% endif %}
{% if serveur_keycloak_ldap_federation %}
# Truststore (racine step_ca via le bundle systeme) pour valider LDAPS vers OpenLDAP.
truststore-paths={{ serveur_keycloak_truststore_path }}
{% endif %}