ACL-GENPASS(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

✨ ACL-GENPASS ✨

the 3valkey manual page, bestie β€” aka the glow-up password generator for your ACL users πŸŽ€


NAME πŸ’–

acl-genpass β€” generates a pseudorandom, secure password that can be used to identify ACL users. no cap, it's literally a password printer.


SYNOPSIS ✨

ACL GENPASS [bits]

DESCRIPTION πŸ¦‹

okay so picture this: your ACL users need a solid password so they can authenticate to the server without security risks. and here's the slay part β€” this password does not need to be remembered by humans. only by computers. so it can be very long and very strong, aka completely unguessable by an external attacker. πŸ’…

ACL GENPASS generates a password starting from /dev/urandom if that's available. and if it's not available (systems without /dev/urandom, rip), it falls back to a weaker system that is likely still better than picking a weak password by hand. πŸ™ˆ

by default (so, when /dev/urandom is available) the password is strong and can be used for other uses in the context of an application too β€” for instance creating unique session identifiers, or other kinds of unguessable and not-colliding IDs. icon status fr fr. 🌈

and the password generation is also very cheap, because we don't really ask /dev/urandom for bits at every execution. instead: at startup Valkey creates a seed using /dev/urandom, and then it uses SHA256 in counter mode, with HMAC-SHA256(seed,counter) as the primitive, in order to create more random bytes as needed. which means you, the application developer, should feel free to abuse ACL GENPASS to create as many secure pseudorandom strings as you need. go off. πŸ”₯

the command output is a hexadecimal representation of a binary string. by default it emits 256 bits β€” that's 64 hex characters bestie. πŸ‘‘

you can also pass an argument in the form of a number of bits to emit, from 1 to 1024, to change the output length. note that the number of bits you provide is always rounded to the next multiple of 4. so for instance asking for just 1 bit of password will result in 4 bits being emitted, in the form of a single hex character. math is math. 🧚


REPLY πŸ’Œ

valkey-protocol(7) Bulk string reply: pseudorandom data.

by default it contains 64 bytes, representing 256 bits of data. and if bits was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. simple as. ✨


COMPLEXITY ⭐

O(1) β€” constant time baby, it does not care how big your dreams are. πŸ’«


ACL CATEGORIES 🌊

  • @slow

HISTORY πŸ“œ

  1. Available since: 6.0.0

EXAMPLES 🌸

127.0.0.1:6379> ACL GENPASS
"dd721260bfe1b3d9601e7fbab36de6d04e2e67b0ef1c53de59d45950db0dd3cc"
127.0.0.1:6379> ACL GENPASS 32
"355ef3dd"
127.0.0.1:6379> ACL GENPASS 5
"90"

look at those strings. absolutely immaculate. random but make it fashion. πŸŽ€


SEE ALSO πŸ‘€

acl(3valkey), acl-cat(3valkey), acl-deluser(3valkey), acl-dryrun(3valkey), acl-getuser(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)


bestie if you're handing out passwords by hand in 2025 i'm gonna need you to sit down. let the machine cook. πŸ‘‘πŸ’…

and that's the whole page, mwah 🫢 stay random, stay secure, stay iconic ✨

this page is from version 9.0.0, dated 2025-10-21 β€” go forth and generate, queen. πŸŽ€πŸ’œ

πŸ“¦ where this page comes from