John Sully
30e8a859c0
Prevent mixed up client replies, and deadlocks
2019-02-22 01:24:16 -05:00
John Sully
8cd2cdca3d
Merge branch 'unstable' of https://github.com/antirez/redis into Multithread
2019-02-21 18:17:12 -05:00
John Sully
8e8abb2ff9
Cleanup lock contention, and ensure clients are written to in an unsafe way when the global lock is released
2019-02-20 23:30:21 -05:00
John Sully
627c19e02f
Multithreading works!
2019-02-20 01:20:26 -05:00
John Sully
3f4315125c
Most tests failing, except some memory and number of PSYNC syncs
2019-02-19 01:11:00 -05:00
John Sully
e9a2b6f561
deadlock fixes
2019-02-18 23:52:21 -05:00
John Sully
0914b52ffa
Thread safety fixes
2019-02-18 22:25:35 -05:00
John Sully
65e48b868e
Load balance connections across threads (config NYI and hardcoded)
2019-02-16 14:26:19 -05:00
John Sully
90c6c37628
make headers C++ safe
2019-02-15 16:55:40 -05:00
John Sully
aed915cebc
make networking.c a C++ file
2019-02-15 14:11:34 -05:00
John Sully
0f293d4fb0
Fix most failing tests
2019-02-15 10:53:32 -05:00
zhaozhao.zz
3eb2f4ca14
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
zhaozhao.zz
de0f42bff3
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
6059bc7e67
Initial work of multithreaded key-db. Note: Fails tests
2019-02-11 03:36:18 -05:00
John Sully
5be3566838
Performance enhancements!
2019-02-09 13:05:06 -05:00
John Sully
f6736cd713
Reduce memory usage for in place strings by 8 bytes
2019-02-09 13:04:18 -05:00
John Sully
dac1213462
complete rebranding with tests passing
2019-02-09 10:11:46 -05:00
antirez
87ce87e68c
ACL: load ACL file at startup. Prevent silly configurations.
2019-02-07 17:20:03 +01:00
John Sully
ef310bc7f8
Merge branch 'unstable' of https://github.com/antirez/redis into unstable
2019-02-06 00:09:39 -05:00
John Sully
cd8145e314
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
1bdc63cc01
ACL: implement rewriting of users in redis.conf.
2019-02-05 10:48:17 +01:00
antirez
e3c8db819b
ACL: implement ACLLoadConfiguredUsers().
2019-02-04 16:35:15 +01:00
antirez
7e4b4cd327
ACL: better error reporting in users configuration errors.
2019-02-04 13:04:35 +01:00
antirez
8dce634f5c
ACL: make ACLAppendUserForLoading() able to report bad argument.
2019-02-04 13:00:58 +01:00
antirez
73efcef7cb
ACL: initial appending of users in user loading list.
2019-02-04 12:55:48 +01:00
antirez
2e2796f4ff
ACL: flags refactoring, function to describe user.
2019-01-31 16:49:22 +01:00
antirez
c9cdbbad7f
ACL: populate category flags from command table.
2019-01-23 16:59:09 +01:00
antirez
aad7757fd3
ACL: define category names and flags.
2019-01-23 16:47:29 +01:00
antirez
75f40e77b0
ACL: better define name, and the idea of reserved ID.
2019-01-23 08:10:57 +01:00
antirez
646e020891
ACL: update comments in command flags.
2019-01-22 19:02:50 +01:00
antirez
da54f1fd3f
Refactoring: always kill AOF/RDB child via helper functions.
2019-01-21 11:28:44 +01:00
antirez
a5e69e6729
ACL: remove server.requirepass + some refactoring.
2019-01-18 11:49:30 +01:00
antirez
5d1069e881
ACL: reimplement requirepass option in term of ACLs.
2019-01-17 18:05:43 +01:00
antirez
9f666e4710
ACL: fix and improve ACL key checking.
2019-01-16 18:31:05 +01:00
antirez
770a284a8c
ACL: AUTH uses users. ACL WHOAMI implemented.
2019-01-15 18:16:20 +01:00
antirez
2977505cc1
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
efd8fa754f
ACL: initial implementation of the ACL command.
2019-01-15 09:36:12 +01:00
antirez
5fe83f2a9b
ACL: ACLCheckCommandPerm() implementation WIP.
2019-01-14 18:35:21 +01:00
antirez
c17fa9ba7b
ACL: Fix compilation by adding prototype and c->cmd fix.
2019-01-14 13:22:56 +01:00
antirez
15748e1fe0
ACL: ACLLCOMMAND flags.
2019-01-14 13:21:21 +01:00
antirez
8df5007346
ACL: avoid a radix tree lookup for the default user.
2019-01-11 11:32:41 +01:00
antirez
b532a16298
ACL: implement ACLCreateUser().
2019-01-10 17:01:12 +01:00
antirez
1d176f0f0e
ACL: initialization function.
2019-01-10 16:39:32 +01:00
antirez
33ff2b2f35
ACL: add a reference to the user in each client.
2019-01-10 16:34:13 +01:00
antirez
4a3b37a7a7
ACL: improved version of the user structure.
2019-01-10 12:47:52 +01:00
antirez
6f25143af6
ACL: use a fixed table for command IDs.
2019-01-09 21:31:29 +01:00
antirez
5151f74fe1
ACL: introduce the concept of command ID.
2019-01-09 17:20:47 +01:00
antirez
4d33fe81cd
ACL: refactoring of the original authentication code.
2019-01-09 17:00:30 +01:00
antirez
89b7b6a917
RESP3: addReplyString() -> addReplyProto().
...
The function naming was totally nuts. Let's fix it as we break PRs
anyway with RESP3 refactoring and changes.
2019-01-09 17:00:30 +01:00
antirez
78a3a19b2c
RESP3: verbatim reply API + DEBUG PROTOCOL support.
2019-01-09 17:00:30 +01:00