How to set Application Context for VPD for processes that run as an OS "generic" user
We have been using VPD for a LONG time. We have a single-user application that calls a stored procedure to set database application context variables specific to the end-user, used for security policies.
We have a database logon trigger that sets security for employees connecting directly to the database view SQL Developer/TOAD/etc.
There is a huge security hole, though, with "Jobs" that run as system processes, both for our developers, and data consumers. These processes can "spoof" anyone by executing a CONNECT_AS procedure to set security. We have 60+ Oracle Accounts for different IT global teams, and I suppose we could set security based on these Accounts individually, but what about developers on staff? We can't give these developers full access, since there are areas of the application that are more sensitive than others. Do we just need more Accounts for the different roles, or is there a better/easier way to prevent