Github user iilyak commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/53#discussion_r36356756
  
    --- Diff: src/chttpd_auth.erl ---
    @@ -12,15 +12,70 @@
     
     -module(chttpd_auth).
     
    +-export([authenticate/2]).
    +-export([authorize/2]).
    +
     -export([default_authentication_handler/1]).
     -export([cookie_authentication_handler/1]).
    +-export([local_admin_handler/1]).
    +
     -export([handle_session_req/1]).
     
    +-include_lib("couch/include/couch_db.hrl").
    +
    +-define(SERVICE_ID, chttpd_auth).
    +
    +
    +%% ------------------------------------------------------------------
    +%% API Function Definitions
    +%% ------------------------------------------------------------------
    +
    +authenticate(HttpReq, Default) ->
    +    maybe_handle(authenticate, [HttpReq], Default).
    +
    +authorize(HttpReq, Default) ->
    +    maybe_handle(authorize, [HttpReq], Default).
    +
    +
    +%% ------------------------------------------------------------------
    +%% Default callbacks
    +%% ------------------------------------------------------------------
    +
     default_authentication_handler(Req) ->
         couch_httpd_auth:default_authentication_handler(Req, 
chttpd_auth_cache).
     
     cookie_authentication_handler(Req) ->
         couch_httpd_auth:cookie_authentication_handler(Req, chttpd_auth_cache).
     
    +local_admin_handler(Req) ->
    +    case config:get("chttpd", "require_valid_user", "false") of
    --- End diff --
    
    Not sure about this one. Since backdoor interface in production is behind a 
firewall. I can imagine setups where for backdoor interface 
`require_valid_user` is `false` while it is `true` for clustered.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to