I read documents for Oracle VPD (Virtual Private Database, aka fine-grained security, shortcut-based security framework), and there is something hard for me to grab. How does VPD prevent user information leakage through a malicious feature in a sentence WHERE?
Say you have a VPD policy that generates a static predicate, such as cust_no = SYS_CONTEXT('order_entry', 'cust_num');(for example, in the Oracle VPD tutorial ).
This leads to a rewrite of the requests, therefore:
SELECT * FROM orders;
becomes:
SELECT * FROM orders
WHERE cust_no = SYS_CONTEXT('order_entry', 'cust_num');
Good as possible. But what if the user writes:
SELECT * FROM orders WHERE my_malicious_function(secret_column);
? my_malicious_function , , , , .
VPD , , - :
SELECT * FROM orders
WHERE cust_no = SYS_CONTEXT('order_entry', 'cust_num')
AND my_malicious_function(secret_column);
Oracle WHERE. my_malicious_function -, , ? (, SYS_CONTEXT, , UDF).
, , VPD , . - ?
( , VPD , , , , . )