Accounts and Security · Topic 3 of 17
Security Architecture, RBAC Hierarchy, Inheritance and Database Roles
Design a layered Snowflake security architecture and build the RBAC hierarchy: privilege inheritance, future grants, managed access and database roles.
- 5 min
- Security is layered: RBAC, data policies, network and authentication controls, encryption and governance.
- Privileges are granted to roles; roles are granted to roles and users; parent roles inherit child privileges.
- Reading a table needs
USAGEon database and schema plusSELECT.
What it is
A security architecture in Snowflake is built in layers. No single feature meets a requirement such as "analysts see only their region and never see national IDs"; you combine access control, data policies, network controls and auditing.
Role-Based Access Control (RBAC) is the core layer. Privileges are granted to roles, roles are granted to users or to other roles, and a user acts through a role. The exam asks you to build the hierarchy so that access is easy to grant, easy to remove and traceable.
How it works
Layers of an architecture
| Need | Layer | Main tools |
|---|---|---|
| Who may use which objects | Access control | Roles, grants, database roles, managed access schemas |
| What a user sees inside an object | Data protection | Masking, row access, aggregation and projection policies, secure views |
| Who may connect and from where | Network and authentication | Network policies, authentication policies, SSO, MFA |
| Where data is stored and protected | Encryption and edition | Encryption by default, Tri-Secret Secure, Business Critical |
| What is sensitive and who touched it | Governance | Object tagging, classification, access history, lineage |
Start from the requirement, name the layer that enforces it, then choose the feature. Compliance frameworks usually also fix the edition: regulated workloads belong in Business Critical or higher.
RBAC and privilege inheritance
A privilege is the right to do an action on an object, such as SELECT on a table or USAGE on a database. A role holds privileges. A role can be granted to another role, and the parent then inherits every privilege of the child.
CREATE ROLE sales_read;
GRANT USAGE ON DATABASE sales TO ROLE sales_read;
GRANT USAGE ON SCHEMA sales.public TO ROLE sales_read;
GRANT SELECT ON ALL TABLES IN SCHEMA sales.public TO ROLE sales_read;
GRANT SELECT ON FUTURE TABLES IN SCHEMA sales.public TO ROLE sales_read;
GRANT ROLE sales_read TO ROLE analyst;
GRANT ROLE analyst TO USER ana;
Inheritance flows up: analyst can do everything sales_read can, and anyone with a role above analyst can do the same.
Rules that matter:
- To read a table a role needs
USAGEon the database and the schema as well asSELECTon the table. - Future grants cover objects created later;
ALL ... IN SCHEMAgrants cover only what exists now. - Every object has one owner role.
OWNERSHIPcan be transferred but not shared, and the owner has all privileges on it. - Granting a role to
SYSADMINlets administrators manage the objects that role owns. Custom role trees should end underSYSADMIN. - Managed access schemas (
CREATE SCHEMA ... WITH MANAGED ACCESS) move grant decisions from object owners to the schema owner or a role withMANAGE GRANTS. That keeps owners from handing out access on their own.
A scenario that says "new tables must be readable automatically" points to future grants. A scenario that says "object owners must not grant access to others" points to a managed access schema.
Database roles
A database role is a role that lives inside one database. It is created with CREATE DATABASE ROLE <db>.<role> and holds privileges on objects in that database only.
CREATE DATABASE ROLE sales.reader;
GRANT SELECT ON ALL TABLES IN SCHEMA sales.public TO DATABASE ROLE sales.reader;
GRANT DATABASE ROLE sales.reader TO ROLE analyst;
Features that set them apart:
- They are granted to account roles (or to other database roles in the same database); users do not log in with them directly.
- They can be granted to a share, so a provider can expose a subset of a database to each consumer. Account roles cannot be granted to a share.
- They travel with the database when it is cloned or replicated, so a replica keeps its access structure.
- They keep access logic inside the database owner's control, without needing an administrator at account level.
| Property | Account role | Database role |
|---|---|---|
| Scope | Whole account | One database |
| Granted to | Users and roles | Account roles and database roles |
| Usable in a share | No | Yes |
| Moves with database | No | Yes |
Common mistakes
Granting SELECT but not USAGE on the database and schema. The role then cannot see the table.
Forgetting future grants. New tables arrive with no access, and analysts raise tickets.
Putting privileges on user facing roles. Grant privileges to access roles and roles to roles; keep user grants thin.
Trying to share an account role. Shares take database roles (and direct grants), so build the access structure in the database.
What to remember for the exam
- Security is layered: RBAC, data policies, network and authentication controls, encryption and governance.
- Privileges are granted to roles; roles are granted to roles and users; parent roles inherit child privileges.
- Reading a table needs
USAGEon database and schema plusSELECT. - Future grants handle new objects; managed access schemas centralize grant control.
- Database roles are scoped to one database, can go into a share and move with replication and cloning.
Check yourself
A role has
SELECTon a table but cannot query it. What is missing?USAGEon the database and the schema that contain the table.Which role type can be granted to a share?
A database role, which is why it suits per consumer access in data sharing.
How do you make privileges flow from a read role to an analyst role?
Grant the read role to the analyst role, and the analyst role inherits the privileges.
Topic 3 of 17 in Accounts and Security
Test yourself on Accounts and Security
The full Snowflake ARA-C01 question bank has 687 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.