You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Metrics: require authentication for local Prometheus, Alertmanager and Grafana #8390
The metrics application runs three services on the leader node: Prometheus (collects the metrics), Alertmanager (handles the alerts) and Grafana (shows the dashboards). They listen only on the node itself, but they trust any program that connects from there. Any other application installed on the same node could read the metrics or change the alerts. The purpose of this change is to make each service check who is calling, without changing how administrators use them.
Proposed solution
Prometheus and Alertmanager ask for a password. The metrics application creates a random password once, keeps it in a file readable only by the application itself, and uses it in all its own components. The cluster alert list, run by the core as the system administrator on the same node, reads the same file.
Grafana relies on a signed token issued by the core for logged-in users. There is nothing to set up on install, update or leader change.
The Prometheus web interface is no longer published through the web proxy, and the related "Prometheus path" setting is removed from the Metrics settings page. For troubleshooting, administrators can reach it through an SSH tunnel, as described in the module README.
Logging in to Grafana from the cluster administration page works as before.
Upgrade notes:
The core must be updated before the metrics application: the new metrics release requires it.
Alert rules added by hand to Loki no longer reach Alertmanager, because they cannot send the password.
Alternative solutions
Leaving Prometheus without a password, as it only allows reading: discarded, because the metrics can still reveal information about the whole cluster.
Letting the core ask the metrics application for the alerts through a task: discarded as more complex than needed, since the core runs as administrator on the same node and can read the password directly.
Additional context
The administrator manual explains where to read the password and how to reach Prometheus.
Activity