About Managing Application Privileges for Data Security Policies
This section includes the following topics:
About Bypassing the Security Checks of a Real Application Security Policy
The following database users can bypass the security checks of a Real Application Security Policy:
-
User
SYS -
Database users who have the
EXEMPT ACCESS POLICYsystem privilege -
The owner of the object to which the policy is applied.
If the data security policy is applied to an object with the owner bypass specification, the owner of the object may bypass such policy. By default, owner bypass is not allowed.
The object owner also can create another view on the same table and assign this view a different Real Application Security policy.
Using the SQL*Plus SET SECUREDCOL Command
The SQL*Plus SET SECUREDCOL command enables you to customize how secure column values are displayed in SQL*Plus output for users without permission to view a column and for columns with unknown security. You can choose either the default text or specify the text that is displayed. The default is OFF.
When column level security is enabled, and SET SECUREDCOL is set ON, output from SQL*Plus for secured columns or columns of unknown security level is replaced with either your customized text or the default indicators. This only applies to scalar data types. Complex object data output is not affected.
Syntax
SET SECUREDCOL {OFF¦ON} [UNAUTH[ORIZED] text][UNK[NOWN] text]
Parameters
| Parameter | Description |
|---|---|
ON |
Displays the default indicator asterisks ( By default this command will be |
OFF |
Displays null values in place of column values for application users without authorization to view the column, and in place of column values where the security level is unknown for the column. |
UNAUTH[ORIZED] |
Text enables you to specify the text to be displayed in a secured column for application users without authorization to view the column. This text appears instead of the default You can specify any alphanumeric text up to the column length or a maximum of 30 characters. Longer text is truncated. Text containing spaces must be quoted. |
UNK[NOWN] |
Text enables you to specify the text to be displayed in a column of unknown security level (when the specific privileges applied to the column are not known). This text appears instead of the default You can specify any alphanumeric text up to the column length or a maximum of 30 characters. Longer text is truncated. Text containing spaces must be quoted. |
Example 1
SET SECUREDCOL ON
SELECT empno, ename, sal FROM emp ORDER BY deptno;
The output of the example will be as follows:
EMPNO ENAME DEPTNO SAL
----- ------ ------ --------
7539 KING 10 ********
7369 SMITH 20 800
7566 JONES 20 2975
7788 SCOTT 20 3000
7521 WARD 30 ********
7499 ALLEN 30 ********
6 rows selected.
Example 2
SET SECUREDCOL ON UNAUTH notallowed
SELECT empno, ename, sal FROM emp ORDER BY deptno;
The output of the example will be as follows:
EMPNO ENAME DEPTNO SAL
----- ------ ------ -------
7539 KING 10 notallowed
7369 SMITH 20 800
7566 JONES 20 2975
7788 SCOTT 20 3000
7521 WARD 30 notallowed
7499 ALLEN 30 notallowed
6 rows selected.