Introduction
This chapter describes fine-grained permissions management for your MRS. If your account does not need individual IAM users, then you may skip over this chapter.
By default, new IAM users do not have permissions assigned. You need to add them to one or more groups, and attach permissions policies or roles to these groups. Users inherit permissions from the groups to which they are added and can perform specified operations on cloud services based on the permissions.
You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism that defines permissions related to user responsibilities. Policies define API-based permissions for operations on specific resources under certain conditions, allowing for more fine-grained, secure access control of cloud resources.
Policy-based authorization is useful if you want to allow or deny the access to an API.
An account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. The permissions required for calling an API are determined by the actions supported by the API. Only users who have been granted permissions allowing the actions can call the API successfully. For example, if an IAM user queries MRS clusters using an API, the user must have been granted permissions that allow the mrs:cluster:list action.
Supported Actions
MRS provides system-defined policies that can be directly used in IAM. You can also create custom policies and use them to supplement system-defined policies, implementing more refined access control. Operations supported by policies are specific to APIs. The following are common concepts related to policies:
- Permission: A statement in a policy that allows or denies certain operations.
- API: REST APIs that can be called by a user who has been granted specific permissions.
- Action: Specific operations that are allowed or denied.
- Related actions: Actions on which a specific action depends to take effect. When assigning permissions for the action to a user, you also need to assign permissions for the related actions.
- IAM or enterprise projects: Type of projects for which an action will take effect. Policies that contain actions for both IAM and enterprise projects can be used and take effect for both IAM and Enterprise Management. Policies that only contain actions for IAM projects can be used and only take effect for IAM.
The check mark (√) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect.
Permissions |
API |
Action |
IAM Project |
Enterprise Project |
---|---|---|---|---|
Creating a Cluster and Running a Job |
POST /v1.1/{project_id}/run-job-flow |
mrs:cluster:create |
√ |
√ |
Resizing a Cluster |
PUT /v1.1/{project_id}/cluster_infos/{cluster_id} |
mrs:cluster:resize |
√ |
√ |
Querying a Cluster List |
GET /v1.1/{project_id}/cluster_infos |
mrs:cluster:list |
√ |
√ |
Querying Cluster Details |
GET /v1.1/{project_id}/cluster_infos/{cluster_id} |
mrs:cluster:get |
√ |
√ |
Deleting a Cluster |
DELETE /v1.1/{project_id}/clusters/{cluster_id} |
mrs:cluster:delete |
√ |
√ |
Querying a Host List |
GET /v1.1/{project_id}/clusters/{cluster_id}/hosts |
mrs:host:list |
√ |
√ |
Adding and Executing a Job (V1) |
POST /v1.1/{project_id}/jobs/submit-job |
mrs:job:submit |
√ |
√ |
Querying the exe Object List of Jobs (V1) |
GET /v1.1/{project_id}/job-exes |
mrs:job:list |
√ |
√ |
Querying exe Object Details (V1) |
GET /v1.1/{project_id}/job-exes/{job_exe_id} |
mrs:job:get |
√ |
√ |
Configuring an Auto Scaling Rule |
POST /v1.1/{project_id}/autoscaling-policy/{cluster_id} |
mrs:cluster:policy |
√ |
√ |
Querying Tags of a Specified Cluster |
GET /v1.1/{project_id}/clusters/{cluster_id}/tags |
mrs:tag:list |
√ |
√ |
Adding or Deleting Cluster Tags in Batches |
POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action |
mrs:tag:batchOperate |
√ |
√ |
Querying All Tags |
GET /v1.1/{project_id}/clusters/tags |
mrs:tag:list |
√ |
√ |
Querying a List of Clusters with Specified Tags |
POST /v1.1/{project_id}/clusters/resource_instances/action |
mrs:tag:listResource |
√ |
× |
Adding and Executing a Job (V2) |
POST /v2/{project_id}/clusters/{cluster_id}/job-executions |
mrs:job:submit |
√ |
√ |
Querying Information About a Job (V2) |
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id} |
mrs:job:list |
√ |
√ |
Querying a List of Jobs (V2) |
GET /v2/{project_id}/clusters/{cluster_id}/job-executions |
mrs:job:list |
√ |
√ |
Terminating a Job (V2) |
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/kill |
mrs:job:stop |
√ |
√ |
Deleting Jobs in Batches (V2) |
POST /v2/{project_id}/clusters/{cluster_id}/job-executions/batch-delete |
mrs:job:batchDelete |
√ |
√ |
Obtaining the SQL Result (V2) |
GET /v2/{project_id}/clusters/{cluster_id}/job-executions/{job_execution_id}/sql-result |
mrs:job:list |
√ |
√ |
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