11.5.2 Enabling Row-Level Data Security
To define row-level security policies on tables or views, your workspace's parsing schema needs additional privileges your DBA can grant.
You use procedures in the DBMS_RLS package to manage data security policies. Once activated, the database enforces them transparently for all application users.
- Ensuring Execute Privilege on DBMS_RLS
To use row-level data security, your workspace's parsing schema requires theEXECUTEprivilege on theDBMS_RLSpackage. - Defining the Security Policy Function
A row-level security policy associates a security policy function with a table or view. This function returns the text of aWHEREclause predicate the database automatically applies to requested operations on the table or view. - Adding and Enabling the Security Policy
To add and enable the security policy, choose the target table or view and call theADD_POLICYprocedure in theDBMS_RLSpackage. Name the policy clearly, and indicate table or view to protect and the associated security policy function. - Referencing Other Context Information
In addition to callingAPEX_AUTHORIZATION.IS_AUTHORIZED, your data security policy function can use other useful information to decide whatWHEREclause to return.
Parent topic: Enabling Row-Level Data Security Policy