Help Center> Migration Center> User Guide> Permissions Management> Creating a User and Granting MgC Permissions
Updated on 2024-03-19 GMT+08:00

Creating a User and Granting MgC Permissions

This section describes how to use Identity and Access Management (IAM) for fine-grained permissions control on your Migration Center (MgC) resources. With IAM, you can:

  • Create IAM users for employees based on the organizational structure of your enterprise. Each IAM user has their own security credentials for accessing MgC resources.
  • Grant only the permissions required for users to perform a specific task.
  • Entrust a Huawei Cloud account or cloud service to perform professional and efficient O&M on your MgC resources.

If your Huawei Cloud account does not need individual IAM users, then you may skip over this section.

This section describes the procedure for granting permissions (see Process Flow).

Prerequisites

Before assigning permissions to user groups, you should learn about system-defined policies supported by MgC and select the policies based on service requirements.

For details about the system-defined policies supported by MgC and the comparison between them, see System-defined Policies. For the system-defined policies of other services, see System-defined Permissions.

Process Flow

Figure 1 Granting MgC permissions to users

  1. Create a user group and assign permissions to it.
    • System-defined policy: Create a user group on the IAM console, and assign the MgC system-defined policies to the user group based on the Description of MgC System-defined Policies and actual permissions requirements. Select All Resources for Scope.
      Table 1 MgC system-defined policies

      Policy Name

      Description

      Policy Type

      Policy Content

      MgC FullAccess

      Administrator permissions of MgC. Users with these permissions can perform all operations on MgC data.

      System-defined policy

      MgC FullAccess Policy Content

      MgC ReadOnlyAccess

      Read-only permissions for MgC. Users with permissions can only view MgC data.

      System-defined policy

      MgC ReadOnlyAccess Policy Content

      MgC DiscoveryAccess

      Permissions for resource discovery of MgC. Users with these permissions can use the resource discovery function of MgC and view MgC data.

      System-defined policy

      MgC DiscoveryAccess Policy Content

      MgC AssessAccesss

      Permissions for application assessment of MgC. Users with these permissions can use the resource discovery and application assessment functions of MgC and view MgC data.

      System-defined policy

      MgC AssessAccesss Policy Content

      MgC MigrateAccess

      Permissions for application migration of MgC. Users with these permissions can use the resource discovery, application assessment, and application migration functions of MgC and view MgC data.

      System-defined policy

      MgC MigrateAccess Policy Content

      MgC AppDiscoveryAccess

      Permissions for application discovery of MgC. Users with these permissions can use the application discovery and resource discovery functions of MgC and view MgC data.

      System-defined policy

      MgC AppDiscoveryAccess Policy Content

      MgC MrrAccess

      Permissions for service verification of MgC. Users with these permissions can use the service verification function of MgC and view MgC data.

      System-defined policy

      MgC MrrAccess Policy Content

    • Custom policy: If an IAM user only needs specific MgC permissions, create custom policies. For details, see MgC Custom Policies.
  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 IAM console using the created user, and in the authorized region, perform the following operations:

    • Choose Migration Center > Service List. On the MgC console, perform operations based on the granted permissions. If you can, the granted permissions have taken effect.
    • Choose another service from Service List. If a message appears indicating that you have insufficient permissions to access the service, the granted permissions have taken effect.

MgC FullAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Action": [
                "mgc:*:*",
                "iam:agencies:listAgencies",
                "iam:agencies:createAgency",
                "iam:permissions:grantRoleToAgency"
            ],
            "Effect": "Allow"
        }
    ]
}

MgC ReadOnlyAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "mgc:*:query*"
            ]
        }
    ]
}

MgC DiscoveryAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "mgc:*:query*",
                "mgc:*:discovery"
            ]
        }
    ]
}

MgC AssessAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Action": [
                "mgc:*:query*",
                "mgc:*:discovery",
                "mgc:*:assess",
                "iam:agencies:listAgencies",
                "iam:agencies:createAgency",
                "iam:permissions:grantRoleToAgency"
            ],
            "Effect": "Allow"
        }
    ]
}

MgC MigrateAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Action": [
                "mgc:*:query*",
                "mgc:*:discovery",
                "mgc:*:assess",
                "mgc:*:migrate",
                "iam:agencies:listAgencies",
                "iam:agencies:createAgency",
                "iam:permissions:grantRoleToAgency"
            ],
            "Effect": "Allow"
        }
    ]
}

MgC AppDiscoveryAccess Policy Content

{
    "Version": "1.1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "mgc:*:query*",
                "mgc:*:discovery",
                "mgc:*:appdiscovery"
            ]
        }
    ]
}

MgC MrrAccess Policy Content

{
            "Version": "1.1",
            "Statement": [
                {
                    "Action": [
                        "mgc:*:query*",
                        "mgc:mrr:query",
                        "mgc:mrr:update",
                        "mgc:mrr:export",
                        "mgc:mrr:import",
                        "mgc:mrr:upgrade",
                        "mgc:mrr:delete",   
                        "mgc:mrr:check"
                    ],
                    "Effect": "Allow"
                }
            ]
        }
    }
}