PK
)Aoa, mimetypeapplication/epub+zipPK )A iTunesMetadata.plistQ
This chapter contains:
A rule set is a collection of one or more rules that you can associate with a realm authorization, factor assignment, command rule, or secure application role. The rule set evaluates to true or false based on the evaluation of each rule it contains and the evaluation type (All True or Any True). A rule within a rule set is a PL/SQL expression that evaluates to true or false. You can create a rule and add the rule to multiple rule sets.
You can use rule sets to accomplish the following activities:
As a further restriction to realm authorization, to define the conditions under which realm authorization is active
To define when to allow a command rule
To enable a secure application role
To define when to assign the identity of a factor
When you create a rule set, Oracle Database Vault makes it available for selection when you configure the authorization for a realm, command rule, factor, or secure application role.
You can run reports on the rule sets that you create in Oracle Database Vault. See "Related Reports and Data Dictionary Views" for more information.
This chapter explains how to configure rule sets by using Oracle Database Vault Administrator. To configure rule sets by using the PL/SQL interfaces and packages provided by Oracle Database Vault, refer to the following chapters:
Oracle Database Vault provides a set of default rules sets that you can customize for your needs. The default rule sets are as follows:
Allow Sessions: Controls the ability to create a session in the database. This rule set enables you to add rules to control database logins using the CONNECT command rule. The CONNECT command rule is useful to control or limit SYSDBA
access to programs that require its use. This rule set is not populated.
Allow System Parameters: Controls the ability to set system initialization parameters. For Oracle Database 11g Release 2 (11.2), the Allow Fine Grained Control of System Parameters rule set replaces this rule set, but it is still supported for backward compatibility. The Allow System Parameters rule set is not associated with any commands, but its rules are still available and can be used with any custom rule set. Oracle recommends that you use the Allow Fine Grained Control of System Parameters rule set.
Allow Fine Grained Control of System Parameters: Provides a very flexible, fine-grained control over initialization parameters that manage system security, dump or destination location, backup and restore settings, optimizer settings, PL/SQL debugging, and security parameters. It affects the following initialization parameters: AUDIT_FILE_DEST
, AUDIT_SYS_OPERATIONS
, AUDIT_TRAIL
, BACKGROUND_DUMP_DEST
, BLOCK_SYSTEM_TRIG_ENABLED
, CORE_DUMP_DEST
, CONTROL_FILES
, DB_CREATE_ONLINE_LOG_DEST
, DB_RECOVERY_FILE_DEST
, DUMP_DATAFILE
, O7_DICTIONARY_ACCESSIBILITY
, OPTIMIZER_SECURE_VIEW_MERGING
, OS_ROLES
, PLSQL_DEBUG
, RECYCLEBIN
(but does not prevent disabling the recycle bin), REMOTE_OS_ROLES
, SQL92_SECURITY
, USER_DUMP
. See Oracle Database Reference for detailed information about initialization parameters.
Can Grant VPD Administration: Controls the ability to grant the GRANT EXECUTE
or REVOKE EXECUTE
privileges on the Oracle Virtual Private Database DBMS_RLS
package, with the GRANT
and REVOKE
statements.
Allow Oracle Data Pump Operation: Contains rules that describe each user authorization that was created by the DVSYS.DBMS_MACADM.AUTHORIZE_DATAPUMP_USER
procedure. The rule includes the user login account and the level of access the user is allowed: the entire database, a schema within the database, or a table within this schema. When a user attempts to perform an Oracle Data Pump export or import operation, Oracle Database Vault checks the authorizations defined in this rule set. If the user's authorizations are not defined here, then he or she is not permitted to perform the export or import operation.
See "Using Oracle Data Pump in an Oracle Database Vault Environment" for more information.
Allow Scheduler Job: Contains rules that describe each user authorization that was created by the DVSYS.DBMS_MACADM.AUTHORIZE_SCHEDULER_USER
procedure. If you do not define the user's authorizations here, then he or she still can create a job. But if the user runs a job under another schema, the job will fail when this job accesses Oracle Database Vault-protected objects. The rule includes the user login account and the level of access the user is allowed: the entire database or a schema within the database. When a user attempts to schedule a database job, Oracle Database Vault checks the authorizations defined in this rule set. If the user's authorizations are not defined here, then he or she is not permitted to create the job.
See "Scheduling Database Jobs in an Oracle Database Vault Environment" for more information.
Can Maintain Accounts/Profiles: Controls the roles that manage user accounts and profiles, through the CREATE USER
, DROP USER
, CREATE PROFILE
, ALTER PROFILE
, or DROP PROFILE
statements.
Can Maintain Own Account: Allows the accounts with the DV_ACCTMGR
role to manage user accounts and profiles with the ALTER USER
statement. Also allows individual accounts to change their own password using the ALTER USER
statement. See "DV_ACCTMGR Database Vault Account Manager Role" for more information about the DV_ACCTMGR
role.
Disabled: Convenience rule set to quickly disable security configurations like realms, command rules, factors, and secure application roles.
Enabled: Convenience rule set to quickly enable system features.
In general, to create a rule set, you first create the rule set itself, and then you edit the rule set to associate it with one or more rules. You can associate a new rule with the rule set, add existing rules to the rule set, or delete a rule association from the rule set.
See also the following sections:
"Guidelines for Designing Rule Sets" for advice on designing rule sets
"Oracle Database Vault PL/SQL Rule Functions" for a set of functions that you can use in rule expressions
"Rule Set Configuration Issues Report" to check the configuration of the rule sets for your database
To create a rule set:
Log in to Oracle Database Vault Administrator as a user who has been granted the DV_OWNER
or DV_ADMIN
role.
"Starting Oracle Database Vault" explains how to log in.
In the Administration page, under Database Vault Feature Administration, click Rule Sets.
In the Rule Sets page, click Create.
In the Create Rule Set page, enter the following settings, and then click OK:
General
Enter the following settings:
Name: Enter a name for the rule set. It can contain up to 90 characters in mixed-case. Spaces are allowed. This attribute is mandatory.
Oracle suggests that you start the name with a noun and complete it with the realm or command rule name to which the rule set is attached. For example:
Limit SQL*Plus access
Description: Enter a description of the functionality for the rule set. It can have up to 1024 characters in mixed-case. This attribute is optional.
You may want to document the business requirement of the rule set. For example:
Rule to limit access to SQL*Plus
Status: Select either Enabled or Disabled to enable or disable the rule set during run time. Rule sets are enabled by default. This attribute is mandatory.
Evaluation Options: If you plan to assign multiple rules to a rule set, select one of the following settings:
All True: Default. All rules in the rule set must evaluate to true for the rule set itself to evaluate to true.
Any True: At least one rule in the rule set must evaluate to true for the rule set itself to evaluate to true.
If you want to determine how often a rule set is evaluated when it is accessed by a command rule, then you can use the is_static
parameter of the DVSYS.DBMS_MACADM.CREATE_RULE_SET
procedure. See "CREATE_RULE_SET Procedure" for more information.
Audit Options
Select from the following options to generate an audit record for the rule set. Oracle Database Vault writes the audit trail to the DVSYS.AUDIT_TRAIL$
system file, described in Appendix A, "Auditing Oracle Database Vault."
This attribute is mandatory. The settings are:
Audit Disabled: Does not create an audit record under any circumstances.
Audit On Failure: Default. Creates an audit record when the rule set evaluates to false or one of the associated rules contains an invalid PL/SQL expression.
Audit On Success or Failure: Creates an audit record whenever a rule set is evaluated.
For additional audit options, see "CREATE_RULE_SET Procedure".
The Oracle Database Vault audit trail, written to the DVSYS.AUDIT_TRAIL$
system table, contains the fields RULE_SET_NAME
and RULE_SET_ID
. These fields are populated when a rule set is associated with a realm authorization and a command authorization, and the rule set is configured to audit under some circumstances. See Appendix A, "Auditing Oracle Database Vault," for more information.
Error Handling Options
Enter the following settings to control the messaging to the database session when the rule set evaluates to false or one of the associated rules contains an invalid PL/SQL expression:
Fail Options: Select either Show Error Message (the default) or Do Not Show Error Message.
An advantage of selecting Do Not Show Error Message and then enabling auditing is that you can track the activities of a potential intruder. The audit report reveals the activities of the intruder, yet the intruder is unaware that you are doing this because he or she does not see any error messages.
Fail Code: Enter a number in the ranges of -20000 to -20999 or 20000 to 20999. The error code is displayed with the Fail Message (created next) when the rule set evaluates to false or one of the associated rules contains an invalid PL/SQL expression. If you omit this setting, then Oracle Database Vault displays the following error code:
ORA-01031: Insufficient privileges
Fail Message: Enter a message, up to 80 characters in mixed-case, to associate with the fail code you specified under Fail Code. The error message is displayed when the rule set evaluates to false or one of the associated rules contains an invalid PL/SQL expression. If you do not specify an error message, then Oracle Database Vault displays a generic error message.
Custom Event Handler Option: Select one of the following options to determine when to run the Custom Event Handler Logic (created next).
Handler Disabled: Default. Does not run any custom event method.
Execute On Failure: Runs the custom event method when the rule set evaluates to false or one of the associated rules contains an invalid PL/SQL expression.
Execute On Success: Runs the custom event method when the rule set evaluates to true.
You can create a custom event method to provide special processing outside the standard Oracle Database Vault rule set auditing features. For example, you can use an event handler to initiate a workflow process or send event information to an external system.
Custom Event Handler Logic: Enter a PL/SQL expression up to 255 characters in mixed-case. An expression may include any package procedure or standalone procedure. You can create your own expression or use the PL/SQL interfaces described in Chapter 15, "Using the Oracle Database Vault PL/SQL Interfaces."
Write the expression as a fully qualified procedure (such as schema
.procedure_name
). Do not include complete SQL statements. If you are using application package procedures or standalone procedures, you must provide DVSYS
with the EXECUTE
privilege on the object. The procedure signature can be in one of the following two forms:
PROCEDURE
my_ruleset_handler(
p_ruleset_name
IN VARCHAR2,
p_ruleset_rules
IN BOOLEAN)
: Use this form when the name of the rule set and its return value are required in the handler processing.
PROCEDURE
my_ruleset_handler
: Use this form when the name of the rule set and its return value are not required in the handler processing.
When you define the expression in the user interface that uses one of these two formats, put the expression in the following form:
myschema.my_ruleset_handler
After you create a rule set, you are ready to create rules to attach to the rule set. To do so, you edit the new rule set, and then define its rules.
To configure or edit a rule set:
In the Oracle Database Vault Administration page, select Rule Sets.
In the Rule Set page, select the rule set that you want to edit.
Click Edit.
Modify the rule set as necessary, and then click OK.
See Also:
|
After you create a new rule set, you can associate it with one or more rules. When you create a new rule, it is automatically added to the current rule set. You also can add existing rules to the rule set. Alternatively, you can omit adding rules to the rule set and use it as a template for rule sets you may want to create in the future.
The rule set evaluation depends on the evaluation of its rules using the Evaluation Options (All True or Any True). If a rule set is disabled, Oracle Database Vault evaluates the rule set to true without evaluating its rules.
See "How Rule Sets Work" for information on how rules are evaluated, how to nest rules, and how to create rules that exclude a particular user, such as a privileged user.
To create and add a rule to a rule set:
In the Oracle Database Vault Administration page, select Rule Sets.
In the Rule Sets page, select the rule set to which you want to create and add a rule, and then select Edit.
In the Edit Rule Set Page, scroll down to Rules Associated To The Rule Set and select Create.
In the Create Rule page, enter the following settings:
Name: Enter a name for the rule. Use up to 90 characters in mixed-case.
Oracle suggests that you start the name with a verb and complete the name with the purpose of the rule. For example:
Prevent non-admin access to SQL*Plus
Because rules do not have a Description field, make the name explicit but be sure to not exceed over 90 characters.
Rule Expression: Enter a PL/SQL expression that fits the following requirements:
It is valid in a SQL WHERE
clause.
It can be a freestanding and valid PL/SQL Boolean expression such as the following:
TO_CHAR(SYSDATE,'HH24') = '12'
It must evaluate to a Boolean (TRUE
or FALSE
) value.
It must be no more than 255 characters long.
It can contain existing and compiled PL/SQL functions from the current database instance. Ensure that these are fully qualified functions (such as schema
. function_name
). Do not include complete SQL statements.
If you want to use application package functions or standalone functions, you must grant the DVSYS
account the EXECUTE
privilege on the function. Doing so reduces the chances of errors when you add new rules.
Ensure that the rule works. You can test the syntax by running the following statement in SQL*Plus:
SELECT rule_expression FROM DUAL;
For example, suppose you have created the following the rule expression:
SYS_CONTEXT('USERENV','SESSION_USER') != 'TSMITH'
You could test this expression as follows:
SELECT SYS_CONTEXT('USERENV','SESSION_USER') FROM DUAL;
See the following sections for functions that you can use in the rule set expression:
For additional examples of expressions, see the rule defined in the rule sets provided with Oracle Database Vault. "Default Rule Sets" lists these rule sets.
Click OK.
The Edit Rule Set page appears. By default, the new rule is added to the rule set.
Editing a Rule
The changes you make to a rule apply to all rule sets that include the rule.
To edit a rule:
In the Edit Rule Set page, scroll to Rules Associated To The Rule Set.
Select the rule you want to edit and click Edit.
In the Edit Rule page, modify the rule as necessary.
Click OK.
Removing a Rule from a Rule Set
Before you remove a rule from a rule set, you can locate the various references to it by querying the rules-related Oracle Database Vault views. See "Oracle Database Vault Data Dictionary Views" for more information.
To remove a rule from a rule set:
In the Edit Rule Set page, scroll to Rules Associated To The Rule Set.
Select the rule you want to delete and click Remove.
In the Confirmation page, click Yes.
After you remove the rule from the rule set, it still exists. If you want, you can associate it with other rule sets. If you want to delete the rule, use the DVSYS.DBMS_MACADM.DELETE_RULE
function, described in "Rule Set Procedures Within DVSYS.DBMS_MACADM". For example, to delete the rule Night Shift, log in to SQL*Plus as the Database Vault Owner and enter the following statement:
EXEC DVSYS.DBMS_MACADM.DELETE_RULE('Night Shift');
To add existing rules to a rule set:
In the Rule Sets page, select the rule set that you want to add rules to, and then select Edit.
Under Rules Associated To The Rule Set, select Add Existing Rules.
In the Add Existing Rules page, select the rules you want, and then click Move (or Move All, if you want all of them) to move them to the Selected Rules list.
You can select multiple rules by holding down the Ctrl key as you click each rule.
Click OK.
Before you delete a rule set, you can locate the various references to it by querying the rules-related Oracle Database Vault views. See "Oracle Database Vault Data Dictionary Views" for more information.
If other Database Vault objects, such as command rules, reference the rule set, then remove the reference.
You can delete a rule set only if no other Database Vault objects are referencing it.
In the Oracle Database Vault Administration page, select Rule Sets.
In the Rule Set page, select the rule set that you want to remove.
Click Remove.
In the Confirmation page, click Yes.
The rule set is deleted. However, the rules associated with the rule set are not deleted.
This section describes how rule sets work in the following ways:
Oracle Database Vault evaluates the rules within a rule set as a collection of expressions. If you have set Evaluation Options to All True and if a rule fails the evaluation, then the evaluation stops at that point, instead of attempting to evaluate the rest of the rules in the rule set. Similarly, if Evaluation Options is set to Any True and if a rule evaluates to true, the evaluation stops at that point. If a rule set is disabled, Oracle Database Vault evaluates it to true without evaluating its rules.
You can nest one or more rules within the rule set. For example, suppose you want to create a nested rule, Is Corporate Network During Maintenance, that performs the following two tasks:
It limits table modifications only when the database session originates within the corporate network.
It restricts table modifications during the system maintenance window scheduled between 10:00 p.m. and 10:59 p.m.
The rule definition would be as follows:
DVF.F$NETWORK = 'Corporate' AND TO_CHAR(SYSDATE,'HH24') between '22' AND '23'
You can create it using a factor function. See "Oracle Database Vault PL/SQL Factor Functions" for more information. Chapter 7 explains how to create facto rs.
You can also create rules to apply to everyone except one user (for example, a privileged user). The rule definition for this type of rule can be as follows:
SYS_CONTEXT('USERENV','SESSION_USER') = 'SUPERADMIN_USER' OR additional_rule
If the current user is a privileged user, then the system evaluates the rule to true without evaluating additional_rule
. If the current user is not a privileged user, then the evaluation of the rule depends on the evaluation of additional_rule
.
This section contains:
Step 3: Configure an Access Control List File for Network Services
Step 4: Create a Rule Set and a Command Rule to Use the Email Security Alert
In the following tutorial, you create an email alert that is sent when a user attempts to alter a table outside a maintenance period. To do this, you must create a rule to set the maintenance period hours, attach this rule to a rule set, and then create a command rule to allow the user to alter the table. You then associate the rule set with this command rule, which then sends the email alert when the user attempts to use the ALTER TABLE
SQL statement outside the maintenance period.
Log in to SQL*Plus as SYS
using the SYSDBA
privilege, and then install the UTL_MAIL
package.
sqlplus sys as sysdba
Enter password: password
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb
The UTL_MAIL
package enables you to manage email. See Oracle Database PL/SQL Packages and Types Reference for more information about UTL_MAIL
. However, be aware that currently, the UTL_MAIL
PL/SQL package do not support SSL servers.
Check the current value of the SMTP_OUT_SERVER
parameter, and make a note of this value so that you can restore it when you complete this tutorial.
For example:
SHOW PARAMETER SMTP_OUT_SERVER
Output similar to the following appears:
NAME TYPE VALUE ----------------------- ----------------- ---------------------------------- SMTP_OUT_SERVER string some_value.example.com
Issue the following ALTER SYSTEM
statement:
ALTER SYSTEM SET SMTP_OUT_SERVER="imap_mail_server.example.com";
Replace imap_mail_server.example.com
with the name of your SMTP server, which you can find in the account settings in your email tool. Enclose these settings in quotation marks. For example:
ALTER SYSTEM SET SMTP_OUT_SERVER="my_imap_mail_server.example.com"
Connect as SYS
using the SYSOPER
privilege and then restart the database.
CONNECT SYS/AS SYSOPER
Enter password: password
SHUTDOWN IMMEDIATE
STARTUP
Ensure that the SMTP_OUT_SERVER
parameter setting is correct.
CONNECT SYS AS SYSDBA
Enter password: password
SHOW PARAMETER SMTP_OUT_SERVER
Output similar to the following appears:
NAME TYPE VALUE ----------------------- ----------------- ---------------------------------- SMTP_OUT_SERVER string my_imap_mail_server.example.com
Ensure that you are connected as SYS
using the SYSDBA
privilege, and then grant the following privileges to a user who has been granted the DV_OWNER
role.
(Alternatively, you can select a user who has been granted the DV_ADMIN
role, but for this tutorial, you will select a user who has the DV_OWNER
role.)
For example:
CONNECT SYS AS SYSDBA
Enter password: password
GRANT CREATE PROCEDURE, DROP ANY PROCEDURE TO lbrown_dvowner;
GRANT EXECUTE ON UTL_TCP TO lbrown_dvowner;
GRANT EXECUTE ON UTL_SMTP TO lbrown_dvowner;
GRANT EXECUTE ON UTL_MAIL TO lbrown_dvowner;
GRANT EXECUTE ON DBMS_NETWORK_ACL_ADMIN TO lbrown_dvowner;
The UTL_TCP
, UTL_SMTP
, UTL_MAIL
, and DBMS_NETWORK_ACL_ADMIN
PL/SQL packages will be used by the email security alert that you create.
Connect to SQL*Plus as the DV_OWNER
user.
For example:
CONNECT lbrown_dvowner
Enter password: password
Create the following procedure:
CREATE OR REPLACE PROCEDURE email_alert AS msg varchar2(20000) := 'Realm violation occurred for the ALTER TABLE Command Security Policy rule set. The time is: '; BEGIN msg := msg||to_char(SYSDATE, 'Day DD MON, YYYY HH24:MI:SS'); UTL_MAIL.SEND ( sender => 'youremail@example.com', recipients => 'recipientemail@example.com', subject => 'Table modification attempted outside maintenance!', message => msg); END email_alert; /
Replace youremail@example.com
with your email address, and recipientemail@example.com
with the email address of the person you want to receive the notification.
Grant the EXECUTE
permission on this procedure to DVSYS
.
GRANT EXECUTE ON email_alert TO DVSYS;
Before you can use PL/SQL network utility packages such as UTL_MAIL
, you must configure an access control list (ACL) file that enables fine-grained access to external network services. For detailed information about this topic, see Oracle Database Security Guide.
To configure an access control list for the email alert:
As the DV_OWNER
user, in SQL*Plus, create the following access control list and its privilege definitions.
BEGIN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL ( acl => 'mail_server_permissions.xml', description => 'Enables network permissions for the mail server', principal => 'LBROWN_DVOWNER', is_grant => TRUE, privilege => 'connect'); END; /
Ensure that you enter your exact user name for the principal setting, in upper-case letters. For this tutorial, enter the name of the Database Vault Owner account (for example, LBROWN_DVOWNER
).
Assign the access control list to the outgoing SMTP network host for your email server.
BEGIN DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL ( acl => 'mail_server_permissions.xml', host => 'SMTP_OUT_SERVER_setting', lower_port => port); END; /
In this example:
SMTP_OUT_SERVER_setting
: Enter the SMTP_OUT_SERVER
setting that you set for the SMTP_OUT_SERVER
parameter in "Step 1: Install and Configure the UTL_MAIL PL/SQL Package". This setting should match exactly the setting that your email tool specifies for its outgoing server.
port
: Enter the port number that your email tool specifies for its outgoing server. Typically, this setting is 25. Enter this value for both the lower_port
and upper_port
settings. (Currently, the UTL_MAIL
package does not support SSL. If your mail server is an SSL server, then enter 25 for the port number, even if the mail server uses a different port number.)
Commit your changes to the database.
COMMIT;
Test the settings that you have created so far.
EXEC EMAIL_ALERT; COMMIT;
SQL*Plus should display a PL/SQL procedure successfully completed
message, and in a moment, depending on the speed of your email server, you should receive the email alert.
If you receive an ORA-24247: network access denied by access control list (ACL)
error followed by ORA-06512: at
string
line
string
errors, then check the settings in the access control list file.
As the DV_OWNER
user, create the following rule set:
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE_SET( rule_set_name => 'ALTER TABLE Command Security Policy', description => 'This rule set allows ALTER TABLE only during the maintenance period.', enabled => 'Y', eval_options => 1, audit_options => DBMS_MACUTL.G_RULESET_AUDIT_FAIL,, fail_options => DBMS_MACUTL.G_RULESET_FAIL_SILENT, fail_message => '', fail_code => NULL, handler_options => DBMS_MACUTL.G_RULESET_HANDLER_FAIL, handler => 'dbavowner.email_alert'); END; /
Create a rule similar to the following.
For now, set the rule expression to be during the time you test it. For example, if you want to test it between 2 p.m. and 3 p.m., create the rule as follows:
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Restrict Access to Maintenance Period', rule_expr => 'TO_CHAR(SYSDATE,''HH24'') BETWEEN ''14'' AND ''15'''); END; /
Ensure that you use two single quotation marks instead of double quotation marks for HH24
, 14
, and 15
.
You can check the system time on your computer by issuing the following SQL statement:
SELECT TO_CHAR(SYSDATE,'HH24') FROM DUAL;
Output similar to the following appears:
TO -- 14
Later on, when you are satisfied that the rule works, you can update it to a time when your site typically performs maintenance work (for example, between 7 p.m. and 10 p.m), as follows:
BEGIN DVSYS.DBMS_MACADM.UPDATE_RULE( rule_name => 'Restrict Access to Maintenance Period', rule_expr => 'TO_CHAR(SYSDATE,''HH24'') BETWEEN ''19'' AND ''22'''); END; /
Add the Restrict Access to Maintenance Period rule to the ALTER TABLE Command Security Policy rule set.
BEGIN DBMS_MACADM.ADD_RULE_TO_RULE_SET( rule_set_name => 'ALTER TABLE Command Security Policy', rule_name => 'Restrict Access to Maintenance Period'); END; /
Create the following command rule:
BEGIN DVSYS.DBMS_MACADM.CREATE_COMMAND_RULE( command => 'ALTER TABLE', rule_set_name => 'ALTER TABLE Command Security Policy', object_owner => 'SCOTT', object_name => '%', enabled => 'Y'); END; /
Commit these updates to the database.
COMMIT;
Connect to SQL*Plus as user SCOTT
.
For example:
CONNECT SCOTT
Enter password: password
If the SCOTT
account is locked and expired, then a user with the DV_ACCTMGR
role can unlock this account and create a new password as follows:
ALTER USER SCOTT ACCOUNT UNLOCK IDENTIFIED BY password;
Replace password
with a password that is secure. See Oracle Database Security Guide for the minimum requirements for creating passwords.
As the user SCOTT
, create a test table.
CREATE TABLE mytest (col1 number);
Change the system time on your computer to a time when the ALTER TABLE Command Security Policy rule set takes place (for example, between 2 p.m. and 3 p.m).
UNIX: Log in as root and use the date
command to set the time. For example, assuming the date today is December 14, 2011, you would enter the following:
su root
Password: password
date --set="14 DEC 2011 14:00:00"
Windows: Double-click the clock icon, which is typically at the lower right corner of the screen. In the Date and Time Properties window, set the time to 2 p.m., and then click OK.
Try altering the my_test
table.
ALTER TABLE mytest ADD (col2 number); Table altered.
SCOTT
should be able to alter the mytest
table during this time.
Reset the system time to a time outside the Restrict Access to Maintenance Period time.
Log in as SCOTT
and try altering the my_test
table again.
CONNECT SCOTT
Enter password: password
ALTER TABLE mytest ADD (col3 number);
The following output should appear:
ORA-47400: Command Rule violation for ALTER TABLE on SCOTT.MYTEST
SCOTT
cannot alter the mytest
table. In a moment, you should receive an email with the subject header Table modification attempted outside maintenance!
and with a message similar to the following:
Realm violation occurred for the ALTER TABLE Command Security Policy rule set. The time is: Wednesday 06 MAY, 2009 14:24:25
Reset the system time to the correct time.
Connect to SQL*Plus as the DV_OWNER
user, and then in the order shown, drop the Oracle Database Vault rule components.
EXEC DVSYS.DBMS_MACADM.DELETE_RULE_FROM_RULE_SET('ALTER TABLE Command Security Policy', 'Restrict Access to Maintenance Period'); EXEC DVSYS.DBMS_MACADM.DELETE_RULE('Restrict Access to Maintenance Period'); EXEC DVSYS.DBMS_MACADM.DELETE_COMMAND_RULE('ALTER TABLE', 'SCOTT', '%'); EXEC DVSYS.DBMS_MACADM.DELETE_RULE_SET('ALTER TABLE Command Security Policy');
Drop the email_alert
PL/SQL procedure.
DROP PROCEDURE email_alert;
Remove the access control list.
EXEC DBMS_NETWORK_ACL_ADMIN.DROP_ACL ('email_alert_permissions.xml');
Connect as user SCOTT
and remove the mytest
table.
CONNECT SCOTT
Enter password: password
DROP TABLE mytest;
Connect as SYS
using the SYSDBA
privilege and then revoke the EXECUTE
privilege on the UTL_TCP
, UTL_SMTP
, and UTL_MAIL
PL/SQL packages from the DV_OWNER
user.
For example:
REVOKE EXECUTE ON UTL_TCP FROM lbrown_dvowner; REVOKE EXECUTE ON UTL_SMTP FROM lbrown_dvowner; REVOKE EXECUTE ON UTL_MAIL FROM lbrown_dvowner; REVOKE EXECUTE ON DBMS_NETWORK_ACL_ADMIN from lbrown_dvowner;
Set the SMTP_OUT_SERVER
parameter to its original value.
For example:
ALTER SYSTEM SET SMTP_OUT_SERVER="some_value.example.com";
Connect as SYS
using the SYSOPER
privilege and then restart the database.
CONNECT SYS/AS SYSOPER
Enter password: password
SHUTDOWN IMMEDIATE
STARTUP
This section contains:
Step 2: Create a Function to Check if User patch_boss Is Logged In
Step 3: Create Rules, a Rule Set, and a Command Rule to Control the Users' Access
In this tutorial, you configure a rule set that defines two-person integrity (TPI), also called dual key security, dual key connection, and two-man rule security. In this type of security, two users are required to authorize an action instead of one user. The idea is that one user provides a safety check for the other user before that user can proceed with a task. Two-person integrity provides an additional layer of security for actions that potentially can be dangerous. This type of scenario is often used for tasks such as database patch updates, which is what this tutorial will demonstrate. One user, patch_user
must log in to perform a database patch upgrade, but the only way that he can do this is if his manager, patch_boss
is already logged in. You will create a function, rules, a rule set, and a command rule to control patch_user
's ability to log in.
You must create the following two users for this tutorial:
patch_boss
acts in a supervisory role: If patch_boss
is not logged in, then the patch_user
user cannot log in.
patch_user
is the user who is assigned to perform the patch upgrade. However, for this tutorial, user patch_user
does not actually perform a patch upgrade. He only attempts to log in.
To create the users:
Connect to SQL*Plus as a user who has been granted the DV_ACCTMGR
role.
For example:
CONNECT amalcolm_dvacctmgr
Enter password: password
Create the following users.
CREATE USER patch_boss IDENTIFIED BY password; CREATE USER patch_user IDENTIFIED BY password;
Replace password
with a password that is secure. See Oracle Database Security Guide for the minimum requirements for creating passwords.
Connect as user SYS
with the SYSDBA
privilege and grant privileges to the patch_boss
and patch_user
users.
CONNECT SYS AS SYSDBA
Enter password: password
GRANT CREATE SESSION TO patch_boss, patch_user;
Grant the following privileges to the DV_OWNER
or DV_ADMIN
user.
For example:
GRANT CREATE PROCEDURE TO lbrown_dvowner; GRANT SELECT ON V_$SESSION TO lbrown_dvowner;
The V_$SESSION
table is the underlying table for the V$SESSION
dynamic view.
In a real-world scenario, you also would log in as the DV_OWNER
user and grant the DV_PATCH_ADMIN
role to user patch_user
(but not to patch_boss
). But because you are not really going to perform a database patch upgrade in this tutorial, you do not need to grant this role to user patch_user
.
The function that you must create, check_boss_logged_in
, does just that: When user patch_user
tries to log in to SQL*Plus, it checks if user patch_boss
is already logged in by querying the V$SESSION
data dictionary view.
To create the check_boss_logged_in
function:
As the DV_OWNER
or DV_ADMIN
user, create the check_boss_logged_in
function as follows:
CREATE OR REPLACE FUNCTION check_boss_logged_in return varchar2 authid definer as v_session_number number := 0; v_allow varchar2(10) := 'TRUE'; v_deny varchar2(10) := 'FALSE'; BEGIN SELECT COUNT(*) INTO v_session_number FROM SYS.V_$SESSION WHERE USERNAME = 'PATCH_BOSS'; -- Enter the user name in capital letters. IF v_session_number > 0 THEN RETURN v_allow; ELSE RETURN v_deny; END IF; END check_boss_logged_in; /
Grant the EXECUTE
privilege on the check_boss_logged_in
function to the DVSYS
schema.
GRANT EXECUTE ON check_boss_logged_in to DVSYS;
Next, you must create two rules, a rule set to which you will add them, and a command rule. The rule set triggers the check_boss_logged_in
function when user patch_user
tries to logs in to the database.
To create the rules and rule set:
Connect as a user who has been granted the DV_OWNER
or DV_ADMIN
role.
For example:
CONNECT lbrown_dvowner
Enter password: password
Create the Check if Boss Is Logged In rule, which checks that the patch_user
user is logged in to the database. In the definition, replace lbrown_dvowner
with the name of the DVOWNER
or DV_ADMIN
user who created the check_boss_logged_in
function.
If the check_boss_logged_in
function returns TRUE
(that is, patch_boss
is logged in to another session), then patch_user
can log in.
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check if Boss Is Logged In', rule_expr => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') = ''PATCH_USER'' and lbrown_dvowner.check_boss_logged_in = ''TRUE'' '); END; /
Enter the user name, PATCH_USER
, in upper-case letters, which is how the SESSION_USER
parameter stores it.
Create the Allow Connect for Other Database Users rule, which ensures that the user logged in (patch_user
) is not user patch_boss
. It also enables all other valid users to log in.
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Allow Connect for Other Database Users', rule_expr => 'SYS_CONTEXT(''USERENV'',''SESSION_USER'') != ''PATCH_USER'''); END; / COMMIT;
Create the Dual Connect for Boss and Patch rule set, and then add the two rules to it.
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE_SET( rule_set_name => 'Dual Connect for Boss and Patch', description => 'Checks if both boss and patch users are logged in.', enabled => 'Y', eval_options => 2, audit_options => DBMS_MACUTL.G_RULESET_AUDIT_FAIL, fail_options => DBMS_MACUTL.G_RULESET_FAIL_SILENT, fail_message =>'', fail_code => NULL, handler_options => DBMS_MACUTL.G_RULESET_HANDLER_OFF, handler => '' ); END; / BEGIN DVSYS.DBMS_MACADM.ADD_RULE_TO_RULE_SET( rule_set_name => 'Dual Connect for Boss and Patch', rule_name => 'Check if Boss Is Logged In' ); END; / BEGIN DVSYS.DBMS_MACADM.ADD_RULE_TO_RULE_SET( rule_set_name => 'Dual Connect for Boss and Patch', rule_name => 'Allow Connect for Other Database Users' ); END; /
Create the following CONNECT command rule, which permits user patch_user
to connect to the database only if patch_boss
is already logged in.
BEGIN DVSYS.DBMS_MACADM.CREATE_COMMAND_RULE( command => 'CONNECT', rule_set_name => 'Dual Connect for Boss and Patch', object_owner => '%', object_name => '%', enabled => 'Y'); END; / COMMIT;
Exit SQL*Plus.
EXIT
Create a second shell, for example:
xterm &
In the first shell, try to log in as user patch_user
.
sqlplus patch_user
Enter password: password
ERROR:
ORA-47400: Command Rule violation for CONNECT on LOGON
Enter user-name:
User patch_user
cannot log in until user patch_boss
is already logged in. (Do not try the Enter user-name
prompt yet.)
In the second shell, log in as user patch_boss
.
sqlplus patch_boss
Enter password: password
Connected.
User patch_boss
can log in.
Go back to the first shell, and then try logging in as user patch_user
again.
Enter user_name: patch_user
Enter password: password
This time, user patch_user
is deemed a valid user, so now he can log in.
In the session for the user patch_boss
, exit SQL*Plus and then close the shell.
EXIT
In the first shell, connect the DV_ACCTMGR
user and remove the users you created.
CONNECT amalcolm_dvacctmgr
Enter password: password
DROP USER patch_boss;
DROP USER patch_user;
Connect as user SYS
with the SYSDBA
privilege and revoke the privileges that you had granted to the DV_OWNER
or DV_ADMIN
user.
CONNECT SYS AS SYSDBA
Enter password: password
REVOKE CREATE PROCEDURE FROM lbrown_dvowner;
REVOKE SELECT ON V_$SESSION FROM lbrown_dvowner;
Connect as the DV_OWNER
or DV_ADMIN
user and drop the rules, rule set, and command rule, in the order shown.
CONNECT lbrown_dvowner
Enter password: password
DROP FUNCTION check_boss_logged_in;
EXEC DVSYS.DBMS_MACADM.DELETE_COMMAND_RULE('CONNECT', '%', '%');
EXEC DVSYS.DBMS_MACADM.DELETE_RULE_FROM_RULE_SET('Dual Connect for Boss and Patch', 'Check if Boss Is Logged In');
EXEC DVSYS.DBMS_MACADM.DELETE_RULE_FROM_RULE_SET('Dual Connect for Boss and Patch', 'Allow Connect for Other Database Users');
EXEC DVSYS.DBMS_MACADM.DELETE_RULE('Check if Boss Is Logged In');
EXEC DVSYS.DBMS_MACADM.DELETE_RULE('Allow Connect for Other Database Users');
EXEC DVSYS.DBMS_MACADM.DELETE_RULE_SET('Dual Connect for Boss and Patch');
COMMIT;
Follow these guidelines for designing rule sets:
You ca0#n share rules among multiple rule sets. This lets you develop a library of reusable rule expressions. Oracle recommends that you design such rules to be discrete, single-purpose expressions.
You can design a rule set so that its evaluation is static, that is, it is evaluated only once during a user session. Alternatively, it can be evaluated each time the associated command rule accesses the rule set. If the rule set is evaluated only once, then the evaluated value is reused throughout the user session each time the command rule accesses the rule set. Using static evaluation is useful in cases where the rule set must be accessed multiple times but the conditions on which the rule set depend do not change during that session. An example would be a SELECT command rule associated with a rule set when the same SELECT
statement occurs multiple times and if the evaluated value is acceptable to use again, rather than evaluating the rule set each time the SELECT
occurs.
To control the static evaluation of the rule set, set the is_static
parameter of the CREATE_RULE_SET
or UPDATE_RULE_SET
procedures of the DVSYS.DBMS_MACADM
PL/SQL package. See "Rule Set Procedures Within DVSYS.DBMS_MACADM" for more information.
Use Oracle Database Vault factors in your rule expressions to provide reusability and trust in the values used by your rule expressions. Factors can provide contextual information to use in your rules expressions.
You can use custom event handlers to extend Oracle Database Vault security policies to integrate external systems for error handling or alerting. Using Oracle utility packages such as UTL_TCP
, UTL_HTTP
, UTL_MAIL
, UTL_SMTP
, or DBMS_AQ
can help you to achieve this type of integration.
Test rule sets thoroughly for various accounts and scenarios either on a test database or on a test realm or command rule for nonsensitive data before you apply them to realms and command rules that protect sensitive data. You can test rule expressions directly with the following SQL statement:
SQL> SELECT SYSDATE from DUAL where rule expression
You can nest rule expressions inside a single rule. This helps to achieve more complex situations where you would need a logical AND
for a subset of rules and a logical OR
with the rest of the rules. See the definition for the Is Corporate Network During Maintenance rule set under "Tutorial: Creating an Email Alert for Security Violations" for an example.
You cannot use invoker's rights procedures with rule expressions. Only use definer's rights procedures with rule expressions.
In general, the more rules and more complex the rules, the more performance overhead the performance for execution of certain operations governed by these rule sets. For example, if you have a very large number of rules in a rule set governing a SELECT
statement, performance could degrade significantly.
If you have rule sets that require many rules, performance improves if you move all the rules to logic defined in a single PL/SQL standalone or package function. However, if a rule is used by other rule sets, there is little performance effect on your system.
If possible, consider setting the rule set to use static evaluation, assuming this is compatible with the associated command rule's usage. See "Guidelines for Designing Rule Sets" for more information.
You can check system performance by running tools such as Oracle Enterprise Manager (including Oracle Enterprise Manager Database Control, which is installed by default with Oracle Database), Statspack
, and TKPROF
. For more information about Oracle Enterprise Manager, see the Oracle Enterprise Manager documentation set. For information about Database Control, refer to its online Help. Oracle Database Performance Tuning Guide describes the Statspack
and TKPROF
utilities.
Table 5-1 lists Oracle Database Vault reports that are useful for analyzing rule sets and the rules within them. See Chapter 17, "Oracle Database Vault Reports," for information about how to run these reports.
Table 5-1 Reports Related to Rule Sets
Report | Description |
---|---|
"Rule Set Configuration Issues Report" |
Lists rule sets that have no rules defined or enabled |
"Secure Application Configuration Issues Report" |
Lists secure application roles that have incomplete or disabled rule sets |
"Command Rule Configuration Issues Report" |
Lists rule sets that are incomplete or disabled |
Table 5-2 lists data dictionary views that provide information about existing rules and rule sets.
See Also: Appendix D, "Oracle Database Vault Security Guidelines," for guidelines on managing security in the Oracle Database configuration |
When you install Oracle Database Vault, the installation process modifies several database initialization parameter settings to better secure your database configuration. If these changes adversely affect your organizational processes or database maintenance procedures, then contact Oracle Support for help in resolving the issue.
Table 2-1 describes the initialization parameter settings that Oracle Database Vault modifies. Initialization parameters are stored in the init.ora
initialization parameter file, located in $ORACLE_HOME/srvm/admin
. For more information about this file, see Oracle Database Administrator's Guide.
Table 2-1 Modified Database Initialization Parameter Settings
Parameter | Default Value in Database | New Value Set by Database Vault | Impact of the Change |
---|---|---|---|
|
|
Enables the auditing of top-level operations directly issued by user For more information about | |
Not configured. |
|
Disables the operating system to completely manage the granting and revoking of roles to users. Any previous grants of roles to users using For more information about | |
|
|
Controls whether the Flashback Drop feature is turned on or off. If See Also:
| |
|
|
Specifies whether Oracle Database checks for a password file. The For more information about | |
|
|
Ensures that users have been granted the For more information about |
During installation of Oracle Database Vault, the installer prompts for several additional database account names. In addition, several database roles are created. These accounts are part of the separation of duties provided by Oracle Database Vault. One common audit problem that has affected several large organizations is the unauthorized creation of new database accounts by a database administrator within a production instance. Upon installation, Oracle Database Vault prevents anyone other than the Oracle Database Vault account manager or a user granted the Oracle Database Vault account manager role from creating users in the database.
For guidelines on managing separation of duty, see "Separation of Duty Guidelines".
To meet regulatory, privacy and other compliance requirements, Oracle Database Vault implements the concept of separation of duty. Oracle Database Vault makes clear separation between the account management responsibility, data security responsibility, and database resource management responsibility inside the database. This means that the concept of a superprivileged user (for example, DBA
) is divided among several new database roles to ensure no one user has full control over both the data and configuration of the system. Oracle Database Vault prevents the SYS
user and other accounts with the DBA
role and other system privileges from designated protected areas of the database called realms. It also introduces new database roles called the Oracle Database Vault Owner (DV_OWNER
) and the Oracle Database Vault Account Manager (DV_ACCTMGR
). These new database roles separate the data security and the account management from the traditional DBA
role. You should map these roles to distinct security professionals within your organization.
See Also:
|
When you install Oracle Database Vault, it revokes a set of privileges from several Oracle Database-supplied roles, as part of the separation of duty enhancement.
Table 2-2 lists privileges that Oracle Database Vault revokes from existing users and roles. Be aware that if you disable Oracle Database Vault, these privileges remain revoked. If your applications depend on these privileges, then grant them to application owner directly.
Table 2-2 Privileges Oracle Database Vault Revokes
User or Role | Privilege That Is Revoked |
---|---|
| |
| |
| |
| |
|
Footnote 1 To authorize users to export and import data using Oracle Data Pump, see "Using Oracle Data Pump in an Oracle Database Vault Environment".
Footnote 2 To authorize users to schedule database jobs, see "Scheduling Database Jobs in an Oracle Database Vault Environment".
Table 2-3 lists privileges that Oracle Database Vault prevents. When Oracle Database Vault is enabled, users who have the Database Vault Account Manager role (DV_ACCTMGR
) have the privileges listed in this table. If you disable Oracle Database Vault, users SYS
and SYSTEM
have these privileges.
Table 2-3 Privileges Oracle Database Vault Prevents
User or Role | Privilege That Is Prevented |
---|---|
|
|
|
|
Footnote 1 For better security and to maintain separation-of-duty standards, do not enable SYS
or SYSTEM
users the ability to create or manage user accounts.
This section contains:
In an Oracle Database Vault environment, when Oracle Label Security is enabled, the AUD$
table is moved from the SYS
schema to the SYSTEM
schema. The synonym SYS.AUD$
is created to refer to the SYSTEM.AUD$
table.
Tip: For greater security, create a realm around theSYSTEM.AUD$ and SYS.FGA_LOG$ tables. See Chapter 4, "Configuring Realms," for more information about realms. |
When you install Oracle Database Vault, it configures several AUDIT
statement settings in the database. See "Oracle Database Audit Settings Created for Oracle Database Vault" for more information.
This section describes new features in Oracle Database Vault for this release of Oracle Database.
This section contains:
New Oracle Database Vault Features in Oracle Database 11g Release 2 (11.2.0.3)
Changed Oracle Database Vault Features in Oracle Database 11g Release 2 (11.2.0.2)
New Oracle Database Vault Features in Oracle Database 11g Release 2 (11.2.0.2)
New Oracle Database Vault Features in Oracle Database 11g Release 2 (11.2.0.1)
This section contains:
New Role to Support the XStream in an Oracle Database Vault Environment
New Roles to Support Oracle GoldenGate in an Oracle Database Vault Environment
Users who want to use XStream in an Oracle Database Vault environment must now be granted the DV_XSTREAM_ADMIN
role.
See "DV_XSTREAM_ADMIN XStream Administrative Role" for more information.
Users who want to use Oracle GoldenGate in an Oracle Database Vault environment must be granted one of the following roles, depending on how they plan to use Oracle GoldenGate:
DV_GOLDENGATE_ADMIN
role if they want to configure Oracle GoldenGate
DV_GOLDENGATE_REDO_ACCESS
role if they want to use the GoldenGate TRANLOGOPTIONS DBLOGREADER
method to access redo logs
See the following sections for more information:
Database Vault Configuration Assistant (DVCA) has been deprecated starting with this release. The functionality for DVCA to add languages to Database Vault has been replaced with the DVSYS.DBMS_MACADM.ADD_NLS_DATA
procedure.
See "Adding Languages to Oracle Database Vault" for more information.
This section contains:
Starting with this release, the Oracle Data Pump EXP
and IMP
utilities cannot be used in an Oracle Database Vault environment.
See "Using Oracle Data Pump in an Oracle Database Vault Environment" for more information about using Oracle Data Pump with Oracle Database Vault.
This section contains:
Default settings for some of the values for the following DVSYS.DBMS_MACADM
PL/SQL package procedures are now based on their previous settings:
DVSYS.DBMS_MACADM.UPDATE_REALM
DVSYS.DBMS_MACADM.UPDATE_REALM_AUTH
DVSYS.DBMS_MACADM.UPDATE_RULE_SET
DVSYS.DBMS_MACADM.UPDATE_COMMAND_RULE
DVSYS.DBMS_MACADM.UPDATE_FACTOR
DVSYS.DBMS_MACADM.UPDATE_ROLE
For example, suppose you created or updated a realm to have realm checking enabled. When you use the DVSYS.DBMS_MACADM.UPDATE_REALM
procedure to modify the realm, the enabled
parameter default is set to enable realm checking.
For more information, see Chapter 12, "Using the DVSYS.DBMS_MACADM Package."
This section contains:
You now can perform a set of Oracle Database Vault functions from both Oracle Database Enterprise Manager Database Control Release 11.2 and Grid Control Release 10.2.0.5. This integration also applies to Releases 9.2.0.8, 10.2.0.4, and 11.1.0.7 of Oracle Database Vault.
From Database Control, you now can perform the following tasks:
Monitor the Database Vault-enabled database
Access Oracle Database Vault reports
From Grid Control, you can perform these tasks:
Propagate Oracle Database Vault security policies across multiple database servers to help ensure consistent policies across the enterprise
Administer and monitor all Oracle Database Vault-protected servers from a single centralized management console
Automate alerts when unauthorized attempts are made to access Oracle Database Vault-protected databases
Access Oracle Database Vault reports
See the following sections for more information:
"Accessing the Oracle Database Vault Pages from Oracle Enterprise Manager"
"Using Oracle Database Vault with Oracle Enterprise Manager"
Oracle Data Pump users now can export and import data in an Oracle Database Vault environment.
See "Using Oracle Data Pump in an Oracle Database Vault Environment" for more information.
Users who are responsible for scheduling database jobs now can do so in an Oracle Database Vault environment.
See "Scheduling Database Jobs in an Oracle Database Vault Environment" for more information.
Oracle Database Vault includes the following new roles:
DV_MONITOR
DV_STREAMS_ADMIN
DV_PATCH_ADMIN
See the following sections for more information:
Oracle Database Vault now provides the following additional rule sets:
Allow Fine Grained Control of System Parameters
Allow Oracle Data Pump Operation
Allow Scheduler Job
See "Default Rule Sets" for more information.
You are no longer restricted to negative numbers when you specify a fail code for the creation of a rule set. You can enter a number the ranges of -20999 to -20000 or 20000 to 20999.
See "Error Handling Options" for more information.
The DBMS_MACADM
and DBMS_MACSEC_ROLES
PL/SQL packages have changed as follows:
The DBMS_MACADM.CREATE_RULE_SET and UPDATE_RULE_SET procedure have a new parameter, is_static. The is_static
parameter determines how often a rule set is evaluated when a SQL statement accesses it. See "CREATE_RULE_SET Procedure" and "UPDATE_RULE_SET Procedure" for more information.
The DBMS_MACADM package has the following new procedures:
AUTHORIZE_DATAPUMP_USER
authorizes an Oracle Database Pump user perform Oracle Data Pump operations when Oracle Database Vault is enabled. See "AUTHORIZE_DATAPUMP_USER Procedure" for more information.
UNAUTHORIZE_DATAPUMP_USER
revokes the authorization that was granted by the AUTHORIZE_DATAPUMP_USER
procedure. See "UNAUTHORIZE_DATAPUMP_USER Procedure" for more information.
AUTHORIZE_SCHEDULER_USER
grants a user authorization to schedule database jobs when Oracle Database Vault is enabled. See "AUTHORIZE_SCHEDULER_USER Procedure" for more information.
UNAUTHORIZE_SCHEDULER_USER
revokes the authorization that was granted by the AUTHORIZE_SCHEDULER_USER
procedure. See "UNAUTHORIZE_SCHEDULER_USER Procedure" for more information.
The DBMS_MACSEC_ROLES.SET_ROLE procedure has been enhanced. You now can specify multiple roles with the p_role
parameter. See "SET_ROLE Procedure" for more information.
Database Vault Configuration Assistant (DVCA) has the following changes:
Addition of the dbuniquename parameter. The dbuniquename
parameter enables you to specify a globally unique name for an Oracle database. See "Adding Languages to Oracle Database Vault" for more information.
Removal of the optionrac parameter. The optionrac
parameter was used for configuring Oracle Database Vault on Oracle Real Application Clusters (Oracle RAC) nodes. The new procedure for configuring Oracle Database Vault on Oracle RAC nodes is simpler. See "Configuring Oracle Database Vault on Oracle RAC Nodes" for more information.
You now can use Oracle Recovery Manager (RMAN) in an Oracle Database Vault environment.
See "Using Oracle Database Vault with Oracle Recovery Manager".
In previous releases of Oracle Database Vault, the SYS
user was prevented from granting or revoking the EXECUTE
privilege on the DBMS_RLS
PL/SQL package to other users. Starting with this release, user SYS
can resume granting and revoking EXECUTE
on DBMS_RLS
to other users.
To keep DVSYS
as a protected schema, you can no longer drop its objects, even if the recycle bin is disabled. For better security for other realms, you should disable the recycle bin.
See "Security Considerations for the Recycle Bin".
Oracle Database Vault no longer modifies the OS_AUTHENT_PREFIX
initialization parameter during installation. The default value for the OS_AUTHENT_PREFIX
parameter is OPS$
.
See Oracle Database Reference for more information about this parameter.
The NOSYSDBA
parameter of the ORAPWD
utility has been deprecated in this release. It is no longer necessary in Oracle Database Vault. As part of this deprecation, the lockout
parameter of the DVCA utility has been deprecated as well.
Administrator's Guide
11g Release 2 (11.2)
E23090-05
March 2012
Oracle Database Vault Administrator's Guide 11g Release 2 (11.2)
E23090-05
Copyright © 2006, 2012, Oracle and/or its affiliates. All rights reserved.
Primary Author: Patricia Huey
Contributors: Priya Badnar, Tammy Bednar, Tom Best, Ji-won Byun, Ben Chang, Martin Cheng, Chi Ching Chui, Scott Gaetjen, Viksit Gaur, Lijie Heng, Sumit Jeloka, Dominique Jeunot, Terri Keller, Peter Knaggs, Chon Lee, Frank Lee, Paul Needham, Deborah Owens, Yi Ouyang, Hozefa Palitanawala, Robert Pang, Rupa Parameswaran, Gayathri Sairamkrishnan, Vipin Samar, Javed Samuel, James Spiller, Ashwini Supur, Srividya Tata, Kamal Tbeileh, Sudheesh Varma, Peter Wahl, Rodney Ward, Daniel Wong, Aravind Yalamanchi
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
This chapter contains:
This section describes how to start Oracle Database Vault Administrator. This section contains:
This section contains:
From Database Control, you can use the Oracle Database Vault pages to monitor a Database Vault-enabled database and view Database Vault reports.
However, you cannot create policies or perform other Database Vault Administrator-related actions from Database Control. If you want to perform these tasks, use Database Vault Administrator, described under "Starting Oracle Database Vault Administrator". If you want to propagate Database Vault policies to other Database Vault-enabled databases, see "Accessing Oracle Database Vault Pages from Grid Control".
To access the Oracle Database Vault pages from Database Control:
If necessary, register Oracle Database Vault.
If you have just installed Oracle Database Vault, you must register it with the database. See "Registering (Enabling) Oracle Database Vault" for more information.
Start Database Control.
For example:
https://myserver.example.com:1158/em
See Oracle Database 2 Day DBA for more information on logging in to Oracle Enterprise Manager.
Log in to Database Control with the following information:
Username: Enter the name of a user who has been granted the appropriate Oracle Database Vault role:
Creating and propagating Database Vault policies: DV_OWNER
or DV_ADMIN
Viewing Database Vault alerts and reports: DV_OWNER
, DV_ADMIN
, or DV_SECANALYST
Creating and managing user accounts and roles: DV_ACCTMGR
The Oracle Database Vault roles do not need any additional privileges (such as SELECT ANY DICTIONARY
) to use Database Control.
See "About Oracle Database Vault Roles" for more information about these roles.
Password: Enter your password.
Connect As: Select Normal from the list.
Save as Preferred Credential check box: Select this check box if you want these credentials to be automatically filled in for you the next time that this page appears
In the Home page, click Server to display the Server subpage.
Under Security, select Database Vault.
The Oracle Database Vault home page appears.
From Grid Control, you can use the Oracle Database Vault pages to propagate Database Vault policies to other Database Vault-protected databases, administer and monitor Database Vault-protected databases from a centralized console, automate alerts, and view Database Vault reports.
However, you cannot create policies or perform other Database Vault Administrator-related actions from Grid Control. If you want to perform these tasks, use Database Vault Administrator, described under "Starting Oracle Database Vault Administrator".
To access the Oracle Database Vault pages from Grid Control:
Ensure that you have configured the Grid Control target databases that you plan to use with Database Vault.
See the Oracle Enterprise Manager online help and Oracle Enterprise Manager Advanced Configuration for more information about configuring target databases.
If necessary, register Oracle Database Vault.
If you have just installed Oracle Database Vault, you must register it with the database. See "Registering (Enabling) Oracle Database Vault" for more information.
Start Grid Control.
For example:
https://myserver.example.com:1158/em
See Oracle Database 2 Day DBA for more information on logging in to Oracle Enterprise Manager.
Log in to Oracle Enterprise Manager as user SYSMAN
and connect as Normal
.
In the Oracle Enterprise Manager Database Home page (Database Home page), select the Targets subpage.
Select the Databases subpage.
In the Databases page, select the link for the Oracle Database Vault-protected database to which you want to connect.
The home page for the database instance appears.
In the Home page, click Server to display the Server subpage.
Under Security, select Database Vault.
The Database Login page appears.
Enter the following information:
Username: Enter the name of a user who has been granted the appropriate Oracle Database Vault role:
Creating and propagating Database Vault policies: DV_OWNER
or DV_ADMIN
Viewing Database Vault alerts and reports: DV_OWNER
, DV_ADMIN
, or DV_SECANALYST
Creating and managing user accounts and roles: DV_ACCTMGR
The Oracle Database Vault roles do not need any additional privileges (such as SELECT ANY DICTIONARY
) to use Grid Control.
See "About Oracle Database Vault Roles" for more information.
Password: Enter your password.
Connect As: Select Normal from the list.
Save as Preferred Credential check box: Select this check box if you want these credentials to be automatically filled in for you the next time that this page appears
Click the Login button.
The Database Vault home page appears.
If you are not using Oracle Enterprise Manager Database Control or Grid Control, or if you want to connect to Oracle Database Vault from a different computer, follow these steps to start Oracle Database Vault Administrator.
If necessary, register Oracle Database Vault.
If you have just installed Oracle Database Vault, you must register it with the database. See "Registering (Enabling) Oracle Database Vault" for more information.
From a browser, enter the following URL:
https://host_name:port/dva
In this specification:
host_name
: The server where you installed Oracle Database Vault
port
: The Oracle Enterprise Manager Console HTTPS port number
For example:
https://myserver:1158/dva
If you are unsure of the port number, open the $ORACLE_HOME
/
host_sid
/sysman/config/emd.properties
file and search for REPOSITORY_URL
. In most cases, the host name and port number are the same as Oracle Enterprise Database Control.
If you cannot start Oracle Database Vault Administrator, check that the Oracle database console process is running.
UNIX: Go to the $ORACLE_HOME/bin
directory and run the following command:
./emctl status dbconsole
If you must start the dbconsole
process, then run the following command:
./emctl start dbconsole
Windows: In the Administrative Services, select the Services utility, and then right-click the OracleDBConsolesid service. If necessary, select Start from the menu to start the database console.
Log files for the database are in the following directory:
$ORACLE_HOME/sysman/log
Log in by using the Oracle Database Vault Owner account that you created during installation.
To log in, you must enter the full connect string. This enables you to manage multiple Oracle Database instances with Oracle Database Vault.
By default, you cannot log in to Oracle Database Vault Administrator by using the SYS
, SYSTEM
, or other administrative accounts. You can log in if you have the DV_ADMIN
or DV_OWNER
roles.
Enter the following values:
User Name: Enter the name of a user who has been granted the appropriate Oracle Database Vault role:
Creating and managing Database Vault policies: DV_OWNER
or DV_ADMIN
Viewing Database Vault reports: DV_OWNER
, DV_ADMIN
, or DV_SECANALYST
Creating and managing user accounts and roles: DV_ACCTMGR
See "About Oracle Database Vault Roles" for more information.
Password: Enter your password.
Host: Enter the host name of the computer of the Oracle Database Vault installation you want. Use the following format:
server.domain
For example:
myserver-pc.us.example.com
Port: Enter the port number for Oracle Database. The default port number is 1521. If you are unsure of the port number, check the tnsnames.ora
file.
For example:
1521
SID/Service: Select either SID or Service. You can find these values in the tnsnames.ora
file. By default, this file is located in $ORACLE_HOME/network/admin
.
SID: Enter the name of the Oracle Database instance. For example:
orcl
Service: Enter the service name of the database instance, in the following format:
service_name.domain
For example:
orcl.us.example.com
Figure 3-1 shows the Oracle Database Vault Administrator home page, which appears after you log in.
Figure 3-1 Oracle Database Vault Administrator Home Page
This section contains:
In this tutorial, you create a simple security configuration for the HR
sample database schema. In the HR
schema, the EMPLOYEES
table has information such as salaries that should be hidden from most employees in the company, including those with administrative access. To accomplish this, you add the HR
schema to the secured objects of the protection zone, which in Oracle Database Vault is called a realm, inside the database. Then you grant limited authorizations to this realm. Afterward, you test the realm to make sure it has been properly secured. And finally, to see how Oracle Database Vault provides an audit trail on suspicious activities like the one you will try when you test the realm, you will run a report.
Before you can use this tutorial, ensure that the HR
sample schema is installed. See Oracle Database Sample Schemas for information on installing the sample schemas.
In this tutorial, the SYSTEM
user grants the ANY
privilege to a new user account, SEBASTIAN
. To do this, you must include SYSTEM
in the Oracle Data Dictionary realm.
To include SYSTEM
in the Oracle Data Dictionary realm:
Log in to Oracle Database Vault Administrator as a user who has been granted the DV_OWNER
or DV_ADMIN
role.
"Starting Oracle Database Vault" explains how to log in.
In the Administration page, under Database Vault Feature Administration, click Realms.
In the Realms page, select Oracle Data Dictionary from the list and then click Edit.
In the Edit Realm: Oracle Data Dictionary page, under Realm Authorizations, click Create.
In the Create Realm Authorization Page, from the Grantee list, select SYSTEM [USER].
For Authorization Type, select Owner.
Leave Authorization Rule Set at <Non Selected>.
Click OK.
In the Edit Realm: Oracle Data Dictionary page, SYSTEM
should be listed as an owner under the Realm Authorizations.
Click OK to return to the Realms page.
To return to the Administration page, click the Database Instance instance_name link over Realms.
Log in to SQL*Plus as user SYSTEM
and access the HR
schema.
sqlplus system
Enter password: password
SELECT FIRST_NAME, LAST_NAME, SALARY FROM HR.EMPLOYEES WHERE ROWNUM < 10;
Output similar to the following appears:
FIRST_NAME LAST_NAME SALARY -------------------- ------------------------- ---------- Donald OConnell 2600 Douglas Grant 2600 Jennifer Whalen 4400 Michael Hartstein 13000 Pat Fay 6000 Susan Mavris 6500 Hermann Baer 10000 Shelley Higgins 12000 William Gietz 8300 9 rows selected.
If the HR
schema is locked and expired, log in to SQL*Plus as the DV_ACCTMGR
user and unlock and unexpire the account. For example:
sqlplus amalcolm_dvacctmgr Enter password: password ALTER USER HR ACCOUNT UNLOCK IDENTIFIED BY password
Replace password
with a password that is secure. See Oracle Database Security Guide for the minimum requirements for creating passwords.
As you can see, SYSTEM
has access to the salary information in the EMPLOYEES
table of the HR
schema. This is because SYSTEM
is automatically granted the DBA
role, which includes the SELECT ANY TABLE
system privilege.
Realms can protect one or more schemas, individual schema objects, and database roles. Once you create a realm, you can create security restrictions that apply to the schemas and their schema objects within the realm. Your first step is to create a realm for the HR
schema.
In the Realms page of Oracle Database Vault Administrator, click Create.
In the Create Realm page, under General, enter HR Realm
after Name.
After Status, ensure that Enabled is selected so that the realm can be used.
Under Audit Options, ensure that Audit On Failure is selected so that you can create an audit trial later on.
Click OK.
The Realms Summary page appears, with HR Realm in the list of realms.
At this stage, you are ready to add the EMPLOYEES
table in the HR
schema to the secured objects of the HR realm.
In the Realms page, select HR Realm from the list and then click Edit.
In the Edit Realm: HR Realm page, scroll to Realm Secured Objects and then click Create.
In the Create Realm Secured Object page, enter the following settings:
Object Owner: Select HR from the list.
Object Type: Select TABLE from the list
Object Name: Enter EMPLOYEES
.
Click OK.
In the Edit Realm: HR Realm page, click OK.
At this stage, there are no database accounts or roles authorized to access or otherwise manipulate the database objects the realm will protect. So, the next step is to authorize database accounts or database roles so that they can have access to the schemas within the realm. You will create the SEBASTIAN
user account. After you authorize him for the realm, SEBASTIAN
can view and modify the EMPLOYEES
table.
In SQL*Plus, connect as the Database Vault Account Manager, who has the DV_ACCTMGR
role, and create user SEBASTIAN
.
For example:
CONNECT amalcolm_dvacctmgr Enter password: password CREATE USER SEBASTIAN IDENTIFIED BY password;
Replace password
with a password that is secure. See Oracle Database Security Guide for the minimum requirements for creating passwords.
Connect as SYSTEM
privilege, and then grant SEBASTIAN
the following additional privileges.
CONNECT SYSTEM
Enter password: password
GRANT CREATE SESSION, SELECT ANY TABLE TO SEBASTIAN;
Do not exit SQL*Plus; you will need it for Step 6: Test the Realm, when you test the realm.
At this stage, even though SEBASTIAN
has the SELECT ANY TABLE
privilege, he cannot select from the HR.EMPLOYEES
table because it is protected by a realm.
Next, authorize user SEBASTIAN
to have access to the HR Realm as follows:
In the Realms page of Database Vault Administrator, select the HR Realm in the list of realms, and then click Edit.
In the Edit Realm: HR Realm page, scroll down to Realm Authorizations and then click Create.
In the Create Realm Authorization page, under Grantee, select SEBASTIAN[USER] from the list.
If SEBASTIAN
does not appear in the list, select the Refresh button in your browser.
SEBASTIAN
is the only user who has access to the EMPLOYEES
table in the HR
schema.
Under Authorization Type, select Participant.
The Participant authorization allows the user SEBASTIAN
in the HR realm to manage access, manipulate, and create objects protected by the HR realm. In this case, the HR
user and SEBASTIAN
are the only users allowed to view the EMPLOYEES
table.
Under Authorization Rule Set, select <Not Assigned>, because rule sets are not needed to govern this realm.
Click OK.
To test the realm, try accessing the EMPLOYEES
table as a user other than HR
. The SYSTEM
account normally has access to all objects in the HR
schema, but now that you have safeguarded the EMPLOYEES
table with Oracle Database Vault, this is no longer the case.
In SQL*Plus, connect as SYSTEM
, and then try accessing the salary information in the EMPLOYEES
table again:
sqlplus system
Enter password: password
SELECT FIRST_NAME, LAST_NAME, SALARY FROM HR.EMPLOYEES WHERE ROWNUM <10;
The following output should appear:
Error at line 1: ORA-01031: insufficient privileges
SYSTEM
no longer has access to the salary information in the EMPLOYEES
table. However, user SEBASTIAN
does have access to this information. Try the following:
CONNECT SEBASTIAN
Enter password: password
SELECT FIRST_NAME, LAST_NAME, SALARY FROM HR.EMPLOYEES WHERE ROWNUM <10;
Output similar to the following appears:
FIRST_NAME LAST_NAME SALARY -------------------- ------------------------- ---------- Donald OConnell 2600 Douglas Grant 2600 Jennifer Whalen 4400 Michael Hartstein 13000 Pat Fay 6000 Susan Mavris 6500 Hermann Baer 10000 Shelley Higgins 12000 William Gietz 8300 9 rows selected.
Because you enabled auditing on failure for the HR Realm, you can generate a report to find any security violations such as the one you attempted in Step 6: Test the Realm.
In the Oracle Database Vault Administrator home page, click Database Vault Reports.
Before you can run the report, you must log in using an account that has the DV_OWNER
, DV_ADMIN
, or DV_SECANALYST
role. Note that user SEBASTIAN
cannot run the report, even if it affects his own realm. "Oracle Database Vault Roles" describes these roles in detail. Currently, you should be logged in as the Database Vault Owner (DV_OWNER
) account.
In the Database Vault Reports page, scroll down to Database Vault Auditing Reports and select Realm Audit.
Click Run Report.
Oracle Database Vault generates a report listing the type of violation (in this case, the SELECT
statement entered in the previous section), when and where it occurred, the login account who tried the violation, and what the violation was.
Remove the SYSTEM
account from the Data Dictionary Realm.
Ensure that you are logged on to Oracle Database Vault Administrator using a database account that has been granted the DV_OWNER
role.
From the Administration page, select Realms.
From the list of realms, select Oracle Data Dictionary, and then click Edit.
Under Realm Authorizations, select SYSTEM
.
Click Remove, and in the Confirmation window, click Yes.
Delete the HR Realm.
In the Realms page, select HR Realm
from the list of realms.
Click Remove, and in the Confirmation window, click Yes.
Drop user SEBASTIAN
.
In SQL*Plus, log on as the Oracle Database Vault account manager (for example, amalcolm_dvacctmgr
) you created when you installed Oracle Database Vault, and then drop SEBASTIAN
as follows:
sqlplus amalcolm_dvacctmgr
Enter password: password
DROP USER SEBASTIAN;
If necessary, lock and expire the HR
account.
ALTER USER HR ACCOUNT LOCK PASSWORD EXPIRE;
This chapter contains:
Oracle Database Vault provides a set of procedural interfaces to administer various Database Vault security options and manage Database Vault security enforcements. There are also procedures and functions that expose the logic to validate a DDL command for realm violations and command authorizations. Additional procedures and functions are provided to set the value of a factor (assuming their associated rule sets evaluate to true) (for example, from a Web application), to retrieve the trust level for a session or specific factor identity, and to get the label for a factor identity. These procedures and functions are provided so that a database administrator does not grant the EXECUTE
privilege on all DVSYS
package procedures to the general database account population. The procedures and functions expose only the minimum methods that are required. All of these functions and procedures are publicly available for applications that need them.
Table 15-1 lists the default run-time PL/SQL procedures and functions.
Table 15-1 DVSYS Functions
Procedure or Function | Parameter |
---|---|
|
Sets a factor |
|
Retrieves a factor |
|
Retrieves the trust level assigned to a factor |
GET_TRUST_LEVEL_FOR_IDENTITY Function |
Retrieves the trust level for a specified factor and an identity |
|
Checks whether the specified database role is enabled |
|
Retrieves the label for the specified factor when the factor has a label assigned to it for the specified Oracle Label Security policy |
The SET_FACTOR
procedure can be exposed to an application that requires the ability to set factor identities dynamically. It wraps the package procedure DVSYS.DBMS_MACADM.SET_FACTOR
. When a factor has a rule set associated with it for assignment and if the rule set returns true, then the value is set. Normal rule set handling occurs, and the factor value (identity) validation method is called. This procedure is available (to execute) to the general database account population.
Syntax
DVSYS.SET_FACTOR( p_factor IN VARCHAR2, p_value IN VARCHAR2);
Parameters
Table 15-2 SET_FACTOR Parameters
Parameter | Description |
---|---|
|
Factor name. To find existing factors in the current database instance, query the |
|
Identity value, up to 1024 characters in mixed case. To find the identities for each factor in the current database instance, query the |
Example
EXECUTE DVSYS.SET_FACTOR(''Sector2_ClientID'', ''identity'');
The GET_FACTOR
function is exposed to the DVF
schema to allow the public factor functions to resolve the identity of a factor. This enables the F$
functions in the DVF
schema. This function is available (to execute) to the general database account population.
Syntax
DVSYS.GET_FACTOR( p_factor IN VARCHAR2) RETURN VARCHAR2;
Parameter
Table 15-3 GET_FACTOR Parameter
Parameter | Description |
---|---|
|
Factor name. To find existing factors in the current database instance, query the |
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get Client ID Factor Identity', rule_expr => 'DVSYS.GET_FACTOR(''Sector2_ClientID'')'); END; /
The GET_TRUST_LEVEL
function returns the trust level of the current session identity for the factor requested. This function is available (to execute) to the general database account population. See "Creating and Configuring a Factor Identity" for a listing of the available trust levels.
Syntax
DVSYS.GET_TRUST_LEVEL( p_factor IN VARCHAR2) RETURN VARCHAR2;
Parameter
Table 15-4 GET_TRUST_LEVEL Parameter
Parameter | Description |
---|---|
|
Factor name. To find existing factors in the current database instance, query the |
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get Client ID Trust Level', rule_expr => 'DVSYS.GET_TRUST_LEVEL(''Sector2_ClientID'')'); END; /
The GET_TRUST_LEVEL_FOR_IDENTITY
function returns the trust level for the factor and identity requested. This function is available (to execute) to the general database account population. See "Creating and Configuring a Factor Identity" for a listing of the available trust levels.
Syntax
DVSYS.GET_TRUST_LEVEL_FOR_IDENTITY( p_factor IN VARCHAR2, p_identity IN VARCHAR2) RETURN VARCHAR2;
Parameters
Table 15-5 GET_TRUST_LEVEL_FOR_IDENTITY Parameters
Parameter | Description |
---|---|
|
Factor name. To find existing factors in the current database instance, query the |
|
Identity value. To find the identities for each factor in the current database instance, use the |
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get Client ID Identity Trust Level', rule_expr => 'DVSYS.GET_TRUST_LEVEL_FOR_IDENTITY(''Sector2_ClientID'', ''identity'')'); END; /
The ROLE_IS_ENABLED
function returns a boolean value that specifies whether a database role has been enabled. This function is available (to execute) to the general database account population.
Syntax
DVSYS.ROLE_IS_ENABLED( p_role IN VARCHAR2) RETURN BOOLEAN;
Parameter
Table 15-6 ROLE_IS_ENABLED Parameter
Parameter | Description |
---|---|
|
Database role name to check. To find existing roles, use the following data dictionary views:
|
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check if SYSADM Role Is Enabled', rule_expr => 'DVSYS.ROLE_IS_ENABLED(''SYSADM'')'); END; /
The GET_FACTOR_LABEL
function returns the label for the specified factor when the factor has a label assigned to it for the specified Oracle Label Security policy. The function returns a label that is merged with the maximum session label for the policy if the policy is configured with Oracle Label Security. The function is available (to execute) to the general database population. See "Label Identity" for more information about factor labels.
Syntax
DVSYS.GET_FACTOR_LABEL( p_factor IN VARCHAR2, p_policy_name IN VARCHAR2) RETURN VARCHAR2;
Parameters
Table 15-7 GET_FACTOR_LABEL Parameters
Parameter | Description |
---|---|
|
Factor name. To find the available factors in the current database instance, query the See "DBA_DV_FACTOR View" and "DBA_DV_MAC_POLICY_FACTOR View". |
|
Oracle Label Security policy name. Use the following data dictionary views to find information about policies and factors in the current database instance:
|
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get the ClientID Factor Label', rule_expr => 'DVSYS.GET_FACTOR_LABEL(''Sector2_ClientID'', ''Access Locations'')'); END; /
In addition to the functions and procedures made available from the DVSYS
schema, the DVF
schema contains a single function for each factor defined in the system. Oracle Database Vault maintains these functions when you use the DVSYS.DBMS_MACADM
PL/SQL package to manage the various factors. The functions are then available to the general database account population through PL/SQL functions and standard SQL. This enables factors to be used in Oracle Label Security, Oracle Virtual Private Database (VPD), and so on.
Typically, you can incorporate these functions into rule expressions. For example:
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Not Internal DBA', rule_expr => 'DVF.F$SESSION_USER NOT IN (''JSMTIH'', ''TBROWN'')'); END; /
To find the value of a factor function, select from the DUAL
system table. For example:
SELECT DVF.F$SESSION_USER FROM DUAL; F$SESSION_USER ------------------------------------------------ LBROWN_DVOWNER
The name of the factor itself is case-insensitive. For example, the following statements return the same result
select dvf.f$session_user from dual; SELECT DVF.F$SESSION_USER FROM DUAL;
Table 15-8 lists the default factor functions.
Table 15-8 Installed Oracle Database Vault Factor Functions
DVF Factor Function | Description |
---|---|
F$AUTHENTICATION_METHOD Function |
Returns the method of authentication in |
|
Returns the IP address of the computer from which the client is connected |
|
Returns the domain of the database as specified in the |
|
Returns the host name of the computer on which the database instance is running |
|
Returns the database instance identification number of the current database instance |
|
Returns the IP address of the computer on which the database instance is running |
|
Returns the name of the database as specified in the |
|
Returns a named collection of physical, configuration, or implementation-specific factors in the run-time environment (for example, a networked IT environment or subset of it) that operates at a specific sensitivity level |
F$ENTERPRISE_IDENTITY Function |
Returns the enterprise-wide identity for a user |
F$IDENTIFICATION_TYPE Function |
Returns the way the schema of a user was created in the database. Specifically, it reflects the |
|
Returns the ISO abbreviation for the language name, a shorter form than the existing |
|
Returns the language and territory currently used by your session, in |
|
Returns the computer (host) name for the database client that established the database session. |
|
Returns the network protocol being used for communication, as specified in the |
F$PROXY_ENTERPRISE_IDENTITY Function |
Returns the Oracle Internet Directory distinguished name (DN) when the proxy user is an enterprise user |
|
Returns the database user name by which the current user is authenticated |
The F$AUTHENTICATION_METHOD
function returns the method of authentication in VARCHAR2
data type. In the list that follows, the type of user is followed by the method returned:
Password-authenticated enterprise user, local database user, or SYSDBA
/SYSOPER
using Password File; proxy with user name using password: PASSWORD
Kerberos-authenticated enterprise or external user: KERBEROS
SSL-authenticated enterprise or external user: SSL
Radius-authenticated external user: RADIUS
Operating system-authenticated external user or SYSDBA
/SYSOPER
: OS
DCE-authenticated external user: DCE
Proxy with certificate, distinguished name (DN), or user name without using password: NONE
You can use IDENTIFICATION_TYPE
to distinguish between external and enterprise users when the authentication method is Password, Kerberos, or SSL.
Syntax
DVF.F$AUTHENTICATION_METHOD () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check SSL Authentication Method', rule_expr => 'DVF.F$AUTHENTICATION_METHOD = ''SSL'''); END; /
The F$CLIENT_IP
function returns the IP address of the computer from which the client is connected, in VARCHAR2
data type.
Syntax
DVF.F$CLIENT_IP () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Client IP Address', rule_expr => 'DVF.F$CLIENT_IP BETWEEN ''192.0.2.10'' AND ''192.0.2.20'''); END; /
The F$DATABASE_DOMAIN
function returns the domain of the database as specified in the DB_DOMAIN
initialization parameter, in sVARCHAR2
data type.
Syntax
DVF.F$DATABASE_DOMAIN () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Client Database Domain', rule_expr => 'DVF.F$DATABASE_DOMAIN NOT IN (''EXAMPLE'', ''YOURDOMAIN'')'); END; /
The F$DATABASE_HOSTNAME
function returns the host name of the computer on which the instance is running, in VARCHAR2
data type.
Syntax
DVF.F$DATABASE_HOSTNAME () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Host Name', rule_expr => 'DVF.F$DATABASE_HOSTNAME IN (''SHOBEEN'', ''MAU'')'); END; /
The F$DATABASE_INSTANCE
function returns the instance identification number of the current database instance, in VARCHAR2
data type.
Syntax
DVF.F$DATABASE_INSTANCE () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database Instance ID', rule_expr => 'DVF.F$DATABASE_INSTANCE = ''SALES_DB'''); END; /
The F$DATABASE_IP
function returns the IP address of the computer on which the database instance is running, in VARCHAR2
data type.
Syntax
DVF.F$DATABASE_IP () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database IP address', rule_expr => 'DVF.F$DATABASE_IP = ''192.0.2.5'''); END; /
The F$DATABASE_NAME
function returns the name of the database as specified in the DB_NAME
initialization parameter, in VARCHAR2
data type.
Syntax
DVF.F$DATABASE_NAME () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database DB_NAME Name', rule_expr => 'DVF.F$DATABASE_NAME = ''ORCL'''); END; /
The F$DOMAIN
function returns a named collection of physical, configuration, or implementation-specific factors in the run-time environment (for example, a networked IT environment or subset of it) that operates at a specific sensitivity level. The return type is VARCHAR2
.
You can identify a domain using factors such as host name, IP address, and database instance names of the Oracle Database Vault nodes in a secure access path to the database. Each domain can be uniquely determined using a combination of the factor identifiers that identify the domain. You can use these identifying factors and possibly additional factors to define the Maximum Security Label within the domain. This restricts data access and commands, depending on the physical factors about the Oracle Database Vault session. Example domains of interest may be Corporate Sensitive, Internal Public, Partners, and Customers.
Syntax
DVF.F$DOMAIN () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Domain', rule_expr => 'DVF.F$DOMAIN = ''EXAMPLE.COM'''); END; /
The F$ENTERPRISE_IDENTITY
function returns the enterprise-wide identity for a user, in VARCHAR2
data type:
For enterprise users: the Oracle Internet Directory DN.
For external users: the external identity (Kerberos principal name, Radius and DCE schema names, operating system user name, certificate DN).
For local users and SYSDBA
/SYSOPER
logins: NULL.
The value of the attribute differs by proxy method:
For a proxy with DN: the Oracle Internet Directory DN of the client.
For a proxy with certificate: the certificate DN of the client for external users; the Oracle Internet Directory DN for global users.
For a proxy with user name: the Oracle Internet Directory DN if the client is an enterprise user; NULL if the client is a local database user.
Syntax
DVF.F$ENTERPRISE_IDENTITY () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check User Enterprise Identity', rule_expr => 'DVF.F$ENTERPRISE_IDENTITY NOT IN (''JSMITH'', ''TSMITH'')'); END; /
The F$IDENTIFICATION_TYPE
function returns the way the schema of a user was created in the database. Specifically, it reflects the IDENTIFIED
clause in the CREATE
/ALTER USER
syntax. The return type is VARCHAR2
. In the list that follows, the syntax used during schema creation is followed by the identification type returned:
IDENTIFIED BY
password
:
LOCAL
IDENTIFIED EXTERNALLY
:
EXTERNAL
IDENTIFIED GLOBALLY
:
GLOBAL SHARED
IDENTIFIED GLOBALLY
AS DN: GLOBAL PRIVATE
Syntax
DVF.F$IDENTIFICATION_TYPE () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check User Schema Creation Type', rule_expr => 'DVF.F$IDENTIFICATION_TYPE = ''GLOBAL SHARED'''); END; /
The F$LANG
function returns the ISO abbreviation for the language name, a shorter form than the existing LANGUAGE
parameter, for the session of the user. The return type is VARCHAR2
.
See Oracle Database Globalization Support Guide for a listing of supported languages for Oracle Database.
Syntax
DVF.F$LANG () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check ISO Abbreviated Language Name', rule_expr => 'DVF.F$LANG IN (''EN'', ''DE'', ''FR'')'); END; /
The F$LANGUAGE
function returns the language and territory currently used by a user session, in VARCHAR2
data type, along with the database character set, in the following form:
language_territory.characterset
See Oracle Database Globalization Support Guide for a listing of supported languages and territories for Oracle Database.
Syntax
DVF.F$LANGUAGE () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Session Language and Territory', rule_expr => 'DVF.F$LANGUAGE = ''AMERICAN_AMERICA.WE8ISO8859P1'''); END; /
The F$MACHINE
function returns the computer (host) name for the database client that established the database session. The return type is VARCHAR2
.
Syntax
DVF.F$MACHINE () RETURN VARCHAR2;
Parameter
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Client Computer Host Name', rule_expr => 'DVF.F$MACHINE NOT IN (''SHOBEEN'', ''SEBASTIAN'')'); END; /
The F$NETWORK_PROTOCOL
function returns the network protocol being used for communication, as specified in the PROTOCOL
=protocol
portion of the connect string. The return type is VARCHAR2
.
Syntax
DVF.F$NETWORK_PROTOCOL () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Network Protocol', rule_expr => 'DVF.F$NETWORK_PROTOCOL = ''TCP'''); END; /
The F$PROXY_ENTERPRISE_IDENTITY
function returns the Oracle Internet Directory distinguished name (DN) when the proxy user is an enterprise user. The return type is VARCHAR2
.
Syntax
DVF.F$PROXY_ENTERPRISE_IDENTITY () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get OID DN of Enterprise User', rule_expr => 'DVF.F$PROXY_ENTERPRISE_IDENTITY = ''cn=Provisioning Admins'''); END; /
The F$SESSION_USER
function returns the database user name by which the current user is authenticated. This value remains the same throughout the session. The return type is VARCHAR2
.
Syntax
DVF.F$SESSION_USER () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database User Name', rule_expr => 'DVF.F$SESSION_USER IN (''JSMITH'', ''TSMITH'')'); END; /
Oracle Database Vault provides a set of functions that you can use in rule sets to inspect the SQL statement that you want the rule set to protect. For example, if a rule set protects SELECT ON HR.EMPLOYEES
under a command rule, then you could use these functions to make more informed decisions in the rule expression.
Table 15-9 lists the default rule functions.
Table 15-9 Installed Oracle Database Vault PL/SQL Rule Set Functions
Rule Set Function | Description |
---|---|
|
Returns the system event firing the rule set |
|
Returns the login user name |
|
Returns the database instance number |
|
Returns the database name |
|
Returns the type of the dictionary object on which the database operation occurred (for example, table, procedure, view) |
|
Returns the owner of the dictionary object on which the database operation occurred |
|
Returns the name of the dictionary object on which the database operation occurred |
|
Returns the first 4000 characters of SQL text of the database statement used in the operation |
The DV_SYSEVENT
function returns the system event firing the rule set, in VARCHAR2
data type. The event name is the same as that in the syntax of the SQL statement (for example, INSERT
, CREATE
.)
Syntax
DVSYS.DV_SYSEVENT () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Get System Event Firing the Maintenance Rule Set', rule_expr => 'DVSYS.DV_SYSEVENT = ''CREATE'''); END; /
The DV_LOGIN_USER
function returns the login user name, in VARCHAR2
data type.
Syntax
DVSYS.DV_LOGIN_USER () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check System Login User Name', rule_expr => 'DVSYS.DV_LOGIN_USER = ''SEBASTIAN'''); END; /
The DV_INSTANCE_NUM
function returns the database instance number, in NUMBER
data type.
Syntax
DVSYS.DV_INSTANCE_NUM () RETURN NUMBER;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database Instance Number', rule_expr => 'DVSYS.DV_INSTANCE_NUM BETWEEN 6 AND 9'); END; /
The DV_DATABASE_NAME
function returns the database name, in VARCHAR2
data type.
Syntax
DVSYS.DV_DATABASE_NAME () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Database Name', rule_expr => 'DVSYS.DV_DATABASE_NAME = ''ORCL'''); END; /
The DV_DICT_OBJ_TYPE
function returns the type of the dictionary object on which the database operation occurred (for example, table, procedure, or view). The return type is VARCHAR2
.
Syntax
DVSYS.DV_DICT_OBJ_TYPE () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Dictionary Object Type', rule_expr => 'DVSYS.DV_DICT_OBJ_TYPE IN (''TABLE'', ''VIEW'')'); END; /
The DV_DICT_OBJ_OWNER
function returns the name of the owner of the dictionary object on which the database operation occurred. The return type is VARCHAR2
.
Syntax
DVSYS.DV_DICT_OBJ_OWNER () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Dictionary Object Owner', rule_expr => 'DVSYS.DV_DICT_OBJ_OWNER = ''JSMITH'''); END; /
The DV_DICT_OBJ_NAME
function returns the name of the dictionary object on which the database operation occurred. The return type is VARCHAR2
.
Syntax
DVSYS.DV_DICT_OBJ_NAME () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check Dictionary Object Name', rule_expr => 'DVSYS.DV_DICT_OBJ_NAME = ''SALES'''); END; /
The DV_SQL_TEXT
function returns the first 4000 characters of SQL text of the database statement used in the operation The return type is VARCHAR2
.
Syntax
DVSYS.DV_SQL_TEXT () RETURN VARCHAR2;
Parameters
None.
Example
BEGIN DVSYS.DBMS_MACADM.CREATE_RULE( rule_name => 'Check SQL Text', rule_expr => 'DVSYS.DV_SQL_TEXT = ''SELECT SALARY FROM HR.EMPLOYEES'''); END; /
Oracle Database Vault provides a collection of PL/SQL package APIs to support the maintenance and run-time behavior of Oracle Database Vault. Table 15-10 lists these packages. Chapter 12, "Using the DVSYS.DBMS_MACADM Package," describes these packages in detail.
Table 15-10 Oracle Database Vault Administrator and Run-Time PL/SQL Packages
Package | Description |
---|---|
|
Provides for the administration of all aspects of the secure and access control configuration data. The realm owner of the Oracle Database Vault realm can grant the ability to run this package. See Chapter 12, "Using the DVSYS.DBMS_MACADM Package," for more information. |
|
Provides the The API also provides a method to issue the See Chapter 13, "Using the DVSYS.DBMS_MACSEC_ROLES Package," for more information. |
|
Defines several constants and utility methods that are commonly used by other Oracle Database Vault packages, such as code/message lookup, error handling, data conversion, and privilege checks. This package can be run by the general database account population. This allows for security developers to leverage the constants in scripted configuration files. Utility methods such as See Chapter 14, "Using the DVSYS.DBMS_MACUTL Package," for more information. |
Note: There are several procedures in theDVSYS.DBMS_MACADM package that are not exposed in the Oracle Database Vault Administration Web application. The procedures that are not exposed include:
|
Oracle Database Vault Administrator's Guide explains how to configure access control-based security in an Oracle Database environment by using Oracle Database Vault.
This preface contains the following topics:
This document is intended for security managers, audit managers, label administrators, and Oracle database administrators (DBAs) who are involved in the configuration of Oracle Database Vault.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
.
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
if you are hearing impaired.
For more information refer to the following documents:
Oracle Documentation Search Engine
To access the database documentation search engine directly, visit:
Oracle Technology Network (OTN)
You can download free release notes, installation documentation, updated versions of this guide, white papers, or other collateral from the Oracle Technology Network (OTN). Visit
http://www.oracle.com/technetwork/index.html
For security-specific information on OTN, visit
http://www.oracle.com/technetwork/topics/security/whatsnew/index.html
For the latest version of the Oracle documentation, including this guide, visit
http://www.oracle.com/technetwork/documentation/index.html
Oracle Database Vault-Specific Sites
For OTN information specific to Oracle Database Vault, visit
http://www.oracle.com/technetwork/database/options/database-vault/index-085211.html
For frequently asked questions about Oracle Database Vault, visit
http://www.oracle.com/technetwork/database/security/dbv-faq-083210.html
Oracle Store
Printed documentation is available for sale in the Oracle Store at:
My Oracle Support (formerly OracleMetaLink)
You can find information about security patches, certifications, and the support knowledge base by visiting My Oracle Support at:
The following text conventions are used in this document:
Convention | Meaning |
---|---|
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. |
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. |
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter. |