Permissions Management

If you need to assign different permissions to employees in your enterprise to access your DDM resources, IAM is a good choice for fine-grained permissions management. IAM provides identity authentication, permissions management, and access control, helping you secure access to your HUAWEI CLOUD resources.

With IAM, you can use your account to create IAM users for your employees, and assign permissions to the users to control their access to specific resource types. For example, some software developers in your enterprise need to use DDM resources but must not delete them or perform any high-risk operations. To achieve this result, you can create IAM users for the software developers and grant them only the permissions required for using DDM resources.

If your account does not need individual IAM users for permissions management, you may skip this section.

IAM is free of charge. You pay only for the resources in your account. For more information about IAM, see IAM Service Overview.

DDM Permissions

By default, new IAM users do not have any permissions granted. You need to add a user to one or more groups, and assign policies or roles to these groups. The user then inherits permissions from the groups it is a member of. This process is called authorization. After authorization, the user can perform specified operations on cloud services based on the permissions.

DDM is a project-level service deployed in specific physical regions. To assign DDM permissions to a user group, specify the scope as region-specific projects and select projects for the permissions to take effect. If All projects is selected, the permissions will take effect for the user group in all region-specific projects. When accessing DDM, users need to switch to a region where they have been authorized to use DDM.

You can grant users permissions using roles and policies.
  • Roles: A coarse-grained authorization mechanism provided by IAM to define permissions based on users' job responsibilities. This mechanism provides only a limited number of service-level roles for authorization. When using roles to grant permissions, you also need to assign other roles that the permissions depend on to take effect. However, roles are not ideal for fine-grained authorization and secure access control.
  • Policies: A fine-grained authorization mechanism that defines permissions required to perform operations on specific cloud resources under certain conditions. This mechanism allows for more flexible policy-based authorization, and meets the requirements for secure access control. For example, you can grant IAM users only the permissions for managing a certain type of DDM resources.
    Table 1 Supported system policies

    Policy Name

    Description

    Type

    Dependency

    DDM FullAccess

    Administrator permissions for DDM

    System-defined policy

    None

    DDM CommonOperations

    Common user permissions for DDM, except for permissions of creating, deleting, and scaling out DDM instances, scaling out schemas, rolling back schema scaling tasks, and changing instance class

    System-defined policy

    None

    DDM ReadOnlyAccess

    Permissions for viewing DDM

    System-defined policy

    None

The following are permission configurations of supported system policies:
  • DDM FullAccess
    {
          "Version": "1.1",
           "Statement": [{
    	    "Action": ["ddm:*:*",
    	    "rds:instance:list",
                "rds:instance:modify",
                "rds:instance:modifyParameter",
    	    "vpc:*:*",
                "ecs:*:get*",
                "ecs:*:list*",
                "ecs:cloudServerNics:update",
                "ecs:serverInterfaces:use"],
    	     "Effect": "Allow"
    		}]
    	}
  • DDM CommonOperations
    {
    	"Version": "1.1",
    	"Statement": [{
    				"Action": [
    					"vpc:*:*list*",
    					"vpc:*:*get*",
    					"vpc:ports:update",
    					"ecs:*:get*",
    					"ecs:*:list*",
    					"rds:instance:list",
    					"rds:instance:modify",
    					"rds:instance:modifyParameter"
    				],
    				"Effect": "Allow"
    				},
    				{
    					"Condition": {
    						"StringEqualsIgnoreCase": {
    							"g:ServiceName": [
    								"ddm"
    							]
    						}
    					},
    					"NotAction": [
    						"ddm:instance:create",
    						"ddm:instance:delete",
    						"ddm:database:migrate*",
    						"ddm:instance:resize",
    						"ddm:instance:extendNode"
    					],
    					"Effect": "Allow"
    		}]
    	}
  • DDM ReadOnlyAccess
    {
         "Version": "1.1",
         "Statement": [{
                        "Action": [
                            "rds:instance:list",
                            "vpc:*:*list*",
                            "vpc:*:*get*",
                            "ecs:*:get*",
                            "ecs:*:list*",
                            "ddm:*:list",
                            "ddm:*:get",
                            "ddm:instance:listParameter",
                            "ddm:instance:listRwInfo",
                            "ddm:instance:listSlowSqlInfo",
                            "ddm:rds:connectivity"
                        ],
                        "Effect": "Allow"
    		}]
    	}
Table 2 lists the common operations supported by each system policy of DDM. Please choose proper system policies according to this table.
Table 2 Common operations supported by each system policy

Operation

DDM FullAccess

DDM CommonOperations

DDM ReadOnlyAccess

Querying DDM instances

Supported

Supported

Supported

Querying details of a DDM instance

Supported

Supported

Supported

Modifying instance information, including the name and security group

Supported

Supported

Not supported

Restarting a DDM instance

Supported

Supported

Not supported

Creating a DDM instance

Supported

Not supported

Not supported

Deleting a DDM Instance

Supported

Not supported

Not supported

Changing instance class

Supported

Not supported

Not supported

Scaling out a DDM instance

Supported

Not supported

Not supported

