Skip to content

Metrics: require authentication for local Prometheus, Alertmanager and Grafana #8390

In progress

Description

@gsanchietti

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.

See also

Activity

  1. added this to the NethServer 8.11 milestone on Nov 27, 2026
  2. self-assigned this
    on Nov 27, 2026
  3. moved this from Backlog to ToDo in NethServeron Nov 27, 2026
  4. moved this from ToDo to In Progress in NethServeron Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

  • Status
    In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions