Oracle® Label Security Administrator's Guide 10g Release 1 (10.1) Part Number B10774-01 |
|
|
View PDF |
In Oracle Label Security, you can set authorizations for users, and grant privileges to users or stored program units by means of the available Oracle Label Security packages, or Oracle Policy Manager.
To manage user labels and privileges, you must have EXECUTE privilege for the SA_USER_ADMIN package, and must have been granted the policy_DBA role.
To perform these functions with Oracle Policy Manager, go to Oracle Label Security Policies--> policyname-->Authorizations-->Users and use the User property sheet.
The SA_USER_ADMIN package provides the functions to manage the Oracle Label Security user security attributes. It contains several procedures to manage user labels by component: that is, specifying user levels, compartments, and groups. For convenience, there are additional procedures that accept character string representations of full labels, rather than components. Note that the level, compartment and group parameters use the short name defined for each component.
All of the label and privilege information is stored in Oracle Label Security data dictionary tables. When a user connects to the database, his session labels are established based on the information stored in the Oracle Label Security data dictionary.
Note that a user can be authorized under multiple policies.
The following SA_USER_ADMIN procedures enable you to manage user labels by label component:
The SET_LEVELS procedure assigns a minimum and maximum level to a user and identifies default values for the user's session label and row label.
Syntax:
PROCEDURE SET_LEVELS (policy_name IN VARCHAR2, user_name IN VARCHAR2, max_level IN VARCHAR2, min_level IN VARCHAR2 DEFAULT NULL, def_level IN VARCHAR2 DEFAULT NULL, row_level IN VARCHAR2 DEFAULT NULL);
The SET_COMPARTMENTS procedure assigns compartments to a user and identifies default values for the user's session label and row label.
All users must have their levels set before their authorized compartments can be established.
The write compartments, if specified, must be a subset of the read compartments. (The write compartments are those to which the user should have write access.)
Syntax:
PROCEDURE SET_COMPARTMENTS (policy_name IN VARCHAR2, user_name IN VARCHAR2, read_comps IN VARCHAR2, write_comps IN VARCHAR2 DEFAULT NULL, def_comps IN VARCHAR2 DEFAULT NULL, row_comps IN VARCHAR2 DEFAULT NULL);
The SET_GROUPS procedure assigns groups to a user and identifies default values for the user's session label and row label.
All users must have their levels set before their authorized groups can be established.
Syntax:
PROCEDURE SET_GROUPS (policy_name IN VARCHAR2, user_name IN VARCHAR2, read_groups IN VARCHAR2, write_groups IN VARCHAR2 DEFAULT NULL, def_group IN VARCHAR2 DEFAULT NULL, row_groups IN VARCHAR2 DEFAULT NULL);
The ALTER_COMPARTMENTS procedure changes the write access, the default label indicator, and/or the row label indicator for each of the compartments in the list.
Syntax:
PROCEDURE ALTER_COMPARTMENTS (policy_name IN VARCHAR2, user_name IN VARCHAR2, comps IN VARCHAR2, access_mode IN VARCHAR2 DEFAULT NULL, in_def IN VARCHAR2 DEFAULT NULL, in_row IN VARCHAR2 DEFAULT NULL);
This procedure adds compartments to a user's authorizations, indicating whether the compartments are authorized for write as well as read.
Syntax:
PROCEDURE ADD_COMPARTMENTS (policy_name IN VARCHAR2, user_name IN VARCHAR2, comps IN VARCHAR2, access_model IN VARCHAR2 DEFAULT NULL, in_def IN VARCHAR2 DEFAULT NULL, in_row IN VARCHAR2 DEFAULT NULL);
The DROP_COMPARTMENTS procedure drops the specified compartments from a user's authorizations.
Syntax:
PROCEDURE DROP_COMPARTMENTS (policy_name IN VARCHAR2, user_name IN VARCHAR2, comps IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
Specifies the policy |
user_name |
Specifies the user name |
comps |
A comma-delimited list of compartments to drop |
The DROP_ALL_COMPARTMENTS procedure drops all compartments from a user's authorizations.
Syntax:
PROCEDURE DROP_ALL_COMPARTMENTS (policy_name IN VARCHAR2, user_name IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
Specifies the policy |
user_name |
Specifies the user name |
The ADD_GROUPS procedure adds groups to a user, indicating whether the groups are authorized for write as well as read.
Syntax:
PROCEDURE ADD_GROUPS (policy_name IN VARCHAR2, user_name IN VARCHAR2, groups IN VARCHAR2, access_mode IN VARCHAR2 DEFAULT NULL, in_def IN VARCHAR2 DEFAULT NULL, in_row IN VARCHAR2 DEFAULT NULL);
The ALTER_GROUPS procedure changes the write access, the default label indicator, and/or the row label indicator for each of the groups in the list.
Syntax:
PROCEDURE ALTER_GROUPS (policy_name IN VARCHAR2, user_name IN VARCHAR2, groups IN VARCHAR2, access_mode IN VARCHAR2 DEFAULT NULL, in_def IN VARCHAR2 DEFAULT NULL, in_row IN VARCHAR2 DEFAULT NULL);
The DROP_GROUPS procedure drops the specified groups from a user's authorizations.
Syntax:
PROCEDURE DROP_GROUPS (policy_name IN VARCHAR2, user_name IN VARCHAR2, groups IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
Specifies the policy |
user_name |
Specifies the user name |
groups |
A comma-delimited list of groups to drop |
The DROP_ALL_GROUPS procedure drops all groups from a user's authorizations.
Syntax:
PROCEDURE DROP_ALL_GROUPS (policy_name IN VARCHAR2, user_name IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
Specifies the policy |
user_name |
Specifies the user name |
The following SA_USER_ADMIN procedures enable you to manage user labels by specifying the complete character label string:
The SET_USER_LABELS procedure sets the user's levels, compartments, and groups using a set of labels, instead of the individual components.
Syntax:
PROCEDURE SET_USER_LABELS ( policy_name IN VARCHAR2, user_name IN VARCHAR2, max_read_label IN VARCHAR2, max_write_label IN VARCHAR2 DEFAULT NULL, min_write_label IN VARCHAR2 DEFAULT NULL, def_label IN VARCHAR2 DEFAULT NULL, row_label IN VARCHAR2 DEFAULT NULL);
The SET_DEFAULT_LABEL procedure sets the user's initial session label to the one specified.
Syntax:
PROCEDURE SET_DEFAULT_LABELS ( policy_name IN VARCHAR2, user_name IN VARCHAR2, def_label IN VARCHAR2);
As long as the row label will still be dominated by the new write label, the user can set the session label to:
The row label must be dominated by the new write label that will result from resetting the session label. If this condition is not true, the SET_DEFAULT_LABEL procedure will fail.
For example, suppose the current row label is S:A,B, and that you have write access to both compartments. If you attempt to set the new default label to C:A,B the SET_LABEL procedure will fail. This is because the new write label would be C:A,B, which does not dominate the current row label.
To successfully reset the session label in this case, you must first lower the row label to a value that will be dominated by the resulting session label.
Use the SET_ROW_LABEL procedure to set the user's initial row label to the one specified.
Syntax:
PROCEDURE SET_ROW_LABEL ( policy_name IN VARCHAR2, user_name IN VARCHAR2, row_label IN VARCHAR2);
The user can set the row label independently, but only to:
If you try to set the row label to an invalid value, the operation is disallowed, and the row label value is unchanged.
Use the DROP_USER_ACCESS procedure to remove all Oracle Label Security authorizations and privileges from the specified user. This procedure must be issued from the command line. It is not available in Oracle Policy Manager.
Syntax:
PROCEDURE DROP_USER_ACCESS ( policy_name IN VARCHAR2, user_name IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
Specifies the policy |
user_name |
Specifies the user name |
The SET_USER_PRIVS procedure sets policy-specific privileges for users. These privileges do not become effective in the current session; rather, they become effective the next time the user logs in. The new set of privileges replaces any existing privileges. A NULL value for the privileges parameter removes the user's privileges for the policy.
To assign policy privileges to users, you must have EXECUTE privilege for the SA_USER_ADMIN package, and must have been granted the policy_DBA role.
To use Oracle Policy Manager to perform these functions, go to the Privileges tab of the User property sheet.
Syntax:
PROCEDURE SET_USER_PRIVS ( policy_name IN VARCHAR2, user_name IN VARCHAR2, privileges IN VARCHAR2);
The SET_ACCESS_PROFILE procedure sets the Oracle Label Security authorizations and privileges of the database session to those of the specified user. (Note that the originating user retains the PROFILE_ACCESS privilege.)
The user executing the SA_SESSION.SET_ACCESS_PROFILE procedure must have the PROFILE_ACCESS privilege. Note that the logged-in database user (the Oracle userid) does not change. That user assumes only the authorizations and privileges of the specified user. By contrast, the Oracle Label Security user name is changed.
This administrative procedure is useful for various tasks:
Syntax:
PROCEDURE SET_ACCESS_PROFILE (policy_name IN VARCHAR2 user_name IN VARCHAR2);
Parameter |
Meaning |
---|---|
policy_name |
The name of an existing policy |
user_name |
Name of the user whose authorizations and privileges should be assumed |
The SA_USER_NAME function returns the name of the current Oracle Label Security user, as set by the SET_ACCESS_PROFILE procedure (or as established at login). This is how you can determine the identity of the current user in relation to Oracle Label Security, rather than in relation to your Oracle login name.
Syntax:
FUNCTION SA_USER_NAME (policy_name IN VARCHAR2) RETURN VARCHAR2;
Parameter |
Meaning |
---|---|
policy_name |
The name of an existing policy |
This section describes views you can use to see the user authorization and privilege assignments made by the administrator.
Note that the views are designed to display these values from two different perspectives. The DBA_SA_USERS view is optimized for users of the command-line interface. The component views are optimized for users of the Oracle Policy Manager administrative tool.
The DBA_SA_USERS view displays the values assigned for privileges, levels, compartments, and groups all together--corresponding to how you enter these values through the SA_USER_ADMIN command-line interface. The values include:
USER_PRIVILEGES
MAX_READ_LABEL
MAX_WRITE_LABEL
MIN_WRITE_LABEL
DEFAULT_READ_LABEL
DEFAULT_WRITE_LABEL
DEFAULT_ROW_LABEL
USER_LABELS
MAX_READ_LABEL
MAX_WRITE_LABEL
MIN_WRITE_LABEL
DEFAULT_READ_LABEL
DEFAULT_WRITE_LABEL
DEFAULT_ROW_LABEL
This information is stored in data dictionary tables, and used to establish session and row labels when a user logs in.
Note: The field USER_LABELS in DBA_SA_USERS is retained solely for backward compatibility and will be removed in the next release. |
The following views display individually each component of the label, corresponding to how you enter these values through Oracle Policy Manager.