Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
39 KiB
Permissions Policies and Supported Actions
This chapter describes fine-grained permissions management for your DIS. If your cloud account does not need individual IAM users, then you may skip over this chapter.
By default, new IAM users do not have any permissions assigned. You need to add a user to one or more groups, and assign permissions policies 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 DIS based on the permissions.
You can grant users permissions by using roles and policies. Roles are a type of coarse-grained authorization mechanism provided by IAM 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.
Note:
Policy-based authorization is useful if you want to allow or deny the access to an API.
An account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned. 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 dis:streams:list action.
Supported Actions
DIS 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.
· APIs: REST APIs that can be called in a custom policy.
· Action: Specific operations that are allowed or denied.
· IAM or enterprise projects: Type of projects for which an action will take effect. Policies that contain actions supporting both IAM and enterprise projects can be assigned to user groups and take effect in both IAM and Enterprise Management. Policies that only contain actions for IAM projects can be used and only take effect for IAM.
Note:
The check mark (√) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect.
Table 1 lists the actions that can be defined in custom policies of DIS. All actions listed in the following table support both Project and Enterprise Project.
Permissions |
APIs |
Actions |
Project |
Enterprise Project |
---|---|---|---|---|
Creating a consumer app |
POST /v2/{project_id}/apps |
dis:apps:create |
√ |
× |
Deleting an app |
DELETE /v2/{project_id}/apps/{app_name} |
dis:apps:delete |
√ |
× |
Querying apps |
GET /v2/{project_id}/apps |
dis:apps:list |
√ |
× |
Querying app details |
GET /v2/{project_id}/apps/{app_name} |
dis:apps:get |
√ |
× |
Querying the app consumption status |
GET /v2/{project_id}/apps/{app}/streams/{stream_name} |
dis:appState:get |
√ |
√ |
Querying all events of a user in pagination mode |
GET /v1/{project_id}/events |
dis:events:list |
√ |
× |
Creating a subscription |
POST /v1/{project_id}/event-subs |
dis:eventEnumSubs:create |
√ |
× |
Deleting a subscription |
DELETE /v1/{project_id}/event-subs/{sub_id} |
dis:eventEnumSubs:delete |
√ |
× |
Modifying a subscription |
PUT /v1/{project_id}/event-subs/{sub_id} |
dis:eventEnumSubs:update |
√ |
× |
Querying all subscriptions of a user |
GET /v1/{project_id}/event-subs |
dis:eventEnumSubs:list |
√ |
× |
Adding a permission policy |
POST /v2/{project_id}/streams/{streamName}/policies |
dis:streamPolicies:create |
√ |
√ |
Querying permission policies |
GET /v2/{project_id}/streams/{streamName}/policies |
dis:streamPolicies:list |
√ |
√ |
Deleting a permission policy of a stream |
DELETE /v2/{project_id}/streams/{streamName}/policies |
dis:streamPolicies:delete |
√ |
√ |
Querying details of a stream |
GET /v2/{project_id}/streams/{streamName} |
dis:streams:get |
√ |
√ |
Creating a stream |
POST /v2/{project_id}/streams |
dis:streams:create |
√ |
√ |
Deleting a Stream |
DELETE /v2/{project_id}/streams/{stream_name} |
dis:streams:delete |
√ |
√ |
Querying streams |
GET /v2/{project_id}/streams |
dis:streams:list |
√ |
× |
Updating stream information |
PUT /v2/{project_id}/streams/{stream_name}/update |
dis:streams:update |
√ |
√ |
Creating a dump task |
POST /v2/{project_id}/streams/{stream_name}/transfer-tasks |
dis:transferTasks:create |
√ |
√ |
Updating a dump task |
PUT /v2/{project_id}/streams/{stream_name}/transfer-tasks |
dis:transferTasks:update |
√ |
√ |
Querying dump tasks |
GET /v2/{project_id}/streams/{stream_name}/transfer-tasks |
dis:transferTasks:list |
√ |
√ |
Querying details of a dump task |
GET /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name} |
dis:transferTasks:get |
√ |
√ |
Deleting a dump task |
DELETE /v2/{project_id}/streams/{stream_name}/transfer-tasks/{task_name} |
dis:transferTasks:delete |
√ |
√ |
Uploading Data to a DIS Stream |
POST /v2/{project_id}/records |
dis:records:write |
√ |
√ |
Obtaining a data cursor |
GET /v2/{project_id}/cursors |
dis:records:readCursor |
√ |
√ |
Downloading data from a DIS stream |
GET /v2/{project_id}/records |
dis:records:read |
√ |
√ |
Adding a checkpoint |
POST /v2/{project_id}/checkpoints |
dis:checkpoints:commit |
√ |
√ |
Querying checkpoint details |
GET /v2/{project_id}/checkpoints |
dis:checkpoints:get |
√ |
√ |
Deleting a checkpoint |
DELETE /v2/{project_id}/checkpoints |
dis:checkpoints:delete |
√ |
√ |
Filtering streams by tag |
POST /{project_id}/{resource_type}/resource_instances/action |
dis:tagResources:list |
√ |
× |
Adding or deleting resource tags in batches |
POST /{project_id}/{resource_type}/{resource_id}/tags/action |
dis:tagResources:update |
√ |
× |
Adding a Tag to a Specified Stream |
POST /{project_id}/{resource_type}/{resource_id}/tags |
dis:tagResources:create |
√ |
× |
Deleting a tag of a specified stream |
DELETE /{project_id}/{resource_type}/{resource_id}/tags/{key} |
dis:tagResources:delete |
√ |
× |
Querying all tags of a specified region |
GET /{project_id}/{resource_type}/tags |
dis:tags:list |
√ |
× |
Note: For the actions not listed Table 1, for example, viewing app quota (/{projectId}/quotas) and viewing DIS resource statistics on the homepage (/v1/{projectId}/statistics), configure system-defined policy DIS User, DIS ReadOnlyAccess, DIS CommonOperations, or DIS FullAccess for users.