3 Getting Started with Oracle Database Vault
Before you can start using Oracle Database Vault, you must register it with the Oracle database.
- About Registering Oracle Database Vault with an Oracle Database
After you install Oracle Database, you must register (that is, configure and enable) Oracle Database Vault with the Oracle CDB and associated PDBs in which it was installed. - Registering Oracle Database Vault
You can register Oracle Database Vault based on several scenarios. - Verifying That Database Vault Is Configured and Enabled
TheDBA_DV_STATUS,CDB_DV_STATUS, andDBA_OLS_STATUSdata dictionary views verify if Oracle Database is configured and enabled. - Logging in to Oracle Database Vault from Oracle Enterprise Cloud Control
Oracle Enterprise Manager Cloud Control (Cloud Control) provides pages for managing Oracle Database Vault. - Quick Start Tutorial: Securing a Schema from DBA Access
This tutorial shows how to create a realm around theHRschema.
About Registering Oracle Database Vault with an Oracle Database
After you install Oracle Database, you must register (that is, configure and enable) Oracle Database Vault with the Oracle CDB and associated PDBs in which it was installed.
Oracle Database includes Database Vault when you choose to include a default database in the installation process, but you must register it before you can use it. If you create a custom database, then you can use DBCA to install and enable Database Vault for it. The registration process enables Oracle Label Security if it is not already enabled. Oracle Label Security is required for Oracle Database Vault but it does not require a separate license unless you begin using Oracle Label Security separately and create Oracle Label Security policies. This procedure applies to the CDB root, application root, and the current pluggable database (PDB), as well as to both single-instance and Oracle Real Application Clusters (Oracle RAC) installations. In a multitenant database, Database Vault must be configured with the CDB root before any of the PDBs can configure Database Vault.
As part of the registration process, you created the Database Vault backup accounts. These are accounts that hold the key Database Vault roles. Use these accounts initially to provision the roles to named users with administrative privileges. Maintaining a backup account will allow you to recover from the named user losing or somehow misplacing their credentials because SYS will not be able to reset these passwords for users with these roles.
When you register Database Vault, you have several methods to choose from for the registration.
Note:
If you have upgraded from a release earlier than Oracle Database 12c, and if the earlier Oracle Database Vault had been enabled in that earlier release, then after the upgrade process is complete, you must enable Oracle Database Vault by using theDBMS_MACADM.ENABLE_DV procedure.
If you are migrating a non-Database Vault registered Oracle database from a release earlier than release 12c, then you must perform a manual installation of Database Vault.
Related Topics
Parent topic: Getting Started with Oracle Database Vault
Registering Oracle Database Vault
You can register Oracle Database Vault based on several scenarios.
- About Registering Database Vault
You must register Oracle Database Vault in the CDB root before you can register Database Vault in any of the associated PDBs. - Registering Database Vault in the CDB Root
You register Oracle Database Vault with common users who will use the Database Vault-enforced roles in the CDB root. - Registering Database Vault Common Users to Manage Specific PDBs
You must register Oracle Database Vault in the root first, then in the PDBs afterward. - Registering Database Vault Local Users to Manage Specific PDBs
You must register Oracle Database Vault in the root first, and then in the PDBs afterward. - Manually Installing Oracle Database Vault
Under certain conditions, you must manually install Oracle Database Vault.
Parent topic: Getting Started with Oracle Database Vault
About Registering Database Vault
You must register Oracle Database Vault in the CDB root before you can register Database Vault in any of the associated PDBs.
The common users who have been assigned the DV_OWNER and DV_ACCTMGR roles in the CDB root can also have the same role in the PDBs. PDBs can have Database Vault registered using the same common users or use separate PDB local users. The DV_ACCTMGR role is granted commonly to the common user in the CDB root. You can grant DV_OWNER locally or commonly to the CDB root common user when you register Database Vault with the CDB root. Granting DV_OWNER locally to the common user prevents the common DV_OWNER user from using this role in any PDB.
Parent topic: Registering Oracle Database Vault
Registering Database Vault in the CDB Root
You register Oracle Database Vault with common users who will use the Database Vault-enforced roles in the CDB root.
Related Topics
Parent topic: Registering Oracle Database Vault
Registering Database Vault Common Users to Manage Specific PDBs
You must register Oracle Database Vault in the root first, then in the PDBs afterward.
ORA-47503: Database Vault is not enabled on CDB$ROOT error appears.
Related Topics
Parent topic: Registering Oracle Database Vault
Registering Database Vault Local Users to Manage Specific PDBs
You must register Oracle Database Vault in the root first, and then in the PDBs afterward.
ORA-47503: Database Vault is not enabled on CDB$ROOT error appears.
Manually Installing Oracle Database Vault
Under certain conditions, you must manually install Oracle Database Vault.
Related Topics
Parent topic: Registering Oracle Database Vault
Verifying That Database Vault Is Configured and Enabled
The DBA_DV_STATUS, CDB_DV_STATUS, and DBA_OLS_STATUS data dictionary views verify if Oracle Database is configured and enabled.
SYS user and users who have been granted the DBA role can query these views.
-
For Database Vault:
-
If you want to find the Database Vault status for the root only or an individual PDB, then query
DBA_DV_STATUS. For example:SELECT * FROM DBA_DV_STATUS;Output similar to the following appears:
NAME STATUS -------------------- ----------- DV_APP_PROTECTION NOT CONFIGURED DV_CONFIGURE_STATUS TRUE DV_ENABLE_STATUS TRUE -
If you want to find the Database Vault status of all PDBs in the multitenant environment, then as a common user with administrative privileges, query
CDB_DV_STATUS, which provides the addition of a container ID (CON_ID) field.
-
-
For Oracle Label Security, query the
DBA_OLS_STATUSdata dictionary view.
Parent topic: Getting Started with Oracle Database Vault
Logging in to Oracle Database Vault from Oracle Enterprise Cloud Control
Oracle Enterprise Manager Cloud Control (Cloud Control) provides pages for managing Oracle Database Vault.
Quick Start Tutorial: Securing a Schema from DBA Access
This tutorial shows how to create a realm around the HR schema.
- About This Tutorial
In this tutorial, you create a realm around for theHRsample database schema by using the Oracle Database Vault PL/SQL packages. - Step 1: Log On as SYSTEM to Access the HR Schema
You must enable theHRschema for this tutorial. - Step 2: Create a Realm
Realms can protect one or more schemas, individual schema objects, and database roles. - Step 3: Create the SEBASTIAN User Account
At this stage, there are no database accounts or roles authorized to access or otherwise manipulate the database objects the realm will protect. - Step 4: Have User SEBASTIAN Test the Realm
At this stage, have userSEBASTIANtest the realm, even though he has theREAD ANY TABLEsystem privilege. - Step 5: Create an Authorization for the Realm
Next, userSEBASTIANmust be granted authorization to the HR Apps realm, so that he can access theHR.EMPLOYEEStable. - Step 6: Test the Realm
To test the realm, you must try to access theEMPLOYEEStable as a user other thanHR. - Step 8: Remove the Components for This Tutorial
You can remove the components that you created for this tutorial if you no longer need them.
Parent topic: Getting Started with Oracle Database Vault
About This Tutorial
In this tutorial, you create a realm around for the HR sample database schema by using the Oracle Database Vault PL/SQL packages.
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.
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 1: Log On as SYSTEM to Access the HR Schema
You must enable the HR schema for this tutorial.
HR sample schema is installed. .
Related Topics
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 2: Create a Realm
Realms can protect one or more schemas, individual schema objects, and database roles.
HR schema.
At this stage, you have created the realm but you have not assigned any authorizations to it. You will take care of that later on in this tutorial.
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 3: Create the SEBASTIAN User Account
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.
Related Topics
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 4: Have User SEBASTIAN Test the Realm
At this stage, have user SEBASTIAN test the realm, even though he has the READ ANY TABLE system privilege.
SEBASTIAN has the READ ANY TABLE system privilege, he cannot query the HR.EMPLOYEES table, because the HR Apps realm takes precedence over the READ ANY TABLE system privilege.
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 5: Create an Authorization for the Realm
Next, user SEBASTIAN must be granted authorization to the HR Apps realm, so that he can access the HR.EMPLOYEES table.
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 6: Test the Realm
To test the realm, you must try to access 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 to the PDB as
SYSTEM.CONNECT SYSTEM@pdb_name Enter password: password
-
Try accessing the salary information in the
EMPLOYEEStable again: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
SYSTEMno longer has access to the salary information in the EMPLOYEES table. (In fact, even userSYSdoes not have access to this table.) However, userSEBASTIANdoes have access to this information. -
Connect as user
SEBASTIAN.CONNECT sebastian@pdb_name Enter password: password
-
Perform the following query:
SELECT FIRST_NAME, LAST_NAME, SALARY FROM HR.EMPLOYEES WHERE ROWNUM <10;
Output similar to the following appears:
FIRST_NAME LAST_NAME SALARY -------------------- ------------------------- ---------- Steven King 24000 Neena Kochhar 17000 Lex De Haan 17000 Alexander Hunold 9000 Bruce Ernst 6000 David Austin 4800 Valli Pataballa 4800 Diana Lorentz 4200 Nancy Greenberg 12008 9 rows selected.
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
Step 8: Remove the Components for This Tutorial
You can remove the components that you created for this tutorial if you no longer need them.
-
Drop user
SEBASTIAN.In SQL*Plus, log in to the PDB on as the Oracle Database Vault account manager (for example,
bea_dvacctmgr) and then dropSEBASTIANas follows:sqlplus bea_dvacctmgr@pdb_name Enter password: password DROP USER SEBASTIAN;
-
Delete the
HR Appsrealm.-
Connect to the PDB as the user who created this realm.
For example:
c##sec_admin_owen@pdb_name Enter password: password
-
Execute the following statement to drop the
HR Appsrealm and its authorizations:EXEC DBMS_MACADM.DELETE_REALM_CASCADE('HR Apps');
-
-
If necessary, in SQL*Plus, lock and expire the
HRaccount.ALTER USER HR ACCOUNT LOCK PASSWORD EXPIRE;
Parent topic: Quick Start Tutorial: Securing a Schema from DBA Access
