You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2021/10/30 18:30:13 UTC

[couchdb] branch 3.x updated: feat(prometheus): allow users with _metrics role to read

This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/3.x by this push:
     new 9c2de4e  feat(prometheus): allow users with _metrics role to read
9c2de4e is described below

commit 9c2de4e725f014fb56d3ffd71d5f592cf0fecc67
Author: Jan Lehnardt <ja...@apache.org>
AuthorDate: Sat Oct 30 11:06:08 2021 +0200

    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 8040f91..f36203e 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).