diff options
author | Shaya Potter <shaya@redislabs.com> | 2022-09-22 16:29:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 16:29:00 +0300 |
commit | 6e993a5dfa38327f25c5c8eea0f0e98ffd5d2c21 (patch) | |
tree | 7f48d653bd4694d4b93ed254613a805e423ef195 /runtest-moduleapi | |
parent | 6d21560190fd5b09ff849ad1777e868d5e78da5f (diff) | |
download | redis-6e993a5dfa38327f25c5c8eea0f0e98ffd5d2c21.tar.gz |
Add RM_SetContextUser to support acl validation in RM_Call (and scripts) (#10966)
Adds a number of user management/ACL validaiton/command execution functions to improve a
Redis module's ability to enforce ACLs correctly and easily.
* RM_SetContextUser - sets a RedisModuleUser on the context, which RM_Call will use to both
validate ACLs (if requested and set) as well as assign to the client so that scripts executed via
RM_Call will have proper ACL validation.
* RM_SetModuleUserACLString - Enables one to pass an entire ACL string, not just a single OP
and have it applied to the user
* RM_GetModuleUserACLString - returns a stringified version of the user's ACL (same format as dump
and list). Contains an optimization to cache the stringified version until the underlying ACL is modified.
* Slightly re-purpose the "C" flag to RM_Call from just being about ACL check before calling the
command, to actually running the command with the right user, so that it also affects commands
inside EVAL scripts. see #11231
Diffstat (limited to 'runtest-moduleapi')
-rwxr-xr-x | runtest-moduleapi | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtest-moduleapi b/runtest-moduleapi index c924a1f98..e58c58099 100755 --- a/runtest-moduleapi +++ b/runtest-moduleapi @@ -50,4 +50,5 @@ $TCLSH tests/test_helper.tcl \ --single unit/moduleapi/eventloop \ --single unit/moduleapi/timer \ --single unit/moduleapi/publish \ +--single unit/moduleapi/usercall \ "${@}" |