Grant RAM user permissions (optional)

Updated at:
Copy as MD

RAM users have no permissions on ApsaraMQ for RabbitMQ resources by default. Grant permissions to allow a RAM user to manage ApsaraMQ for RabbitMQ resources and send and receive messages.

Background information

Skip this step if you use an Alibaba Cloud account. Alibaba Cloud accounts have full permissions on ApsaraMQ for RabbitMQ by default.

To check your account role:

Log on to the ApsaraMQ for RabbitMQ console and check the upper-right corner. If Alibaba Cloud Account appears below Account ID, no action is needed. If RAM User appears, proceed with this topic.

Access policies for ApsaraMQ for RabbitMQ

ApsaraMQ for RabbitMQ provides the following system policies. Choose a policy based on the permission scope you need.

Policy

Description

AliyunAMQPFullAccess

The management permissions on your ApsaraMQ for RabbitMQ resources. If you use this policy to grant permissions to RAM users, the RAM users are granted the permissions that are equivalent to the permissions of an Alibaba Cloud account. This means that the RAM users are granted the permissions to manage all ApsaraMQ for RabbitMQ resources of the Alibaba Cloud account, and to send and receive messages by using SDKs.

AliyunAMQPReadOnlyAccess

The read-only permissions on your ApsaraMQ for RabbitMQ resources. If you use this policy to grant permissions to RAM users, the RAM users can query the data of all ApsaraMQ for RabbitMQ resources of the Alibaba Cloud account.

To grant permissions on specific resources, create a custom policy. Custom access policies for ApsaraMQ for RabbitMQ.

Grant permissions to a RAM user

  1. Log on to the RAM console as a RAM administrator.

  2. In the left-side navigation pane, choose Identities > Users.

  3. On the Users page, find the required RAM user, and click Add Permissions in the Actions column.

    You can also select multiple RAM users and click Add Permissions in the lower part of the page to grant permissions to the RAM users at a time.

  4. In the Grant Permission panel, grant permissions to the RAM user.

    1. Configure the Resource Scope parameter.

      • Account: The authorization takes effect on the current Alibaba Cloud account.

      • Resource Group: The authorization takes effect on a specific resource group.

        Important

        If you select Resource Group for the Resource Scope parameter, make sure that the required cloud service supports resource groups. For more information, see Services that work with Resource Group. For more information about how to grant permissions on a resource group, see Control RAM user access to specific ECS instances.

    2. Configure the Principal parameter.

      The principal is the RAM user to which you want to grant permissions. The current RAM user is automatically selected.

    3. Configure the Policy parameter.

      A policy contains a set of permissions. Policies can be classified into system policies and custom policies. You can select multiple policies at a time.

      • System policies: policies that are created by Alibaba Cloud. You can use but cannot modify these policies. Version updates of the policies are maintained by Alibaba Cloud. For more information, see Services that support RAM.

        Note

        The system automatically identifies high-risk system policies, such as AdministratorAccess and AliyunRAMFullAccess. We recommend that you do not grant unnecessary permissions by attaching high-risk policies.

      • Custom policies: You can manage and update custom policies based on your business requirements. You can create, update, and delete custom policies. For more information, see Create a custom policy.

    4. Click OK.

  5. Click Close.

Next steps

Step 2: Create resources

Step 3: Use an SDK to send and receive messages

References

System policies are predefined by Alibaba Cloud and cannot be modified. For fine-grained permission control, create a custom policy.

ApsaraMQ for RabbitMQ supports custom policies for fine-grained access control. Custom access policies for ApsaraMQ for RabbitMQ.