Grafana Service Accounts Need ... Note

Grafana Service Accounts Need Organization-Scoped Review

Grafana service accounts enable programmatic access to Grafana features without requiring human interaction. They differ from user accounts, persisting even after their creator departs, with tokens inheriting associated permissions. This utility for automation is counterbalanced by risks if organization scope and token inventory are not meticulously documented. A service account is a workload identity, distinct from its authentication tokens, and can have multiple tokens for separate auditing or rotation purposes. Service accounts operate within the organization where they are created, lacking instance-wide administrative capabilities. To manage them effectively, record details like organization, owner, purpose, token names, creation date, and last use for each account. Implement the principle of least privilege by assigning only necessary API operations and using separate accounts for distinct permission sets or audit trails. Regularly check the effective permissions granted to service accounts via the access-control API, as account names are purely descriptive and not a guarantee of access limitations. To rotate tokens safely, create a new one, update secret stores, verify functionality, and then revoke the old token. In case of token exposure, disable it immediately, audit its activity, and investigate potential data source access beyond Grafana itself. Service accounts should have team ownership rather than individual ownership, and this ownership should be reviewed during personnel or organizational changes. Proper management of Grafana service accounts ensures auditable automation through unique tokens, scoped permissions, and routine rotation.