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.
Notes and Constraints
- Deleting a user will remove its authorization relationship and disconnect it from the instance.
- Available on the console only for 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 RabbitMQ console.
- Click
in the upper left corner to select the region where your instance is located. - 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.
- Click OK.
View the new user on the user list page.
- 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 RabbitMQ console.
- Click
in the upper left corner to select the region where your instance is located. - 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.
- Edit user parameters by referring to Table 2.
Table 2 Parameters for editing a user Parameter
How to Edit
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.
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 RabbitMQ console.
- Click
in the upper left corner to select the region where your instance is located. - Click an instance name to go to the instance details page.
- In the navigation pane, choose Users.
- In the row containing the user to be deleted, click Delete.
Deleting a user will remove its authorization relationship and disconnect it from the instance.
- Click OK.
The user is deleted when it is removed from the user list.
Related Documents
- To create an ACL user by calling an API, see Creating a User.
- To delete an ACL user by calling an API, see Deleting Users.