From d1e7657212a70ed1a1bd01af4a2c89d77a2b3e95 Mon Sep 17 00:00:00 2001 From: Oluwabusayo Jacobs <68024640+TropicolX@users.noreply.github.com> Date: Fri, 7 Nov 2025 08:32:48 +0100 Subject: [PATCH 1/3] Revise "The passwords property #pl7" --- stage_descriptions/auth-04-pl7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stage_descriptions/auth-04-pl7.md b/stage_descriptions/auth-04-pl7.md index 62677f30..19c834f8 100644 --- a/stage_descriptions/auth-04-pl7.md +++ b/stage_descriptions/auth-04-pl7.md @@ -23,7 +23,7 @@ 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 @@ -40,4 +40,4 @@ The tester will validate the following for the response: 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 +4. The fourth element of the array is an empty array because no passwords have been specified for the default user. From c343c24c578b6208779b421d99b6cb4ecb6605bc Mon Sep 17 00:00:00 2001 From: Oluwabusayo Jacobs <68024640+TropicolX@users.noreply.github.com> Date: Sat, 8 Nov 2025 10:20:14 +0100 Subject: [PATCH 2/3] Update ACL GETUSER command documentation Clarified the description of the 'passwords' property and updated example usage to reflect the expected response format. --- stage_descriptions/auth-04-pl7.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/stage_descriptions/auth-04-pl7.md b/stage_descriptions/auth-04-pl7.md index 19c834f8..d6cfc877 100644 --- a/stage_descriptions/auth-04-pl7.md +++ b/stage_descriptions/auth-04-pl7.md @@ -1,10 +1,9 @@ -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 -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 the user. The `default` user does not have any associated passwords unless explicitly configured: -Example usage: ```bash > ACL GETUSER default 1) "flags" @@ -13,7 +12,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 `passwords` property and its value: + +- The string `passwords`, encoded as a bulk string. +- A RESP array containing the list of passwords. Since the `default` user has none, you must hardcode this to an empty array. ### Tests @@ -23,7 +25,7 @@ The tester will execute your program like this: $ ./your_program.sh ``` -It will 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 @@ -35,9 +37,9 @@ $ redis-cli 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. +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. From 78718d0c6ac89b0c6f7addc3f426ea7556f988b0 Mon Sep 17 00:00:00 2001 From: Oluwabusayo Jacobs <68024640+TropicolX@users.noreply.github.com> Date: Sun, 9 Nov 2025 05:42:57 +0100 Subject: [PATCH 3/3] Enhance documentation for ACL GETUSER passwords property Clarify the description of the 'passwords' property and its expected response format for the 'ACL GETUSER' command. --- stage_descriptions/auth-04-pl7.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/stage_descriptions/auth-04-pl7.md b/stage_descriptions/auth-04-pl7.md index d6cfc877..b010f2bb 100644 --- a/stage_descriptions/auth-04-pl7.md +++ b/stage_descriptions/auth-04-pl7.md @@ -1,8 +1,10 @@ In this stage, you'll add support for responding to the `ACL GETUSER` command with the `passwords` property. -### The `passwords` property +### The `passwords` Property -The `passwords` property lists all hash-encoded passwords associated with the user. The `default` user does not have any associated passwords unless explicitly configured: +The `passwords` property lists all hash-encoded passwords associated with a user. + +The `default` user does not have any associated passwords unless explicitly configured: ```bash > ACL GETUSER default @@ -12,10 +14,10 @@ The `passwords` property lists all hash-encoded passwords associated with the us 4) (empty array) ``` -Your `ACL GETUSER` response must now include the `passwords` property and its value: +Your `ACL GETUSER` response must now include the following: -- The string `passwords`, encoded as a bulk string. -- A RESP array containing the list of passwords. Since the `default` user has none, you must hardcode this to an empty array. +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 @@ -28,9 +30,8 @@ $ ./your_program.sh 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"