Configure Realms in Oracle Database Vault on Autonomous Database
Configure Realms in Oracle Database Vault on Autonomous Database
Oracle Database Vault enhances database security by enforcing separation of duties and protecting application data from unauthorized access — even by privileged users like DBAs. In this guide, we'll walk through the process of creating a Realm on an Autonomous Database, specifically targeting the HR schema.
What is a Realm?
A Realm is a security boundary in Oracle Database Vault that protects a set of database objects (like tables or schemas) from access—even by users with administrative privileges—unless they are specifically authorized.
Steps to Configure a Realm in Autonomous Database
1. Connect as DV Owner User
Log in to your Autonomous Database using SQL Developer Web or any SQL client.
Ensure that you're connected as the Database Vault Owner (typically a user with DVOWNER role), and set the container to ROOT, if required.
If working with a PDB-enabled environment (not typical for Autonomous), switch accordingly.
2. Enable REST Access (Optional for SQL Developer Web)
Ensure REST access is enabled to connect to the necessary services. This step might already be configured in ADB.
3. Create a Realm on the HR Schema
Use the following PL/SQL block to create a realm:
4. Add Objects to the Realm
Now add all objects under the HR
schema to the realm. Use %
to include all objects:
5. Test Realm Protection
Switch to a regular privileged user (e.g., ADMIN
) and try to access HR schema objects:
If access is not explicitly granted through Realm Authorizations, you should receive a security violation error, even if the user has SELECT ANY TABLE
or DBA privileges.
Summary
In this guide, you've learned how to:
-
Connect to Autonomous DB as DV owner
-
Create a Database Vault Realm for the HR schema
-
Add all schema objects to the realm
-
Protect access to sensitive HR data even from privileged accounts
Why Use Realms in Autonomous DB?
Using Realms in Autonomous Databases adds a strong layer of protection, particularly for sensitive business data, and is a best practice for zero-trust architecture in cloud deployments.
Want to automate this with a script or protect specific tables only? Comment below or explore more on bidhandba.blogspot.com!
Comments