Understanding User and Role Management in Snowflake
Instruction: Explain how roles and permissions are managed in Snowflake.
Updated
Official answer
Manage normal business access through custom roles with narrowly scoped privileges. Grant a role to a user, or to another role to build a hierarchy. If READER is granted to ANALYST, ANALYST inherits READER's privileges; merely owning a role does not provide that inheritance.
Account roles can be active in a session. Database roles are scoped to their database and must be granted to an account role for use; they cannot be activated directly. Check primary and secondary roles when diagnosing effective access. Creating objects is authorized through the primary role, while other operations can use applicable active-role privileges.
Snowflake also supports direct grants to users through user-based access control, considered when secondary roles are set to ALL. Therefore, “privileges can only be assigned through roles” is no longer accurate. Include direct grants and PUBLIC in access reviews.
For a reporting reader, verify warehouse usage, database/schema access and the required table/view privileges. Future grants cover new objects; existing objects need appropriate grants too. Managed access schemas centralize grant decisions with the schema owner or a role with MANAGE GRANTS.
Use GRANT, REVOKE and SHOW to administer and inspect permissions. Test permitted and denied operations using representative identities, remove stale access and avoid routine use of broad administrative roles.
Source
Snowflake access control, hierarchy, direct grants and active roles.