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:46 UTC
[couchdb] 01/01: 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 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).