fix(grafana): login OIDC pour les users sans email (repli username) (#87)

bbarthe (et tout compte Authentik sans email) échouait au login SSO :
Grafana, email vide, tentait l'endpoint /emails inexistant chez Authentik
→ 404 InternalError. email_attribute_path avec repli preferred_username +
login_attribute_path évitent le fallback. Plus besoin d'email par user.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
ALI YESILKAYA 2026-07-07 12:31:20 +02:00 committed by GitHub
parent 514cb89579
commit f9a916988b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,6 +26,10 @@ grafana:
auth_url: http://auth.lab.local/application/o/authorize/ auth_url: http://auth.lab.local/application/o/authorize/
token_url: http://authentik.auth.svc.cluster.local:9000/application/o/token/ token_url: http://authentik.auth.svc.cluster.local:9000/application/o/token/
api_url: http://authentik.auth.svc.cluster.local:9000/application/o/userinfo/ api_url: http://authentik.auth.svc.cluster.local:9000/application/o/userinfo/
# Repli si l'utilisateur Authentik n'a pas d'email : sans ça Grafana tente un
# endpoint /emails inexistant chez Authentik → 404 « InternalError » au login.
login_attribute_path: preferred_username
email_attribute_path: email || preferred_username
# Membre du groupe lab-admins → Admin, sinon Viewer # Membre du groupe lab-admins → Admin, sinon Viewer
role_attribute_path: contains(groups[*], 'lab-admins') && 'Admin' || 'Viewer' role_attribute_path: contains(groups[*], 'lab-admins') && 'Admin' || 'Viewer'
role_attribute_strict: false role_attribute_strict: false