Project

General

Profile

Actions

Feature #45372

open

Feature #47765: mgr/dashboard: security improvements

mgr/dashboard: monitoring/grafana: any user can run any query on the Prometheus data source

Added by Patrick Seidensal almost 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Monitoring
Target version:
-
% Done:

0%

Source:
Tags:
security
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Any user with the viewer role can send any query to the Prometheus data source through Grafana.

According to Prometheus' security model, neither the data which could be accessed nor the access to Prometheus itself is considered an issue, though malicious actions might be possible and enhanced security might be a requirement in some cases.

It is presumed that untrusted users have access to the Prometheus HTTP endpoint and logs.
-- https://prometheus.io/docs/operating/security/#prometheus

By default though, this access is limited to read-only operations (provided the admin API isn't enabled, which isn't the case in our default deployment). Measures to mitigate against Denial of Service attacks are built in Prometheus itself, though it can not be guaranteed to prevent all attacks. Secrets are not exposed.

Grafana enables users of its enterprise version to control which queries can be send to Prometheus, the community version does not include such options.

-- https://grafana.com/docs/grafana/latest/installation/security/#limit-viewer-query-permissions

A possible solution would be to implement a reverse proxy in Ceph Dashboard, which will be capable of filtering queries before they are relayed to Grafana. This solution should not replace the current integration with Grafana, where Grafana is enabled to allow anonymous access, but offered as additional option.

By implementing such a proxy, the benefit of being able to access Grafana directly and outside of Ceph Dashboard will be lost, as Grafana will need to be configured to run behind a reverse proxy.

By implementing this solution, we will need to specify which operations can be performed by a Ceph Dashboard user (by its group). This involves continues maintenance.

Please also note that Prometheus' HTTP API in our current deployments is not protected from being accessed and that restrictions to access Prometheus' API should probably be resolved before this issue needs to be fixed.


Related issues 1 (1 open0 closed)

Related to Dashboard - Feature #47911: mgr/dashboard: (re-)explore a dashboard-proxified GrafanaNew

Actions
Actions #1

Updated by Patrick Seidensal almost 4 years ago

  • Tags set to security
  • Affected Versions v15.0.0, v16.0.0 added
Actions #2

Updated by Ernesto Puerta over 3 years ago

  • Parent task set to #47765
Actions #3

Updated by Lenz Grimmer over 3 years ago

  • Related to Feature #47911: mgr/dashboard: (re-)explore a dashboard-proxified Grafana added
Actions #4

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 148 to Monitoring
Actions

Also available in: Atom PDF