Updated on 2025-06-30 GMT+08:00

Creating a User and Granting Permissions

System-defined permissions in role/policy-based authorization provided by Identity and Access Management (IAM) let you control access to your SWR resources. With IAM, you can:

  • Create IAM users or user groups for personnel based on your enterprise's organizational structure. Each IAM user has their own identity credentials for accessing SWR resources.
  • Grant users only the permissions required to perform a given task based on their job responsibilities.
  • Entrust other Huawei Cloud account or cloud service to perform efficient O&M on your SWR resources.

If your Huawei Cloud account does not require individual IAM users for permissions management, you can skip this section.

This section describes the procedure for granting user permissions.

Prerequisites

Before granting permissions to user groups, learn about system-defined permissions for SWR. For details, see Permissions. To grant permissions for other services, learn about all system-defined permissions.

Process Flow

Figure 1 Process of granting SWR permissions
  1. Create a user group and assign permissions to it.

    Create a user group on the IAM console, and grant the SWR Admin permissions to the group.

  2. Create an IAM user and add it to the user group.

    Create a user on the IAM console and add the user to the group created in 1.

  3. Log in and verify permissions.

    Log in to the management console using the IAM user. Switch to the authorized region. If the following operations can be performed, the permissions are assigned successfully:

    1. Choose Service List > SoftWare Repository for Container. The SWR console is displayed.
    2. In the navigation pane, choose Organizations. Click Create Organization in the upper right corner. Enter an organization name to create an organization.
    3. In the navigation pane, choose My Images. Click Upload Through SWR in the upper right corner. Select the new organization. Upload a local image file to SWR.

System-defined Roles

Roles are a type of coarse-grained authorization mechanism that defines service-level permissions based on user responsibilities. Only a limited number of service-level roles are available for authorization. Roles are not ideal for fine-grained authorization and least privilege access.

The system-defined role preset for SWR in IAM is SWR Admin, which has all permissions for SWR.

System-defined Policies

System-defined policies preset for SWR in IAM include SWR FullAccess, SWR OperateAccess, and SWR ReadOnlyAccess.

  • SWR FullAccess: all permissions for SWR
  • SWR OperateAccess: operation permissions for SWR
  • SWR ReadOnlyAccess: read-only permissions for SWR

Custom Policies

Custom policies can be created as a supplement to the system-defined policies of SWR. For the actions that can be added to custom policies, see Permissions Policies and Supported Actions.

You can create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Create a JSON policy or edit an existing one.

For details, see Creating a Custom Policy.