ExamGecko
Question list
Search
Search

List of questions

Search

Question 113 - ARA-C01 discussion

Report
Export

How can the Snowflake context functions be used to help determine whether a user is authorized to see data that has column-level security enforced? (Select TWO).

A.
Set masking policy conditions using current_role targeting the role in use for the current session.
Answers
A.
Set masking policy conditions using current_role targeting the role in use for the current session.
B.
Set masking policy conditions using is_role_in_session targeting the role in use for the current account.
Answers
B.
Set masking policy conditions using is_role_in_session targeting the role in use for the current account.
C.
Set masking policy conditions using invoker_role targeting the executing role in a SQL statement.
Answers
C.
Set masking policy conditions using invoker_role targeting the executing role in a SQL statement.
D.
Determine if there are ownership privileges on the masking policy that would allow the use of any function.
Answers
D.
Determine if there are ownership privileges on the masking policy that would allow the use of any function.
E.
Assign the accountadmin role to the user who is executing the object.
Answers
E.
Assign the accountadmin role to the user who is executing the object.
Suggested answer: A, C

Explanation:

Snowflake context functions are functions that return information about the current session, user, role, warehouse, database, schema, or object. They can be used to help determine whether a user is authorized to see data that has column-level security enforced by setting masking policy conditions based on the context functions. The following context functions are relevant for column-level security:

current_role: This function returns the name of the role in use for the current session. It can be used to set masking policy conditions that target the current session and are not affected by the execution context of the SQL statement. For example, a masking policy condition using current_role can allow or deny access to a column based on the role that the user activated in the session.

invoker_role: This function returns the name of the executing role in a SQL statement. It can be used to set masking policy conditions that target the executing role and are affected by the execution context of the SQL statement. For example, a masking policy condition using invoker_role can allow or deny access to a column based on the role that the user specified in the SQL statement, such as using the AS ROLE clause or a stored procedure.

is_role_in_session: This function returns TRUE if the user's current role in the session (i.e. the role returned by current_role) inherits the privileges of the specified role. It can be used to set masking policy conditions that involve role hierarchy and privilege inheritance. For example, a masking policy condition using is_role_in_session can allow or deny access to a column based on whether the user's current role is a lower privilege role in the specified role hierarchy.

The other options are not valid ways to use the Snowflake context functions for column-level security:

Set masking policy conditions using is_role_in_session targeting the role in use for the current account. This option is incorrect because is_role_in_session does not target the role in use for the current account, but rather the role in use for the current session. Also, the current account is not a role, but rather a logical entity that contains users, roles, warehouses, databases, and other objects.

Determine if there are ownership privileges on the masking policy that would allow the use of any function. This option is incorrect because ownership privileges on the masking policy do not affect the use of any function, but rather the ability to create, alter, or drop the masking policy. Also, this is not a way to use the Snowflake context functions, but rather a way to check the privileges on the masking policy object.

Assign the accountadmin role to the user who is executing the object. This option is incorrect because assigning the accountadmin role to the user who is executing the object does not involve using the Snowflake context functions, but rather granting the highest-level role to the user. Also, this is not a recommended practice for column-level security, as it would give the user full access to all objects and data in the account, which could compromise data security and governance.

Context Functions

Advanced Column-level Security topics

Snowflake Data Governance: Column Level Security Overview

Data Security Snowflake Part 2 - Column Level Security

asked 23/09/2024
Mina Shaker
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first