Skip to content

Commit 09eb371

Browse files
authored
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.
1 parent a3c3aba commit 09eb371

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

stage_descriptions/auth-03-ql6.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@ In this stage, you'll add support for responding to the `ACL GETUSER` command wi
22

33
### The `nopass` flag
44

5-
The `nopass` flag is one of the user flags in Redis.
5+
The `nopass` flag is one of the user flags in Redis. It controls the password authentication behaviour:
66

7-
- If the `nopass` flag is set for a user, the authentication succeeds with an arbitrary password for the user.
8-
- Setting the `nopass` flag clears the associated passwords for the given user.
9-
- 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.)
7+
- If `nopass` is set for a user, authentication succeeds with any password (or no password)
8+
- Setting `nopass` clears any passwords associated with the user
109

11-
Example usage:
10+
The `default` user has `nopass` set by default, which is why new connections are automatically authenticated.
11+
12+
For example:
1213
```bash
1314
> ACL GETUSER default
1415
1) "flags"
1516
2) 1) "nopass"
17+
...
1618
```
1719

18-
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.
20+
The flags are encoded as a RESP array of bulk strings.
1921

20-
In this stage, you only need to respond to the `ACL GETUSER` command with the `nopass` flag set.
22+
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.
2123

2224
### Tests
2325

@@ -37,7 +39,6 @@ $ redis-cli
3739
2) 1) "nopass"
3840
```
3941

40-
The tester will validate the following for the response:
41-
42-
1. The first element of the array is the string `flags`, encoded as a RESP bulk string.
43-
2. The second element of the array is a RESP array, and contains the `nopass` flag.
42+
The tester will verify that the response is a RESP array with two elements:
43+
1. The first element is the bulk string `flags`.
44+
2. The second element is a RESP array containing one element: the bulk string `nopass`.

0 commit comments

Comments
 (0)