Skip to content

Commit c343c24

Browse files
authored
Update ACL GETUSER command documentation
Clarified the description of the 'passwords' property and updated example usage to reflect the expected response format.
1 parent d1e7657 commit c343c24

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

stage_descriptions/auth-04-pl7.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
In this stage, you'll add support for responding to the `ACL GETUSER` command with the passwords property.
1+
In this stage, you'll add support for responding to the `ACL GETUSER` command with the `passwords` property.
22

33
### The `passwords` property
44

5-
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.
5+
The `passwords` property lists all hash-encoded passwords associated with the user. The `default` user does not have any associated passwords unless explicitly configured:
66

7-
Example usage:
87
```bash
98
> ACL GETUSER default
109
1) "flags"
@@ -13,7 +12,10 @@ Example usage:
1312
4) (empty array)
1413
```
1514

16-
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.
15+
Your `ACL GETUSER` response must now include the `passwords` property and its value:
16+
17+
- The string `passwords`, encoded as a bulk string.
18+
- A RESP array containing the list of passwords. Since the `default` user has none, you must hardcode this to an empty array.
1719

1820
### Tests
1921

@@ -23,7 +25,7 @@ The tester will execute your program like this:
2325
$ ./your_program.sh
2426
```
2527

26-
It will then send an `ACL GETUSER` command specifying the `default` user.
28+
It will then send an `ACL GETUSER` command specifying the `default` user:
2729

2830
```bash
2931
$ redis-cli
@@ -35,9 +37,9 @@ $ redis-cli
3537
4) (empty array)
3638
```
3739

38-
The tester will validate the following for the response:
40+
The tester will validate that the response is a RESP array with four elements:
3941

4042
1. The first element of the array is the string `flags`, encoded as a RESP bulk string.
4143
2. The second element of the array is a RESP array and contains the `nopass` flag.
42-
3. The third element of the array is the string `passwords`, encoded as a RESP bulk string.
43-
4. The fourth element of the array is an empty array because no passwords have been specified for the default user.
44+
3. The third element of the array is the string `passwords`, encoded as a bulk string.
45+
4. The fourth element of the array is an empty array.

0 commit comments

Comments
 (0)