From a3c3abaab31716ae56c7498ea72d32df008398b2 Mon Sep 17 00:00:00 2001 From: Oluwabusayo Jacobs <68024640+TropicolX@users.noreply.github.com> Date: Fri, 7 Nov 2025 08:30:50 +0100 Subject: [PATCH 1/2] Revise "The nopass flag #ql6" --- stage_descriptions/auth-03-ql6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stage_descriptions/auth-03-ql6.md b/stage_descriptions/auth-03-ql6.md index 4c68191a..59ebf288 100644 --- a/stage_descriptions/auth-03-ql6.md +++ b/stage_descriptions/auth-03-ql6.md @@ -27,7 +27,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 # Expect RESP array: ["flags", ["nopass"]] @@ -40,4 +40,4 @@ $ redis-cli 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. \ No newline at end of file +2. The second element of the array is a RESP array, and contains the `nopass` flag. From 09eb3712bfd87f059b8373306d5eab25b519a9ca Mon Sep 17 00:00:00 2001 From: Oluwabusayo Jacobs <68024640+TropicolX@users.noreply.github.com> Date: Sat, 8 Nov 2025 09:50:14 +0100 Subject: [PATCH 2/2] Enhance documentation for 'nopass' flag in Redis Clarified the behavior of the 'nopass' flag and its implications for user authentication. Updated example usage and testing requirements for the 'ACL GETUSER' command. --- stage_descriptions/auth-03-ql6.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/stage_descriptions/auth-03-ql6.md b/stage_descriptions/auth-03-ql6.md index 59ebf288..87f04bb9 100644 --- a/stage_descriptions/auth-03-ql6.md +++ b/stage_descriptions/auth-03-ql6.md @@ -2,22 +2,24 @@ In this stage, you'll add support for responding to the `ACL GETUSER` command wi ### The `nopass` flag -The `nopass` flag is one of the user flags in Redis. +The `nopass` flag is one of the user flags in Redis. It controls the password authentication behaviour: -- If the `nopass` flag is set for a user, the authentication succeeds with an arbitrary password for the user. -- Setting the `nopass` flag clears the associated passwords for the given user. -- The default user has the `nopass` flag set. Due to this, new connections are automatically authenticated as the `default` user. (This behavior can be changed, and we'll get to this in the later stages.) +- If `nopass` is set for a user, authentication succeeds with any password (or no password) +- Setting `nopass` clears any passwords associated with the user -Example usage: +The `default` user has `nopass` set by default, which is why new connections are automatically authenticated. + +For example: ```bash > ACL GETUSER default 1) "flags" 2) 1) "nopass" +... ``` -The flags are encoded as a RESP array of bulk strings. Each flag is a bulk string (e.g., `nopass`). We'll get to enforcing the behavior of the `nopass` flag in later stages. +The flags are encoded as a RESP array of bulk strings. -In this stage, you only need to respond to the `ACL GETUSER` command with the `nopass` flag set. +For this stage, you only need to respond to the `ACL GETUSER` command with the `nopass` flag set. We'll get to enforcing the behavior of the `nopass` flag in later stages. ### Tests @@ -37,7 +39,6 @@ $ redis-cli 2) 1) "nopass" ``` -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. +The tester will verify that the response is a RESP array with two elements: +1. The first element is the bulk string `flags`. +2. The second element is a RESP array containing one element: the bulk string `nopass`.