Permissions Policies and Supported Actions

This section describes fine-grained permissions management for your DLI. If your account does not need individual IAM users, then you may skip this section.

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 After authorization, the user can perform specified operations on MRS based on the permissions.

  • 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.

Note

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 needs to create buckets using an API, the user must have been granted permissions that allow the dli:queue:create_queue action.

Supported Actions

VBS 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:

  • Permissions: Allow or deny operations on specified resources under specific conditions.

  • APIs: RESTful APIs that can be called in a custom policy.

  • Actions: added to a custom policy to control permissions for specific operations.

  • 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 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 supporting IAM projects can be assigned to user groups and only take effect for IAM. Such policies will not take effect if they are assigned to user groups in Enterprise Project.

Note

The check mark (Y) indicates that an action takes effect. The cross mark (x) indicates that an action does not take effect.

DLI supports the following actions that can be defined in custom policies:

Table 1 Actions

Permission

API

Actions

IAM Project

(Project)

Enterprise Project

(Enterprise Project)

Creating a queue

POST /v1.0/{project_id}/queues

dli:queue:createQueue

Y

Y

Deleting a queue

DELETE /v1.0/{project_id}/queues/{queue_name}

dli:queue:dropQueue

Y

Y

Submitting a job

POST /v1.0/{project_id}/jobs/submit-job

dli:queue:submitJob

Y

x

Canceling a job

DELETE /v1.0/{project_id}/jobs/{job_id}

dli:queue:cancelJob

Y

x

Viewing queue permissions of other users

GET /v1.0/{project_id}/queues/{queue_name}/users

dli:queue:showPrivileges

Y

x

Restarting a queue

PUT /v1.0/{project_id}/queues/{queue_name}/action

dli:queue:restart

Y

x

Scaling out/in a queue

PUT /v1.0/{project_id}/queues/{queue_name}/action

dli:queue:scaleQueue

Y

x

Granting elastic resource pool permissions

PUT /v1.0/{project_id}/user-authorization

dli:elasticresourcepool:grantPrivilege

Y

x

Revoking elastic resource pool permissions

PUT /v1.0/{project_id}/user-authorization

dli:elasticresourcepool:revokePrivilege

Y

x

Creating a database

POST /v1.0/{project_id}/databases

dli:database:createDatabase

Y

x

Deleting a database

DELETE /v1.0/{project_id}/databases/{database_name}

dli:database:dropDatabase

Y

x

Modifying database configuration

POST /v1.0/{project_id}/jobs/submit-job

dli:database:alterDatabaseProperties

Y

x

Explaining the SQL statement as an execution plan

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:explain

Y

x

Creating a table

POST /v1.0/{project_id}/databases/{database_name}/tables

dli:database:createTable

Y

x

Creating a view

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:createView

Y

x

Creating a function

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:createFunction

Y

x

Describing a function

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:describeFunction

Y

x

Deleting a function

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:dropFunction

Y

x

Displaying a function

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:showFunctions

Y

x

Creating a role

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:createRole

Y

x

Deleting a role

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:dropRole

Y

x

Displaying a role

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:showRoles

Y

x

Displaying all roles

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:showAllRoles

Y

x

Binding a role

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:grantRole

Y

x

Unbinding a role

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:revokeRole

Y

x

Displaying the binding relationships between all roles and users

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:database:showUsers

Y

x

Viewing database permissions of other users

GET /v1.0/{project_id}/databases/{database_name}/users

dli:database:showPrivileges

Y

x

Displaying a database

GET /v1.0/{project_id}/databases

dli:database:displayDatabase

Y

x

Displaying all databases

GET /v1.0/{project_id}/databases

dli:database:displayAllDatabases

Y

x

Displaying all tables

GET /v1.0/{project_id}/databases

dli:database:displayAllTables

Y

x

Granting database permissions to a specified user

PUT /v1.0/{project_id}/user-authorization

dli:database:grantPrivilege

Y

x

Removing database permissions of a specified user

PUT /v1.0/{project_id}/user-authorization

dli:database:revokePrivilege

Y

x

Deleting a table

DELETE /v1.0/{project_id}/databases/{database_name}/tables/{table_name}

dli:table:dropTable

Y

x

Displaying the table structure

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}

dli:table:describeTable

Y

x

Querying a table

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/preview

dli:table:select

Y

x

Displaying table configuration

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:showTableProperties

Y

x

Displaying the table creation statement

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/preview

dli:table:showCreateTable

Y

x

Displaying all partitions

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:showPartitions

Y

x

Setting table configuration

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableSetProperties

Y

x

Adding a column

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableAddColumns

Y

x

Adding partitions to a partitioned table

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableAddPartition

Y

x

