You are assigned one or more roles. By selecting a role, you get the privileges and ownership rights of that role. At any point in time, you are assigned one current role, and therefore have access to all roles in the active role set.
In the top right corner of the user interface you can see the role currently selected. Click the down arrow on the right of your login name in the Starburst Galaxy banner to change the current role. Roles are displayed in a column and are organized alphabetically. The current role is highlighted. Select the name of a different assigned role to switch the current role. Click Show all to show all of the current user’s available roles.
Use the following SQL command to list all current roles of the user:
SHOW CURRENT ROLES
You can also change the user’s current role to a different role in SQL. The
following SQL statement changes the user’s current role to
SET ROLE engineering
The roles system provides great flexibility and control for organizations that need that fine-grained access control. It’s important to choose roles that fit your organization, and include necessary administrative roles.
If a role is granted to another role, all the privileges and ownership rights of the first role are conveyed to the second role.
One role can be used to grant another role to a user or role under the following circumstances:
By default, every role is implicitly granted the PUBLIC role, and therefore has all its privileges.
The relationship between a role receiving a role grant and the role granted is a parent-child relationship. A role may be granted zero or more roles. The only restriction on role grants is that they are not allowed to create grant loops. Consequently, roles form a directed acyclic graph.
You can grant one or more roles to a role
in the user interface. You can also
create role grants using SQL. This statement grants the role
GRANT support_admin TO ROLE sales_admin
Users may be granted roles, and all users are implicitly granted the pre-defined
public. At any moment a user assumes a single role. That role can be
chosen in the UI using the role selection dropdown always shown in the upper
right corner of the screen. Alternatively, the role can be chosen with SQL:
SET ROLE rolename
A role’s active role set contains the role itself, plus all roles that are descendants of the role.
A role has all the privileges and ownership rights of all roles in its active role set. That means all the privileges of those child roles, plus the privileges of their children, and so on.
By assuming a role, the user has all the privileges of that role, plus all the privileges of all roles that are descendants of that role, and so on. The user session has the privileges of all roles in the active role set, and has ownership privileges on any entity owned by a role in the active role set.
All deny privileges apply as usual, which means that they override any grant privileges.
Certain roles are predefined by Starburst Galaxy and cannot be deleted. These
roles are owned by the
_system role, which cannot be reassigned.
accountadmin role is predefined, and cannot be modified or deleted. It is
granted the manage security
and it can therefore assign any privilege on any other entity to itself. It can
literally do anything. The same applies to all other roles with the manage
Only a limited list of users should be granted the
accountadmin role. Best
practice is to create new roles appropriate to the needs of your organization,
and grant these new roles only the necessary privileges needed to perform their
public role is a predefined default role that is implicitly granted to
every user and cannot be revoked or deleted. Administrators can assign
additional privileges to the public role.
_system role is defined by the SQL specification to be a grantor of
privileges to all newly-created entities. It has no other function in the roles
system, and it cannot be granted to other roles or deleted.
Picking the new roles and their corresponding privileges on entities starts with identifying the different communities of users. In a typical organization most users do not need to create or manage catalogs or clusters, they just want to run queries. They need nothing beyond USE_CLUSTER on one or more clusters.
For these users, it makes sense to create a
data_consumer role with only the
USE_CLUSTER privilege on one or more clusters. Users granted the role
data_consumer can run SQL queries on clusters, but cannot do any damage
to any Starburst Galaxy setup.
If users need only one specific cluster at a time, it can make sense to create a role for each cluster with USE_CLUSTER on that cluster, and perhaps additional roles that group these roles together.
For administrative operations, it makes sense to divide the privileges and entities into distinct roles. There are many ways to divide administrative privileges, but organizations can start with the following example of a traditional division of administrative responsibility among roles:
data_admin, the owner of all catalogs and clusters, having the
CREATE_CLUSTER and CREATE_CATALOG privileges.
data_admin has no rights to
manage users or roles.
security_admin, the owner of all custom roles, having the CREATE_ROLE
security_admin can create and delete roles, and grant or revoke
any privilege on any role.
security_admin has no privileges to manage or
even access catalogs, clusters or users.
user_admin, the owner of all users, having the CREATE_USER privilege.
user_admin can only manage users, and has no privileges to control catalogs
Is the information on this page helpful?