16.access Control in Snowflake
16.access Control in Snowflake
Snowflake
Agenda
• What is Access Control
• Key Concepts of Access Control
• Objects Hierarchy
• Roles in Snowflake
• System Defined Roles
• Role Hierarchy
• Custom Roles
Access Control in Snowflake
• What is Access Control?
• Access control determines who can access database objects and perform
operations on specific objects in Snowflake.
• Snowflake supports and combines both of below access control models.
• Discretionary Access Control (DAC): Each object has an owner, who can in turn
grant access to that object.
• Role-based Access Control (RBAC): Access privileges are assigned to roles, which
are in turn assigned to users.
Key Concepts
Below are the key concepts of Snowflake Access Control mechanism.
• Securable object: An entity to which access can be granted. Tables, schemas, views
etc.
• Role: An entity to which privileges can be granted. Roles are in turn assigned to
users. Note that roles can also be assigned to other roles, creating a role hierarchy.
• Privilege: It is level of access that can be granted to any object. Like select, create,
drop, insert etc.
• User: Specifies the people or system to whom the access granted.
Key Concepts
Privileges
Privilege Usage
SELECT Execute a SELECT statement on the table.
INSERT Execute an INSERT query on the table.
UPDATE Execute an UPDATE query on the table.
TRUNCATE Execute a TRUNCATE query on the table.
DELETE Execute a DELETE query on the table.
6. PUBLIC:
• Automatically granted to every user and every role in your account.
• The objects owned by the role are, by definition, available to every other user and
role in the account.
• This role is typically used in cases where all users have all access to the objects.
Role Hierarchy
Custom Roles
• Custom roles can be created by the USERADMIN role (or a higher role) as well as by any
role to which the CREATE ROLE privilege has been granted.
• By default, a newly-created role is not assigned to any user, nor granted to any other role.
• Snowflake recommends creating a hierarchy of custom roles, with the top-most custom
role assigned to the system role SYSADMIN. This will allow system administrators to
manage all objects in the account.
• If custom role is not assigned to SYSADMIN through a role hierarchy, the system
administrators will not be able to manage the objects owned by that role. Only
SECURITYADMIN can view the objects and modify their access grants.
Thank You