Note: this code has been tested on version 19c (19.3.0.0.0)
In this post, I’ll show how incredibly easy is to read data from a table by having only the INDEX privilege granted on it. It’s something I found out when preparing a demo about Oracle Virtual Private Database, you’ll see why later on in this post.
Let’s imagine the following scenario: user SCOTT owns a table CUSTOMERS_CC holding sensitive information about customers
1 2 3 4 5 6 7 8 |
SCOTT> select * from CUSTOMER_CC; CUST_ID CUST_NAME CC_NUMBER ---------- -------------------- -------------------- 1 John Smith 1234-5899-7458-1111 2 Brenda Lipson 5093-1214-0875-1496 3 Mark Walfish 9905-8465-3208-5478 4 Artur Tork 5521-4785-0033-7408 5 Robert Koczinski 1457-9650-0897-0000 |