1Z0-060 · Question #210
You execute this piece of code with appropriate privileges: User SCOTT has been granted the CREATE SESSION privilege and the MGR role. Which two statements are true when a session logged in as SCOTT…
The correct answer is A. Data is redacted for the EMP.SAL column only if the SCOTT session does not have the MGR role E. Data is never redacted on the EMP_V.SAL column. Oracle Data Redaction on a base table does not propagate to views built on that table; the redaction policy expression controls whether EMP.SAL is masked based on the session role context.
Question
You execute this piece of code with appropriate privileges:
User SCOTT has been granted the CREATE SESSION privilege and the MGR role. Which two statements are true when a session logged in as SCOTT queries the SAL columns in the view and the table?
Options
- AData is redacted for the EMP.SAL column only if the SCOTT session does not have the MGR role
- BData is never redacted on the EMP.SAL column.
- CData is redacted for the EMP.SAL column only if the SCOTT session has the MGR role set.
- DData is redacted for the EMP_V.SAL column only if the SCOTT session has the MGR role set.
- EData is never redacted on the EMP_V.SAL column.
How the community answered
(27 responses)- A67% (18)
- B4% (1)
- C7% (2)
- D22% (6)
Why each option
Oracle Data Redaction on a base table does not propagate to views built on that table; the redaction policy expression controls whether EMP.SAL is masked based on the session role context.
The redaction policy on EMP.SAL uses a policy expression that evaluates the session's active roles. When SCOTT's session does not have the MGR role enabled, the expression returns true and the column value is masked. When MGR is enabled, the expression is false and the real value is returned.
Incorrect - the redaction policy on EMP.SAL is enforced when SCOTT's session does not have the MGR role active, so data is redacted in that scenario.
Incorrect - having the MGR role set in the session EXEMPTS SCOTT from redaction on EMP.SAL; it is the absence of the role that triggers masking, not its presence.
Incorrect - because data in EMP_V.SAL is never redacted (the view bypasses the base table's redaction policy), the MGR role state has no bearing on the view's output.
Oracle Data Redaction does not apply policies defined on base tables when the data is accessed through a view. If the view EMP_V was defined by a user with the EXEMPT REDACTION POLICY privilege (such as SYS), queries against EMP_V.SAL always return unredacted values regardless of SCOTT's role context.
Concept tested: Oracle Data Redaction policy expressions and view access
Source: https://docs.oracle.com/en/database/oracle/oracle-database/19/asoag/oracle-data-redaction-features-and-capabilities.html
Topics
Community Discussion
No community discussion yet for this question.