Resource Access Management (RAM) allows you to separately manage the permissions of your Alibaba Cloud account and its RAM users. You can grant different permissions to different RAM users to avoid security risks caused by disclose of the AccessKey pair of your Alibaba Cloud account.

Background information

Enterprise A has activated Message Queue for RabbitMQ and wants to grant permissions on Message Queue for RabbitMQ resources, such as instances, queues, vhosts, and exchanges, to employees. Employees with different duties require different permissions. Enterprise A has the following requirements:

  • For security purposes, the enterprise does not want to disclose the AccessKey pair of its Alibaba Cloud account to employees. Instead, it prefers to create different RAM users for the employees and grant different permissions to these RAM users.
  • A RAM user can use resources only under authorization. Resource usage and costs are not separately calculated for each RAM user. All expenses are billed to the Alibaba Cloud account of the enterprise.
  • The enterprise can revoke the permissions granted to RAM users and delete RAM users at any time.

Step 1: Create a RAM user

Use the Alibaba Cloud account of the enterprise to log on to the RAM console and create a RAM user.

  1. Log on to the RAM console by using your Alibaba Cloud account.
  2. In the left-side navigation pane, choose Identities > Users.
  3. On the Users page, click Create User.
  4. On the Create User page, specify Logon Name and Display Name in the User Account Information section.
    Note You can click Add User to create multiple RAM users at a time.
  5. In the Access Mode section, select Console Access or Programmatic Access.
    • Console Access: If you select this access mode, you must complete the logon security settings. These settings specify whether to use a system-generated or custom logon password, whether the password must be reset on the next logon, and whether to enable multi-factor authentication (MFA).
      Note If you select Custom Logon Password in the Console Password section, you must specify a password. The password must meet the complexity requirements. For more information about the complexity requirements, see Configure a password policy for RAM users.
    • Programmatic Access: If you select this access mode, an AccessKey pair is automatically created for the RAM user. The RAM user can call API operations or use other development tools to access Alibaba Cloud resources.
    Note We recommend that you select only one access mode for the RAM user to ensure the security of your Alibaba Cloud account. This prevents the RAM user from using an AccessKey pair to access Alibaba Cloud resources after the RAM user leaves the organization.
  6. Click OK.

Step 2: Grant permissions to the RAM user

Grant different permissions to RAM users.

  1. Log on to the RAM console by using your Alibaba Cloud account.
  2. In the left-side navigation pane, choose Identities > Users.
  3. On the Users page, find the RAM user to which you want to grant permissions and click Add Permissions in the Actions column.
  4. In the Select Policy section of the Add Permissions panel, click System Policy or Custom Policy. Enter the keyword of the policy that you want to add in the search box, click the displayed policy to add it to the Selected list, and then click OK.
    Note For more information about the policies that can be used to access Message Queue for RabbitMQ, see RAM policies.
  5. In the Add Permissions panel, view the authorization information and click Complete.

What to do next

Employees of Enterprise A can use RAM users to access Message Queue for RabbitMQ by using the following methods:

  • Console
    1. Open the RAM Account Login page in your browser.
    2. On the RAM Account Login page, specify Username and click Next. Then, specify Password and click Login.
      Note The logon name of the RAM user is in the format of <$username>@<$AccountAlias> or <$username>@<$AccountAlias>.onaliyun.com. <$AccountAlias> is the account alias. If no account alias is specified, the ID of the Alibaba Cloud account is used.
  • API operation

    Use the AccessKey ID and AccessKey secret of the RAM user in code to make an API request to access Message Queue for RabbitMQ.