CertSafari
    Snowflake SnowPro Advanced: Administrator (ADA-C02)· Lessons

    Domain 1 · Lesson 2/24

    Designing Snowflake access control: DAC, RBAC, UBAC and the role hierarchy

    Given a set of business requirements, design access control framework

    21 min read
    4.43% of exam
    4 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Explain how Snowflake's DAC, RBAC and UBAC models work, and choose the right one for a business requirement
    • Name what each system-defined role (ORGADMIN, ACCOUNTADMIN, SECURITYADMIN, USERADMIN, SYSADMIN, PUBLIC) is for and where it sits in the hierarchy
    • Decide when a business requirement calls for a custom role rather than a system-defined one
    • Design custom roles that follow least privilege and roll up to SYSADMIN
    • Predict what a parent role gains when you grant a role to it, and what it loses when you revoke one
    • Grant the full USAGE chain a role needs to query a table

    Key concept

    Privilege inheritance through the role hierarchy — In Snowflake, privileges are attached to roles, and a role granted to another role passes all of its privileges upward. A role's effective access is therefore everything granted to it plus everything granted to every role beneath it.

    1.Three access models: ownership, roles and direct user grants

    Snowflake doesn't use just one access control model. It mixes three, and an access design has to say which one governs which objects. Every securable object follows the same default rule: unless a grant allows access, access is denied. The three models differ in who can make grants and who receives them.

    The three models Snowflake combines, and where privileges land in each
    ModelWho holds the privilegeHow access reaches a user
    Discretionary Access Control (DAC)The role that owns the object (holds OWNERSHIP)The owner role can grant access to the object to other roles
    Role-based Access Control (RBAC)A roleThe role is granted to users, who then act with its privileges
    User-based Access Control (UBAC)An individual userThe privilege is granted straight to the user, with no role in between

    DAC is about ownership, and roles own objects, not people. Each securable object has exactly one owner role. By default that is the role used to create the object. Every user granted that role shares control of the object. In a regular schema the owner has all privileges on the object, including the right to grant or revoke privileges for other roles, and GRANT OWNERSHIP moves ownership to a different role. Because the owner is always a role, no design can make one analyst the private owner of a table. The best you can do is give that person a role that nobody else holds. Owners can also grant to any role, including PUBLIC, which is how grants spread out of control.

    RBAC is the foundation, and the default choice for production. Privileges go to roles, and roles go to users. Take 400 analysts spread across five teams, moving between teams every few months. Under RBAC you build one role per team. Moving a person takes one REVOKE ROLE ... FROM USER and one GRANT ROLE ... TO USER. The team's privileges don't change, and the audit trail shows a single role change. Snowflake recommends RBAC for production and enterprise governance because grants are centralised, consistent and easy to audit. Two other designs fail that requirement. Granting every privilege to every user individually means hundreds of grants to undo for each move. A single role holding every team's privileges makes everyone equal, which breaks least privilege.

    UBAC grants a privilege straight to one user. It is built for private development and collaboration. A typical case is someone building a Streamlit app who wants to share it with a few colleagues before it gets a wider role-based rollout. To use UBAC, a role with MANAGE GRANTS on the object grants the privilege to the user. The user also needs the containers above the object, granted the same way. Direct grants only take effect when the user's secondary roles are all enabled. The details of secondary roles are covered in primary and secondary roles.

    UBAC: granting a user everything needed to reach one Streamlit app, with no role involvedsql
    GRANT USAGE ON WAREHOUSE w1 TO USER user1;
    
    GRANT USAGE ON DATABASE d1 TO USER user1;
    
    GRANT USAGE ON SCHEMA d1.s1 TO USER user1;
    
    GRANT USAGE ON STREAMLIT `streamlitApp1` TO USER user1;

    UBAC doesn't give owners any power they lacked before. An owner who could already grant to any role can now also grant to one person. Grants can spread under either model. The control against that is a managed access schema, which takes grant decisions away from object owners. An account can also switch UBAC off entirely with DISABLE_USER_PRIVILEGE_GRANTS = TRUE.

    Custom roles are how RBAC is fitted to a business, because the system-defined roles only cover account administration. They can't be dropped and their built-in privileges can't be revoked, so anything specific to an organisation, such as who reads finance data or who loads the staging schema, belongs in a custom role. A user holding a role with the necessary privileges creates it, and each one is scoped to a business function so that it permits actions on a narrow set of objects.

    Four requirements call for a custom role rather than a system-defined one:

    • A restricted job such as reporting. A read-only role holds USAGE on a warehouse, database and schema plus SELECT on the tables, so its users can't update data, create objects or drop tables.
    • A business function that spans several data sets. Accountants who need read-write on fin but read-only on hr get a role built from narrower access roles, one per database and level of access.
    • Access confined to one database. A database role limits actions to that database and the objects in it. It can't be activated in a session, so it is granted to an account role first.
    • An extra object privilege that an administrator needs. Mixing account-management and object privileges in one role is discouraged, so the privilege goes on a custom role and that role is granted to the system-defined role.

    Where a requirement is plain account administration, such as creating users, the matching system-defined role already fits and no custom role is needed. How custom roles are built and attached to SYSADMIN is covered in the custom roles section below.

    Checkpoint 1 of 9· Match them up

    Match each access control model to the situation it is designed for

    Tap a term, then the definition that fits it.

    Checkpoint 2 of 9· Exam question

    A Snowflake administrator is documenting the access models the platform supports. Which description correctly characterizes user-based access control (UBAC) as opposed to role-based access control (RBAC)?

    Checkpoint 3 of 9· Exam question

    A company has 400 analysts who rotate between five business teams every few months. Security wants the lowest ongoing administrative effort and a clear audit trail when someone changes teams. Which design best meets this requirement?

    Sources123

    2.System-defined roles and their hierarchy

    Every account comes with a small set of system-defined roles that split up administrative work. They can't be dropped, and the privileges Snowflake gives them can't be revoked. Choosing among them comes down to matching a requirement to the narrowest role that meets it. Each role is defined as much by what it lacks as by what it has.

    System-defined roles: purpose and place in the default hierarchy
    RoleWhat it is forHierarchy position
    ORGADMINOrganization-level operations, run from a regular accountAbove the account level; it manages the organization rather than objects in one account
    ACCOUNTADMINTop-level account role: account parameters, billing and credit data, stopping any running SQL statementTop of the account hierarchy; SYSADMIN and SECURITYADMIN are granted to it
    SECURITYADMINHolds the global MANAGE GRANTS privilege, so it can grant or revoke any privilege on any object; creates and manages users and rolesChild of ACCOUNTADMIN; USERADMIN is granted to it
    USERADMINUser and role management only: holds CREATE USER and CREATE ROLEChild of SECURITYADMIN
    SYSADMINCreates warehouses, databases and all database objectsChild of ACCOUNTADMIN; the recommended parent of custom roles
    PUBLICPseudo-role granted automatically to every user and every role; anything it owns is available to everyoneBottom of the hierarchy; every role inherits it

    USERADMIN versus SECURITYADMIN is the distinction people most often get wrong. Both can create users and roles. SECURITYADMIN gets that ability by inheriting USERADMIN. SECURITYADMIN also holds MANAGE GRANTS across the whole account, which lets it change any grant on any object. A team lead who should only create users and roles for their department needs USERADMIN. Granting SECURITYADMIN would also give them account-wide grant control. Granting SYSADMIN would let them create databases. Granting ACCOUNTADMIN would give them everything. In the other direction, MANAGE GRANTS doesn't let SECURITYADMIN create objects. To create a database role, for example, SECURITYADMIN must also be granted CREATE DATABASE ROLE.

    ACCOUNTADMIN sits at the top but is not a superuser. It can see and manage an object only if it, or a role below it in the hierarchy, has privileges on that object. It should be held by a small, controlled group of users, and it should not be used to create everyday objects. How to protect and assign it is covered in administrative roles. Snowflake is also phasing ORGADMIN out in favour of GLOBALORGADMIN, which exists only in the organization account.

    Checkpoint 4 of 9· Check yourself

    A department lead must be able to create new users and roles for their team, and do nothing else. Which system-defined role should they be granted?

    Checkpoint 5 of 9· Check yourself

    A custom role DEV_ROLE was never granted to any other role. It creates a table. An administrator then switches to ACCOUNTADMIN and tries to drop that table. What happens?

    Checkpoint 6 of 9· Exam question

    A new team lead must be able to create users and roles for their department. The security team wants to give them only these abilities, without account-wide privilege management or the ability to create databases. Which system-defined role should be granted?

    Sources12

    3.Custom roles and why they roll up to SYSADMIN

    Custom roles put least privilege into practice. Each one is scoped to a business function and allowed to act on a narrow set of objects. USERADMIN creates them, as can any higher role or any role granted CREATE ROLE. The workflow has four steps: create the role, grant it privileges, grant it to the users who need it, and grant it to a parent role. The last step is optional but strongly recommended, because a new role starts out isolated. It belongs to no user and sits under no other role.

    Without a parent, an isolated role's objects are out of the administrators' reach. By default, even ACCOUNTADMIN can't modify or drop objects created by a custom role. If the custom role isn't under SYSADMIN through the hierarchy, system administrators can't manage what it owns. Only roles with MANAGE GRANTS, which by default means only SECURITYADMIN, can see those objects and change their grants. The fix is one statement. After it runs, SYSADMIN inherits every privilege the custom role holds, and ACCOUNTADMIN gets them through SYSADMIN. Administrators manage objects from the SYSADMIN branch, while user and role management stays with USERADMIN.

    Attaching custom role r1 to SYSADMIN so SYSADMIN inherits its privilegessql
    GRANT ROLE r1 TO ROLE sysadmin;

    For larger designs, use two layers of custom roles. Access roles hold privileges on database objects or warehouses. Functional roles match business functions and are made up of access roles. Take an account with a fin database and an hr database. Accountants need read-write on fin and read-only on hr. Analysts need read-only on both. You build read and write access roles for each database, grant the right combination to an ACCOUNTANT role and an ANALYST role, and grant the top functional roles to SYSADMIN. Technically, Snowflake treats access roles and functional roles the same way. The split only shows how the roles are used. SYSADMIN works well as the top of this tree, but any role with enough privileges could take that place.

    Checkpoint 7 of 9· Fill the gap

    Role r1 owns the tables a data team builds. Which role goes in the blank so that system administrators can manage those tables, and ACCOUNTADMIN reaches them through the recommended branch of the hierarchy?

    GRANT ROLE r1 TO ROLE  ? ;

    Sources312

    4.What granting and revoking a role does to inherited privileges

    Privileges flow up the hierarchy, never down. Grant r1 to r2, and r2 gains everything r1 has. Grant r2 to r3, and r3 gains both. A parent's effective privileges are the combined privileges of every role beneath it. If a role below the custom role owns objects, members of the parent role effectively own them as well.

    Revoking a role cuts off everything that came through it. REVOKE ROLE removes a role from another role or from a user. The parent stops inheriting every privilege it received through that path, including privileges from roles lower in the revoked branch. Because one statement can remove a large set of privileges at once, revoke a mid-level functional role only after checking what sits beneath it.

    Detaching the analyst role from SYSADMINsql
    REVOKE ROLE analyst FROM ROLE SYSADMIN;

    Two clauses control how far a revoke goes. Revoking GRANT OPTION FOR a role removes only the parent's ability to grant that role onward. The grant itself stays, so inheritance continues. When the parent has re-granted the role to other roles, the default RESTRICT makes the revoke fail. CASCADE revokes the grant and, recursively, every grant that depended on it.

    REVOKE ROLE ... FROM ROLE variants and their effect on the parent
    Statement formDoes the parent still inherit?Effect on roles it re-granted to
    REVOKE ROLE r FROM ROLE p (RESTRICT, the default)No, if the revoke succeedsThe command fails if p re-granted r
    REVOKE ROLE r FROM ROLE p CASCADENoThose dependent grants are revoked recursively
    REVOKE GRANT OPTION FOR ROLE r FROM ROLE pYes; only the grant option is removedWith CASCADE, dependent grants are revoked and p keeps r

    Checkpoint 8 of 9· Check yourself

    Consider this chain: role FIN_READ holds SELECT on the tables in the fin database. FIN_READ is granted to role ANALYST, and ANALYST is granted to SYSADMIN. SYSADMIN also holds the privilege to create warehouses. Which statement about effective privileges is correct?

    Sources14

    5.Granting access to an object inside a database

    A privilege on a table is useless unless the role can reach the table. Tables, views, functions and stages live in a schema, and the schema lives in a database. To work with an object, a role also needs USAGE, or any other privilege, on both the database and the schema above it. Running a query takes compute as well, so the role needs USAGE on a warehouse too. A role that has SELECT on a table and nothing else can't query it.

    The minimum grants that let role r1 query table d1.s1.t1sql
    GRANT USAGE ON WAREHOUSE w1 TO ROLE r1; GRANT USAGE ON DATABASE d1 TO ROLE r1; GRANT USAGE ON SCHEMA d1.s1 TO ROLE r1; GRANT SELECT ON TABLE d1.s1.t1 TO ROLE r1;

    Inheritance and the USAGE chain work together. The chain can be split across a hierarchy. For example, an access role might hold SELECT on the tables, while the functional role above it holds USAGE on the database and schema. Users of the functional role get the whole chain because the parent inherits the child's privileges. When a query is denied even though the table grant looks right, run SHOW GRANTS TO ROLE and check for a missing database, schema or warehouse grant. GRANT SELECT ON ALL TABLES IN SCHEMA covers only tables that already exist. Granting on tables created later is covered in fine-tuning access controls, and the privileges for each object type are listed in creating and managing access control.

    Checkpoint 9 of 9· Fill the gap

    Role r1 already holds SELECT on table d1.s1.t1, but its queries are still denied. These grants give r1 the minimum it needs. Which privilege completes the schema grant?

    GRANT USAGE ON WAREHOUSE w1 TO ROLE r1; GRANT USAGE ON DATABASE d1 TO ROLE r1; GRANT  ?  ON SCHEMA d1.s1 TO ROLE r1; GRANT SELECT ON TABLE d1.s1.t1 TO ROLE r1;

    Sources231

    Practise it for real

    Build a custom role that can query one table, assign it to a user, and attach it to SYSADMIN so administrators can manage it.

    1. 1.As USERADMIN, run: CREATE ROLE r1 COMMENT = 'This role has all privileges on schema_1';

      Why: USERADMIN or a higher role, or any role with CREATE ROLE, can create custom account roles.

      You should see: The role exists, isolated: no users, no parent role, no privileges.

    2. 2.As SECURITYADMIN, run: GRANT USAGE ON WAREHOUSE w1 TO ROLE r1; GRANT USAGE ON DATABASE d1 TO ROLE r1; GRANT USAGE ON SCHEMA d1.s1 TO ROLE r1; GRANT SELECT ON TABLE d1.s1.t1 TO ROLE r1;

      Why: Querying needs the full chain: warehouse, database, schema, then the table.

      You should see: Four grants succeed.

    3. 3.Run: GRANT ROLE r1 TO USER smith;

      Why: Under RBAC, users get privileges through the roles granted to them.

      You should see: smith can run USE ROLE r1 and query d1.s1.t1.

    4. 4.Run: GRANT ROLE r1 TO ROLE sysadmin;

      Why: Without a parent, administrators can't manage what r1 owns.

      You should see: SYSADMIN, and through it ACCOUNTADMIN, inherits r1's privileges.

    5. 5.Run: SHOW GRANTS TO ROLE r1;

      Why: Confirms the chain is complete before you hand the role over.

      You should see: Four rows: USAGE on W1, D1 and D1.S1, and SELECT on D1.S1.T1.

    Stuck? Get a nudge

    If smith gets a 'does not exist or not authorized' error, compare the SHOW GRANTS output against the four grants and look for the missing link in the chain.

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Discretionary Access Control (DAC): Each object has an owner, who can in turn grant access to that object.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Role-based Access Control (RBAC): Access privileges are assigned to roles, which are in turn assigned to users.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “User-based Access Control (UBAC): Access privileges are assigned directly to users.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Each securable object is owned by a single role, which by default is the role used to create the object.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Users who have been granted a role with the necessary privileges can create custom roles to meet specific business and security needs.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “To limit SQL actions to a single database, as well as any object in the database”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Snowflake recommends granting the additional privileges to a custom role and assigning the custom role to the system-defined role.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “System-defined roles cannot be dropped. In addition, the privileges granted to these roles by Snowflake cannot be revoked.”
      ↩︎ System-defined roles and their hierarchy
      “Role that encapsulates the SYSADMIN and SECURITYADMIN system-defined roles.”
      ↩︎ System-defined roles and their hierarchy
      “Inherits the privileges of the USERADMIN role via the system role hierarchy (that is, USERADMIN role is granted to SECURITYADMIN).”
      ↩︎ System-defined roles and their hierarchy
      “Role that is dedicated to user and role management only.”
      ↩︎ System-defined roles and their hierarchy
      “It does not give the SECURITYADMIN the ability to perform other actions such as creating objects.”
      ↩︎ System-defined roles and their hierarchy
      “Pseudo-role that is automatically granted to every user and every role in your account.”
      ↩︎ System-defined roles and their hierarchy
      “The ORGADMIN role will be phased out in a future release, so organization administrators are encouraged to use the GLOBALORGADMIN role instead.”
      ↩︎ System-defined roles and their hierarchy
      “As a best practice, it is not recommended to mix account-management privileges and entity-specific privileges in the same role.”
      ↩︎ System-defined roles and their hierarchy
      “Custom account roles can be created using the USERADMIN role (or a higher role)”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “Conversely, if a custom role is not assigned to SYSADMIN through a role hierarchy, the system administrators cannot manage the objects owned by the role.”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “The privileges associated with a role are inherited by any roles above that role in the hierarchy.”
      ↩︎ What granting and revoking a role does to inherited privileges
      “Securable objects such as tables, views, functions, and stages are contained in a schema object, which are in turn contained in a database.”
      ↩︎ Granting access to an object inside a database
      “The privileges associated with a role are inherited by any roles above that role in the hierarchy.”
      ↩︎ Key concept
      “Privilege inheritance is only possible within a role hierarchy.”
      ↩︎ Exam trap 3
      “Is granted the CREATE USER and CREATE ROLE security privileges.”
      ↩︎ Exam trap 4
      “Access control considers privileges assigned directly to users only when USE SECONDARY ROLE is set to ALL.”
      ↩︎ Prediction
      “A role owner (the role that has the OWNERSHIP privilege on the role) does not inherit the privileges of the owned role.”
      ↩︎ Prediction
    2. 2.
      “Using RBAC, you grant privileges to roles, and then assign users to those roles, simplifying administration, ensuring consistency, and making audit access easier.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “RBAC is generally recommended for production environments and enterprise-level governance.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “User-based access control (UBAC) is intended for use cases such as private development and collaboration.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “UBAC does not provide object owners with new levels of privilege.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Note that ACCOUNTADMIN is not a superuser role.”
      ↩︎ System-defined roles and their hierarchy
      “When a custom role is first created, it exists in isolation.”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “There is no technical difference between an object access role and a functional role in Snowflake.”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “users must be granted USAGE or any other privilege on the container database and schema.”
      ↩︎ Granting access to an object inside a database
      “By default, not even the ACCOUNTADMIN role can modify or drop objects created by a custom role.”
      ↩︎ Exam trap 2
      “users must be granted USAGE or any other privilege on the container database and schema.”
      ↩︎ Exam trap 5
      “RBAC is generally recommended for production environments and enterprise-level governance. User-based access control (UBAC) is intended for use cases such as private development and collaboration.”
      ↩︎ Checkpoint
      “The user administrator (USERADMIN) role includes the privileges to create and manage users and roles”
      ↩︎ Checkpoint
      “only allows viewing and managing objects in the account if this role, or a role lower in a role hierarchy, has sufficient privileges”
      ↩︎ Checkpoint
    3. 3.
      “A user with MANAGE GRANTS privileges on objects can grant privileges directly to users.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “Users who execute commands using this role cannot update the table data, create additional database objects, or drop tables.”
      ↩︎ Three access models: ownership, roles and direct user grants
      “we recommend creating custom roles that align with the business functions in your organization to permit SQL actions on a narrow set of securable objects.”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “The SYSADMIN role inherits any object privileges granted to the r1 role”
      ↩︎ Custom roles and why they roll up to SYSADMIN
      “To query an object (for example, a table or view), a role must have the USAGE privilege on a warehouse.”
      ↩︎ Granting access to an object inside a database
      “Privileges assigned directly to users are only effective when the user has all secondary roles enabled.”
      ↩︎ Exam trap 1
      “Create a role hierarchy by granting a role to a second role. You can then grant that second role to a third role.”
      ↩︎ Checkpoint
    4. 4.
      “Removes a role from another role or a user.”
      ↩︎ What granting and revoking a role does to inherited privileges
      “If specified, removes the ability for the recipient role to grant the role to another role.”
      ↩︎ What granting and revoking a role does to inherited privileges
      “RESTRICT: If the role being revoked has been re-granted to another role, the REVOKE command fails.”
      ↩︎ What granting and revoking a role does to inherited privileges
      “CASCADE: If the role being revoked has been re-granted, the REVOKE command recursively revokes these dependent grants.”
      ↩︎ What granting and revoking a role does to inherited privileges

    Spotted a mistake, or was something unclear? Tell us.