Help Center> Cloud Bastion Host> Service Overview> IAM-based Permissions Management
Updated on 2024-05-16 GMT+08:00

IAM-based Permissions Management

If you need to assign different permissions to employees in your enterprise to access your CBH resources, Identity and Access Management (IAM) is a good choice for fine-grained permissions management. IAM provides identity authentication, permissions management, and access control. If your account works good for you and you do not need an IAM account to manage user permissions, then you may skip over this chapter.

IAM is a free service. You only pay for the resources in your account.

With IAM, you can control the access to Huawei Cloud resources through authorization. For example, some developers in your enterprise need to use CBH but you do not want them have permissions to high-risk operations such as deleting CBH instances. To achieve such purpose, you can use IAM to grant them only the permissions to use CBH, but not delete CBH instances. With IAM, you can control their usage of CBH resources.

IAM supports role/policy-based authorization and identity policy-based authorization.

The following table describes the differences between these two authorization models.

Table 1 Differences between role/policy-based and identity policy-based authorization

Name

Core Relationship

Permission

Authorization Method

Application Scenario

Role/Policy-based authorization

User-permissions-authorization scope

  • System-defined roles
  • System-defined policies
  • Custom policies

Assigning roles or policies to principals

To authorize a user, you need to add it to a user group first and then specify the scope of authorization. It provides a limited number of condition keys and cannot meet the requirements of fine-grained permissions control. This method is suitable for small- and medium-sized enterprises.

Identity Policy-based authorization

User-policy

  • System-defined policies
  • Custom identity policies
  • Assigning identity policies to principals
  • Attaching identity policies to principals

You can authorize a user by attaching an identity policy to it. User-specific authorization and a variety of key conditions allow for more fine-grained permissions control. However, this model can be hard to set up. It requires a certain amount of expertise and is suitable for medium- and large-sized enterprises.

Assume that you want to grant IAM users permission to create ECSs in CN North-Beijing4 and OBS buckets in CN South-Guangzhou. With role/policy-based authorization, the administrator needs to create two custom policies and assign both to the IAM users. With identity policy-based authorization, the administrator only needs to create one custom identity policy and configure the condition key g:RequestedRegion for the policy, and then attach the policy to the users or grant the users the access permissions to the specified regions. Identity policy-based authorization is more flexible than role/policy-based authorization.

Policies/identity policies and actions in the two authorization models are not interoperable. You are advised to use the identity policy-based authorization model.

For more information about IAM, see IAM Service OverviewIAM Service OverviewIAM Service Overview.

Identity Policy-based Permissions Management

CBH supports identity policy-based authorization. New IAM users do not have any permissions assigned by default. You need to first add them to one or more groups and then attach policies or roles to these groups. The users then inherit permissions from the groups and can perform specified operations on cloud services based on the permissions they have been assigned.

CBH is a project-level service deployed and accessed in specific physical regions. When you set Scope to Region-specific projects and select the specified projects (for example, ap-southeast-2) in the specified regions (for example, AP-Bangkok), the users only have permissions for ECSs in the selected projects. If you set Scope to All resources, the users have permissions for ECSs in all region-specific projects. When accessing CBH, the users need to switch to a region where they have been authorized to use the CBH service.

Table 1 lists all CBH system permissions. System-defined policies in role/policy-based authorization are not interoperable with those in identity policy-based authorization.

Table 2 CBH system permissions

Role/Policy Name

Description

Type

Dependency

CBH FullAccess

All permissions (except the payment permission) on CBH instances

System-defined policies

None

CBH ReadOnlyAccess

Read-only permissions for CBH instances. Users who have read-only permissions granted can only view CBH instances but not configure services.

System-defined policies

None

CBH ServiceLinkedAgencyPolicy

Agency permissions required for CBH to access KMS and CSMS.

System-defined policies

None

Table 3 describes the common operations supported by each system-defined permission of CBH.

Table 3 Common operations supported by system-defined permissions

Operation

CBH FullAccess

CBH ReadOnlyAccess

CBH ServiceLinkedAgencyPolicy

Creating a CBH instance

x

x

Changing CBH instance specifications (changing specifications)

x

x

Querying the CBH instance list

x

Upgrading the CBH system version

x

x

Querying total ECS quota

x

x

Binding or unbinding an EIP

x

x

Restarting a CBH instance

x

x

Starting a CBH instance

x

x

Stopping a CBH instance

x

x

Querying the AZ of a CBH instance

x

x

Checking whether an IPv6 CBH instance can be created

x

x

Checking network connection between the CBH instance and the license center

x

x

Modifying the network of the CBH instance to ensure that the CBH instance can communicate with the license center

x

x

Agency permission required for CBH to access KMS and CSMS resources

x

Role/Policy Dependencies of the CBH Console

Table 4 Role/Policy dependencies of the CBH console

Console Function

Dependent Service

Role/Policy Required

Creating a CBH instance

Elastic Cloud Server (ECS)

Virtual Private Cloud (VPC)

In addition to CBH FullAccess role, the ECS CommonOperations and VPC FullAccess roles are required for an IAM user to create CBH instances on the console.

Binding or unbinding an EIP

Elastic IP (EIP)

In addition to CBH FullAccess role, the VPC FullAccess role is required for an IAM user to bind an EIP to or unbind an EIP from a CBH instance.

Updating the security group for a CBH instance

Virtual Private Cloud (VPC)

In addition to CBH FullAccess role, the VPC FullAccess role is required for an IAM user to change the security group for a CBH instance.

Reference

  • IAM Service Overview
  • Assigning Permissions Using IAM
  • Actions Supported by Identity Policy-based Authorization