|
| 1 | +--- |
| 2 | +title: Access Control Privileges |
| 3 | +sidebar_label: Privileges |
| 4 | +description: |
| 5 | + Databend Access Control Privileges |
| 6 | +--- |
| 7 | + |
| 8 | +This topic describes the privileges that are available in the Databend access control model. |
| 9 | + |
| 10 | +## All Privileges |
| 11 | + |
| 12 | +| Privilege | Object Type | Description | |
| 13 | +| :-- | :-- | :-- | |
| 14 | +| ALL | All | Grants all the privileges for the specified object type. | |
| 15 | +| ALTER | Global, Database, Table, View | Privilege to alter databases or tables, Alter user/UDF. | |
| 16 | +| CREATE | Global, Database, Table | Privilege to create databases or tables or udf. | |
| 17 | +| DELETE | Table | Privilege to delete or truncate rows in a table. | |
| 18 | +| DROP | Global, Database, Table, View | Privilege to drop databases or tables or views and undrop databases or tables, Drop UDF. | |
| 19 | +| INSERT | Table | Privilege to insert rows into tables. | |
| 20 | +| SELECT | Database, Table | Privilege to select rows from tables, show or use databases. | |
| 21 | +| UPDATE | Table | Privilege to update rows in a table | |
| 22 | +| GRANT | Global | Privilege to Grant/Revoke privileges to users or roles | |
| 23 | +| SUPER | Global, Table | Privilege to Kill query, Set global configs, Optimize table, Analyze table, Operator stage/catalog/share. | |
| 24 | +| USAGE | Global | UsagePrivilege is a synonym for “no privileges” | |
| 25 | +| CREATE ROLE | Global | Privilege to create a role | |
| 26 | +| DROP ROLE | Global | Privilege to drop a role | |
| 27 | +| CREATE USER | Global | Privilege to create a sql user | |
| 28 | +| CREATE USER | Global | Privilege to drop a sql user | |
| 29 | + |
| 30 | +## Global Privileges |
| 31 | + |
| 32 | +| Privilege | Usage | |
| 33 | +| :-- | :-- | |
| 34 | +| ALL | Grants all the privileges for the specified object type. | |
| 35 | +| GRANT | Add/Drop table Column, Alter table cluster key, Re-cluster table | |
| 36 | +| CREATEROLE | Create a new role. | |
| 37 | +| DROPUSER | Drop a new user. | |
| 38 | +| CREATEUSER | Create a new user. | |
| 39 | +| DROPROLE | Drop a new role. | |
| 40 | +| SUPER | Kill query, Set/Unset settings, operator stage/catalog/share, Call function, Copy into stage | |
| 41 | +| USAGE | Only can connect to databend query, but no privileges | |
| 42 | +| CREATE | Create UDF | |
| 43 | +| DROP | Drop UDF | |
| 44 | +| ALTER | Alter UDF, ALter sql user | |
| 45 | + |
| 46 | + |
| 47 | +## Table Privileges |
| 48 | + |
| 49 | +| Privilege | Usage | |
| 50 | +| :-- | :-- | |
| 51 | +| ALL | Grants all the privileges for the specified object type. | |
| 52 | +| ALTER | Add/Drop table Column, Alter table cluster key, Re-cluster table, Revert table | |
| 53 | +| CREATE | Create table | |
| 54 | +| DELETE | Delete rows in a table, Truncate table | |
| 55 | +| DROP | Drop table, Undrop table(restores the recent version of a dropped table) | |
| 56 | +| INSERT | Insert rows into table, Copy into table | |
| 57 | +| SELECT | Select rows from tables, Show create table, Describe table | |
| 58 | +| UPDATE | Update rows in a table | |
| 59 | +| SUPER | Optimize/Analyze table need super privilege | |
| 60 | + |
| 61 | +## View Privileges |
| 62 | + |
| 63 | +| Privilege | Usage | |
| 64 | +| :-- | :-- | |
| 65 | +| ALL | Grants all the privileges for the specified object type | |
| 66 | +| ALTER | Create/Drop view, Alter the existing view by using another `QUERY` | |
| 67 | +| DROP | Drop view | |
| 68 | + |
| 69 | +## Database Privileges |
| 70 | + |
| 71 | +| Privilege | Usage | |
| 72 | +| :-- | :-- | |
| 73 | +| Alter | Rename database | |
| 74 | +| CREATE | Create database | |
| 75 | +| DROP | Drop database, Undrop database(restores the recent version of a dropped database) | |
| 76 | +| SELECT | Show create database, Use database, | |
| 77 | + |
| 78 | + |
| 79 | +## Session Policy Privileges |
| 80 | + |
| 81 | +| Privilege | Usage | |
| 82 | +| :-- | :-- | |
| 83 | +| SUPER | Kill query, Set/Unset settings | |
| 84 | +| ALL | Grants all the privileges for the specified object type. | |
| 85 | + |
| 86 | +## Stage Privileges |
| 87 | + |
| 88 | +| Privilege | Usage | |
| 89 | +| :-- | :-- | |
| 90 | +| SUPER | List Stage, Create Stage, Drop Stage, Remove Stage | |
| 91 | +| ALL | Grants all the privileges for the specified object type. | |
| 92 | + |
| 93 | +## Catalog Privileges |
| 94 | + |
| 95 | +| Privilege | Usage | |
| 96 | +| :-- | :-- | |
| 97 | +| SUPER | Show create catalog, Create catalog, Drop catalog | |
| 98 | +| ALL | Grants all the privileges for the specified object type. | |
| 99 | + |
| 100 | +## Catalog Privileges |
| 101 | + |
| 102 | +| Privilege | Usage | |
| 103 | +| :-- | :-- | |
| 104 | +| SUPER | Create share, Drop share, Desc share, Show shares | |
| 105 | +| ALL | Grants all the privileges for the specified object type. | |
0 commit comments