Configuring RabbitMQ ACL Users
When ACL is enabled for a RabbitMQ instance, message production and consumption require authentication.
This section describes how to create, edit, and delete a user.
RabbitMQ ACL users can be configured on the console only in RabbitMQ AMQP-0-9-1. By default, you can create users on the management UI, and assign permissions for RabbitMQ 3.x.x instances.
Prerequisites
- A RabbitMQ AMQP-0-9-1 instance has been purchased.
- ACL has been enabled.
Creating a User
- Log in to the console.
- In the upper left corner, click and select a region.
Select the region where your RabbitMQ instance is in.
- Click and choose Middleware > Distributed Message Service for RabbitMQ to open the console of DMS for RabbitMQ.
- Click an instance name to go to the instance details page.
- In the navigation pane, choose Users.
- Click Create User.
- Configure the user's name and other parameters by referring to Table 1.
Table 1 User parameters Parameter
Description
Username
You can customize a username that complies with the rules: 7–64 characters; starts with a letter; can contain only letters, digits, hyphens (-), and underscores (_).
The name cannot be changed after the user is created.
Password
Password of the user.
A password must meet the following requirements:
- Contains 8 to 32 characters.
- Contains at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters `~! @#$ %^&*()-_=+\|[{}];:'",<.>? and spaces, and cannot start with a hyphen (-).
- Cannot be the username spelled forwards or backwards.
Confirm Password
Enter the password again.
Vhost
- Accessible Virtual Host: Select a virtual host from the drop-down list box.
- Assignable Resource: Use regular expressions to grant user permissions for virtual host resources. For example, ^test-.* grants the user permissions for all the resources whose names start with test-.
- Writable Resource: Use regular expressions to grant user write permissions for virtual host resources. For example, .*, grants user write permissions for all virtual host resources.
- Readable Resource: Use regular expressions to grant user read permissions for virtual host resources. For example, .* grants user read permissions for all virtual host resources.
Click Add to add virtual hosts as required.
Figure 1 Creating a User
- Click OK.
- After ACL is enabled, user authentication information (username and password) must be added to both the producer and consumer configurations. For details, see the following instructions:
Modifying User Information
- Log in to the console.
- In the upper left corner, click and select a region.
Select the region where your RabbitMQ instance is in.
- Click and choose Middleware > Distributed Message Service for RabbitMQ to open the console of DMS for RabbitMQ.
- Click an instance name to go to the instance details page.
- In the navigation pane, choose Users.
- In the row containing the desired user, click Edit.
- To edit the password, click Edit next to Password and enter a new password. To edit the virtual host:
- Accessible Virtual Host: Select a virtual host from the drop-down list box.
- Assignable Resource: Use regular expressions to grant user permissions for virtual host resources. For example, ^test-.* grants the user permissions for all the resources whose names start with test-.
- Writable Resource: Use regular expressions to grant user write permissions for virtual host resources. For example, .*, grants user write permissions for all virtual host resources.
- Readable Resource: Use regular expressions to grant user read permissions for virtual host resources. For example, .* grants user read permissions for all virtual host resources.
- Click OK.
Deleting a User
- Log in to the console.
- In the upper left corner, click and select a region.
Select the region where your RabbitMQ instance is in.
- Click and choose Middleware > Distributed Message Service for RabbitMQ to open the console of DMS for RabbitMQ.
- Click an instance name to go to the instance details page.
- In the navigation pane, choose Users.
- In the row containing the desired user, click Delete.
- Click OK.
Deleting a user will remove its authorization relationship and disconnect it from the instance.
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