rnewson commented on a change in pull request #1440: Optionally prevent
non-admins from accessing /_all_dbs
URL: https://github.com/apache/couchdb/pull/1440#discussion_r202547445
##########
File path: src/chttpd/src/chttpd_auth_request.erl
##########
@@ -34,7 +34,11 @@ authorize_request_int(#httpd{path_parts=[]}=Req) ->
authorize_request_int(#httpd{path_parts=[<<"favicon.ico">>|_]}=Req) ->
Req;
authorize_request_int(#httpd{path_parts=[<<"_all_dbs">>|_]}=Req) ->
- Req;
+ case config:get("chttpd", "admin_only_all_dbs", "false") of
+ "false" -> Req;
+ "true" -> require_admin(Req);
+ Else -> couch_log:error("Invalid setting for admin_only_all_dbs: ~p.
Must be true or false.", [Else])
Review comment:
hm, but that's different to many other parameters behaviour (that work as I
indicated above), so while I get your reasoning, and agree with it, having a
single parameter behave that way when all the rest don't seems worse than the
current situation. Of course, we could review and change them _all_ to follow
your goal of making it harder to accidentally leave things open.
What I think should happen is that, for new installs, we set everything
appropriate to its more secure/closed option in what we ship. Then every
opening of that is done consciously.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services