Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

ACL DRYRUN

Last updated
ACL DRYRUN username command [argument ...]
Group
ACL
Complexity
O(1)
Arity
-4 (at least 4 words, counting the command name)
HotKV Cloud
All plans
On-Premise
no license needed

ACL DRYRUN checks a user’s rules against a command and its arguments, including the keys and channels it would touch, and tells you whether the user could run it. Nothing is executed. Use it to test new rules before you hand out a password. The check uses the rules only, so a user that is off can still be checked.

Case RESP2 RESP3
Allowed Simple string OK Simple string OK
Command not allowed Bulk string User <user> has no permissions to run the '<command>' command Bulk string
A key not allowed Bulk string User <user> has no permissions to access the '<key>' key Bulk string
A channel not allowed Bulk string User <user> has no permissions to access the '<channel>' channel Bulk string
Unknown user Error ERR User '<user>' not found Same error
Unknown command Error ERR Command '<command>' not found Same error
Wrong number of arguments for the command Error ERR wrong number of arguments for '<command>' command Same error

A denial is a normal reply, not an error.

127.0.0.1:6379> ACL SETUSER reports on >reports-password ~report:* -@all +@read
OK
127.0.0.1:6379> ACL DRYRUN reports GET report:2026
OK
127.0.0.1:6379> ACL DRYRUN reports GET user:1000
"User reports has no permissions to access the 'user:1000' key"
127.0.0.1:6379> ACL DRYRUN reports SET report:2026 x
"User reports has no permissions to run the 'set' command"

Same arguments and replies as Redis 7 and Valkey 8, which also reply with a bulk string for a denial.

ACL SETUSER, ACL GETUSER, ACL CAT