Monitoring the read/write ratio

Supported

Supported

Supported

Monitoring slow SQL statements

Supported

Supported

Supported

Creating a schema

Supported

Supported

Not supported

Querying schemas

Supported

Supported

Supported

Querying details of a schema

Supported

Supported

Supported

Scaling out a schema

Canceling the scaling task

Supported

Not supported

Not supported

Rolling back if scaling out fails

Clearing source data when scaling out fails

Retrying if scaling out fails

Supported

Not supported

Not supported

Deleting a schema

Supported

Supported

Not supported

Querying accounts

Supported

Supported

Supported

Creating an account

Supported

Supported

Not supported

Modifying an account

Supported

Supported

Not supported

Resetting a password

Supported

Supported

Not supported

Locking and unlocking an account

Supported

Supported

Not supported

Deleting an account

Supported

Supported

Not supported

Synchronizing MySQL DB instance information

Supported

Supported

Not supported

Querying MySQL DB instances

Supported

Supported

Supported

Querying details of a MySQL DB instance

Supported

Supported

Supported

Modifying the read policy of a MySQL DB instance

Supported

Supported

Not supported

Viewing products

Supported

Supported

Supported

Creating a parameter template

Supported

Supported

Not supported

Deleting a parameter template

Supported

Supported

Not supported

Applying a parameter template

Supported

Supported

Not supported

Modifying a parameter template

Supported

Supported

Not supported

Replicating a parameter template

Supported

Supported

Not supported

Comparing two parameter templates

Supported

Supported

Supported

Querying parameter templates

Supported

Supported

Supported

Table 3 Common operations and supported actions

Category

Operation

Permission

DDM routine operations

As required

Buying a yearly/monthly instance

ddm:instance:create

Before buying a DDM instance, obtain the following dependent permissions:

  • ecs:*:get*
  • ecs:*:list*
  • vpc:vpcs:list
  • vpc:securityGroups:get
  • vpc:subnets:get
  • ecs:cloudServerNics:update
  • ecs:serverInterfaces:use
  • vpc:port:* when you want to buy a global or regional DDM instance
  • BSS Finance and BSS Operator policies

    The last permission is required only when you buy yearly/monthly DDM instances.

Querying DDM instances

ddm:instance:list

Querying details of a DDM instance

ddm:instance:get

To view details of a DDM instance, you need to configure the following permissions:

  • vpc:*:get*
  • vpc:*:list*

Modifying instance information, including the name and security group

ddm:instance:modify

To modify a security group, you need to configure the following permissions:
  • vpc:*:get*
  • vpc:*:list*
  • vpc:ports:update

Restarting a DDM instance

ddm:instance:reboot

Deleting a DDM instance

ddm:instance:delete

vpc:ports:delete

Changing instance class

ddm:instance:resize

Scaling out a DDM instance

ddm:instance:extendNode

Monitoring the read/write ratio

ddm:instance:listRwInfo

Monitoring slow SQL statements

ddm:instance:listSlowSqlInfo

DDM routine operations

Renewing a yearly/monthly DDM instance

Configure policies BSS Finance and BSS Operator as follows: The configuration procedure is as follows:

  1. Log in to the IAM console.
  2. In the navigation pane, click User Groups.
  3. Choose More > Assign Permissions.
  4. Click Attach Policy in the same row as the project for which you want to edit the permissions.
  5. In the Available Policies area, select BSS Finance and BSS Operator.

DDM routine operations

Changing to yearly/monthly billing

Configure policies BSS Finance and BSS Operator. The procedure is the same as that for renewing an instance.

DDM schema operations

Creating a schema

ddm:database:create

Querying schemas

ddm:database:list

Querying details of a schema

ddm:database:get

Scaling out a schema

Canceling the scaling task

ddm:database:migrate

Rolling back if scaling out fails

Clearing source data when scaling out fails

Retrying if scaling out fails

ddm:database:migrateRollback

Deleting a schema

ddm:database:delete

DDM account operations

Querying accounts

ddm:user:list

Creating an account

ddm:user:create

Modifying an account

ddm:user:modify

Resetting a password

ddm:user:modify

Locking and unlocking an account

ddm:user:modifyStatus

Deleting an account

ddm:user:delete

DDM and MySQL DB instance management (using an RDS MySQL DB instance as an example)

Synchronizing MySQL DB instance information

ddm:rds:synchro

To synchronize MySQL DB instance information, you need to configure the following permissions:

  • rds:instance:list
  • rds:instance:modify
  • rds:instance:modifyParameter

Querying MySQL DB instances

ddm:rds:list

Querying details of a MySQL DB instance

ddm:rds:get

Modifying the read policy of a MySQL DB instance

ddm:rds:modifyReadPolicy

DDM product operations

Viewing products

ddm:product:list

DDM parameter template operations

Creating a parameter template

ddm:param:create

Deleting a parameter template

ddm:param:delete

Applying a parameter template

ddm:param:apply

Modifying a parameter template

ddm:param:update

Replicating a parameter template

ddm:param:create

Comparing two parameter templates

ddm:param:list

Querying parameter templates

ddm:param:list