Prerequisites to Use Customer-Managed
Encryption Keys in Oracle Key Vault 🔗
Describes the prerequisite steps to use customer-managed master encryption
keys that reside in Oracle Key Vault (OKV) on Autonomous Database.
Requirements:
The Autonomous Database
instance must use private endpoints.
Autonomous Database supports
OKV instances that are in private networks and are accessible from the
same network where the Autonomous Database resides.
Modify the endpoint to make the previously created wallet the default
wallet.
Navigate to the endpoint's details page.
On the Default Wallet pane, select Choose Wallet.
On the Choose Wallet page, select the previously created wallet
and click Select.
Click Save.
Enable Restful services.
Note
Restful services must be enabled on the OKV instance to
successfully run the curl command, in a subsequent step, to
download the wallet.
From the OKV home page, select the System
tab.
On the left navigation pane, click Setting
.
Under System Configuration, select Restful
services.
Click All, then Save.
Provision an Autonomous Database
instance, with the following required settings:
For Choose network access, select Private endpoint access
only.
For Virtual cloud network, select the VCN where this database
instance is running.
For Subnet, select the private subnet where this database
instance is running.
For Network security groups (NSGs), select the security
group.
For Encryption key settings, default to Encryption using an
Oracle-managed key. These settings are changed to customer
managed keys in OKV, after these prerequisite steps are completed. The
customer managed keys are disabled during instance provisioning. See
Use Customer-Managed Encryption Keys on Autonomous Database with Oracle Key Vault for details.
Connect to the Autonomous Database
instance and create a directory for the OKV wallet.
Connect to the Private Endpoint Autonomous Database instance as the ADMIN user.
For example, connect to the OKVDEMO1 database
instance:
SQL> connect ADMIN/<password>@OKVDEMO1_low
Create a directory object in the Autonomous Database instance.
For
example:
SQL> create directory okv_dir as 'okvdir';
Check to make sure the directory is created.
For example, the following statements create the
OKV_DIR directory object and the statement
results display the directory name (OKV_DIR) and
directory path (/u03/dbfs/<path
data>/data/okvdir).
OKV server is the Internal Fully Qualified
Domain Name (FQDN) found on the OKV instance details
page
Enrollment Token is the OKV instance
enrollment token found on the Endpoints page for the
endpoint.
After the wallet is downloaded, the endpoint on the OKV instance
shows a status of enrolled.
Upload the wallet to Object Storage.
Upload the wallet file from your local machine to your
Object Storage bucket using Upload Object. See Uploading an Object
to a Bucket, for more information.
From the VM, connect to the database instance as ADMIN user.
In the database instance, run the
DBMS_CLOUD.GET_OBJECT procedure to download the
wallet from Object Storage to the database instance wallet
directory.
If you are already using customer-managed keys in OKV and you
want to rotate the TDE keys, follow these steps and select a different
key (select a key that is different from the currently selected master
encryption key). However, you cannot use an OKV key that has been used
previously on the same Autonomous Database instance.
On the Manage encryption key page, select Encrypt using a
customer-managed key.
On the Key type drop-down, select Oracle Key Vault (OKV).
Certificate DN - Enter your certificate Distinguished
Name (DN).
Certificate ID (Optional) - Enter your
certificate ID or leave blank.
Note
This field is optional if using OKV
versions 21.9 and above. If using OKV versions below 21.9, the
certificate ID is required.
Directory name - Enter the directory name where the
wallet is saved on the Autonomous Database instance.
Click Save.
When the save completes successfully, encryption settings for the Autonomous Database instance are updated
to show Customer-managed key (Oracle Key Vault (OKV)) and the work request
state shows succeeded.