All Products
Search
Document Center

ApsaraMQ for RabbitMQ:Manage static usernames and passwords

更新時間:May 22, 2024

When you access an ApsaraMQ for RabbitMQ broker from an open source RabbitMQ client, you must specify the username and password for authentication. You can access the ApsaraMQ for RabbitMQ broker only after the authentication is passed. This topic describes how to create and delete static usernames and passwords in the ApsaraMQ for RabbitMQ console.

Background information

Usernames and passwords of ApsaraMQ for RabbitMQ instances can be generated by using AccessKey IDs and AccessKey secrets provided by Alibaba Cloud Resource Access Management (RAM). For more information, see Create a pair of static username and password.

Important

If you use an SDK to send and receive messages on your client, we recommend that you use persistent connections. This way, the client does not need to establish connections every time the client sends and receives messages. Frequent establishment of connections consumes a large number of network and broker resources and may trigger protection against SYN flood attacks on the broker. For more information, see Connection.

Usage notes

  • The account that you use to log on to the ApsaraMQ for RabbitMQ console is an Alibaba Cloud account or a RAM user that is granted the permissions to view, create, and delete static usernames and passwords. For information about account permissions and authorization operations, see RAM policies and Grant permissions to RAM users.

  • The instance for which you want to create and delete a pair of static username and password is in the Running state.

  • Permissions that are granted by using an AccessKey pair are applicable to all resources in the Alibaba Cloud account. Multiple instances in an Alibaba Cloud account can share an AccessKey pair. Different usernames and passwords are generated for instances that use the same AccessKey pair.

  • If you want to update an existing pair of username and password, delete the existing pair of username and password and create a new pair of username and password.

Create a pair of static username and password

  1. Log on to the ApsaraMQ for RabbitMQ console. In the left-side navigation pane, click Instances.

  2. In the top navigation bar of the Instances page, select the region where the instance that you want to manage resides. Then, in the instance list, click the name of the instance that you want to manage.

  3. In the left-side navigation pane, click Static Accounts.

  4. On the Static Accounts page, click Create Username/Password.

  5. In the Create Username/Password panel, configure the AccessKey ID and AccessKey Secret parameters and click OK.

    Note

    You can obtain the values of the AccessKey ID and AccessKey Secret parameters in the RAM console. For more information, see Create an AccessKey pair.

    On the Static Accounts page, the created pair of static username and password appears. The password is masked.用户名密码

  6. In the Password column of the created pair of static username and password, click Display to view the password.

Delete a pair of static username and password

Warning

If a pair of static username and password is deleted or the AccessKey pair used to create the static username and password is disabled or deleted, the pair of static username and password becomes invalid. If a client uses the pair of static username and password to access ApsaraMQ for RabbitMQ, the access request is rejected.

  1. On the Static Accounts page, find the pair of static username and password that you want to manage and click Delete in the Actions column.

  2. In the Note message, click OK.

    The deleted pair of static username and password no longer appears on the Static Accounts page.

Related operations

After you create a pair of static username and password, you can access ApsaraMQ for RabbitMQ from an open source RabbitMQ client by using the static username and password. For more information, see Supported SDKs.

Note

Before you use the AccessKey pair of a RAM user to create a pair of static username and password that is used to access ApsaraMQ for RabbitMQ to send and receive messages, make sure that the RAM user is granted the required permissions to send and receive messages. For more information, see RAM policies.