acl: @replication command group
containing mandatory commands for replication (used by masteruser user) Former-commit-id: 123bc125cfe7b30fdeef833759a33ccc854b5c51
This commit is contained in:
parent
4bb5c35548
commit
c0f60008cb
@ -376,9 +376,9 @@ dir ./
|
|||||||
#
|
#
|
||||||
# However this is not enough if you are using KeyDB ACLs (for Redis version
|
# However this is not enough if you are using KeyDB ACLs (for Redis version
|
||||||
# 6 or greater), and the default user is not capable of running the PSYNC
|
# 6 or greater), and the default user is not capable of running the PSYNC
|
||||||
# command and/or other commands needed for replication. In this case it's
|
# command and/or other commands needed for replication (gathered in the
|
||||||
# better to configure a special user to use with replication, and specify the
|
# @replication group). In this case it's better to configure a special user to
|
||||||
# masteruser configuration as such:
|
# use with replication, and specify the masteruser configuration as such:
|
||||||
#
|
#
|
||||||
# masteruser <username>
|
# masteruser <username>
|
||||||
#
|
#
|
||||||
|
@ -80,6 +80,7 @@ struct ACLCategoryItem {
|
|||||||
{"connection", CMD_CATEGORY_CONNECTION},
|
{"connection", CMD_CATEGORY_CONNECTION},
|
||||||
{"transaction", CMD_CATEGORY_TRANSACTION},
|
{"transaction", CMD_CATEGORY_TRANSACTION},
|
||||||
{"scripting", CMD_CATEGORY_SCRIPTING},
|
{"scripting", CMD_CATEGORY_SCRIPTING},
|
||||||
|
{"replication", CMD_CATEGORY_REPLICATION},
|
||||||
{NULL,0} /* Terminator. */
|
{NULL,0} /* Terminator. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,7 +18,8 @@ static char *commandGroups[] = {
|
|||||||
"hyperloglog",
|
"hyperloglog",
|
||||||
"cluster",
|
"cluster",
|
||||||
"geo",
|
"geo",
|
||||||
"stream"
|
"stream",
|
||||||
|
"replication"
|
||||||
};
|
};
|
||||||
|
|
||||||
struct commandHelp {
|
struct commandHelp {
|
||||||
|
@ -180,7 +180,7 @@ volatile unsigned long lru_clock; /* Server global current LRU time. */
|
|||||||
*
|
*
|
||||||
* @keyspace, @read, @write, @set, @sortedset, @list, @hash, @string, @bitmap,
|
* @keyspace, @read, @write, @set, @sortedset, @list, @hash, @string, @bitmap,
|
||||||
* @hyperloglog, @stream, @admin, @fast, @slow, @pubsub, @blocking, @dangerous,
|
* @hyperloglog, @stream, @admin, @fast, @slow, @pubsub, @blocking, @dangerous,
|
||||||
* @connection, @transaction, @scripting, @geo.
|
* @connection, @transaction, @scripting, @geo, @replication.
|
||||||
*
|
*
|
||||||
* Note that:
|
* Note that:
|
||||||
*
|
*
|
||||||
@ -673,7 +673,7 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
* failure detection, and a loading server is considered to be
|
* failure detection, and a loading server is considered to be
|
||||||
* not available. */
|
* not available. */
|
||||||
{"ping",pingCommand,-1,
|
{"ping",pingCommand,-1,
|
||||||
"ok-stale fast @connection",
|
"ok-stale fast @connection @replication",
|
||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"echo",echoCommand,2,
|
{"echo",echoCommand,2,
|
||||||
@ -717,15 +717,15 @@ struct redisCommand redisCommandTable[] = {
|
|||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"sync",syncCommand,1,
|
{"sync",syncCommand,1,
|
||||||
"admin no-script",
|
"admin no-script @replication",
|
||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"psync",syncCommand,3,
|
{"psync",syncCommand,3,
|
||||||
"admin no-script",
|
"admin no-script @replication",
|
||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"replconf",replconfCommand,-1,
|
{"replconf",replconfCommand,-1,
|
||||||
"admin no-script ok-loading ok-stale",
|
"admin no-script ok-loading ok-stale @replication",
|
||||||
0,NULL,0,0,0,0,0,0},
|
0,NULL,0,0,0,0,0,0},
|
||||||
|
|
||||||
{"flushdb",flushdbCommand,-1,
|
{"flushdb",flushdbCommand,-1,
|
||||||
|
@ -372,7 +372,8 @@ public:
|
|||||||
#define CMD_CATEGORY_CONNECTION (1ULL<<36)
|
#define CMD_CATEGORY_CONNECTION (1ULL<<36)
|
||||||
#define CMD_CATEGORY_TRANSACTION (1ULL<<37)
|
#define CMD_CATEGORY_TRANSACTION (1ULL<<37)
|
||||||
#define CMD_CATEGORY_SCRIPTING (1ULL<<38)
|
#define CMD_CATEGORY_SCRIPTING (1ULL<<38)
|
||||||
#define CMD_SKIP_PROPOGATE (1ULL<<39) /* "noprop" flag */
|
#define CMD_CATEGORY_REPLICATION (1ULL<<39)
|
||||||
|
#define CMD_SKIP_PROPOGATE (1ULL<<40) /* "noprop" flag */
|
||||||
|
|
||||||
/* AOF states */
|
/* AOF states */
|
||||||
#define AOF_OFF 0 /* AOF is off */
|
#define AOF_OFF 0 /* AOF is off */
|
||||||
|
@ -15,7 +15,8 @@ GROUPS = [
|
|||||||
"hyperloglog",
|
"hyperloglog",
|
||||||
"cluster",
|
"cluster",
|
||||||
"geo",
|
"geo",
|
||||||
"stream"
|
"stream",
|
||||||
|
"replication"
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
GROUPS_BY_NAME = Hash[*
|
GROUPS_BY_NAME = Hash[*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user