Account Management and Data Governance · Topic 1 of 8
Security Model, RBAC and the Securable Object Hierarchy
How Snowflake combines discretionary and role-based access control, how ownership and grants work, and how the securable object hierarchy shapes access.
- 5 min
- DAC: every object has an owner role that can grant access. RBAC: privileges go to roles, roles go to users.
- The role that creates an object owns it through the OWNERSHIP privilege. Transfer it with GRANT OWNERSHIP.
- Granting a role to another role makes the receiving role inherit all its privileges.
What it is
Snowflake's security model rests on a few principles: every object is owned, access is granted through roles, and nothing is visible until a privilege allows it. Data is encrypted by default, sign-ins can be restricted by network policy, and every action is recorded.
Access control mixes two models. Discretionary access control (DAC) means each object has an owner who decides who else gets access. Role-based access control (RBAC) means privileges are granted to roles, and roles are granted to users.
A third model, user-based access control, lets privileges go straight to a user. Snowflake considers those grants only when the session uses all secondary roles, so for exam purposes RBAC is the main path.
How it works
Ownership is the DAC part
When a role creates an object, that role gets the OWNERSHIP privilege on it. The owner can grant privileges on the object to other roles, and can transfer ownership with GRANT OWNERSHIP.
An object has exactly one owning role, not one owning user. If a user leaves, the objects stay owned by the role, which is why ownership by a role is safer than ownership by a person.
Grants are the RBAC part
Privileges are granted to roles with GRANT <privilege> ON <object> TO ROLE <role>. Roles are then granted to users, or to other roles to build a hierarchy.
When role A is granted to role B, role B inherits every privilege of role A. Privileges flow up the hierarchy, never down.
The securable object hierarchy
Every securable object lives inside a container, and access to a contained object needs access to each container above it.
| Level | Examples of securable objects |
|---|---|
| Organization | Accounts |
| Account | Users, roles, databases, warehouses, resource monitors, integrations, network policies, shares |
| Database | Schemas, database roles |
| Schema | Tables, views, stages, file formats, sequences, streams, tasks, pipes, UDFs, stored procedures, policies, tags |
To query a table, a role needs USAGE on the database, USAGE on the schema and SELECT on the table. Running the query also needs USAGE on a warehouse.
Future grants and managed access schemas
A future grant sets privileges on objects that do not exist yet, for example GRANT SELECT ON FUTURE TABLES IN SCHEMA sales.public TO ROLE analyst. New tables in that schema are then readable by the role with no extra step.
In a regular schema, each object owner can grant access to its own objects. In a managed access schema (CREATE SCHEMA ... WITH MANAGED ACCESS), object owners lose that right. Only the schema owner or a role with the MANAGE GRANTS privilege can grant privileges on objects in the schema, which centralizes control.
| Schema type | Who grants privileges on contained objects |
|---|---|
| Regular | The object owner, plus roles with MANAGE GRANTS |
| Managed access | The schema owner, plus roles with MANAGE GRANTS |
Least privilege in practice
Give each role only what its job needs, keep powerful roles for a few people and build custom roles under SYSADMIN. Review grants with SHOW GRANTS TO ROLE and SHOW GRANTS ON <object>.
When a question says a user "can see the table but cannot query it", look for a missing USAGE on the database, the schema or the warehouse before blaming SELECT.
Common mistakes
Thinking users own objects. Ownership belongs to a role. Dropping or disabling a user does not remove or orphan the objects that user's role created.
Granting only SELECT. SELECT on a table is useless without USAGE on its database and schema. The query also fails without a warehouse the role can use.
Expecting privileges to flow down. A child role does not get the privileges of the roles above it. Only the role that is granted another role gains that role's privileges.
Confusing managed access with masking. A managed access schema only changes who may grant privileges. It does not hide any columns or rows.
What to remember for the exam
- DAC: every object has an owner role that can grant access. RBAC: privileges go to roles, roles go to users.
- The role that creates an object owns it through the OWNERSHIP privilege. Transfer it with GRANT OWNERSHIP.
- Granting a role to another role makes the receiving role inherit all its privileges.
- Hierarchy: organization, account, database, schema, schema objects.
- Query access needs USAGE on database and schema, SELECT on the table and USAGE on a warehouse.
- Future grants cover objects created later in a schema or database.
- Managed access schemas let only the schema owner or MANAGE GRANTS roles grant privileges.
Ownership is powerful. The owner role can drop the object and grant any privilege on it, so do not leave production objects owned by a personal or ad hoc role.
Check yourself
Which access control model gives every object an owner who can grant access to it?
Discretionary access control (DAC). In Snowflake the owner is the role holding OWNERSHIP on the object.
An analyst role has SELECT on a table but cannot query it. What is most likely missing?
USAGE on the containing database and schema, or USAGE on a warehouse to run the query.
What changes when a schema is created WITH MANAGED ACCESS?
Object owners can no longer grant access; only the schema owner or a role with MANAGE GRANTS can grant privileges on its objects.
Topic 1 of 8 in Account Management and Data Governance
Test yourself on Account Management and Data Governance
The full Snowflake SnowPro Core COF-C03 question bank has 845 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Snowflake. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.