Oracle Label Security provides a set of data dictionary tables and views that you can use. There are also restrictions that you should be aware of.
Topics:
Oracle Label Security provides data dictionary tables, data dictionary views, and an user-created auditing view.
Topics:
Oracle Label Security does not label the Oracle data dictionary tables. Access is controlled by standard Oracle Database system and object privileges.
For a description of all data dictionary tables and views, refer to the Oracle Database Reference.
Oracle Label Security maintains an independent set of data dictionary tables. These tables are exempt from any policy enforcement.
Access to the DBA views is granted by default to the SELECT_CATALOG_ROLE
, a standard Oracle Database role that lets you examine the Oracle Database data dictionary.
The ALL_SA_AUDIT_OPTIONS
data dictionary view shows the Oracle Label Security auditing options for the current user, configured using SA_AUDIT_ADMIN.AUDIT
procedure. (See "SA_AUDIT_ADMIN.AUDIT".)
This view displays whether auditing is configured to generate audit records per session (BY SESSION
) or per access (BY ACCESS
) and for successful or unsuccessful operations. Possible values are as follows:
A dash (-
) indicates that the audit option is not set.
The S
character indicates that the audit option is set BY SESSION
.
The A
character indicates that the audit option is set BY ACCESS
.
Each audit option has two possible settings, WHENEVER SUCCESSFUL
and WHENEVER NOT SUCCESSFUL
, separated by a slash (/
).
For example, in the following output, user jjones
is audited with the BY ACCESS
audit type for successful actions involving policy-specific privileges. User rlayton
is audited with the BY SESSION
audit type: audit records are written for failed attempts to remove policies and for successful attempts at setting user authorizations.
SELECT * FROM DBA_SA_AUDIT_OPTIONS; POLICY_NAME USER_NAME APY REM SET_ PRV ----------- ------------ --- ---- ---- --- HR_OLS_POL JJONES -/- -/- -/- A/- HR_OLS_POL RLAYTON -/- -/S S/- -/-
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the user associated with the policy |
|
|
Audit option; refers to the application of specified Oracle Label Security policies to tables and schemas |
|
|
|
Audit option; refers to the removal of specified Oracle Label Security policies from tables and schemas |
|
|
|
Audit option; refers to the setting of user authorizations, and user and program privileges |
|
|
|
Audit option; refers to the use of all policy-specific privileges |
The ALL_SA_COMPARTMENTS
data dictionary view shows for the current user information about Oracle Label Security policy compartments, based on the settings used in the SA_COMPONENTS.CREATE_COMPARTMENT
procedure. (See "SA_COMPONENTS.CREATE_COMPARTMENT".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Compartment number in the range of (0-9999) |
|
|
|
Short name for the compartment |
|
|
|
Long name for the compartment |
The ALL_SA_DATA_LABELS
data dictionary view shows for the current user the label and label tag for the specified Oracle Label Security policy, based on settings from the SA_LABEL_ADMIN.CREATE_LABEL
procedure. (See "SA_LABEL_ADMIN.CREATE_LABEL".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
Short name of the level, compartment, or group that was specified as the label value |
|
|
|
Integer that represents the sort order of the label, relative to other policy labels (0-99999999) |
The ALL_SA_GROUPS
data dictionary view shows for the current user information about Oracle Label Security policy groups, based on the SA_COMPONENTS.CREATE_GROUP
and SA_COMPONENTS.ALTER_GROUP_PARENT
procedures. (See"SA_COMPONENTS.CREATE_GROUP" and "SA_COMPONENTS.ALTER_GROUP_PARENT".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Group number (0-9999) |
|
|
|
Short name of the group |
|
|
|
Long name of the group |
|
|
Numerical ID for the associated parent group |
|
|
|
Name of the group assigned as the parent for the group |
The ALL_SA_LABELS
data dictionary view shows for the current user information about the tags and types of labels, based on the SA_LABEL_ADMIN.CREATE_LABEL
and SA_LABEL_ADMIN.ALTER_LABEL
procedures.
(See "SA_LABEL_ADMIN.CREATE_LABEL" and "SA_LABEL_ADMIN.ALTER_LABEL".) Access to ALL_SA_LABELS
is PUBLIC
. However, only the labels authorized for read access by the session are visible.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Short name of the level associated with this label |
|
|
|
Integer tag assigned to the label |
|
|
Type of label |
The ALL_SA_LEVELS
data dictionary view shows for the current user information about levels, based on the SA_COMPONENTS.CREATE_LEVEL
procedure.
(See "SA_COMPONENTS.CREATE_LEVEL".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Level number (0-9999) |
|
|
|
Short name for the level |
|
|
|
Long name for the level |
The ALL_SA_POLICIES
data dictionary view shows for the current user information about Oracle Label Security policies, based on the SA_SYSDBA.CREATE_POLICY
procedure, and whether the policy has been enabled or disabled. (See "SA_SYSDBA.CREATE_POLICY".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the column that was added to tables protected by the policy |
|
|
Whether the policy has been enabled or disabled |
|
|
|
Options that were set for this policy See Table 8-2 for a listing of the possible enforcement options. |
The ALL_SA_PROG_PRIVS
data dictionary view shows for the current user information about the policy-specific privileges for program units, based on the SA_USER_ADMIN.SET_PROG_PRIVS
procedure. (See "SA_USER_ADMIN.SET_PROG_PRIVS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the schema that contains the program unit |
|
|
|
Program unit that was granted privileges |
|
|
|
Name of the Oracle Label Security policy |
|
|
Policy-specific privileges. See "About Granting Privileges to Users and Trusted Program Units for the Policy" for list of possible privileges. |
The ALL_SA_SCHEMA_POLICIES
data dictionary view shows for the current user information about policies that have been applied to all tables in the schema, based on the SA_POLICY_ADMIN.APPLY_SCHEMA_POLICY
procedure. (See "SA_POLICY_ADMIN.APPLY_SCHEMA_POLICY".) It also indicates if the schema enforcement options have been enabled or disabled.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the schema associated with this policy |
|
|
Whether the policy has been enabled or disabled for the schema (by the |
|
|
|
Options that have been applied. See Table 8-2 for a listing of the default enforcement options. |
The ALL_SA_TABLE_POLICIES
data dictionary view shows for the current user information about a policy that has been added to a specific database table, based on the settings from the SA_POLICY_ADMIN.APPLY_TABLE_POLICY
procedure. (See "SA_POLICY_ADMIN.APPLY_TABLE_POLICY".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Schema that contains the table that the policy protects |
|
|
|
Table to be protected by the policy |
|
|
Whether the policy has been enabled or disabled for the table (by the |
|
|
|
Policy enforcement options to be used for the table See Table 8-2 for a listing of the default enforcement options. |
|
|
|
Name of the function to return a label value to use as the default |
|
|
|
Predicate to combine (using |
The ALL_SA_USERS
data dictionary view shows for the current user information about the privileges that Oracle Label Security users have, based on the SA_USER_ADMIN.SET_USER_LABELS
and SA_USER_ADMIN.SET_USER_PRIVS
procedure procedures. (See "SA_USER_ADMIN.SET_USER_LABELS" and "SA_USER_ADMIN.SET_USER_PRIVS".)
Column | Type | Null | Description |
---|---|---|---|
|
|
|
Name of the user |
|
|
|
Name of the Oracle Label Security policy |
|
|
Policy-specific privileges granted to the user. See "About Granting Privileges to Users and Trusted Program Units for the Policy" for list of possible privileges. |
|
|
|
Label string to initialize the user's maximum authorized read label |
|
|
|
Label string to initialize the user's maximum authorized write label |
|
|
|
Label string to initialize the user's minimum authorized write label |
|
|
|
Label string to initialize the user's session label, including level, compartments, and groups, for read access |
|
|
|
Label string to initialize the user's session label, including level, compartments, and groups, for write access |
|
|
|
Label string to initialize the program's row label; includes level, components, and groups |
|
|
|
Retained solely for backward compatibility and will be removed in the next release |
The ALL_SA_USER_LABELS
data dictionary view shows for the current user label-specific information about users, based on the SA_USER_ADMIN.SET_USER_LABELS
. (See "SA_USER_ADMIN.SET_USER_LABELS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the user |
|
|
|
Name of the Oracle Label Security policy |
|
|
Retained solely for backward compatibility and will be removed in the next release |
|
|
|
|
Label string to initialize the user's maximum authorized read label |
|
|
Label string to initialize the user's maximum authorized write label |
|
|
|
Label string to initialize the user's minimum authorized write label |
|
|
|
Label string to initialize the user's session label, including level, compartments, and groups, for read access |
|
|
|
Label string to initialize the user's session label, including level, compartments, and groups, for write access |
|
|
|
Label string to initialize the program's row label; includes level, components, and groups |
The ALL_SA_USER_LEVELS
data dictionary view shows for the current user the minimum and maximum levels that have been assigned to users and lists the default values for the user's session label and row label, based on the SA_USER_ADMIN.SET_LEVELS
procedure. (See "SA_USER_ADMIN.SET_LEVELS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the user |
|
|
|
Short name of the highest level for read and write access |
|
|
|
Short name of the lowest level for read and write access |
|
|
|
Short name of the default level |
|
|
|
Short name of the row level |
The ALL_SA_USER_PRIVS
data dictionary view shows for the current user the policy-specific privileges that have been granted to users, based on the SA_USER_ADMIN.SET_USER_PRIVS
procedure. (See "SA_USER_ADMIN.SET_USER_PRIVS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the user |
|
|
|
Name of the Oracle Label Security policy |
|
|
Policy-specific privileges granted to the user See "About Granting Privileges to Users and Trusted Program Units for the Policy" for available privileges |
The DBA_SA_GROUP_HIERARCHY
data dictionary view shows the hierarchy of groups (that is, parent-child relationships) in a policy.
Column | Type | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
Indicates the level of a particular group in a group hierarchy. A group with no parent group will have For example, consider these groups in the following order:
Here, The parent-child relationships are:
|
|
|
|
Short name of the group intended to indicate the hierarchy level |
The DBA_SA_POLICIES
data dictionary view shows for the entire database information about Oracle Label Security policies, based on the SA_SYSDBA.CREATE_POLICY
procedure, and whether the policy has been enabled or disabled and its subscription status.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the column that was added to tables protected by the policy |
|
|
Whether the policy has been enabled or disabled |
|
|
|
Options that were set for this policy. See Table 8-2 for a listing of the possible enforcement options. |
|
|
|
Indicates the policy's subscription status, based on the |
The DBA_SA_USER_COMPARTMENTS
data dictionary view shows for the entire database the user authorizations, indicating whether the compartments are authorized for write and read privileges, based on the SA_USER_ADMIN.ADD_COMPARTMENTS
procedure. (See "SA_USER_ADMIN.ADD_COMPARTMENTS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the user |
|
|
|
Short name of compartments that were added |
|
|
Access mode. Possible values are:
|
|
|
|
|
Whether the compartments are in the default compartments |
|
|
|
whether the compartments are in the row label |
The DBA_SA_USER_GROUPS
data dictionary view shows for the entire database the groups that are associated with users, based on the SA_USER_ADMIN.ADD_GROUPS
procedure. (See "SA_USER_ADMIN.ADD_GROUPS".)
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
|
Name of the user |
|
|
|
Short name of groups that were added |
|
|
Access mode. Possible values are:
|
|
|
|
|
Whether the group is in a default group |
|
|
|
Whether the group is in a label |
The DBA_OLS_STATUS
data dictionary view describes the configuration status of Oracle Label Security in the database.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
Name of the status. Values are:
|
|
|
|
Indicates the status of the feature mentioned in the corresponding name column. For example, a |
|
|
|
Description of the status:
|
The USER_SA_SESSION
data dictionary view shows the security attribute values for the current database session. Access to this view is PUBLIC
.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
|
Name of the Oracle Label Security policy |
|
|
Name of the current session user |
|
|
|
Current session privileges |
|
|
|
Label string that initialized the user's maximum authorized read label |
|
|
|
Label string that initialized the user's maximum authorized write label |
|
|
|
Minimum Oracle Label Security level authorized for the session |
|
|
|
Label for the current database session |
|
|
|
Compartments to which the user is authorized to write |
|
|
|
Groups to which the user is authorized to write |
|
|
|
Row label that is associated with the policy for the current session |
Using the SA_AUDIT_ADMIN.CREATE_VIEW
procedure, you can create an audit trail view for a specific policy. By default, this view is named DBA_
policyname_
AUDIT_TRAIL
.
Column | Datatype | Null | Description |
---|---|---|---|
|
|
Name of the user whose actions were audited |
|
|
|
Client host machine name |
|
|
|
Identifier of the user's terminal |
|
|
|
Date and time of the creation of the audit trail entry (date and time of user login for entries created by |
|
|
|
Creator of the object affected by the action |
|
|
|
Name of the object affected by the action |
|
|
|
|
Numeric action type code. The corresponding name of the action type is in the |
|
|
Name of the action type corresponding to the numeric code in the |
|
|
|
Text comment on the audit trail entry, providing more information about the statement audited Also indicates how the user was authenticated. The method can be one of the following:
|
|
|
|
|
Numeric ID for each Oracle session |
|
|
|
Numeric ID for each audit trail entry in the session |
|
|
|
Numeric ID for each statement run |
|
|
|
Oracle error code generated by the action. Some useful values:
|
|
|
Timestamp of the creation of the audit trail entry (timestamp of user login for entries created by |
|
|
|
Name of the column that was added to the tables that Oracle Label Security protects |
See Also:
Several restrictions exist in this Oracle Label Security release.
These restrictions are as follows:
CREATE TABLE AS SELECT
restriction
If you attempt to perform CREATE
TABLE
AS
SELECT
in a schema that is protected by an Oracle Label Security policy, then the statement will fail.
Label tag restriction
Label tags must be unique across the policies in the database. When you use multiple policies in a database, you cannot use the same numeric label tag in different policies.
Export restriction
Before Oracle Database 12c Release 1 (12.1), the LBACSYS
schema could not be exported due to the use of opaque types in Oracle Label Security. An export of the entire database (parameter FULL
=Y
) with Oracle Label Security installed can be done, except that the LBACSYS
schema would not be exported.
From Oracle Database Release 12c on, this restriction has been removed. See "Full Database Export" for additional details on the database versions that the export can be supported from.
Oracle Label Security removal restriction
Do not perform a DROP
USER
CASCADE
on the LBACSYS
account.
Connect to the database as user SYS, using the AS
SYSDBA
syntax, and run the file $ORACLE_HOME/rdbms/admin/catnools.sql
to remove Oracle Label Security.
See Also:
Your platform-specific Oracle installation documentation
Shared schema support restriction
User accounts defined in the Oracle Internet Directory cannot be given individual Oracle Label Security authorizations. However, authorizations can be given to the shared schema to which the directory users are mapped.
The Oracle Label Security function SET_ACCESS_PROFILE
can be used programmatically to set the label authorization profile to use after a user has been authenticated and mapped to a shared schema. Oracle Label Security does not enforce a mapping between users who are given label authorizations in Oracle Label Security and actual database users.
Hidden columns restriction
PL/SQL does not recognize references to hidden columns in tables. A compiler error will be generated.