Snowflake Security, RBAC, and User Administration · Topic 2 of 16

Access Control Frameworks - DAC, RBAC and UBAC and Designing the Framework

Compare the Snowflake access control frameworks DAC, RBAC and UBAC and design an access control framework from business requirements and roles.

  • 4 min
In a nutshell
  • DAC: the owner grants. RBAC: privileges to roles, roles to users. UBAC: privileges directly to users.
  • UBAC privileges count only when USE SECONDARY ROLES is ALL.
  • RBAC with access roles and functional roles is the recommended design.

What it is

Snowflake combines three access control models. Discretionary Access Control (DAC) says every object has an owner who can grant access to it. Role-Based Access Control (RBAC) says privileges go to roles and roles go to users. User-based Access Control (UBAC) says privileges are granted directly to users.

The exam gives business requirements and asks which model, and which design, fits. In nearly every answer RBAC is the backbone, DAC explains who may grant, and UBAC is an exception.

Objecthas one owner roleDAC: owner grantsPrivilegeRBAC: granted toRolegranted toUserPrivilegeUBAC: granted directly toUser

How it works

The three frameworks

FrameworkWho holds the privilegeWho decides grantsTypical use
DACA roleThe owner role of the objectTeams that own their own objects and share them
RBACA role, then inherited by usersOwner role, or a role with MANAGE GRANTSStandard design for most requirements
UBACA single userAn owner or a role with MANAGE GRANTSOne off access that should follow a person, not a job

DAC. Each securable object has a single owner role, by default the role that created it. The owner can grant and revoke privileges on it, and GRANT OWNERSHIP transfers it to another role.

RBAC. Roles are granted to roles, so a parent role inherits the privileges of its children. A user acts through roles, which is why access is easy to add and to remove.

UBAC. Privileges are assigned with GRANT <privilege> ... TO USER and removed with REVOKE ... FROM USER. The docs give the main constraint: access control considers privileges assigned directly to users only when USE SECONDARY ROLES is set to ALL.

GRANT SELECT ON TABLE sales.public.orders TO USER ana;
ALTER USER ana SET DEFAULT_SECONDARY_ROLES = ('ALL');
Watch out

If a user's secondary roles are off or limited, privileges granted directly to the user are ignored. That is the usual reason a UBAC grant seems to do nothing.

Choosing for the business requirement

Work from the requirement to the model.

  • "Access must follow job functions and change when people move" points to RBAC.
  • "Each team controls who can use its own objects" points to DAC inside an RBAC design, with owner roles per team.
  • "Only the central security team may grant access" points to managed access schemas and MANAGE GRANTS, which removes owner discretion (covered on the managed access page).
  • "A single person needs temporary access that must not be tied to a role" is the narrow case for UBAC.
  • "Access must be audited easily" favors RBAC, because grants sit on a small set of roles.

Designing a framework

A common design has three layers.

Object privilegesheld byAccess rolesSALES_RO, SALES_RWgranted toFunctional rolesANALYST, ENGINEERgranted toUsersFunctional rolesrolled up toSYSADMIN
  1. Access roles hold privileges on objects, ideally through future grants.
  2. Functional roles collect access roles for a job.
  3. System roles sit at the top: custom roles roll up to SYSADMIN so administrators can manage the objects.

Keep account management privileges (such as MANAGE GRANTS or CREATE USER) apart from object privileges. If a system role needs more, create a custom role with the extra privileges and grant it to the system role.

Exam tip

A requirement that says "analysts may read, engineers may write, and managers may do both" is two access roles and three functional roles, not six direct grants.

Role limits that appear in scenarios

  • A session has exactly one primary role and any number of secondary roles.
  • CREATE <object> is authorized only by the primary role and the new object is owned by it.
  • A role that owns another role does not inherit its privileges; only the role hierarchy passes privileges.

Common mistakes

Granting to users by default. UBAC grants are hard to audit and depend on secondary roles.

Treating DAC as unsafe by definition. Owner discretion is normal in Snowflake; limit it with managed access schemas when a central team must control grants.

Mixing account management and object privileges in one role. Split them.

Building the tree with no link to SYSADMIN. Objects become unmanageable by administrators.

What to remember for the exam

  • DAC: the owner grants. RBAC: privileges to roles, roles to users. UBAC: privileges directly to users.
  • UBAC privileges count only when USE SECONDARY ROLES is ALL.
  • RBAC with access roles and functional roles is the recommended design.
  • Central grant control means managed access schemas or MANAGE GRANTS.
  • Custom roles roll up to SYSADMIN.

Check yourself

  • Who can grant privileges on an object under DAC?

    The owner role of the object, or a role with MANAGE GRANTS.

  • A direct grant to a user has no effect. Why?

    Secondary roles are not set to ALL, so privileges granted directly to the user are not considered.

  • Which model fits "access must follow job functions"?

    RBAC, with functional roles that hold access roles.

Topic 2 of 16 in Snowflake Security, RBAC, and User Administration

Test yourself on Snowflake Security, RBAC, and User Administration

The full Snowflake ADA-C02 question bank has 814 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.