diff --git a/stage_descriptions/auth-04-pl7.md b/stage_descriptions/auth-04-pl7.md index 62677f30..b010f2bb 100644 --- a/stage_descriptions/auth-04-pl7.md +++ b/stage_descriptions/auth-04-pl7.md @@ -1,10 +1,11 @@ -In this stage, you'll add support for responding to the `ACL GETUSER` command with the passwords property. +In this stage, you'll add support for responding to the `ACL GETUSER` command with the `passwords` property. -### The `passwords` property +### The `passwords` Property -A user in the Redis ACL system can have zero or more passwords associated with them. The `ACL GETUSER` command also returns the `passwords` property of the specified user. +The `passwords` property lists all hash-encoded passwords associated with a user. + +The `default` user does not have any associated passwords unless explicitly configured: -Example usage: ```bash > ACL GETUSER default 1) "flags" @@ -13,7 +14,10 @@ Example usage: 4) (empty array) ``` -The fourth element of the response is the passwords array. The default user does not have any associated passwords unless explicitly configured. This is why the passwords array is empty for the default user. +Your `ACL GETUSER` response must now include the following: + +1. The string `passwords`, encoded as a bulk string. +2. A RESP array containing the list of passwords. Since the `default` user has none, you must hardcode this to be an empty array. ### Tests @@ -23,21 +27,20 @@ The tester will execute your program like this: $ ./your_program.sh ``` -It'll then send an `ACL GETUSER` command specifying the `default` user. +It will then send an `ACL GETUSER` command specifying the `default` user: ```bash -$ redis-cli # Expect RESP array: ["flags", ["nopass"], "passwords", []] -> ACL GETUSER default +$ redis-cli ACL GETUSER default 1) "flags" 2) 1) "nopass" 3) "passwords" 4) (empty array) ``` -The tester will validate the following for the response: +The tester will validate that the response is a RESP array with four elements: 1. The first element of the array is the string `flags`, encoded as a RESP bulk string. 2. The second element of the array is a RESP array and contains the `nopass` flag. -3. The third element of the array is the string `passwords`, encoded as a RESP bulk string. -4. The fourth element of the array is an empty array because no passwords have been specified for the default user. \ No newline at end of file +3. The third element of the array is the string `passwords`, encoded as a bulk string. +4. The fourth element of the array is an empty array.