Help Center> ModelArts> Best Practices> Permissions Management> FAQ> What Do I Do If a Message Indicating Insufficient Permissions Is Displayed When I Use ModelArts?
Updated on 2024-03-29 GMT+08:00

What Do I Do If a Message Indicating Insufficient Permissions Is Displayed When I Use ModelArts?

If a message indicating insufficient permissions is displayed when you use ModelArts, perform the operations described in this section to grant permissions for related services as needed.

The permissions to use ModelArts depend on OBS authorization. Therefore, ModelArts users require OBS system permissions as well.

Configuring Common Operations Permissions

To use the basic functions of ModelArts, assign the ModelArts CommonOperations permission on project-level services to users. Since ModelArts depends on OBS permissions, assign the OBS Administrator permission on global services to users.

The procedure is as follows:

  1. Create a user group.

    Log in to the IAM console and choose User Groups > Create User Group. Enter a user group name, and click OK.

  2. Configure permissions for the user group.

    In the user group list, locate the user group created in step 1, click Authorize , and perform the following operations.

    1. Assign the ModelArts CommonOperations permission on project-level services to the user group and click OK.
      Figure 1 Assigning the ModelArts CommonOperations permission
      Figure 2 Setting Scope to Region-specific projects

      The permission takes effect only in assigned regions. Assign permissions in all regions if the permission is required in all regions.

    2. Assign the OBS Administrator permission on global services to the user group and click OK.
      Figure 3 Assigning the OBS Administrator permission
      Figure 4 Setting Scope to Global services

  3. Create a user and add it to the user group.

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

  4. Log in and verify permissions.

    Log in to the ModelArts console as the created user, switch to the authorized region, and verify the ModelArts CommonOperations and Tenant Administrator policies are in effect.

    • Choose Service List > ModelArts. Choose Dedicated Resource Pools. On the page that is displayed, select a resource pool type and click Create. You should not be able to create a new resource pool.
    • Choose any other service in Service List. (Assume that the current policy contains only ModelArts CommonOperations.) If a message appears indicating that you have insufficient permissions to access the service, the ModelArts CommonOperations policy has already taken effect.
    • Choose Service List > ModelArts. On the ModelArts console, choose Data Management > Datasets > Create Dataset. You should be able to access the corresponding OBS path.

Creating a Custom Policy for ModelArts

In addition to the default system policies of ModelArts, you can create custom policies, which can address OBS permissions as well. For more information, see Creating a Custom Policy.

You can create custom policies using either the visual editor or JSON views. This section describes how to use a JSON view to create a custom policy to grant permissions required to use development environments and the minimum permissions required by ModelArts to access OBS.

A custom policy can contain actions for multiple services that are accessible globally or only for region-specific projects.

ModelArts is a project-level service, but OBS is a global service, so you need to create separate policies for the two services and then apply these policies to the users.

  1. Create a custom policy for minimizing permissions for OBS that ModelArts depends on. See Figure 5.
    Log in to the IAM console, choose Permissions > Policies/Roles, and click Create Custom Policy. Configure the parameters as follows:
  2. Create a custom policy for the permission to use the ModelArts development environment. See Figure 6. Configure the parameters as follows:
  3. On the IAM console, create a user group and grant required permissions.

    After creating a user group on the IAM console, grant the custom policy created in 1 to the user group.

  4. Create a user and add it to the user group.

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

  5. Log in and verify permissions.

    Log in to the ModelArts console as the created user, switch to the authorized region, and verify the ModelArts CommonOperations and Tenant Administrator policies are in effect.

    • Choose Service List > ModelArts. On the ModelArts console, choose Data Management > Datasets. If you cannot create a dataset, the permissions (for using the development environment) granted only to ModelArts users have taken effect.
    • Choose Service List > ModelArts. On the ModelArts console, choose DevEnviron > Notebooks > Create. You should be able to access the OBS path specified in Storage Path.

Example Custom Policies of OBS

The permissions to use ModelArts require OBS authorization. The following example shows the minimum OBS required, including the permissions for OBS buckets and objects. After being granted the minimum permissions for OBS, users can access OBS from ModelArts without restrictions.

{
    "Version": "1.1",
    "Statement": [
        {
            "Action": [
                "obs:bucket:ListAllMybuckets",
                "obs:bucket:HeadBucket",
                "obs:bucket:ListBucket",
                "obs:bucket:GetBucketLocation",
                "obs:object:GetObject",
                "obs:object:GetObjectVersion",
                "obs:object:PutObject",
                "obs:object:DeleteObject",
                "obs:object:DeleteObjectVersion",
                "obs:object:ListMultipartUploadParts",
                "obs:object:AbortMultipartUpload",
                "obs:object:GetObjectAcl",
                "obs:object:GetObjectVersionAcl",
                "obs:bucket:PutBucketAcl",
                "obs:object:PutObjectAcl"
            ],
            "Effect": "Allow"
        }
    ]
}

Example Custom Policies for Using the ModelArts Development Environment

{ 
    "Version": "1.1", 
    "Statement": [ 

        { 
            "Effect": "Allow", 
            "Action": [ 
                "modelarts:notebook:list", 
                "modelarts:notebook:create" ,
                "modelarts:notebook:get" ,
                "modelarts:notebook:update" ,
                "modelarts:notebook:delete" ,
                "modelarts:notebook:action" ,
                "modelarts:notebook:access" 
            ] 
        } 
    ] 
}