summaryrefslogtreecommitdiff
path: root/runtest-moduleapi
diff options
context:
space:
mode:
authorYaacovHazan <31382944+YaacovHazan@users.noreply.github.com>2021-09-23 08:52:56 +0300
committerGitHub <noreply@github.com>2021-09-23 08:52:56 +0300
commita56d4533b72db8aa147be090c4c1d2bc548b9408 (patch)
tree718d3628bcdb7ca5132324af33b841cb0d1aeeec /runtest-moduleapi
parent14d6abd8e9a928aa920d5009d79e7b8ff2d0d5ba (diff)
downloadredis-a56d4533b72db8aa147be090c4c1d2bc548b9408.tar.gz
Adding ACL support for modules (#9309)
This commit introduced a new flag to the RM_Call: 'C' - Check if the command can be executed according to the ACLs associated with it. Also, three new API's added to check if a command, key, or channel can be executed or accessed by a user, according to the ACLs associated with it. - RM_ACLCheckCommandPerm - RM_ACLCheckKeyPerm - RM_ACLCheckChannelPerm The user for these API's is a RedisModuleUser object, that for a Module user returned by the RM_CreateModuleUser API, or for a general ACL user can be retrieved by these two new API's: - RM_GetCurrentUserName - Retrieve the user name of the client connection behind the current context. - RM_GetModuleUserFromUserName - Get a RedisModuleUser from a user name As a result of getting a RedisModuleUser from name, it can now also access the general ACL users (not just ones created by the module). This mean the already existing API RM_SetModuleUserACL(), can be used to change the ACL rules for such users.
Diffstat (limited to 'runtest-moduleapi')
-rwxr-xr-xruntest-moduleapi1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtest-moduleapi b/runtest-moduleapi
index 33b2711d4..0e78e3e84 100755
--- a/runtest-moduleapi
+++ b/runtest-moduleapi
@@ -40,4 +40,5 @@ $TCLSH tests/test_helper.tcl \
--single unit/moduleapi/list \
--single unit/moduleapi/stream \
--single unit/moduleapi/datatype2 \
+--single unit/moduleapi/aclcheck \
"${@}"