Help Center> Ubiquitous Cloud Native Service> User Guide> Permissions> UCS Resource Permissions (IAM Authorization)
Updated on 2024-06-17 GMT+08:00

UCS Resource Permissions (IAM Authorization)

UCS resources include container fleets, clusters, and federation instances. Administrators can grant different permissions to different user roles (such as development and O&M) to control their use of UCS resources. UCS resource permissions are granted following the IAM system policies.

IAM grants permissions to users through user groups. Before granting permissions to a user group, read the UCS system policies that can be added to the user group and the minimum permissions required by UCS. To learn about the permission policies of other cloud services, see System Permissions.

Permission Granting Process

This section uses the UCS ReadOnlyAccess policy as an example to describe how to grant permissions to a user. Figure 1 shows the process.

Figure 1 Process for granting UCS permissions to a user
  1. Create a user group and grant permissions.

    Create a user group on the IAM console as the administrator, and grant UCS permissions, for example, the UCS ReadOnlyAccess policy to the group.

    UCS is a global service deployed in all physical regions. When granting permissions, set the authorization scope to All resources.

  2. Create an IAM user and add the user 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 the permissions.

    Log in to the console as an IAM user and verify the permissions (assume that the user has only the UCS ReadOnlyAccess policy).

    • Choose UCS from Service List of Huawei Cloud. In the left navigation pane, choose Infrastructure > Fleets. If a message is displayed indicating that you do not have the access permission when you create a fleet or register a cluster, the UCS ReadOnlyAccess permission has taken effect.
    • Choose another service (such as ECS) in Service List of Huawei Cloud. If a message is displayed indicating insufficient permissions, the UCS ReadOnlyAccess policy has taken effect.

System Policies

The preset UCS system policies of IAM include UCS FullAccess, UCS CommonOperations, UCS CIAOperations, and UCS ReadOnlyAccess.

  • UCS FullAccess: UCS administrator with full permissions, including creating permission policies and security policies
  • UCS CommonOperations: Common UCS user with permissions for creating workloads, distributing traffic, and other operations
  • UCS CIAOperations: CIA administrator with full permissions in UCS
  • UCS ReadOnlyAccess: Read-only permissions on UCS (except for CIA)

You can check a policy to learn about the actions supported by a system policy. An action is in the format of Service name:Resource type:Operation. The wildcard (*) is allowed, indicating all actions.

The following is an example of the UCS FullAccess policy. This policy contains all permissions on UCS, CCE, and SWR, and operation permissions on some resources of services such as AOM, SMN, and DNS.

{
    "Version": "1.1",
    "Statement": [
        {
            "Action": [
                "ucs:*:*",
                "cce:*:*",
                "swr:*:*",
                "aom:*:get",
                "aom:*:list",
                "smn:*:list",
                "dns:*:get*",
                "dns:*:list*",
                "dns:*:get",
                "dns:*:list",
                "dns:recordset:create",
                "dns:recordset:delete",
                "dns:recordset:update",
                "dns:tag:get",
                "lts:*:get",
                "lts:*:list",
                "apm:*:get",
                "apm:*:list",
                "vpcep:epservices:*",
                "vpcep:connections:*",
                "vpcep:endpoints:*",
                "elb:*:get",
                "elb:*:list",
                "vpc:*:get",
                "vpc:*:list",
                "ief:*:get",
                "ief:*:list",
                "cgs:images:operate",
                "cgs:*:get",
                "cgs:*:list"
            ],
            "Effect": "Allow"
        }
    ]
}

Minimum Permissions Required by UCS

Services on Huawei Cloud are interdependent, and UCS depends on other cloud services to implement some functions, such as image repository and domain name resolution. The preceding four system policies are often used together with roles or policies of other cloud services for refined permission granting. When granting permissions to IAM users, the administrator must comply with the principle of least privilege. Table 1 lists the minimum permissions required by the administrator, operation, and read-only permissions of each UCS function.

  • For the first login of your Huawei Cloud account to the UCS console, you need to grant permissions to the account. Then UCS will create an agency named ucs_admin_trust for you in IAM. Do not delete or modify the agency.
  • If the user group of an IAM user is not granted any permissions, you cannot access the UCS console. See Table 1.
Table 1 Minimum permissions required by UCS

Description

Permission Type

Permission

Minimum Permission

Fleet

Admin

  • Creating and deleting a fleet
  • Registering a Huawei Cloud cluster (CCE cluster and CCE Turbo cluster) , on-premises cluster, or attached cluster
  • Unregistering a cluster
  • Adding a cluster to or removing a cluster from a fleet
  • Associating permission policies with a cluster or fleet
  • Enabling cluster federation and performing federation management operations (such as creating a federated workload and creating domain name access)

UCS FullAccess

Viewer

Querying clusters and fleets or their details

UCS ReadOnlyAccess

Huawei Cloud clusters

Admin

Read-write permissions on Huawei Cloud clusters and all Kubernetes resource objects (including nodes, workloads, jobs, and services)

UCS FullAccess + CCE Administrator

Operation

Read-write permissions on Huawei Cloud clusters and most Kubernetes resource objects and read-only permissions on Kubernetes resource objects such as namespaces and resource quotas

UCS CommonOperations + CCE Administrator

Viewer

Read-only permissions on Huawei Cloud clusters and all Kubernetes resource objects (including nodes, workloads, jobs, and services)

UCS ReadOnlyAccess + CCE Administrator

On-premises/Attached/Multi-cloud clusters

Admin

Read-write permissions on on-premises/attached/multi-cloud clusters and all Kubernetes resource objects (including nodes, workloads, jobs, and services)

UCS FullAccess

Operation

Read-write permissions on on-premises/attached/multi-cloud clusters and most Kubernetes resource objects and read-only permissions on Kubernetes resource objects such as namespaces and resource quotas

UCS CommonOperations + UCS RBAC (The list permission for namespaces is required.)

Viewer

Read-only permissions on on-premises/attached/multi-cloud clusters and all Kubernetes resource objects (including nodes, workloads, jobs, and services)

UCS ReadOnlyAccess + UCS RBAC (The list permission for namespaces is required.)

Image repository

Admin

All permissions on SoftWare Repository for Container (SWR), including creating organizations, uploading images, viewing images or details, and downloading images

SWR Administrator

Permissions

Admin

  • Creating and deleting a permission policy
  • Viewing permissions or details
NOTE:

When creating a permission policy, you need to grant the IAM ReadOnlyAccess permission (read-only permissions on IAM) to IAM users to obtain the IAM user list.

UCS FullAccess + IAM ReadOnlyAccess

Viewer

Viewing permissions or details

UCS ReadOnlyAccess + IAM ReadOnlyAccess

Policy Center

Admin

  • Enabling the Policy Center
  • Creating and disabling a policy
  • Querying policies
  • Viewing policy implementation details

UCS FullAccess

Viewer

For fleets and clusters with Policy Center enabled, users with this permission can view policies and policy implementation details.

UCS CommonOperations or UCS ReadOnlyAccess

Traffic distribution

Admin

Operations such as creating a traffic policy, suspending and deleting a scheduling policy

(Recommended) UCS CommonOperations + DNS Administrator

or

UCS FullAccess + DNS Administrator

Viewer

Viewing traffic policies or details

UCS ReadOnlyAccess + DNS Administrator

CIA

Admin

  • Connecting clusters to a fleet or canceling cluster connection
  • Viewing monitoring data in multiple aspects, such as infrastructure and application workload

UCS CIAOperations