651 Commits

Author SHA1 Message Date
John Sully
a47b0f4d3b Load balance connections across threads (config NYI and hardcoded) 2019-02-16 14:26:19 -05:00
John Sully
5fc8747feb make headers C++ safe 2019-02-15 16:55:40 -05:00
John Sully
62090d0a97 make networking.c a C++ file 2019-02-15 14:11:34 -05:00
John Sully
48f6d0d800 Fix most failing tests 2019-02-15 10:53:32 -05:00
zhaozhao.zz
14507457a0 ACL: show categories in COMMAND reply
Adding another new filed categories at the end of
command reply, it's easy to read and distinguish
flags and categories, also compatible with old format.
2019-02-14 00:13:01 +08:00
Guy Benoish
bdd9a8002a Trim SDS free space of retained module strings
In some cases processMultibulkBuffer uses sdsMakeRoomFor to
expand the querybuf, but later in some cases it uses that query
buffer as is for an argv element (see "Optimization"), which means
that the sds in argv may have a lot of wasted space, and then in case
modules keep that argv RedisString inside their data structure, this
space waste will remain for long (until restarted from rdb).
2019-02-12 14:21:21 +01:00
zhaozhao.zz
ea9d3aefec ACL: add masteruser configuration for replication
In mostly production environment, normal user's behavior should be
limited.

Now in redis ACL mechanism we can do it like that:

    user default on +@all ~* -@dangerous nopass
    user admin on +@all ~* >someSeriousPassword

Then the default normal user can not execute dangerous commands like
FLUSHALL/KEYS.

But some admin commands are in dangerous category too like PSYNC,
and the configurations above will forbid replica from sync with master.

Finally I think we could add a new configuration for replication,
it is masteruser option, like this:

    masteruser admin
    masterauth someSeriousPassword

