SAML + CENTREON
Mise en place d'un authentifcation en SAML avec Authentik et Centreon
📘 Intégration Authentik (IdP) avec Centreon (SP) via SAML
Cette documentation décrit comment intégrer Authentik comme fournisseur d'identité (IdP) avec Centreon comme Service Provider (SP) via SAML 2.0, en environnement sécurisé avec reverse proxy et certificats TLS Let's Encrypt.
🧰 Prérequis
1. Environnement sécurisé
Centreon et Authentik sont accessibles en HTTPS via reverse proxy (NGINX, Traefik, Apache…).
Certificats Let’s Encrypt valides sur les deux côtés (authentik et centreon).
Authentik est déjà installé (voir guide Docker ici).
2. DNS / Reverse Proxy
Le reverse proxy gère les certificats SSL et fait suivre le trafic vers les IP internes :
https://auth.mondomaine.tld
→ Authentik (port 80/443)https://centreon.mondomaine.tld
→ Centreon (port 80/443)
⚙️ Étapes côté Authentik (IdP)
1. Générer un certificat signé (pour les assertions)
Depuis l’interface admin :
Aller dans System → Certificates → Generate
Paramètres :
Common Name (CN) :
centreon.mondomaine.tld
Subject Alternative Name (SAN) :
auth.mondomaine.tld
,centreon.mondomaine.tld
Utiliser ce certificat pour :
Signer l’assertion
Signer la réponse
2. Créer un Provider SAML
Aller dans Providers → Create → SAML Provider
ACS URL :
https://centreon.mondomaine.tld/centreon/api/latest/saml/acs
Issuer :
https://centreon.mondomaine.tld
(⚠️ Sans/
final)SLO URL : (facultatif)
Binding : POST
Sign Responses : ✅
Sign Assertions : ✅
Certificate : le certificat généré à l'étape 1
Enregistrer.
3. Créer une Application SAML
Aller dans Applications → Create
Name :
Centreon
Slug :
centreon
Provider : celui créé juste avant
User attribute mapping ( fais par defaut, mais s'assurer d'avoir les suivants d'inclu) :
username
email
name
💡 Identifiants SAML visibles dans :
https://auth.mondomaine.tld/application/saml/centreon/metadata/
⚙️ Étapes côté Centreon (SP)
1. Modifier le fichier PHP des options SAML
Dans /usr/share/centreon/src/Core/Security/Authentication/Infrastructure/Provider/Settings/Formatter/OneLoginSettingsFormatter.php
Ajoutez dans le bloc 'security'
:
'security' => [
'requestedAuthContext' => false,
'requestedAuthnContextComparison' => 'Minimum',
],
Redémarrer Apache / PHP-FPM ou l’unité Centreon :
systemctl restart centreon
2. Configuration Web de SAML dans Centreon
Depuis l’interface web Centreon :
Administration → Authentication → SAML
Authentication Method
Mixed
Remote login URL
https://auth.mondomaine.tld/application/saml/centreon/sso/binding/redirect/
Issuer (Entity ID)
https://centreon.mondomaine.tld
x.509 Certificate
🔐 Certificat signé généré dans Authentik (voir étape 1)
Login Attribute (username)
http://schemas.goauthentik.io/2021/02/saml/username
Email Attribute
http://schemas.goauthentik.io/2021/02/saml/email
Name Attribute
http://schemas.goauthentik.io/2021/02/saml/name
🔁 Reverse Proxy (bonus)
Exemple de config NGINX pour passer centreon en https
server {
listen 443 ssl;
server_name centreon.mondomaine.tld;
ssl_certificate /etc/letsencrypt/live/centreon.mondomaine.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/centreon.mondomaine.tld/privkey.pem;
location / {
proxy_pass http://<centreon_ip>/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
💡 Important : Le certificat présenté doit être valide et reconnu par Authentik.
Si vous utilisez un certificat autosigné, ajoutez-le manuellement dans le keystore Java d'Authentik ou désactivez la validation stricte (non recommandé en prod).
✅ Vérifications finales
✔️ L’ACS URL correspond à celle définie dans Authentik
✔️ Le certificat est bien signé
✔️ Les attributs SAML sont bien mappés
✔️ Authentik utilise une URL en HTTPS avec certificat reconnu
DEBUG
Si vous rencontrez des bug, j'ai ecrit un comment sur une issue github qui peut etre très utiles.
📚 Références utiles
Last updated
Was this helpful?