You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/commands/acl-setuser.md
+30-13Lines changed: 30 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,12 +98,39 @@ For information on persisting ACLs, see the [ACL tutorial]({{< relref "/operate/
98
98
99
99
The following documentation is a reference manual about the capabilities of this command, however our [ACL tutorial]({{< relref "/operate/oss_and_stack/management/security/acl" >}}) may be a more gentle introduction to how the ACL system works in general.
One or more ACL rules to apply to the user. See the [ACL rules](#acl-rules) section for the full list of rules.
114
+
115
+
</details>
116
+
117
+
## Examples
118
+
119
+
```
120
+
> ACL SETUSER alan allkeys +@string +@set -SADD >alanpassword
121
+
+OK
122
+
> ACL SETUSER antirez heeyyyy
123
+
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
124
+
```
125
+
126
+
## Details
127
+
128
+
### ACL rules
102
129
103
130
Redis ACL rules are split into two categories: rules that define command permissions or _command rules_, and rules that define the user state or _user management rules_.
104
131
This is a list of all the supported Redis ACL rules:
105
132
106
-
### Command rules
133
+
####Command rules
107
134
108
135
*`~<pattern>`: Adds the specified key pattern (glob style pattern, like in the [`KEYS`]({{< relref "/commands/keys" >}}) command), to the list of key patterns accessible by the user. This grants both read and write permissions to keys that match the pattern. You can add multiple key patterns to the same user. Example: `~objects:*`
109
136
*`%R~<pattern>`: (Available in Redis 7.0 and later) Adds the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions]({{< relref "/operate/oss_and_stack/management/security/acl#key-permissions" >}}) for more information.
@@ -122,7 +149,7 @@ This is a list of all the supported Redis ACL rules:
122
149
*`-@<category>`: Like `+@<category>` but removes all the commands in the category instead of adding them.
123
150
*`nocommands`: Alias for `-@all`. Removes all the commands, and the user is no longer able to execute anything.
124
151
125
-
### User management rules
152
+
####User management rules
126
153
127
154
*`on`: Set the user as active, it will be possible to authenticate as this user using `AUTH <username> <password>`.
128
155
*`off`: Set user as not active, it will be impossible to log as this user. Please note that if a user gets disabled (set to off) after there are connections already authenticated with such a user, the connections will continue to work as expected. To also kill the old connections you can use [`CLIENT KILL`]({{< relref "/commands/client-kill" >}}) with the user option. An alternative is to delete the user with [`ACL DELUSER`]({{< relref "/commands/acl-deluser" >}}), that will result in all the connections authenticated as the deleted user to be disconnected.
@@ -135,16 +162,6 @@ This is a list of all the supported Redis ACL rules:
135
162
*`clearselectors`: (Available in Redis 7.0 and later) Deletes all of the selectors attached to the user.
136
163
*`reset`: Removes any capability from the user. They are set to off, without passwords, unable to execute any command, unable to access any key.
137
164
138
-
## Examples
139
-
140
-
```
141
-
> ACL SETUSER alan allkeys +@string +@set -SADD >alanpassword
142
-
+OK
143
-
144
-
> ACL SETUSER antirez heeyyyy
145
-
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
Copy file name to clipboardExpand all lines: content/commands/command-docs.md
+37-20Lines changed: 37 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,29 +47,38 @@ The following keys may be included in the mapped reply:
47
47
***since:** the Redis version that added the command (or for module commands, the module version).
48
48
***group:** the functional group to which the command belongs.
49
49
Possible values are:
50
-
-_bitmap_
51
-
-_cluster_
52
-
-_connection_
53
-
-_generic_
54
-
-_geo_
55
-
-_hash_
56
-
-_hyperloglog_
57
-
-_list_
58
-
-_module_
59
-
-_pubsub_
60
-
-_scripting_
61
-
-_sentinel_
62
-
-_server_
63
-
-_set_
64
-
-_sorted-set_
65
-
-_stream_
66
-
-_string_
67
-
-_transactions_
50
+
- array
51
+
- bf
52
+
- bitmap
53
+
- cf
54
+
- cluster
55
+
- cms
56
+
- connection
57
+
- generic
58
+
- geo
59
+
- hash
60
+
- hyperloglog
61
+
- json
62
+
- list
63
+
- pubsub
64
+
- scripting
65
+
- search
66
+
- server
67
+
- set
68
+
- sorted-set
69
+
- stream
70
+
- string
71
+
- suggestion
72
+
- tdigest
73
+
- timeseries
74
+
- topk
75
+
- transactions
76
+
- vector_set
68
77
***complexity:** a short explanation about the command's time complexity.
69
78
***doc_flags:** an array of documentation flags.
70
79
Possible values are:
71
-
-_deprecated:_ the command is deprecated.
72
-
-_syscmd:_ a system command that isn't meant to be called by users.
80
+
-deprecated: the command is deprecated.
81
+
-syscmd: a system command that isn't meant to be called by users.
73
82
***deprecated_since:** the Redis version that deprecated the command (or for module commands, the module version)..
74
83
***replaced_by:** the alternative for a deprecated command.
75
84
***history:** an array of historical notes describing changes to the command's output or arguments. It should not contain information about behavioral changes.
@@ -81,6 +90,14 @@ The following keys may be included in the mapped reply:
Returns [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}) of keys from a full Redis command.
40
39
41
40
`COMMAND GETKEYS` is a helper command to let you find the keys
42
-
from a full Redis command.
41
+
from the provided Redis `command`.
43
42
44
-
[`COMMAND`]({{< relref "/commands/command" >}}) provides information on how to find the key names of each command (see `firstkey`, [key specifications]({{< relref "develop/reference/key-specs#logical-operation-flags" >}}), and `movablekeys`),
45
-
but in some cases it's not possible to find keys of certain commands and then the entire command must be parsed to discover some / all key names.
46
-
You can use `COMMAND GETKEYS` or [`COMMAND GETKEYSANDFLAGS`]({{< relref "/commands/command-getkeysandflags" >}}) to discover key names directly from how Redis parses the commands.
43
+
44
+
[`COMMAND`]({{< relref "/commands/command" >}}) describes how Redis identifies key names for each command, including `firstkey`, [key specifications]({{< relref "develop/reference/key-specs#logical-operation-flags" >}}), and `movablekeys`. For some commands, Redis can identify the keys only by parsing the full command. Use COMMAND GETKEYS or [`COMMAND GETKEYSANDFLAGS`]({{< relref "/commands/command-getkeysandflags" >}}) to get the key names directly from the Redis command parser.
0 commit comments