Then replica will try AUTH admin someSeriousPassword and get privilege
to execute PSYNC. If masteruser is NULL, replica would AUTH with only
masterauth like before.
2019-02-12 17:12:37 +08:00
John Sully
d62178ec8c Initial work of multithreaded key-db. Note: Fails tests 2019-02-11 03:36:18 -05:00
John Sully
edd87115f1 Performance enhancements! 2019-02-09 13:05:06 -05:00
John Sully
2f9d958e96 Reduce memory usage for in place strings by 8 bytes 2019-02-09 13:04:18 -05:00
John Sully
d3fc46b3a8 complete rebranding with tests passing 2019-02-09 10:11:46 -05:00
antirez
80f987726d ACL: load ACL file at startup. Prevent silly configurations. 2019-02-07 17:20:03 +01:00
John Sully
3e9e84ca19 Merge branch 'unstable' of https://github.com/antirez/redis into unstable 2019-02-06 00:09:39 -05:00
John Sully
41a24e689e Make main headers C++ safe, and change rdb to use file descriptor instead of FILE pointer 2019-02-05 23:36:40 -05:00
antirez
775bf6193d ACL: implement rewriting of users in redis.conf. 2019-02-05 10:48:17 +01:00
antirez
8ce3c16317 ACL: implement rewriting of users in redis.conf. 2019-02-05 10:48:17 +01:00
antirez
500b3e128f ACL: implement ACLLoadConfiguredUsers(). 2019-02-04 16:35:15 +01:00
antirez
0082503bdf ACL: implement ACLLoadConfiguredUsers(). 2019-02-04 16:35:15 +01:00
antirez
68fd4a97fa ACL: better error reporting in users configuration errors. 2019-02-04 13:04:35 +01:00
antirez
20fa89d093 ACL: better error reporting in users configuration errors. 2019-02-04 13:04:35 +01:00
antirez
b166c41edd ACL: make ACLAppendUserForLoading() able to report bad argument. 2019-02-04 13:00:58 +01:00
antirez
0d6e0f8d23 ACL: make ACLAppendUserForLoading() able to report bad argument. 2019-02-04 13:00:58 +01:00
antirez
21e84cdae2 ACL: initial appending of users in user loading list. 2019-02-04 12:55:48 +01:00
antirez
1327538221 ACL: initial appending of users in user loading list. 2019-02-04 12:55:48 +01:00
antirez
c7cd10dfe9 ACL: flags refactoring, function to describe user. 2019-01-31 16:49:22 +01:00
antirez
110c8caf8a ACL: flags refactoring, function to describe user. 2019-01-31 16:49:22 +01:00
antirez
8a8b8a4199 ACL: populate category flags from command table. 2019-01-23 16:59:09 +01:00
antirez
f99e0f59ef ACL: populate category flags from command table. 2019-01-23 16:59:09 +01:00
antirez
14ea988d9c ACL: define category names and flags. 2019-01-23 16:47:29 +01:00
antirez
91ec53ed13 ACL: define category names and flags. 2019-01-23 16:47:29 +01:00
antirez
52d43a80b1 ACL: better define name, and the idea of reserved ID. 2019-01-23 08:10:57 +01:00
antirez
70e541b7bc ACL: better define name, and the idea of reserved ID. 2019-01-23 08:10:57 +01:00
antirez
1e9665909d ACL: update comments in command flags. 2019-01-22 19:02:50 +01:00
antirez
711e514ea4 ACL: update comments in command flags. 2019-01-22 19:02:50 +01:00
antirez
23abe9612a Refactoring: always kill AOF/RDB child via helper functions. 2019-01-21 11:28:44 +01:00
antirez
4dc69497f5 Refactoring: always kill AOF/RDB child via helper functions. 2019-01-21 11:28:44 +01:00
antirez
4261b70f8d ACL: remove server.requirepass + some refactoring. 2019-01-18 11:49:30 +01:00
antirez
c8391388c2 ACL: remove server.requirepass + some refactoring. 2019-01-18 11:49:30 +01:00
antirez
03c4aa01ec ACL: reimplement requirepass option in term of ACLs. 2019-01-17 18:05:43 +01:00
antirez
7b65605ab2 ACL: reimplement requirepass option in term of ACLs. 2019-01-17 18:05:43 +01:00
antirez
dabd1e3bbb ACL: fix and improve ACL key checking. 2019-01-16 18:31:05 +01:00
antirez
4a3419acfc ACL: fix and improve ACL key checking. 2019-01-16 18:31:05 +01:00
antirez
8cb696b953 ACL: AUTH uses users. ACL WHOAMI implemented. 2019-01-15 18:16:20 +01:00
antirez
cca64672f4 ACL: AUTH uses users. ACL WHOAMI implemented. 2019-01-15 18:16:20 +01:00
antirez
1cb8998a1c ACL: nopass user setting.
This is needed in order to model the current behavior of authenticating
the connection directly when no password is set. Now with ACLs this will
be obtained by setting the default user as "nopass" user. Moreover this
flag can be used in order to create other users that do not require any
password but will work with "AUTH username <any-password>".
2019-01-15 13:16:31 +01:00
antirez
b39409bcf8 ACL: nopass user setting.
This is needed in order to model the current behavior of authenticating
the connection directly when no password is set. Now with ACLs this will
be obtained by setting the default user as "nopass" user. Moreover this
flag can be used in order to create other users that do not require any
password but will work with "AUTH username <any-password>".
2019-01-15 13:16:31 +01:00
antirez
4d8991fdf4 ACL: initial implementation of the ACL command. 2019-01-15 09:36:12 +01:00
antirez
7aea02fa87 ACL: initial implementation of the ACL command. 2019-01-15 09:36:12 +01:00
antirez
532049a9bc ACL: ACLCheckCommandPerm() implementation WIP. 2019-01-14 18:35:21 +01:00
antirez
a2e376ba52 ACL: ACLCheckCommandPerm() implementation WIP. 2019-01-14 18:35:21 +01:00