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

    Domain 2 · Lesson 7/19

    Snowflake access control: DAC, RBAC, roles and grants

    Explain Snowflake security model and principles

    15 min read
    6.67% of exam
    5 sources
    Published 20 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Tell apart discretionary, role-based and user-based access control in Snowflake
    • Predict who owns an object, who can grant on it, and what happens to its ownership when a role is dropped
    • Use future grants to give a role privileges on objects that do not exist yet
    • Match the system-defined roles to their responsibilities
    • Choose between account roles, database roles and custom roles, and explain how secondary roles widen a session's privileges

    Key concept

    Default deny on securable objects — Every table, schema, warehouse or other securable object is closed until a grant opens it. In a session, what you can do depends on the privileges held by your active roles. Owners, roles and secondary roles are all different ways of answering one question: which grant lets this request through?

    1.Three access control models in one system

    Snowflake does not choose a single access control model. It combines three of them, and each one answers a different question. Discretionary access control (DAC) decides who may hand out access: every object has an owner, and that owner decides who else gets privileges on it. Role-based access control (RBAC) decides how those privileges reach people: privileges go to roles, and roles go to users. User-based access control (UBAC) lets a privilege be granted straight to a user, with no role in between.

    These models are not alternatives that compete. They describe different stages of one flow. In a typical grant, Role 1 owns a table (DAC). It grants SELECT on the table to Role 2, and Role 2 is granted to two analysts (RBAC). RBAC is the everyday mechanism. UBAC is an extension, and it has a catch: Snowflake considers privileges granted directly to a user only when the session's secondary roles are set to ALL.

    What each access control model decides
    ModelPrivileges are held byWhat it controls
    DACThe owning role (OWNERSHIP privilege)Who may grant access to an object
    RBACRoles, which are granted to users or to other rolesHow privileges reach users; the usual way to manage access
    UBACUsers directlyDirect grants, considered only when USE SECONDARY ROLES is ALL

    Checkpoint 1 of 9· Match them up

    Snowflake combines three access control models. Match each model to the question it answers in a grant flow.

    Tap a term, then the definition that fits it.

    Checkpoint 2 of 9· Exam question

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

    Sources1

    2.The securable object hierarchy and ownership

    Grants follow the container tree of organization, account, database, schema and object, which object hierarchy: organization > account > database > schema > objects teaches. In access control this tree is the securable object hierarchy, and you can grant privileges at every level of it. Containers act as gates. USAGE on a database or schema lets a role run USE on it, so a role with SELECT on a table still needs USAGE on the database and the schema above that table before it can reach it.

    Ownership is the DAC half of the model. To own an object is to hold the OWNERSHIP privilege on it. Each object has exactly one owning role, and by default that is the role that created it. In a regular schema the owner holds every privilege on the object and can grant and revoke privileges for other roles. GRANT OWNERSHIP moves ownership to a different role, and the target can be a database role. Everyone who has the owning role shares control of the object.

    A managed access schema takes grant decisions away from object owners. In that kind of schema, only the schema owner or a role with MANAGE GRANTS can grant privileges on the objects inside. MANAGE GRANTS lets a role grant and revoke as if it owned the object. Use a managed access schema when a central team, not each object's creator, should decide who sees what.

    Dropping a role never leaves objects without an owner. Whatever the dropped role owned now belongs to the role that ran DROP ROLE. The drop is permanent: a dropped role cannot be recovered and must be recreated. There are a few exceptions. You cannot drop your current primary role. You cannot drop a role that owns a shared database until you transfer that ownership with GRANT OWNERSHIP.

    Checkpoint 3 of 9· Check yourself

    In a regular schema, several data engineers each create tables and grant SELECT on them to whichever roles they like. The security team wants to be the only group that decides who can access objects in that schema. Which change does this?

    Checkpoint 4 of 9· 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?

    Sources213

    3.Future grants for objects that do not exist yet

    A grant on existing objects covers only the objects that exist when you run it. If a pipeline keeps creating tables, a reporting role loses access to every table created after the last grant. A future grant fixes this. It sets the privileges that new objects of a given type in a schema receive, and Snowflake applies them each time such an object is created. ON FUTURE handles new objects and ON ALL handles existing ones, so you usually need both.

    Future grants for new tables and an ALL grant for existing tables, including handing access from r1 to r2sql
    -- Grant the SELECT privilege on all new (future) tables in a schema to role R1
    GRANT SELECT ON FUTURE TABLES IN SCHEMA s1 TO ROLE r1;
    
    -- / Create tables in the schema /
    
    -- Grant the SELECT privilege on all new tables in a schema to role R2
    GRANT SELECT ON FUTURE TABLES IN SCHEMA s1 TO ROLE r2;
    
    -- Grant the SELECT privilege on all existing tables in a schema to role R2
    GRANT SELECT ON ALL TABLES IN SCHEMA s1 TO ROLE r2;
    
    -- Revoke the SELECT privilege on all new tables in a schema (future grant) from role R1
    REVOKE SELECT ON FUTURE TABLES IN SCHEMA s1 FROM ROLE r1;

    Some workarounds look similar but do not do the same job. A scheduled GRANT ... ON ALL TABLES leaves a gap: a table created between two runs is unreadable until the next run. Making the reporting role owner of the schema does not help either. Each table is still owned by the role that created it, here the ETL role. Granting the ETL role to the reporting role is no better: privileges are inherited by any role above in the hierarchy, so the reporting role would pick up everything the ETL role holds, not just SELECT on these tables.

    Checkpoint 5 of 9· Check yourself

    Every hour, an ETL role creates new tables in schema s1. The REPORTING role must be able to SELECT from every table in s1, both the ones there now and the ones created later, with no gap. A colleague suggests making REPORTING the owner of schema s1. What is the right assessment?

    Checkpoint 6 of 9· 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?

    Sources421

    4.System-defined roles

    Every account comes with a small set of system-defined roles. You cannot drop them, and you cannot revoke the privileges Snowflake gave them. Their job is account management:

    • ACCOUNTADMIN contains SYSADMIN and SECURITYADMIN. It is the top-level role, so grant it to only a few, closely controlled users.
    • SECURITYADMIN can manage any object grant across the account, and can create, monitor and manage users and roles. It holds MANAGE GRANTS and inherits USERADMIN.
    • USERADMIN manages users and roles and nothing else. It holds CREATE USER and CREATE ROLE, and it can manage the users and roles it owns.
    • SYSADMIN has the privileges to create warehouses, databases and other objects in the account. When custom roles are arranged in a hierarchy that ends at SYSADMIN, it can also grant privileges on those objects to other roles.
    • PUBLIC is a pseudo-role that every user and every role in the account receives automatically. Objects it owns are available to everyone, so it suits cases where explicit access control is not needed.

    MANAGE GRANTS does not let SECURITYADMIN create things. It can grant and revoke, but creating an object, such as a database role, still requires that object's own CREATE privilege. For someone who should create users and reset their passwords, but not grant on database objects or manage warehouses, USERADMIN fits most closely.

    Checkpoint 7 of 9· Check yourself

    A platform team wants every SYSADMIN user to also have SELECT and INSERT on the tables in a finance schema. Which approach follows Snowflake's recommendation for system-defined roles?

    Sources1

    5.Functional roles: account, database and custom roles

    Functional roles give people the privileges their job needs, and the role type decides how far those privileges can reach. An account role can hold privileges on any object in the account. A database role holds privileges only on objects in its own database, which suits access such as read access to the SALES database that should never spread further. Custom roles are the ones you create. Any user with a role that has the right privileges can create one.

    Database roles have a limit that catches people out: you cannot activate one directly in a session. Suppose an analyst has the ANALYST account role and needs the SELECT privileges held by DB_SALES.READ_ROLE. First grant the database role to an account role the analyst can use, such as ANALYST. Then the analyst activates that account role.

    Granting roles to roles builds a hierarchy, and each role inherits the privileges of every role below it. Inheritance happens only inside the hierarchy. A role that owns another role does not get that role's privileges, because ownership of a role is not a grant of it.

    Checkpoint 8 of 9· Match them up

    An analyst needs the SELECT privileges held by DB_SALES.READ_ROLE. Match each role, or each relationship between roles, to how it behaves.

    Tap a term, then the definition that fits it.

    Sources1

    6.Primary and secondary roles in a session

    A user can have many roles, but by default one active role decides what the session can do. Secondary roles add the privileges of more roles on top. USE SECONDARY ROLES ALL activates every role granted to the user besides the primary role. Snowflake works out this set again for every statement, so a role granted halfway through a session counts from the next statement onward. USE SECONDARY ROLES NONE turns them off, and only the primary role authorizes actions. You can also name specific roles, provided each one has been granted to you.

    Two rules decide what secondary roles cannot do. First, permission to run CREATE <object> comes only from the primary role, so the primary role owns every new object. Second, privileges granted directly to a user (UBAC) count only when secondary roles are set to ALL.

    Checkpoint 9 of 9· Check yourself

    SELECT on a reporting view was granted directly to user JDOE, not to any role. JDOE's session runs USE SECONDARY ROLES ANALYST, BI_READER, both of which are roles granted to JDOE, and the query on the view is denied. What change lets the direct grant count?

    Sources5

    Sources

    (5)

    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 control models in one system
      “Role-based Access Control (RBAC): Access privileges are assigned to roles, which are in turn assigned to users.”
      ↩︎ Three access control models in one system
      “Access control considers privileges assigned directly to users only when USE SECONDARY ROLE is set to ALL.”
      ↩︎ Three access control models in one system
      “Usually, you use RBAC to manage access to securable objects in Snowflake.”
      ↩︎ Three access control models in one system
      “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
      “The GRANT OWNERSHIP command lets you transfer the ownership of an object from one role to another role, including to database roles.”
      ↩︎ The securable object hierarchy and ownership
      “However, in a managed access schema, object owners lose the ability to make grant decisions.”
      ↩︎ The securable object hierarchy and ownership
      “The privileges associated with a role are inherited by any roles above that role in the hierarchy.”
      ↩︎ Future grants for objects that do not exist yet
      “System-defined roles cannot be dropped. In addition, the privileges granted to these roles by Snowflake cannot be revoked.”
      ↩︎ System-defined roles
      “Role that encapsulates the SYSADMIN and SECURITYADMIN system-defined roles.”
      ↩︎ 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
      “It does not give the SECURITYADMIN the ability to perform other actions such as creating objects.”
      ↩︎ System-defined roles
      “Is granted the CREATE USER and CREATE ROLE security privileges.”
      ↩︎ 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
      “Snowflake recommends granting the additional privileges to a custom role and assigning the custom role to the system-defined role.”
      ↩︎ 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
      “grant privileges on the object to a database role in the same database.”
      ↩︎ Functional roles: account, database and custom roles
      “Users who have been granted a role with the necessary privileges can create custom roles to meet specific business and security needs.”
      ↩︎ Functional roles: account, database and custom roles
      “A role owner (the role that has the OWNERSHIP privilege on the role) does not inherit the privileges of the owned role.”
      ↩︎ Functional roles: account, database and custom roles
      “Securable object: An entity to which access can be granted. Unless allowed by a grant, access is denied.”
      ↩︎ Key concept
      “Note that database roles cannot be activated directly in a session.”
      ↩︎ Exam trap 2
      “in a managed access schema, object owners lose the ability to make grant decisions”
      ↩︎ Checkpoint
      “Each securable object is owned by a single role, which by default is the role used to create the object.”
      ↩︎ Checkpoint
      “Note that database roles cannot be activated directly in a session. Grant database roles to account roles, which can be activated in a session.”
      ↩︎ Checkpoint
      “Access control considers privileges assigned directly to users only when USE SECONDARY ROLE is set to ALL.”
      ↩︎ Checkpoint
    2. 2.
      “Grants the ability to execute a USE <object> command on the object.”
      ↩︎ The securable object hierarchy and ownership
      “Grants the ability to grant or revoke privileges on any object as if the invoking role were the owner of the object.”
      ↩︎ The securable object hierarchy and ownership
      “OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object”
      ↩︎ Future grants for objects that do not exist yet
    3. 3.
      “Dropped roles cannot be recovered; they must be recreated.”
      ↩︎ The securable object hierarchy and ownership
      “A role cannot be dropped if it has the OWNERSHIP privilege on a shared database.”
      ↩︎ The securable object hierarchy and ownership
      “Ownership of any objects owned by the dropped role is transferred to the role that executes the DROP ROLE command.”
      ↩︎ Exam trap 1
      “Ownership of any objects owned by the dropped role is transferred to the role that executes the DROP ROLE command.”
      ↩︎ Prediction
    4. 4.
      “As new objects are created, the defined privileges are automatically granted to a role, simplifying grant management.”
      ↩︎ Future grants for objects that do not exist yet
    5. 5.
      “All roles that have been granted to the user in addition to the current active primary role.”
      ↩︎ Primary and secondary roles in a session
      “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
      “Note that authorization to execute CREATE <object> statements to create objects is provided by the primary role.”
      ↩︎ Exam trap 3

    Continue to part 2 of 2

    Snowflake authentication, network policies, account identifiers and logging

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