AUTH(3valkey)

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

πŸ’– AUTH πŸ’–

okay bestie, welcome to AUTH(3valkey) β€” the Valkey command manual page that's literally just about proving you are who you say you are. gatekeeping but make it secure πŸ’…


✨ NAME ✨

auth β€” authenticates the connection. that's it. that's the whole vibe. 🫢


🌸 SYNOPSIS 🌸

AUTH [username] password

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. AUTH authenticates the current connection using the valkey-acl(7) Valkey ACL system. like, it's the bouncer at the door of the club and your password is the fit check. πŸ‘‘

The standard way to AUTH is the two-argument form:

AUTH <username> <password>

This authenticates the current connection with one of the users defined in the ACL list (peep valkey-acl-setuser(7) ACL SETUSER and the official valkey-acl(7) ACL guide for more info, iykyk).

When the single argument form of the command is used, where only the password is specified, it is assumed that the implicit username is β€œdefault”. lowkey convenient.

AUTH <password>

This form authenticates against the β€œdefault” user's password set with requirepass. yes, the default user. the main character. ✨

If the password provided via AUTH matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. slay. Otherwise, an error is returned and the clients needs to try a new password. not me getting rejected 😭 try again bestie.

πŸ” Security notice πŸ”

Because of the high performance nature of Valkey, it is possible to try a lot of passwords in parallel in very short time, so make sure to generate a strong and very long password so that this attack is infeasible. fr fr, do NOT be out here using password123. πŸ’€

A good way to generate strong passwords is via the valkey-acl-genpass(7) ACL GENPASS command. use it. it's iconic. 🌈


πŸ’Œ REPLY πŸ’Œ

valkey-protocol(7) Simple string reply: OK, or an error if the password, or username/password pair, is invalid. so either you're in, or you're not. no in-between, periodt.


⚑ COMPLEXITY ⚑

O(N) where N is the number of passwords defined for the user. math girlies rise 🧚


πŸŽ€ ACL CATEGORIES πŸŽ€

@connection @fast


πŸ“œ HISTORY πŸ“œ

  • Available since: 1.0.0
  • Changed in 6.0.0: Added ACL style (username and password).

so she's been around a minute and then got a glow-up in 6.0.0. growth. 🌱


πŸ‘€ SEE ALSO πŸ‘€


okay that's the whole page bestie, go forth and authenticate responsibly 🫢

and that's a wrap!! this little manual moment is brought to you by version 9.0.0, dated 2025-10-21 β€” the AUTH(3valkey) era. mwah πŸ’‹ stay safe, stay authenticated, stay slay. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from