VPD function for column masking with inner-select [message #595612] |
Thu, 12 September 2013 07:47  |
 |
pythian
Messages: 2 Registered: September 2013
|
Junior Member |
|
|
I'm writing a VPD function to be used for column masking. The predicate (WHERE-clause) it generates may take many different forms. In particular, it may contain inner-selects; for example,
"exists(select '*' from B where B.VAL = '123' and A.KEY = B.KEY)"
where A is the table that is associated to the VPD function, and B is some other table.
I wonder if this is OK for column masking? If not, my VPD function may sometimes work and sometimes fail, in unexpected ways.
The Oracle Database Security Guide (11g Release 1) says
Quote:
Column-masking conditions generated by the policy function must be simple Boolean expressions, unlike regular Oracle Virtual Private Database predicates".
This seems to indicate that there are cases where a VPD function works for row-level security, but not for column masking.
Does anyone have an example of a 'regular Oracle VPD predicate' that doesn't work for column-masking?
Thanks
|
|
|
|
|
|
Re: VPD function for column masking with inner-select [message #595624 is a reply to message #595619] |
Thu, 12 September 2013 09:02   |
 |
Michel Cadot
Messages: 68749 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
I don't understand your question.
If you already did both genuine RLS and column masking you should know the difference, won't you?
The difference is in the call of ADD_POLICY which defines what you protect.
In your link:
BEGIN
DBMS_RLS.ADD_POLICY(
object_schema => 'scott',
object_name => 'emp',
policy_name => 'hide_sal_policy',
policy_function => 'hide_sal_comm',
sec_relevant_cols =>' sal,comm', --\__ there
sec_relevant_cols_opt => dbms_rls.ALL_ROWS); --/
END;
/
BEGIN
DBMS_RLS.ADD_POLICY (
object_schema => 'oe',
object_name => 'orders',
policy_name => 'orders_policy',
function_schema => 'sys',
policy_function => 'auth_orders',
statement_types => 'select, insert, update, delete' --> and there
);
END;
/
Regards
Michel
|
|
|
|