Renaming a table partition

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableRenamePartition

Y

x

Deleting partitions from a partitioned table

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableDropPartition

Y

x

Restoring a table partition

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableRecoverPartition

Y

x

Renaming a table

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableRename

Y

x

Setting the partition path

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterTableSetLocation

Y

x

Inserting table data

POST /v1.0/{project_id}/jobs/submit-job, statement invoking

dli:table:insertIntoTable

Y

x

Rewriting table data

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:insertOverwriteTable

Y

x

Viewing table permissions of other users

GET /v1.0/{project_id}/databases/{database_name}/tables/{table_name}/users

dli:table:showPrivileges

Y

x

Clearing a table

POST /v1.0/{project_id}/jobs/submit-job

dli:table:truncateTable

Y

x

Updating a table

POST /v1.0/{project_id}/jobs/submit-job

dli:table:update

Y

x

Deleting table data

POST /v1.0/{project_id}/jobs/submit-job

dli:table:delete

Y

x

Modifying column information

POST /v1.0/{project_id}/jobs/submit-job

dli:table:alterTableChangeColumn

Y

x

Deleting a column

POST /v1.0/{project_id}/jobs/submit-job

dli:table:alterTableDropColumns

Y

x

Displaying data segments

POST /v1.0/{project_id}/jobs/submit-job

dli:table:showSegments

Y

x

Merging data segments

POST /v1.0/{project_id}/jobs/submit-job

dli:table:compaction

Y

x

Modifying a view

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:table:alterView

Y

x

Displaying the table structure

POST /v1.0/{project_id}/jobs/submit-job, executing corresponding SQL statements

dli:table:describeTable

Y

x

Granting data table permissions to a specified user

PUT /v1.0/{project_id}/user-authorization

dli:table:grantPrivilege

Y

x

Removing data table permissions of a specified user

PUT /v1.0/{project_id}/user-authorization

dli:table:revokePrivilege

Y

x

Viewing the security authentication information permission list of other users

GET /v1.0/{project_id}/datasource/auth-infos/{auth_name}/users

dli:datasourceauth:showPrivileges

Y

x

Using security authentication information

POST /v1.0/{project_id}/jobs/submit-job

dli:datasourceauth:useAuth

Y

x

Deleting security authentication information

DELETE /v2.0/{project_id}/datasource/auth-infos/{auth_info_name}

dli:datasourceauth:dropAuth

Y

x

Updating security authentication information

PUT /v2.0/{project_id}/datasource/auth-infos

dli:datasourceauth:updateAuth

Y

x

Granting security authentication permissions to a specified user

PUT /v1.0/{project_id}/user-authorization

dli:datasourceauth:grantPrivilege

Y

x

Removing security authentication permissions of a specified user

PUT /v1.0/{project_id}/user-authorization

dli:datasourceauth:revokePrivilege

Y

x

Granting job permissions to a specified user

PUT /v1.0/{{project_id}}/authorization

dli:jobs:grantPrivilege

Y

x

Removing job permissions of a specified user

PUT /v1.0/{{project_id}}/authorization

dli:jobs:revokePrivilege

Y

x

Querying a Column

POST /v1.0/{project_id}/jobs/submit-job, SQL statement invoking

dli:column:select

Y

x

Granting permissions to a specified user queue

PUT /v1.0/{project_id}/user-authorization

dli:column:grantPrivilege

Y

x

Removing permissions of a specified user queue

PUT /v1.0/{project_id}/user-authorization

dli:column:revokePrivilege

Y

x

Listing Flink jobs

GET /v1.0/{project_id}/streaming/jobs

dli:jobs:listAll

Y

x

Querying Flink job details

GET /v1.0/{project_id}/streaming/jobs/{job_id}

dli:jobs:get

Y

x

Creating a Flink SQL job

POST /v1.0/{project_id}/streaming/sql-jobs

dli:jobs:create

Y

x

Creating a Flink Jar job

POST /v1.0/{project_id}/streaming/flink-jobs

dli:jobs:create

Y

x

Updating a Flink SQL job

PUT /v1.0/{project_id}/streaming/sql-jobs/{job_id}

dli:jobs:update

Y

x

Updating a Flink Jar job

PUT /v1.0/{project_id}/streaming/flink-jobs/{job_id}

dli:jobs:update

Y

x

Deleting a Flink job

DELETE /v1.0/{project_id}/streaming/jobs/{job_id}

dli:jobs:delete

Y

x

Running Flink jobs in batches

POST /v1.0/{project_id}/streaming/jobs/run

dli:jobs:start

Y

x

Stopping a Flink job

POST /v1.0/{project_id}/streaming/jobs/stopob_id/stop

dli:jobs:stop

Y

x