Kelvin Clement Mwinuka
bdd5f4eb6b
Implemented SADD command
2023-12-23 01:10:43 +03:00
Kelvin Clement Mwinuka
553f136138
Added Get, GetRandom and Pop method implementations to set data type
2023-12-23 00:32:43 +03:00
Kelvin Clement Mwinuka
515168cdfc
Implemented set data type
2023-12-22 23:35:50 +03:00
Kelvin Clement Mwinuka
cab70ca32b
Added package for SortedSet data type with no scaffolding for commands (will be implemented in the future).
2023-12-22 20:45:10 +03:00
Kelvin Clement Mwinuka
a9c26ff328
Implemented scaffolding for set data type
2023-12-22 20:25:40 +03:00
Kelvin Clement Mwinuka
181844c7eb
Removed unused ContainsMutual utils function
2023-12-22 19:58:13 +03:00
Kelvin Clement Mwinuka
48cc85e068
Removed unused ContainsMutual utils function
2023-12-22 16:58:10 +03:00
Kelvin Clement Mwinuka
8b464070f7
Check if key exists before fetching value on get commands
2023-12-22 16:44:29 +03:00
Kelvin Clement Mwinuka
a11a5b4709
Moved CreateUser function int into user.go
2023-12-22 16:17:29 +03:00
Kelvin Clement Mwinuka
408495078d
Fixed comment in AuthorizeConnection
2023-12-22 14:54:38 +03:00
Kelvin Clement Mwinuka
9d90dd283f
Moved authentication check above pubsub authorization
2023-12-21 03:54:19 +08:00
Kelvin Clement Mwinuka
8a965afec2
Implemented ACL authorization for pubsub commands
2023-12-21 03:49:35 +08:00
Kelvin Clement Mwinuka
772345a5aa
Implemented ACL authorization for IncludedKeys, IncludedReadKeys and IncludedWriteKeys
2023-12-21 03:01:16 +08:00
Kelvin Clement Mwinuka
558f5f0307
Implemented ACL authorization for IncludedCommand and ExcludedCommands
2023-12-21 02:34:21 +08:00
Kelvin Clement Mwinuka
901dbe33a8
Added ACL check for IncludedCategories and ExcludedCategories
2023-12-21 02:21:37 +08:00
Kelvin Clement Mwinuka
3e9f694bf9
Prevent unauthorized connections from running commands when requirepass is true
2023-12-21 01:40:32 +08:00
Kelvin Clement Mwinuka
16e6852c7d
Extract command|subcommand, categories and keys from attempted action in acl AuthorizeConnection method
2023-12-20 05:53:08 +08:00
Kelvin Clement Mwinuka
53a6a59699
Added Merge and Replace methods to ACL user struct to aid user updating upon load and for other potential user cases.
...
Implemented handler for ACL load command.
2023-12-20 05:21:03 +08:00
Kelvin Clement Mwinuka
30e70e3804
Implemented ACL SAVE command
2023-12-19 12:12:01 +08:00
Kelvin Clement Mwinuka
1d36d2c772
Added resetpass, nocommands, resetkeys and resetchannels directives in ACL DSL
2023-12-19 10:02:17 +08:00
Kelvin Clement Mwinuka
ab86694bc2
Show nopass flag in ACL LIST command
2023-12-19 08:15:05 +08:00
Kelvin Clement Mwinuka
cec1366f3e
Added conditions to normalising user
2023-12-19 08:03:42 +08:00
Kelvin Clement Mwinuka
e5291421f4
Created User methods for normalising fields and removing debug print statement in SetUser
2023-12-19 07:26:05 +08:00
Kelvin Clement Mwinuka
5b2a0c1375
Use reference for User instead of copying values in Connection type
2023-12-19 05:21:28 +08:00
Kelvin Clement Mwinuka
f4432a4d0e
Pass context to DeleteUser and AuthenticateUser
2023-12-18 05:12:29 +08:00
Kelvin Clement Mwinuka
29b7d808eb
Added KeepAlive config in tcp listener.
...
Implemented delete user functionality from ACL.
2023-12-18 05:07:47 +08:00
Kelvin Clement Mwinuka
501a435157
Removed unused Plugin declarations
2023-12-16 23:38:13 +08:00
Kelvin Clement Mwinuka
1c8b617541
Channel publish command returns OK instead of PUBLISH_OK
2023-12-16 23:26:21 +08:00
Kelvin Clement Mwinuka
5e16a8ff74
Implemented ACL GETUSER command handler
2023-12-16 05:25:46 +08:00
Kelvin Clement Mwinuka
77b21b4522
Implemented handler for ACL LIST command
2023-12-16 03:27:16 +08:00
Kelvin Clement Mwinuka
1f22c59f38
Added GetAllCommands method to server interface. Implemented ACL CAT command
2023-12-15 23:48:38 +08:00
Kelvin Clement Mwinuka
e6a107f78b
Moved OK and WRON_ARGS_RESPONSE to utils const file
2023-12-15 20:04:02 +08:00
Kelvin Clement Mwinuka
5db0164335
Removed printing of pubsub in pubsub/commands.go module
2023-12-15 01:24:10 +08:00
Kelvin Clement Mwinuka
26dfe5d1b8
Added connection category to subscribe and unsubscribe commands
2023-12-15 01:15:54 +08:00
Kelvin Clement Mwinuka
acb7cd6973
Added command categories in utils/types.go and in each of the current modules and commands
2023-12-15 01:03:39 +08:00
Kelvin Clement Mwinuka
14465732db
Implemented ACL USERS command
2023-12-14 23:10:46 +08:00
Kelvin Clement Mwinuka
c3194b0d2d
Implemented connection authentication and ACL WHOAMI command
2023-12-14 23:01:32 +08:00
Kelvin Clement Mwinuka
39bf074e33
Call ACL Authorize for command before processing. Call ACL Authenticate when auth command is triggered.
2023-12-14 18:43:56 +08:00
Kelvin Clement Mwinuka
19c9b40b4c
Implemented connection registration ACL method
2023-12-14 15:14:00 +08:00
Kelvin Clement Mwinuka
42c145ef3c
Added KeyExtractionFunc for all commands and sub commands to extract keys for ACL authorization.
...
Deleted genpass command.
2023-12-13 22:09:14 +08:00
Kelvin Clement Mwinuka
5f39a64a8d
Refactored command modules to always accept connection parameter in order to streamline command processing.
...
Updated server command list and enabled subcommands and granular cluster sync for individual subcommands.
Renamed "set" packate to "etc" as "set" will be used for the set data type in the future.
2023-12-13 19:34:52 +08:00
Kelvin Clement Mwinuka
d0caebf25d
Removed Plugin property from Command type and removed json tags from Command and SubCommand structs
2023-12-13 02:00:23 +08:00
Kelvin Clement Mwinuka
e7c7cf1553
Deleted plugin folder.
...
Removed nested plugin in command list for modules.
Moved PubSub feature from plugin folder to modules folder.
2023-12-13 01:56:55 +08:00
Kelvin Clement Mwinuka
f82508e964
Created new pubsub module. Refactored LoadPlugins method to LoadModules
2023-12-13 00:49:20 +08:00
Kelvin Clement Mwinuka
acc3e1961b
Moved get, list, ping, set, and string plugins into internal modules folder. This should simplify future testing efforts.
2023-12-13 00:37:21 +08:00
Kelvin Clement Mwinuka
cd3bf4f420
Added handler scaffolds for acl subcommands and auth command.
2023-12-12 19:48:19 +08:00
Kelvin Clement Mwinuka
a18ce4c8a4
Fixed initilization of allow-lists on acl users
2023-12-12 18:42:18 +08:00
Kelvin Clement Mwinuka
10eddac11e
Implemented ACL user normalisation
2023-12-12 18:19:17 +08:00
Kelvin Clement Mwinuka
0708893928
Created MergeUsers function for merging users with the same username using sensible defaults.
2023-12-11 17:12:38 +08:00
Kelvin Clement Mwinuka
e4f8a4a59a
Removed indirection of ACLPlugin inside of ACL struct
2023-12-10 14:03:04 +08:00