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 09:06:45 UTC

[couchdb] branch feat/metrics-role-for-prmetheus created (now 837f2a5)

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

jan pushed a change to branch feat/metrics-role-for-prmetheus
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 837f2a5  feat(prometheus): allow users with _metrics role to read

This branch includes the following new commits:

     new 837f2a5  feat(prometheus): allow users with _metrics role to read

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[couchdb] 01/01: feat(prometheus): allow users with _metrics role to read

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch feat/metrics-role-for-prmetheus
in repository https://gitbox.apache.org/repos/asf/couchdb.git

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

    feat(prometheus): allow users with _metrics role to read
---
 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).