How do you set up authentication and authorisation in Grafana for a large company?
IntermediateProductionObservability as Code, Security & Vendor Choices
Answer
- SSO through OIDC/SAML (Okta, Entra ID, Google) with the login form disabled.
- Role mapping from IdP groups:
role_attribute_pathmaps groups to Viewer, Editor or Admin; team sync (Enterprise/Cloud) or the Grafana Operator keeps teams in line with groups. - Folder permissions per team; most users are Viewers in other teams' folders.
- Service accounts with scoped tokens for CI and Terraform, never personal API keys.
- Data source permissions to restrict sensitive tenants (security logs).
[auth.generic_oauth]
role_attribute_path = contains(groups[*], 'sre') && 'Admin' || contains(groups[*], 'eng') && 'Editor' || 'Viewer'
More on Observability as Code, Security & Vendor Choices
What does "observability as code" cover, and why insist on it?BeginnerHow do you manage Grafana with Terraform?IntermediateHow do you validate Alertmanager configuration in CI?BeginnerWhat does a CI pipeline for Prometheus rules look like?IntermediateRaw dashboard JSON, Jsonnet/Grafonnet or the Grafana Foundation SDK: which do you pick?AdvancedWhat are monitoring mixins and how do you consume them?Advanced