Privileges#
A privilege is the right to perform an action on an entity. You grant privileges to roles, and users get privileges through the roles that they hold. This page describes how to grant privileges, and it lists the privileges that you can grant in the Control Plane UI.
Each privilege applies to one kind of entity. Account privileges apply to the Control Plane as a whole. Data privileges apply to catalogs, schemas, tables, columns, functions, and storage locations.
Grant privileges#
You grant privileges to a role on its Privileges tab. To grant privileges based on tags, use policies. You can also grant, list, and revoke privileges with the Control Plane API.
Add privileges#
In the Control Plane UI, go to Access > Roles and privileges, and select the role.
On the Privileges tab, click Add privilege.
Select the tab for the kind of privilege: Data, Account, Location, or Function. On the Data tab, select a catalog, schema, table, or column in Scope. On the Location tab, enter the storage location.
Select the privileges to grant, and click Save privileges.
Change a privilege#
On the Privileges tab, search for the catalog and expand the tree to the table.
Open the table’s menu and select Modify privileges.
Change the settings for the privilege and save your changes.
Allow and deny#
Each grant either allows or denies a privilege. A new grant allows the
privilege. To block a data privilege, open Modify privileges and set Allow
or deny? to DENY. A DENY always overrides an allow. You can’t deny
account privileges, such as Create catalog.
Grant option#
To let a role grant a privilege to other roles, select Grant to others? for the privilege in Modify privileges. You can’t deny a privilege that has the grant option. While the option is selected, you can’t change the Allow or deny? setting.
Grant privileges with SQL#
You can also grant, deny, and revoke privileges with SQL. Specify the privilege, the entity kind, and the entity name:
GRANT CREATE_SCHEMA ON CATALOG example TO ROLE analyst;
GRANT SELECT ON TABLE example.sales.customers TO ROLE analyst WITH GRANT OPTION;
DENY SELECT ON TABLE example.sales.customers TO ROLE contractor;
REVOKE SELECT ON TABLE example.sales.customers FROM ROLE analyst;
For account privileges, use MY ACCOUNT as the entity. For location
privileges, put the storage location in double quotes:
GRANT CREATE_CATALOG ON MY ACCOUNT TO ROLE data_admin;
GRANT CREATE_SQL ON LOCATION "s3://example-bucket/data/*" TO ROLE data_admin;
Entity kind |
Entity name |
Privileges |
|---|---|---|
|
None |
The account privileges listed in Account privileges |
|
Catalog name |
|
|
Catalog and schema name, such as |
|
|
Catalog, schema, and table name, such as |
|
|
Catalog, schema, table, and column name, such as
|
|
|
Storage location in double quotes |
|
|
Function name |
|
Account privileges#
Privilege |
SQL name |
Description |
|---|---|---|
Manage security |
|
Grant or revoke any privilege on any entity to any role, and assign roles
to users. Grant this privilege only to a few trusted roles. The
|
Create role |
|
Create a new role. Your current role owns the roles that it creates, so it can modify and delete them. This privilege doesn’t let you modify or delete other roles. For more information, see Ownership. |
Create tag |
|
Create and manage tags. |
Apply tag |
|
Apply an existing tag to data. |
Create catalog |
|
Create a new catalog. Your current role owns the catalogs that it creates, so it can modify and delete them, and it gets privileges to use them. This privilege doesn’t let you use, modify, or delete other catalogs. For more information, see Ownership. |
View all query history |
|
View the query history and query details of all users’ queries. |
View audit log |
|
View the Control Plane audit log. |
Create cluster |
|
Create clusters. Your current role owns the clusters that it creates, so it can edit, fail over, and delete them. For more information, see Ownership. |
Manage billing |
|
View usage and billing. |
Manage query routing |
|
Create and manage routing rules and tagging rules. |
Manage SSO |
|
View groups and assign roles to them. |
Manage LakeOps |
|
Manage LakeOps. Available when LakeOps is enabled. |
Create AI model |
|
Create AI models. Available when AI models are enabled. |
Create data domain |
|
Create data domains for data products. Available when data products are enabled. |
Privileges for Control Plane features#
The following table lists the privileges or ownership that you need to use each Control Plane feature. The role that creates a cluster or catalog owns it.
Action |
Requires |
|---|---|
View a cluster and its status |
Ownership of the cluster, Manage security, or a cluster privilege on the cluster |
Edit, delete, or fail over a cluster |
Ownership of the cluster. Manage security doesn’t give this access. |
Enable or disable a cluster |
Ownership of the cluster, or the Enable/disable cluster privilege on the cluster |
Edit or delete a catalog, or switch it between governed and delegated |
Ownership of the catalog |
Manage catalog files |
Create catalog. To update or purge a file that catalogs use, you also need ownership of each of those catalogs. |
Manage Starburst Metastore data sources and credentials |
Create catalog |
View the query history of all users |
View all query history. Without it, users see only their own queries. |
Assign roles to groups |
Manage SSO, which lets you see groups |
Assign a role to another role |
Ownership of the role, Manage security, or a grant of the role that lets you grant it to others |
Data privileges#
Entity |
Privilege |
SQL name |
Description |
|---|---|---|---|
Catalog |
Create schema |
|
Create schemas in the catalog. |
Schema |
Create table |
|
Create tables in the schema. |
Table or column |
Select from table |
|
Select columns from the table. |
Table |
Insert into table |
|
Insert rows into the table. |
Table or column |
Update table rows |
|
Update rows in the table. |
Table |
Delete from table |
|
Delete rows from the table. |
Function |
Execute |
|
Run the function. Built-in functions don’t need this privilege. |
Location |
Create schema and table in location |
|
Create schemas and tables with an explicit location in the storage location. |
AI model |
Use AI model |
|
Use the AI model. Available when AI models are enabled. |
Data domain |
Create data product |
|
Create data products in the domain. Available when data products are enabled. |
Data domain |
View data domain |
|
View the domain. Available when data products are enabled. |
Data product |
View data product |
|
View the data product. Available when data products are enabled. |
Data product |
Publish data product |
|
Publish the data product. Available when data products are enabled. |
You can grant Select from table and Update table rows on individual columns. Insert into table and Delete from table apply to the whole table only.
View privileges#
To query a view, a role needs the Select from table privilege on the view. What else it needs depends on the security mode of the view:
A
SECURITY INVOKERview runs with the privileges of the role that queries it. That role also needs Select from table on the tables that the view reads from.A
SECURITY DEFINERview runs with the privileges of the role that owns the view. The owning role needs Select from table with the grant option on the tables that the view reads from, unless the querying role is the owning role or holds it. This keeps a role from sharing access to tables through a view when it can’t grant that access directly.
A SECURITY DEFINER view that was created outside Starburst access control, such
as in a delegated catalog, has no Starburst access control owner and fails until
you set one:
ALTER VIEW example.sales.monthly_summary SET AUTHORIZATION ROLE analyst;
Location privileges#
You need the Create schema and table in location privilege to set an
explicit location when you create a schema or table in any catalog, governed or
delegated. This applies to all roles, including accountadmin. Schemas and
tables that you create without an explicit location don’t need it.
Location privileges apply to a storage location path that starts with s3://,
gs://, abfs://, or abfss:// and ends with /*, such as
s3://example-bucket/data/*. You can’t deny location privileges.
If the Control Plane uses a MySQL database, the storage location in a location privilege can have at most 192 characters.