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.
- For details about how to grant a user full permissions for OBS and common operations permissions for ModelArts, see Configuring Common Operations Permissions.
- For details about how to manage user permissions on OBS and ModelArts in a refined manner and configure custom policies, see Creating a Custom Policy for ModelArts.
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:
- 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.
- 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.
- 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.
- 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
- Assign the ModelArts CommonOperations permission on project-level services to the user group and click OK.
- 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.
- 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.
- 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:
- Policy Name: Choose a custom policy name.
- Policy View: JSON
- Policy Content: Follow the instructions in Example Custom Policies of OBS. For more information about OBS system permissions, see OBS Permissions Management.
- Create a custom policy for the permission to use the ModelArts development environment. See Figure 6. Configure the parameters as follows:
- Policy Name: Choose a custom policy name.
- Policy View: JSON
- Policy Content: Follow the instructions in Example Custom Policies for Using the ModelArts Development Environment. For the actions that can be added for custom policies, see ModelArts API Reference > Permissions Policies and Supported Actions.
- For the system policies of other services, see System Permissions.
- 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.
- 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.
- 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" ] } ] }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot