Skip to content

Commit

Permalink
MB-19339: Add support for privilege_debug for memcached
Browse files Browse the repository at this point in the history
Memcached supports privilege_debug mode to have the system
approve a request when the RBAC system would deny access.
The motivation for this mode is to be able to run an
application so that one may figure out which privileges
it need.

This mode should _NEVER_ be enabled in production!

To enable privilege debug mode the following command
may be used:

curl -u Administrator:asdfasdf \
           -X POST \
           http://127.0.0.1:8091/pools/default/settings/memcached/node/self \
           --data privilege_debug=true

Change-Id: Ia40d7809e422c709421b37b0d7980164b8edae76
Reviewed-on: http://review.couchbase.org/73949
Reviewed-by: Dave Finlay <dave.finlay@couchbase.com>
Tested-by: Dave Finlay <dave.finlay@couchbase.com>
  • Loading branch information
trondn authored and dave-finlay committed Mar 15, 2017
1 parent 6c773f4 commit 45cd8d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/api.txt
Expand Up @@ -417,6 +417,7 @@ GET /pools/default/serverGroups =>
(breakpad_minidump_dir_path: <string>)?
(ssl_cipher_list: <string>)?
(connection_idle_time: <number>)?
(privilege_debug: <bool>)?
}


Expand Down
1 change: 1 addition & 0 deletions src/menelaus_web_mcd_settings.erl
Expand Up @@ -39,6 +39,7 @@ supported_setting_names() ->
{ssl_cipher_list, string},
{client_cert_auth, string},
{connection_idle_time, {int, 0, ?MAXINT}},
{privilege_debug, bool},
{breakpad_enabled, bool},
{breakpad_minidump_dir_path, string},
{dedupe_nmvb_maps, bool}].
Expand Down
2 changes: 2 additions & 0 deletions src/ns_config_default.erl
Expand Up @@ -244,6 +244,7 @@ default() ->
{ssl_cipher_list, "HIGH"},
{connection_idle_time, 0},
{verbosity, 0},
{privilege_debug, false},
{breakpad_enabled, true},
%% Location that Breakpad should write minidumps upon memcached crash.
{breakpad_minidump_dir_path, BreakpadMinidumpDir},
Expand Down Expand Up @@ -311,6 +312,7 @@ default() ->
{ssl_minimum_protocol, {memcached_config_mgr, ssl_minimum_protocol, []}},

{connection_idle_time, connection_idle_time},
{privilege_debug, privilege_debug},

{breakpad,
{[{enabled, breakpad_enabled},
Expand Down

0 comments on commit 45cd8d8

Please sign in to comment.