retrieving policy name inside the function called by this particular policy

Posted on 16th Feb 2014 by admin

Hi there,

I've playing around with dbms_rls package, trying to set up some security repository, linking users to what
columns and row values they are allowed to see etc...

A policy, applied on a table, causes a custom made function to be executed and returns the where clause that
should be added to a select on that table. So far, so good.
Now, is it possible to trap, inside this trigger, the name of the policy that caused this trigger to fire ... ?

If I could have this, it would be possible to make up one single function, used by each policy, that would,
based on some repository table containing the os_user, table, columns, operator strings, values to which the
operator is applied, and of course the policy name, return the exact where clause, by combining the information
in the repository table.

Other forums