ACL DRYRUN
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.
Return value
Section titled “Return value”| 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.
Examples
Section titled “Examples”127.0.0.1:6379> ACL SETUSER reports on >reports-password ~report:* -@all +@readOK127.0.0.1:6379> ACL DRYRUN reports GET report:2026OK127.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"Compatibility
Section titled “Compatibility”Same arguments and replies as Redis 7 and Valkey 8, which also reply with a bulk string for a denial.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.