diff options
author | Jan Lehnardt <jan@apache.org> | 2021-10-30 11:06:08 +0200 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2021-10-30 20:30:03 +0200 |
commit | 9c2de4e725f014fb56d3ffd71d5f592cf0fecc67 (patch) | |
tree | 12121ac708cc150498af123b14adfbe2d3ae1b16 | |
parent | d0cd82c2ab53b1075b22f813364abe6c1dc46255 (diff) | |
download | couchdb-9c2de4e725f014fb56d3ffd71d5f592cf0fecc67.tar.gz |
feat(prometheus): allow users with _metrics role to read
Closes #3801
-rw-r--r-- | src/chttpd/src/chttpd_auth_request.erl | 2 |
1 files changed, 2 insertions, 0 deletions
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). |