CertSafari
    Snowflake SnowPro Core Certification (COF-C03)· Lessons

    Domain 2 · Lesson 7/19

    Snowflake Access Control: DAC, RBAC, and Roles

    Explain Snowflake security model and principles

    13 min read
    6.67% of exam
    2 sources
    Published 5 Oct 2026
    Docs as of 4 Oct 2026

    What you will be able to do

    • Tell apart the DAC, RBAC and UBAC parts of Snowflake's access control model
    • Describe the securable object hierarchy and how ownership and managed access schemas affect who can grant privileges
    • Match each system-defined role to its responsibility
    • Choose between account roles, database roles and custom roles, and explain how database roles reach a session
    • Explain how primary and secondary roles combine to authorize SQL actions

    Key concept

    Privileges flow through roles to securable objects — In Snowflake, nothing is accessible unless a grant allows it. Privileges on objects are granted to roles (or occasionally to users), roles are granted to users or to other roles, and the roles active in a session decide what a user can do.

    1.Three access control models in one framework

    Snowflake does not use a single access control model. It combines three. Discretionary Access Control (DAC) means every object has an owner, and that owner decides who else gets access. Role-based Access Control (RBAC) means privileges are granted to roles, and roles are granted to users. User-based Access Control (UBAC) means privileges are granted directly to users. UBAC has a catch: privileges granted directly to a user only count when the session has secondary roles set to ALL.

    Four terms run through the rest of this lesson. A securable object is anything access can be granted on. A role is an entity that privileges are granted to. A privilege is a defined level of access to an object. A user is an identity, either a person or a service. Privileges can also be granted to users, but RBAC is the usual way to manage access. Roles can be granted to other roles, which creates a role hierarchy. In that hierarchy, a role inherits the privileges of every role below it.

    The documentation adds that no super-user exists who can skip these checks: every action needs the right privileges.

    Checkpoint 1 of 8· Check yourself

    Role R1 created table T1 and therefore owns it. R1 then grants SELECT on T1 to role R2. Which access control model does R1's ability to make that grant illustrate?

    Sources1

    2.The securable object hierarchy and ownership

    Every securable object sits inside a hierarchy of containers. The organization is at the top. Each account sits under it and holds all of its databases. Each database holds schemas. Each schema holds objects such as tables, views, functions and stages.

    Ownership is what makes DAC work. Owning an object means a role holds the OWNERSHIP privilege on it. Each object has exactly one owner role, which is the role that created it unless ownership is changed. GRANT OWNERSHIP transfers ownership to another role, and that includes database roles. Every user who has the owner role shares control of the object.

    In a regular schema, the owner role has every privilege on its object by default, including the right to grant or revoke privileges to other roles. A managed access schema centralizes those decisions instead. Object owners can no longer grant. Only the schema owner, or a role with the MANAGE GRANTS privilege, can grant privileges on objects in the schema, and that includes future grants.

    One more ownership rule is easy to miss. Owning a *role* is not the same as inheriting from it. A role that owns another role does not get that role's privileges. Privileges are inherited only through the role hierarchy.

    Checkpoint 2 of 8· Check yourself

    Role ADMIN_X holds OWNERSHIP on role REPORTER, but REPORTER has not been granted to ADMIN_X. Which statement is true?

    Sources1

    3.System-defined roles

    Every account comes with a small set of system-defined roles. They cannot be dropped, and the privileges Snowflake grants them cannot be revoked. You can grant them extra privileges, but Snowflake recommends against it, because these roles hold account-management privileges and mixing those with privileges on specific objects is poor practice. If one of them needs more access, grant that access to a custom role and grant the custom role to the system-defined role.

    The roles also form their own hierarchy. ACCOUNTADMIN contains both SYSADMIN and SECURITYADMIN, and USERADMIN is granted to SECURITYADMIN. Note that SECURITYADMIN's MANAGE GRANTS privilege only lets it grant and revoke. It does not let SECURITYADMIN create objects. For example, to create a database role, SECURITYADMIN also needs the CREATE DATABASE ROLE privilege.

    System-defined roles and what each one is for
    RoleResponsibility
    ACCOUNTADMINTop-level role that contains SYSADMIN and SECURITYADMIN. Grant it only to a limited, controlled number of users
    SECURITYADMINManages any object grant globally through MANAGE GRANTS, and creates, monitors and manages users and roles. Inherits USERADMIN
    USERADMINUser and role management only. Holds CREATE USER and CREATE ROLE
    SYSADMINCreates warehouses, databases and other objects. Can grant privileges on them to other roles when all custom roles roll up to it
    PUBLICPseudo-role automatically granted to every user and role. Anything it owns is available to everyone in the account

    PUBLIC is also the fallback role when a session starts. If the connection does not specify a role and the user has no default role, the session uses PUBLIC. PUBLIC suits cases where no explicit access control is needed and all users are treated equally.

    Checkpoint 3 of 8· Exam question

    Which statement accurately distinguishes Snowflake's discretionary access control (DAC) model from its role-based access control (RBAC) model?

    Checkpoint 4 of 8· Match them up

    Match each system-defined role to its job

    Tap a term, then the definition that fits it.

    Sources1

    4.Functional roles: account, database, and custom roles

    The roles you create for business functions differ mainly in scope.

    - An account role can be granted privileges on any object in the account. - A database role is limited to one database and the objects inside it. You grant it privileges on objects in that same database.

    Any role you create yourself is a custom role. USERADMIN, any higher role, or any role with the CREATE ROLE privilege can create custom account roles. Custom database roles are created by the database owner. A new role starts out unattached: it is not granted to any user or to any other role.

    Database roles have one important limit. They cannot be activated directly in a session. To use a database role's privileges, grant the database role to an account role, and activate the account role. The reverse grant is not allowed: account roles cannot be granted to database roles.

    Checkpoint 5 of 8· Exam question

    A data platform team creates a new schema `ANALYTICS.MARTS` and expects dozens of tables to be created in it over the coming months by an ETL pipeline running as role `ETL_LOADER`. They want the `REPORTING_RO` role to automatically receive SELECT on every table as soon as it is created, without re-running a GRANT statement each time. Which approach satisfies this requirement?

    Snowflake recommends building custom roles into a hierarchy whose top role is granted to SYSADMIN. That way system administrators can manage every object in the account, while user and role management stays with USERADMIN. If a custom role is left outside that hierarchy, SYSADMIN cannot manage its objects. Only roles with MANAGE GRANTS can then see those objects and change their grants, and by default that means only SECURITYADMIN.

    Checkpoint 6 of 8· Exam question

    An engineer runs `DROP ROLE FINANCE_ANALYST`, a custom role that owned several tables and views, without first reassigning ownership of those objects. What happens to the objects that role owned?

    Checkpoint 7 of 8· Check yourself

    Database role SALES_DB.READER holds SELECT on every table in SALES_DB. User U1 has only the account role ANALYST. What makes READER's privileges available to U1?

    Sources1

    5.Primary and secondary roles in a session

    A session always has exactly one primary role, but it can have any number of secondary roles active at once. The primary role comes from the role named in the connection, or from the user's default role, or from PUBLIC if neither is set. USE ROLE changes the primary role during the session. USE SECONDARY ROLES changes the secondary roles.

    The two kinds of role authorize different things. CREATE statements are authorized only by the primary role, and every new object is owned by the primary role. For any other statement, privileges from the primary role, the secondary roles and all the roles they inherit are combined. This is why secondary roles are handy for cross-database joins: without them, you would need a parent role that held access to both databases. Database roles can never be primary or secondary roles.

    Syntax of USE SECONDARY ROLESsql
    USE SECONDARY ROLES {
          ALL
        | NONE
        | <role_name> [ , <role_name> ... ]
      }

    ALL activates every role granted to the user, in addition to the primary role. The set is worked out again for each statement, so roles granted mid-session take effect immediately and revoked roles stop working. NONE turns secondary roles off, which leaves the primary role as the only source of authorization. If you name specific roles instead, each one must already be granted to the user, or the command fails.

    Checkpoint 8 of 8· Fill the gap

    Which keyword activates every role granted to the user as a secondary role?

    USE SECONDARY ROLES  ? ;

    Sources12

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.A database role can be activated with USE ROLE or used as a secondary role.Why is that wrong?

      A database role can be neither a primary nor a secondary role. You have to grant it to an account role, and only account roles can be activated in a session.

      Covered in Functional roles: account, database, and custom roles

    2. 2.If a secondary role has the CREATE privilege in a schema, the user can create objects there.Why is that wrong?

      CREATE statements are authorized only by the primary role, and the new object is owned by the primary role. Secondary roles only authorize other kinds of SQL actions.

      Covered in Primary and secondary roles in a session

    3. 3.Because SECURITYADMIN holds MANAGE GRANTS, it can create any object in the account.Why is that wrong?

      MANAGE GRANTS only lets SECURITYADMIN grant and revoke privileges. To create objects it needs the matching CREATE privilege, for example CREATE DATABASE ROLE.

      Covered in System-defined roles

    Sources

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

    1. 1.
      “Role-based Access Control (RBAC): Access privileges are assigned to roles, which are in turn assigned to users.”
      ↩︎ Three access control models in one framework
      “Access control considers privileges assigned directly to users only when USE SECONDARY ROLE is set to ALL.”
      ↩︎ Three access control models in one framework
      “The privileges associated with a role are inherited by any roles above that role in the hierarchy.”
      ↩︎ Three access control models in one framework
      “All access requires appropriate access privileges.”
      ↩︎ Three access control models in one framework
      “The top-most container is the customer organization.”
      ↩︎ The securable object hierarchy and ownership
      “Securable objects such as tables, views, functions, and stages are contained in a schema object, which are in turn contained in a database.”
      ↩︎ The securable object hierarchy and ownership
      “Each securable object is owned by a single role, which by default is the role used to create the object.”
      ↩︎ The securable object hierarchy and ownership
      “System-defined roles cannot be dropped.”
      ↩︎ System-defined roles
      “Snowflake recommends granting the additional privileges to a custom role and assigning the custom role to the system-defined role.”
      ↩︎ System-defined roles
      “It is the top-level role in the system and should be granted only to a limited/controlled number of users in your account.”
      ↩︎ System-defined roles
      “Role that can manage any object grant globally, as well as create, monitor, and manage users and roles.”
      ↩︎ System-defined roles
      “Role that has privileges to create warehouses and databases (and other objects) in an account.”
      ↩︎ System-defined roles
      “Pseudo-role that is automatically granted to every user and every role in your account.”
      ↩︎ System-defined roles
      “If no role was specified and a default role has not been set for the connecting user, the system role PUBLIC is used.”
      ↩︎ System-defined roles
      “To permit SQL actions on any object in your account, grant privileges on the object to an account role.”
      ↩︎ Functional roles: account, database, and custom roles
      “To limit SQL actions to a single database, as well as any object in the database”
      ↩︎ Functional roles: account, database, and custom roles
      “Custom account roles can be created using the USERADMIN role (or a higher role)”
      ↩︎ Functional roles: account, database, and custom roles
      “Custom database roles can be created by the database owner”
      ↩︎ Functional roles: account, database, and custom roles
      “Account roles cannot be granted to database roles in a role hierarchy.”
      ↩︎ Functional roles: account, database, and custom roles
      “if a custom role is not assigned to SYSADMIN through a role hierarchy, the system administrators cannot manage the objects owned by the role.”
      ↩︎ Functional roles: account, database, and custom roles
      “a session must have exactly one active primary role at a time, a session can activate any number of secondary roles”
      ↩︎ Primary and secondary roles in a session
      “Secondary roles are particularly useful for SQL operations such as cross-database joins”
      ↩︎ Primary and secondary roles in a session
      “Unless allowed by a grant, access is denied.”
      ↩︎ Key concept
      “A database role can be neither a primary nor a secondary role.”
      ↩︎ Exam trap 1
      “Authorization to execute CREATE <object> statements comes from the primary role only.”
      ↩︎ Exam trap 2
      “It does not give the SECURITYADMIN the ability to perform other actions such as creating objects.”
      ↩︎ Exam trap 3
      “Discretionary Access Control (DAC): Each object has an owner, who can in turn grant access to that object.”
      ↩︎ Checkpoint
      “However, in a managed access schema, object owners lose the ability to make grant decisions.”
      ↩︎ Prediction
      “A role owner (the role that has the OWNERSHIP privilege on the role) does not inherit the privileges of the owned role.”
      ↩︎ Checkpoint
      “Role that is dedicated to user and role management only.”
      ↩︎ Checkpoint
      “Note that database roles cannot be activated directly in a session.”
      ↩︎ Checkpoint
    2. 2.
      “Note that the set of roles is reevaluated when each SQL statement executes.”
      ↩︎ Primary and secondary roles in a session
      “Disables secondary roles. The authorization for all SQL actions is provided via the primary role.”
      ↩︎ Primary and secondary roles in a session

    Continue to page 2 of 2

    Snowflake Authentication, Network Policies, Account Identifiers, and Logging

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