ACL-GETUSER(3valkey)
β¨ NAME β¨
acl-getuser β bestie, this one lists out the ACL rules of a user. That's it, that's the whole job. π
It lives in the Valkey Command Manual, section 3valkey, iykyk.
π SYNOPSIS π
ACL GETUSER username
πΈ DESCRIPTION πΈ
Okay so here's the tea: this command hands you back every single rule that's been defined for an ACL user that already exists. No cap.
Specifically, it spills the whole list β the user's ACL flags, password hashes, commands, key patterns, channel patterns (added in version 6.2), and selectors (added in version 7.0). And likeβ¦ future versions might return even more stuff if more metadata gets added to the user, so don't be shocked if the shape grows. π¦
Command rules are always returned in the exact same format that valkey-acl-setuser(7) / the ACL SETUSER command uses. Before version 7.0, keys and channels came back as an array of patterns β but from version 7.0 onward they're also returned in the same format as the one used in the ACL SETUSER command. Glow-up fr. β¨
Heads up: this description of command rules reflects the user's effective permissions. So it might not be literally identical to the set of rules you used to configure the user β but it's still functionally identical. Same energy, different letter.
Selectors are listed in the order they were applied to the user, and they come with info about commands, key patterns, and channel patterns. π
π REPLY π
RESP2
One of the following, bestie:
valkey-protocol(7)Array reply: a list of ACL rule definitions for the user.valkey-protocol(7)Nil reply: if the user does not exist. π
RESP3
One of the following:
valkey-protocol(7)Map reply: a set of ACL rule definitions for the user.valkey-protocol(7)Null reply: if the user does not exist. π
β COMPLEXITY β
O(N). Where N is the number of password, command and pattern rules that the user has. So like, more rules = more work. Simple math, queen. π
π ACL CATEGORIES π
@admin @dangerous @slow
Not me casually being admin and dangerous and slow at the same time. Main character energy honestly. π
π HISTORY π
- Available since:
6.0.0 - Changed in
6.2.0: Added Pub/Sub channel patterns. - Changed in
7.0.0: Added selectors and changed the format of key and channel patterns from a list to their rule representation.
π EXAMPLES π
Here's an example configuration for a user:
127.0.0.1:6379> ACL SETUSER sample on nopass +GET allkeys &* (+SET ~key2)
"OK"
127.0.0.1:6379> ACL GETUSER sample
1) "flags"
2) 1) "on"
2) "allkeys"
3) "nopass"
3) "passwords"
4) (empty array)
5) "commands"
6) "+@all"
7) "keys"
8) "~*"
9) "channels"
10) "&*"
11) "selectors"
12) 1) 1) "commands"
6) "+SET"
7) "keys"
8) "~key2"
9) "channels"
10) "&*"
Look at that selector sitting pretty at number 12. Ate. π₯
π§ SEE ALSO π§
acl(3valkey), acl-cat(3valkey), acl-deluser(3valkey), acl-dryrun(3valkey), acl-genpass(3valkey), acl-help(3valkey), acl-list(3valkey), acl-load(3valkey), acl-log(3valkey), acl-save(3valkey), acl-setuser(3valkey), acl-users(3valkey), acl-whoami(3valkey), bgrewriteaof(3valkey), bgsave(3valkey), command(3valkey), command-count(3valkey), command-docs(3valkey), command-getkeys(3valkey), command-getkeysandflags(3valkey), command-help(3valkey), command-info(3valkey), command-list(3valkey), commandlog(3valkey), commandlog-get(3valkey), commandlog-help(3valkey), commandlog-len(3valkey), commandlog-reset(3valkey), config(3valkey), config-get(3valkey), config-help(3valkey), config-resetstat(3valkey), config-rewrite(3valkey), config-set(3valkey), dbsize(3valkey), debug(3valkey), failover(3valkey), flushall(3valkey), flushdb(3valkey), info(3valkey), lastsave(3valkey), latency(3valkey), latency-doctor(3valkey), latency-graph(3valkey), latency-help(3valkey), latency-histogram(3valkey), latency-history(3valkey), latency-latest(3valkey), latency-reset(3valkey), lolwut(3valkey), memory(3valkey), memory-doctor(3valkey), memory-help(3valkey), memory-malloc-stats(3valkey), memory-purge(3valkey), memory-stats(3valkey), memory-usage(3valkey), module(3valkey), module-help(3valkey), module-list(3valkey), module-load(3valkey), module-loadex(3valkey), module-unload(3valkey), monitor(3valkey), psync(3valkey), replconf(3valkey), replicaof(3valkey), restore-asking(3valkey), role(3valkey), save(3valkey), shutdown(3valkey), slowlog(3valkey), slowlog-get(3valkey), slowlog-help(3valkey), slowlog-len(3valkey), slowlog-reset(3valkey), swapdb(3valkey), sync(3valkey), time(3valkey)
And that's the whole page, bestie β this edition is version 9.0.0, dated 2025-10-21, and it's giving ACL-GETUSER(3valkey) in the Valkey Command Manual. Slay, go read your ACLs. π«Άβ¨
π¦ where this page comes from
- fedora 44: valkey-doc 9.0.3-2.fc44 Β· CC-BY-SA-4.0
- fedora 44: valkey-doc 9.0.6-1.fc44 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms