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:07:14 UTC

[couchdb] branch feat/metrics-role-for-prmetheus updated (837f2a5 -> 5b1fd09)

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.


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

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (837f2a5)
            \
             N -- N -- N   refs/heads/feat/metrics-role-for-prmetheus (5b1fd09)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:

[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 5b1fd09df2203c28605e93d4d47b46bba274becf
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).