Configuring DCS Redis ACL Users
If you need multiple users for a DCS Redis instance, create ACL users. ACL users can have read-only or read/write permissions.
Video Tutorial
This tutorial demonstrates how to create a user for a DCS Redis instance. As product functions evolve, the GUI may vary. This tutorial is for reference only.
Notes and Constraints
- By default, this function is supported by DCS Redis 4.0/5.0 instances.
- This function is restricted for DCS Redis 6.0 instances. To enable it, submit a ticket to contact customer service. If your DCS Redis 6.0 instance is earlier than v6.2.10.4, upgrade the minor version. For details, see Upgrading Minor or Proxy Versions of a DCS Instance.
- Up to 18 users can be created for each instance.
- Currently, ACL users support read/write and read-only permissions.
Configuring DCS Redis ACL Users
- Log in to the DCS console.
- Click
in the upper left corner of the console and select the region where your instance is located. - In the navigation pane, choose Cache Manager.
- Click a DCS instance name to go to the instance overview page.
- Choose User Management in the navigation pane.
The user whose username is default is the instance's default user. The default user has read and write permissions and their password is the instance's password.
- Click Create User.
A password-free Redis instance can only be accessed by the default user. Normal users are invalid. To use a normal user, click Reset Password in the row containing the default user to disable Password Protected for the default user.
- In the displayed Create User dialog box, enter the username and password.
- The username can contain 1 to 64 characters. It must start with a letter and can contain only letters, digits, hyphens (-), and underscores (_).
- The password can contain 8 to 64 characters and cannot be the username or the username spelled backwards. It must contain at least three types of the following characters: lowercase letters, uppercase letters, digits, and special characters `~!@#$%^&*()-_=+\|{},<.>/?
- Select Read-only or Read/Write for Permissions.
- (Optional) Read-only Routing can be selected for Proxy Cluster or read/write splitting instances.
To forward read requests of a specified user to the master node, replica node, or master/replica node, select Master, Replica, or Master and replica. Alternatively, you can disable it.
Figure 1 Selecting the read-only routing policy
- This policy is available only when the instance proxy is 5.1.14.12 or later. To upgrade the proxy, see Upgrading Minor or Proxy Versions of a DCS Instance.
- Read-only Routing is restricted. If the instance type and proxy version requirements are met, but this policy is not displayed on the console, submit a ticket to contact customer service to enable this function.
- To configure a read-only routing policy for a Proxy Cluster instance, set parameter backend-master-only to no (read/write splitting is enabled). If the parameter is set back to yes after the user is created, the configured policy becomes invalid.
- Parameter support-dispatch-to-replica-list is prior to the read-only routing policy of the ACL user on the read request forwarding. For details, see Read Request Processing Priority.
- Enter an account description as required. It can contain a maximum of 512 characters.
- Click OK. Figure 2 User management
Connecting to an Instance as an ACL User
A normal ACL user connects to an instance with password {username:password}.
- When using redis-cli to connect to an instance, the default user runs the following command:
./redis-cli -h {dcs_instance_address} -p 6379 -a {password}
- A normal ACL user runs the following command:
./redis-cli -h {dcs_instance_address} -p 6379 -a {username:password}
More Operations
The following operations can be performed on normal users.
| Operation | Description |
|---|---|
| Changing a password | Locate the row that contains the desired user and click Change Password in the Operation column. |
| Reset a password | If you forget the password or no password is set, locate the row that contains the user and click Reset Password in the Operation column. |
| Modify permissions | Locate the row containing the normal user. Choose More > Modify Permission in the Operation column. The Read-only or Read/Write permissions can be granted. For a Proxy Cluster or read/write splitting instance, click More > Modify Permission in the Operation column of the default user to select Read-only Routing. For details, see Enabling read-only routing for normal users. The default user has read and write permissions, which is fixed. |
| Edit description | Locate the row containing the normal user. Choose More > Edit Description in the Operation column. |
| Delete a user | Locate the row containing the normal user. Choose More > Delete in the Operation column. The default user cannot be deleted. |
| Batch deleting users | Select the normal users to be deleted and click Delete above the list. The default user cannot be deleted. |
Related Document
To create an ACL user by calling an API, see Account Management.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot