Snowflake

Snowflake RBAC Complete Guide: Designing and Implementing Role-Based Access Control

2026-03-21
更新: 2026-03-27
NicheeLab Editorial Team

Snowflake access control is built on RBAC (Role-Based Access Control). Every privilege is granted to a role, and users reach objects through the roles they activate. This article walks through the system-defined role hierarchy, custom role design patterns, and GRANT/REVOKE syntax in a single, structured guide.

Core Concepts of RBAC

In Snowflake RBAC, privileges are defined on objects and granted to roles. You cannot grant privileges directly to users — users always reach objects through a role. Roles can be granted to other roles to form a hierarchy, and a higher-level role inherits the privileges of every role beneath it.

Access control model:

[User] ──(USE ROLE)──→ [Role] ──(GRANT)──→ [Privilege] ──→ [Object]

* Privileges cannot be granted directly to users.
* Roles can be granted to other roles to build a hierarchy.

System-Defined Role Hierarchy

Snowflake ships with 5 system-defined roles arranged in a fixed hierarchy. Each higher-level role inherits every privilege of the roles below it.

System-defined role hierarchy:

              ACCOUNTADMIN
             /            \
      SYSADMIN        SECURITYADMIN
         │                  │
         │              USERADMIN
         │                  │
         └────── PUBLIC ────┘

ACCOUNTADMIN  : Top-level administrator for the entire account
SYSADMIN      : Manages objects such as warehouses, databases, and schemas
SECURITYADMIN : Manages roles, privileges, and GRANTs (holds MANAGE GRANTS)
USERADMIN     : Creates and manages users and roles
PUBLIC        : Lowest-level role automatically granted to every user

Responsibilities and Privileges of Each Role

RolePrimary ResponsibilityKey Privileges Granted
ACCOUNTADMINManaging the entire accountAll SYSADMIN + SECURITYADMIN privileges, billing management, Resource Monitor creation
SYSADMINCreating and managing objectsCREATE WAREHOUSE / DATABASE / SCHEMA, etc.
SECURITYADMINManaging access controlMANAGE GRANTS (manage GRANTs on other roles); inherits USERADMIN privileges
USERADMINCreating users and rolesCREATE USER / ROLE
PUBLICDefault role for all usersNone (only explicitly granted privileges)

Designing Custom Roles

In real-world deployments, you create custom roles that match your business requirements. Best practice is to connect custom roles under SYSADMIN.

Example custom role hierarchy:

              ACCOUNTADMIN
             /            \
      SYSADMIN        SECURITYADMIN
       /    \               │
  ETL_ADMIN  ANALYST_ADMIN  USERADMIN
     │          │            │
  ETL_ROLE   ANALYST_ROLE   PUBLIC
     │          │
  ETL_DEV    ANALYST_RO

* Every custom role is connected under SYSADMIN
  (no orphan roles).
-- Create a custom role and connect it under SYSADMIN
CREATE ROLE analyst_role
  COMMENT = 'Role for the data analytics team';

-- Connect under SYSADMIN (best practice)
GRANT ROLE analyst_role TO ROLE SYSADMIN;

-- Grant the required privileges
GRANT USAGE ON DATABASE analytics_db TO ROLE analyst_role;
GRANT USAGE ON SCHEMA analytics_db.public TO ROLE analyst_role;
GRANT SELECT ON ALL TABLES IN SCHEMA analytics_db.public TO ROLE analyst_role;
GRANT SELECT ON FUTURE TABLES IN SCHEMA analytics_db.public TO ROLE analyst_role;
GRANT USAGE ON WAREHOUSE analyst_wh TO ROLE analyst_role;

-- Grant the role to a user
GRANT ROLE analyst_role TO USER tanaka;

GRANT / REVOKE Syntax

GRANT — Granting Privileges

-- Object-level GRANTs
GRANT SELECT ON TABLE my_db.public.sales TO ROLE analyst_role;
GRANT INSERT, UPDATE ON TABLE my_db.public.reports TO ROLE etl_role;
GRANT USAGE ON WAREHOUSE etl_wh TO ROLE etl_role;
GRANT CREATE TABLE ON SCHEMA my_db.staging TO ROLE etl_role;

-- Database- and schema-level GRANTs
GRANT USAGE ON DATABASE my_db TO ROLE analyst_role;
GRANT USAGE ON ALL SCHEMAS IN DATABASE my_db TO ROLE analyst_role;

-- FUTURE GRANTs (apply to objects created later)
GRANT SELECT ON FUTURE TABLES IN SCHEMA my_db.public TO ROLE analyst_role;
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE my_db TO ROLE analyst_role;

-- Role GRANTs (building the hierarchy)
GRANT ROLE analyst_role TO ROLE analyst_admin;
GRANT ROLE analyst_admin TO ROLE SYSADMIN;

REVOKE — Revoking Privileges

-- Revoke a specific privilege
REVOKE SELECT ON TABLE my_db.public.sales FROM ROLE analyst_role;

-- Revoke FUTURE GRANTs
REVOKE SELECT ON FUTURE TABLES IN SCHEMA my_db.public FROM ROLE analyst_role;

-- Remove a role from a hierarchy
REVOKE ROLE analyst_role FROM ROLE SYSADMIN;

-- CASCADE / RESTRICT (when references exist)
REVOKE SELECT ON TABLE my_db.public.sales FROM ROLE analyst_role CASCADE;

Types of Privileges

CategoryKey PrivilegesTarget Object
Global privilegesCREATE WAREHOUSE, MANAGE GRANTS, EXECUTE TASKEntire account
Database privilegesUSAGE, CREATE SCHEMA, MONITORDatabase
Schema privilegesUSAGE, CREATE TABLE, CREATE VIEWSchema
Table privilegesSELECT, INSERT, UPDATE, DELETE, TRUNCATETable
Warehouse privilegesUSAGE, OPERATE, MONITOR, MODIFYWarehouse

Differences Between Warehouse Privileges

PrivilegeWhat it allows
USAGERun queries using the warehouse
OPERATEStart, stop, suspend, and resume the warehouse
MONITORMonitor warehouse usage and performance
MODIFYModify warehouse properties (resizing, etc.)

Relationship with DAC (Discretionary Access Control)

Snowflake combines RBAC with Discretionary Access Control (DAC). Under DAC, the role that created an object owns it and holds every privilege on it. To transfer ownership, use GRANT OWNERSHIP ON ... TO ROLE ....

-- Transfer ownership
GRANT OWNERSHIP ON TABLE my_db.public.sales
  TO ROLE etl_role
  REVOKE CURRENT GRANTS;

-- REVOKE CURRENT GRANTS: revoke the previous owner's privileges
-- COPY CURRENT GRANTS: keep the previous owner's privileges

Best Practices

  • Use ACCOUNTADMIN only for administrative work; use custom roles for day-to-day operations.
  • Assign at least two users to ACCOUNTADMIN and enable MFA on each of them.
  • Connect every custom role under SYSADMIN to prevent orphan roles.
  • Use FUTURE GRANTs to set up privileges in advance for objects that will be created later.
  • Follow the principle of least privilege — grant only what each role needs for its job.
  • Assign object ownership to service roles (e.g., ETL_ROLE) so that an individual user leaving the company does not break ownership.

Key Exam Takeaways

  • ACCOUNTADMIN is the top-level role that inherits both SYSADMIN and SECURITYADMIN privileges.
  • SECURITYADMIN holds MANAGE GRANTS and can manage GRANTs on other roles.
  • Best practice is to connect custom roles under SYSADMIN.
  • The PUBLIC role is automatically granted to every user and cannot be revoked.
  • FUTURE GRANTs automatically apply privileges to objects created in the future.
  • On warehouses, USAGE is required to run queries while OPERATE is required to start and stop them.

Sample Question

RBAC

問題 1

You want to grant operational privileges on the warehouse etl_wh to a new custom role named custom_etl. The role should be able to start and stop the warehouse but must not be able to change its properties. Which privilege should you grant?

  1. A. USAGE
  2. B. OPERATE
  3. C. MODIFY
  4. D. MONITOR

正解: B

OPERATE allows starting (RESUME), stopping (SUSPEND), and aborting (ABORT) the warehouse. USAGE is required to run queries but does not allow starting or stopping. MODIFY allows property changes such as resizing, which exceeds the requirement. MONITOR only allows watching usage and cannot start or stop the warehouse.

Frequently Asked Questions

Is it safe to use the ACCOUNTADMIN role for day-to-day work?

No, it is not recommended. ACCOUNTADMIN is the top-level role with every privilege in the account, so using it routinely increases the risk of accidental changes and security incidents. Snowflake's official best practices recommend switching to ACCOUNTADMIN only when administrative work requires it and using custom roles for day-to-day tasks. You should also assign multiple users to ACCOUNTADMIN and enable MFA on each of them.

What is the difference between SYSADMIN and SECURITYADMIN?

SYSADMIN owns object management — warehouses, databases, schemas, and so on. SECURITYADMIN owns role and user creation along with managing GRANTs. SECURITYADMIN holds the MANAGE GRANTS global privilege, which lets it run GRANT/REVOKE on objects owned by other roles. This split lets you operate object management and access control independently.

Which system-defined role should custom roles be created under?

Best practice is to create custom roles under SYSADMIN. Concretely, you connect the hierarchy with GRANT ROLE custom_role TO ROLE SYSADMIN. This lets SYSADMIN inherit every privilege the custom role holds, so ACCOUNTADMIN can centrally manage account-wide privileges. If you skip this step, the custom role becomes an "orphan role" whose privileges are invisible even to ACCOUNTADMIN.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification — Associate, Core, Specialty, Ad...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams ranked by difficulty with study-time es...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — six domains, scope, sample ques...

Snowflake

SnowPro Associate Platform (SOL-C01): Complete Guide (2026)

The entry-level SnowPro Associate exam — scope, weighting, s...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.