CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Navigating SnowPro Core Certification: Secure View Access
Understanding how to grant secure view access without exposing underlying tables is crucial for the SnowPro Core exam. Let's explore the question.
Making the right decision about secure views often trips up candidates. The goal is to grant access while keeping the underlying data safe.
The question
A data engineer needs to grant a user access to a secure view without exposing the underlying tables. Which of the following is the most appropriate method to achieve this?
- A. Grant the user access to the underlying tables directly.
- B. Create a role that has access to the secure view and grant that role to the user.
- C. Share the secure view with the user via a data share.
- D. Use a stored procedure to manage access to the secure view.
Think before you scroll
Consider the principle of least privilege. The goal is to allow access to necessary resources without compromising security. Weigh the implications of each option on data exposure.
The answer
The correct option is B. Create a role that has access to the secure view and grant that role to the user. This method protects the underlying tables while allowing the user to access the secure view, adhering to security best practices.
Why the other options lose
- A. Grant the user access to the underlying tables directly. This option violates the principle of least privilege. It exposes sensitive data, which is a major security risk.
- C. Share the secure view with the user via a data share. While this option does provide access to the secure view, it may not enforce the same level of security as granting a role specifically designed for access control.
- D. Use a stored procedure to manage access to the secure view. This method does not inherently restrict access to the underlying tables. It can introduce complexity without ensuring that the underlying data remains protected.
The concept behind it
Understanding access control in Snowflake is essential. The principle of least privilege dictates that users should only have access to information necessary for their work. Creating a role for secure views encapsulates this principle effectively.
Exam trap to remember
Always prioritize the principle of least privilege when granting access. Roles are safer than direct access to underlying data.