Bug 1964334 - alertmanager/prometheus/thanos-querier /metrics endpoints are not secured
Summary: alertmanager/prometheus/thanos-querier /metrics endpoints are not secured
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.8.0
Assignee: Arunprasad Rajkumar
QA Contact: Junqi Zhao
: 1897630 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2021-05-25 08:54 UTC by Junqi Zhao
Modified: 2021-09-20 13:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2021-07-27 23:10:08 UTC
Target Upstream Version:

Attachments (Terms of Use)
The /metrics endpoint is accessible to anyone without any authentication (237.10 KB, image/png)
2021-05-25 08:54 UTC, Junqi Zhao
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1183 0 None open Bug 1964334: protect monitoring related /metrics endpoints from unauthorised access 2021-05-27 06:37:33 UTC
Github openshift origin pull 26187 0 None open Bug 1964334: use bearer token to access prometheus /metrics endpoint 2021-05-27 10:24:34 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:10:22 UTC

Description Junqi Zhao 2021-05-25 08:54:05 UTC
Created attachment 1786772 [details]
The /metrics endpoint is accessible to anyone without any authentication

Description of problem:
this bug is from bug 1960767, only grafana metrics endpoint is secured now, but alertmanager/prometheus/thanos-querier are not secured
see the attached picture

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. login in grafana/alertmanager/prometheus/thanos-querier routes metrics endpoint one by one
# oc get route -n openshift-monitoring
Append the route UI URL with /metrics

Actual results:
The /metrics endpoint is accessible to anyone without any authentication.

Expected results:
The /metrics endpoint should not be accessible without authentication.

Additional info:

Comment 1 Simon Pasquier 2021-05-25 15:42:22 UTC
*** Bug 1897630 has been marked as a duplicate of this bug. ***

Comment 3 hongyan li 2021-05-31 03:26:00 UTC
same issue exists for thanos-ruler when enabled user-workload monitoring

Comment 4 Arunprasad Rajkumar 2021-05-31 06:25:50 UTC
@hongyli@redhat.com Thanks, I've updated the PR to include thanos-ruler as well.

Comment 6 Junqi Zhao 2021-06-02 01:37:10 UTC
checked with 4.8.0-0.nightly-2021-06-01-190440,alertmanager/prometheus/thanos-querier/thanos-ruler metrics endpoints are secured now

Comment 9 errata-xmlrpc 2021-07-27 23:10:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.