From 9c2de4e725f014fb56d3ffd71d5f592cf0fecc67 Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 30 Oct 2021 11:06:08 +0200 Subject: feat(prometheus): allow users with _metrics role to read Closes #3801 --- src/chttpd/src/chttpd_auth_request.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/chttpd/src/chttpd_auth_request.erl b/src/chttpd/src/chttpd_auth_request.erl index 8040f91fd..f36203efe 100644 --- a/src/chttpd/src/chttpd_auth_request.erl +++ b/src/chttpd/src/chttpd_auth_request.erl @@ -103,6 +103,8 @@ server_authorization_check(#httpd{path_parts=[<<"_node">>,_ , <<"_stats">>|_]}=R require_metrics(Req); server_authorization_check(#httpd{path_parts=[<<"_node">>,_ , <<"_system">>|_]}=Req) -> require_metrics(Req); +server_authorization_check(#httpd{path_parts=[<<"_node">>,_ , <<"_prometheus">>|_]}=Req) -> + require_metrics(Req); server_authorization_check(#httpd{path_parts=[<<"_", _/binary>>|_]}=Req) -> require_admin(Req). -- cgit v1.2.1