A Snowflake administrator needs to ensure that a new analyst can query tables in the SALES database but cannot modify any objects. Which system-defined role should be granted to the analyst to follow the principle of least privilege?
- A. SYSADMIN
- B. USERADMIN
- C. SECURITYADMIN
- D. PUBLIC✓ Correct
Explanation
PUBLIC is the correct answer. Every user and role in Snowflake is automatically granted the PUBLIC role, but more precisely, for read-only access, a custom role with SELECT privileges is ideal. However, among these system-defined options, PUBLIC is the only role that does not carry object-creation or administrative privileges. SYSADMIN has full privileges to create and manage all database objects, violating least privilege. SECURITYADMIN manages users and roles and can grant any privilege, which is excessive. USERADMIN can create users and roles but is also far more powerful than needed for read-only access.