326 Commits

Author SHA1 Message Date
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
antirez
a6ead03510 RESP3: addReplyBool() implemented. 2019-01-09 17:00:29 +01:00
antirez
bf3d7bbf31 RESP3: initial implementation of the HELLO command. 2019-01-09 17:00:29 +01:00
antirez
f47004f589 RESP3: restore the concept of null array for RESP2 compat. 2019-01-09 17:00:29 +01:00
antirez
83ad63732e RESP3: add shared.nullarray for better RESP2 compat. 2019-01-09 17:00:29 +01:00
antirez
8ecf7693bf RESP3: addReplyNullArray() added for better RESP2 compat. 2019-01-09 17:00:29 +01:00
antirez
c8304b099d RESP3: most null replies converted. 2019-01-09 17:00:29 +01:00
antirez
29bbe91392 RESP3: addReplyNull() added. 2019-01-09 17:00:29 +01:00
antirez
e30fef5d8a RESP3: remove other pointless shared object. 2019-01-09 17:00:29 +01:00
antirez
5ebe3268ed RESP3: remove certain constants to spot places to fix. 2019-01-09 17:00:29 +01:00
antirez
56c95799a3 RESP3: bring RESP2 compatibility to previous changes. 2019-01-09 17:00:29 +01:00
antirez
e6a467814a RESP3: addReply*Len() support for RESP2 backward comp. 2019-01-09 17:00:29 +01:00
antirez
9325d288f6 RESP3: put RESP version in the client structure. 2019-01-09 17:00:29 +01:00
antirez
036e10dcb9 RESP3: Use new deferred len API in server.c. 2019-01-09 17:00:29 +01:00
antirez
689949fb30 RESP3: Aggregate deferred lengths functions. 2019-01-09 17:00:29 +01:00
antirez
f7e99b07f3 Modules shared API: initial core functions.
Based on ideas and code in PR #5560 by @MeirShpilraien.
2018-12-20 17:57:35 +01:00
antirez
ea2d253238 Revert shared APIs to modify the design. 2018-12-20 17:56:38 +01:00
MeirShpilraien
2a907e7d00 added module ability to register api to be used by other modules 2018-12-20 17:55:18 +01:00
antirez
421c242dd0 freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:37:15 +01:00
antirez
83b0df508c Reject EXEC containing write commands against RO replica.
Thanks to @soloestoy for discovering this issue in #5667.
This is an alternative fix in order to avoid both cycling the clients
and also disconnecting clients just having valid read-only transactions
pending.
2018-12-11 11:39:21 +01:00
Oran Agra
bad0b20979 fix #5580, display fragmentation and rss overhead bytes as signed
these metrics become negative when RSS is smaller than the used_memory.
This can easily happen when the program allocated a lot of memory and haven't
written to it yet, in which case the kernel doesn't allocate any pages to the process
2018-12-02 15:29:20 +02:00
antirez
8e399f0e01 Streams: XSTREAM SETID -> XSETID.
Keep vanilla stream commands at toplevel, see #5426.
2018-10-16 13:17:14 +02:00
Salvatore Sanfilippo
ff1b36c825 Merge pull request #5426 from soloestoy/feature-xstream
Bugfix data inconsistency after aof rewrite, and add XSTREAM command.
2018-10-16 13:10:36 +02:00
antirez
b10d99a13b Fix propagation of consumer groups last ID.
Issue #5433.
2018-10-10 12:51:02 +02:00
antirez
4e851f8044 Introduce protectClient() + some refactoring.
The idea is to have an API for the cases like -BUSY state and DEBUG
RELOAD where we have to manually deinstall the read handler.
See #4804.
2018-10-09 13:15:41 +02:00
zhaozhao.zz
7e2c73d79b Streams: add a new command XTREAM
XSTREAM CREATE <key> <id or *> -- Create a new empty stream.
XSTREAM SETID <key> <id or $>  -- Set the current stream ID.
2018-10-09 13:11:04 +08:00
antirez
96ceafbe4d Module cluster flags: initial vars / defines added. 2018-09-19 11:20:52 +02:00
antirez
55d85db425 LOLWUT: wrap it into a proper command. 2018-09-12 11:34:10 +02:00
antirez
bdca5b9be5 Slave removal: SLAVEOF -> REPLICAOF. SLAVEOF is now an alias. 2018-09-11 15:32:28 +02:00