Set-OPS-Public/roles/serveur_icingaweb2/defaults/main.yml
Daniel Allaire b60c5dc963 serveur_oauth2_proxy : passerelle SSO OIDC générique + Icinga Web 2 au SSO
oauth2-proxy (v7.15.3) place Keycloak devant toute app sans OIDC natif
(auth external, utilisateur via en-tête). Rôle paramétrable, réutilisable.
Éprouvé devant icingaweb2 (backend=external, X-Forwarded-Preferred-Username).

Prouvé : testmail → oauth2-proxy → Keycloak → icingaweb2 /dashboard,
connecté. Ferme le gap LDAP-direct d'icingaweb2.

Réglages appris : insecure_oidc_allow_unverified_email (IdP interne) ;
reverse-proxy passe X-Forwarded-* pas X-Auth-Request-* ; handler nginx en
restart (pas reload) — un changement d'adresse d'écoute n'est pas pris par
un reload gracieux.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 19:05:04 -04:00

63 lines
2.8 KiB
YAML

---
# Icinga Web 2 (UI native Icinga) + module IcingaDB, sur le nœud de supervision.
# App PHP servie par nginx local + php-fpm ; l'edge nginx proxifie par nom.
# Auth LDAP direct (OpenLDAP) — icingaweb2 n'a pas d'OIDC natif ; SSO via proxy = raffinement.
serveur_icingaweb2_paquets:
- icingadb-web # module IcingaDB (tire icingaweb2 en dépendance)
- icingaweb2-module-businessprocess # module BPM (vues d'impact métier)
- php8.4-fpm
- php8.4-cli
- php8.4-pgsql
- php8.4-ldap
- php8.4-intl
- php8.4-gd
- php8.4-curl
- php8.4-xml
- php8.4-mbstring
- nginx
serveur_icingaweb2_php_fpm_service: "php8.4-fpm"
serveur_icingaweb2_php_fpm_socket: "/run/php/php8.4-fpm.sock"
serveur_icingaweb2_nginx_service: "nginx"
# Publication : nginx LOCAL sur ce port ; l'edge proxifie icinga.<domaine> ici.
serveur_icingaweb2_hostname: "icinga.{{ domaine_interne }}"
serveur_icingaweb2_http_port: 8080
serveur_icingaweb2_docroot: "/usr/share/icingaweb2/public"
serveur_icingaweb2_config_dir: "/etc/icingaweb2"
# Base IcingaDB (via le registre — même consommateur que le moteur).
serveur_icingaweb2_icinga_groupe: "serveur_icinga"
# Redis IcingaDB (local au nœud de supervision).
serveur_icingaweb2_redis_host: "127.0.0.1"
serveur_icingaweb2_redis_port: 6380
# Authentification LDAP (OpenLDAP, LDAPS via la confiance step_ca / client_pki).
serveur_icingaweb2_ldap_url: "ldaps://id-ldap-01.{{ domaine_interne }}"
serveur_icingaweb2_ldap_port: 636
serveur_icingaweb2_ldap_base: "dc={{ domaine_interne.split('.') | join(',dc=') }}"
serveur_icingaweb2_ldap_users_dn: "ou=people,dc={{ domaine_interne.split('.') | join(',dc=') }}"
serveur_icingaweb2_ldap_bind_dn: "cn=admin,dc={{ domaine_interne.split('.') | join(',dc=') }}"
serveur_icingaweb2_ldap_bind_password: "{{ vault_openldap_admin | default('') }}"
serveur_icingaweb2_ldap_user_class: "inetOrgPerson"
serveur_icingaweb2_ldap_user_attr: "uid"
# Qui reçoit le rôle Administrateur (liste d'uid séparés par des virgules).
serveur_icingaweb2_admins: "testmail"
# Backend d'authentification : "ldap" (direct) ou "external" (utilisateur fourni par une
# passerelle SSO devant, ex. oauth2-proxy → Keycloak). En "external", nginx doit poser REMOTE_USER.
serveur_icingaweb2_auth: "ldap"
# Variable nginx d'où vient REMOTE_USER. En SSO : l'en-tête d'oauth2-proxy.
serveur_icingaweb2_remote_user: "$remote_user"
# Préfixe d'écoute nginx local ("" = toutes interfaces ; "127.0.0.1:" = local, derrière la passerelle).
serveur_icingaweb2_nginx_bind: ""
# Modules icingaweb2 à activer.
serveur_icingaweb2_modules:
- icingadb
- businessprocess
# Processus métier (BPM) à semer, en IaC (nom -> contenu du .conf). Vide par défaut :
# les processus sont normalement édités via l'UI. Un contenu ici est géré par Ansible.
serveur_icingaweb2_bpm_processes: {}