SnowPro Specialty: Gen AI Question 215
Single answer3.1 Set up model access controls.A Snowflake administrator is enabling Cortex LLM functions for an analytics engineering team. Company policy requires that only the ENGINEERING_AI role can invoke Snowflake-managed models in production, while analysts using other roles must not be able to call those models. The admin wants the simplest control that directly governs who can use the models. Which action should the administrator take?
- A
Grant the SNOWFLAKE.CORTEX_USER database role to the ENGINEERING_AI role only
- B
Grant USAGE on the SNOWFLAKE database to the ENGINEERING_AI role and deny it to all other roles
- C
Create a masking policy on prompt columns so only ENGINEERING_AI can access model inference
- D
Grant the ACCOUNTADMIN role to ENGINEERING_AI so it inherits all Cortex-related privileges
Show answer and explanation
Correct answer: A
Explanation
The best answer is to grant the SNOWFLAKE.CORTEX_USER database role only to the role that should be allowed to use Snowflake Cortex LLM functions. This is the documented access-control mechanism for Cortex model usage and aligns with least-privilege security design. In practice, administrators should assign this role only to approved application or user roles and avoid broad grants through highly privileged roles such as ACCOUNTADMIN. Database privileges like USAGE or data governance features like masking policies address different concerns and do not replace the dedicated Cortex access role.
- A. Correct.
Correct. Access to Snowflake Cortex LLM functions is controlled through the SNOWFLAKE.CORTEX_USER database role. Granting this database role only to ENGINEERING_AI is the direct and least-privilege way to allow that role to invoke Snowflake-managed models while preventing other roles from doing so.
- B. Incorrect.
Incorrect. USAGE on the SNOWFLAKE database alone does not grant the ability to invoke Cortex LLM functions. A common misconception is that database visibility controls service usage, but Cortex model access is specifically governed by the SNOWFLAKE.CORTEX_USER database role.
- C. Incorrect.
Incorrect. Masking policies control data visibility, not authorization to use Cortex models. While masking may be relevant for protecting sensitive prompt data, it does not determine whether a role can call Snowflake-managed LLM functions in the first place.
- D. Incorrect.
Incorrect. Granting ACCOUNTADMIN violates least-privilege principles and is not the correct mechanism for model access control. Although ACCOUNTADMIN can perform many administrative tasks, using it to enable model access for an application team is excessive and poor security practice.