11 Managing Oracle Key Vault Master Encryption Keys
Managing security objects includes uploading and downloading security objects, managing the persistent master encryption key cache, and using user-defined TDE keys.
- Using the Persistent Master Encryption Key Cache
The persistent master encryption key cache feature enables databases to be operational when the Oracle Key Vault server is unavailable. - Configuring an Oracle Key Vault to a New TDE-Enabled Database Connection
You can configure a connection between Oracle Key Vault and a database that has not yet been configured for Transparent Data Encryption. - Migrating Existing TDE Wallets to Oracle Key Vault
A migrated TDE wallet can be used to restore database contents that were previously encrypted by TDE. - Uploading and Downloading Oracle Wallets
To store and share Oracle wallets, you must upload them to Oracle Key Vault. - Uploading and Downloading JKS and JCEKS Keystores
Theokvutil upload
andokvutil download
commands can upload and download JKS and JCEKS keystores. - Using a User-Defined Key as the TDE Master Encryption Key
You can import a generated key to be used as the Transparent Data Encryption (TDE) master encryption key in Oracle Key Vault.
Using the Persistent Master Encryption Key Cache
The persistent master encryption key cache feature enables databases to be operational when the Oracle Key Vault server is unavailable.
- About the Persistent Master Encryption Key Cache
The persistent master encryption key cache ensures the availability of TDE master encryption keys. - About Oracle Key Vault Persistent Master Encryption Key Cache Architecture
The Oracle Key Vault persistent master encryption key cache is implemented in Oracle Key Vault’sPKCS#11
library. - Caching Master Encryption Keys in the In-Memory and Persistent Master Encryption Key Cache
After a master encryption key is created or fetched from a different location, it is stored in an Oracle Key Vault cache. - Storage Location of Persistent Master Encryption Key Cache
The persistent master encryption key cache is created in the same location as the configuration fileokvclient.ora
. - Persistent Master Encryption Key Cache Modes of Operation
The persistent master encryption key cache operates in two modes. - Persistent Master Encryption Key Cache Refresh Window
The persistent master encryption key cache refresh window helps to extend the availability of the master encryption key. - Persistent Master Encryption Key Cache Parameters
Oracle Key Vault provides parameters to configure the persistent master encryption key cache. - Listing the Contents of the Persistent Master Key Cache
Theokvutil
list command can be used to list the master encryption keys that are cached in the persistent master encryption key cache. - Oracle Database Deployments and Persistent Master Encryption Key Cache
The persistent master encryption key cache affects the integration of other Oracle features with Oracle Key Vault.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About the Persistent Master Encryption Key Cache
The persistent master encryption key cache ensures the availability of TDE master encryption keys.
It accomplishes this by reducing dependence on the state of the Oracle Key Vault server.
The TDE master encryption key is cached in the persistent master encryption key cache in addition to the in-memory cache, to make the master encryption key available across database processes. It eliminates the need for databases to contact the Oracle Key Vault server for every new process, redo log switch, or database startup operation.
The following are the benefits of ensuring availability of TDE master encryption keys:
-
Continuous operation of endpoints during upgrade, primary-standby configuration, switchover, failover, and other procedures that require an Oracle Key Vault restart operation
-
Less load on the Oracle Key Vault server when multiple sessions of a single database request the same master encryption key
-
Improved scalability of Oracle Key Vault
Note that the extractable attribute of the TDE master encryption key must be set to true, otherwise, the TDE master encryption key cannot leave Oracle Key Vault and thus it cannot be cached in either in-memory cache or the persistent master encryption key cache.
Parent topic: Using the Persistent Master Encryption Key Cache
About Oracle Key Vault Persistent Master Encryption Key Cache Architecture
The Oracle Key Vault persistent master encryption key cache is implemented in Oracle Key Vault’s PKCS#11
library.
When the persistent master encryption key cache feature is configured, the Oracle Key Vault PKCS#11
library will create the persistent master encryption key cache when the first master encryption key is retrieved from Oracle Key Vault.
-
If the Oracle Key Vault client is installed with a password specified, then the persistent master encryption key cache is a password-based wallet.
-
If the Oracle Key Vault client is installed without a password specified, then the persistent master encryption key cache is an auto-login wallet.
The PKCS#11
library also implements an in-memory master encryption key cache. When the in-memory master encryption key cache feature is configured, the master encryption key is cached in the process memory of the process that loaded the library into memory. The in-memory and persistent master encryption key caches are independent of each other. You can enable and disable these caches independently.
For operations that involve encryption and decryption, PKCS#11
attempts to look up the master encryption key in the in-memory master encryption key cache. If it does not find it, PKCS#11
then it looks up the master encryption key in the persistent master encryption key cache. If the master encryption key is not found in the in-memory or the persistent master encryption key cache, then it is retrieved from the Oracle Key Vault server, if the server is online.
Parent topic: Using the Persistent Master Encryption Key Cache
Caching Master Encryption Keys in the In-Memory and Persistent Master Encryption Key Cache
After a master encryption key is created or fetched from a different location, it is stored in an Oracle Key Vault cache.
When the master encryption key is first fetched from the Oracle Key Vault server, or created in the Oracle Key Vault server, the master encryption key is stored in the in-memory master encryption key cache and in the persistent master encryption key cache.
Master encryption keys stored in the in-memory master encryption key cache are available for a limited time from the moment the key is placed into the persistent cache. The duration is defined by the PKCS11_CACHE_TIMEOUT
parameter in the okvclient.ora
file.
If the persistent cache exists, then it will be used. If the persistent cache does not exist, then Oracle Key Vault creates it. When the key is created, all future sessions will retrieve it from the in-memory master encryption key cache or persistent master encryption key cache.
Persistent master encryption keys that are stored in the persistent master encryption key cache are available for a limited time from the moment the key is placed into the persistent cache. You can define this time by setting the PKCS11_PERSISTENT_CACHE_TIMEOUT
parameter in the okvclient.ora
file.
When the endpoint deletes the master encryption key, the key will be removed from the in-memory master encryption key cache and persistent master encryption key cache.
Parent topic: Using the Persistent Master Encryption Key Cache
Storage Location of Persistent Master Encryption Key Cache
The persistent master encryption key cache is created in the same location as the configuration file okvclient.ora
.
The default location for the okvclient.ora
file is the directory $OKV_HOME/conf
.
It is important that the ORACLE_HOME
, ORACLE_BASE
, and OKV_HOME
environment variables are consistently set across the deployment. If they are not consistent, then operations requiring the persistent cache may fail, and the persistent cache may be created in multiple locations.
If the environment variable OKV_HOME
is set, then the persistent cache is created in $OKV_HOME/conf
.
If OKV_HOME
is not set, but ORACLE_BASE
is set, then the persistent cache is created in $ORACLE_BASE/okv/$ORACLE_SID
.
If neither OKV_HOME
nor ORACLE_BASE
is set, but ORACLE_HOME
is set, then the persistent cache is created in $ORACLE_HOME/okv/$ORACLE_SID
.
Note:
Ensure that the directory in which the persistent cache is created is secure and has restricted permissions.Parent topic: Using the Persistent Master Encryption Key Cache
Persistent Master Encryption Key Cache Modes of Operation
The persistent master encryption key cache operates in two modes.
The difference between the two modes is the order in which the persistent master encryption key cache and Oracle Key Vault are looked up to retrieve the master encryption key.
- Oracle Key Vault First Mode
In Oracle Key Vault first mode, the endpoints attempt to retrieve the master encryption key from the Oracle Key Vault server. - Persistent Master Encryption Key Cache First Mode
In persistent master encryption key cache first mode, the endpoints retrieve the master encryption key from the persistent master encryption key cache.
Parent topic: Using the Persistent Master Encryption Key Cache
Oracle Key Vault First Mode
In Oracle Key Vault first mode, the endpoints attempt to retrieve the master encryption key from the Oracle Key Vault server.
If the Oracle Key Vault server is offline, then the endpoints attempt to retrieve the master encryption key from the persistent master encryption key cache.
The endpoints must determine the status of the Oracle Key Vault server, and if it is offline, then the endpoints attempt to retrieve the master encryption key from the persistent master encryption key cache. Hence, database operations that require access to master encryption keys will experience a delay.
Persistent Master Encryption Key Cache First Mode
In persistent master encryption key cache first mode, the endpoints retrieve the master encryption key from the persistent master encryption key cache.
If the master encryption key is not available in the persistent master encryption key cache, then the endpoints attempt to retrieve the master encryption key from the Oracle Key Vault server.
The modifications to the master encryption keys on the Oracle Key Vault server are not applied until the key expires in the persistent master encryption key cache.
Persistent Master Encryption Key Cache Refresh Window
The persistent master encryption key cache refresh window helps to extend the availability of the master encryption key.
The refresh window feature of the persistent master encryption key cache enables the database endpoint to make multiple attempts to refresh the expired master encryption key from the Oracle Key Vault server. In that sense, the endpoint waits for the Oracle Key Vault server to be back online for the master encryption key refresh to complete. Meanwhile, if the master encryption key refresh attempt fails, then the keys are retrieved from the persistent cache for the duration of the refresh window.
The refresh window feature of the persistent master encryption key cache therefore extends the duration for which the master encryption key is available after it is cached in the persistent master encryption key cache. At the same time, the endpoints can refresh the key during the refresh window instead of once at the end of the cache time. This addresses the possibility that persistent cache expires during the time when the Oracle Key Vault is unavailable, such as when a primary-standby switchover is in progress. The refresh window terminates and then the cache period begins as soon as the key is refreshed.
In the okvclient.ora
file, you can use the PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
parameter to extend the duration for which the master encryption key is available after it is cached in the persistent master encryption key cache. This value reflects the amount of time it takes for the Oracle Key Vault server to recover and return online. You must specify this value in minutes. The default value for PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
is 30
(minutes).
Related Topics
Parent topic: Using the Persistent Master Encryption Key Cache
Persistent Master Encryption Key Cache Parameters
Oracle Key Vault provides parameters to configure the persistent master encryption key cache.
- PKCS11_CACHE_TIMEOUT Parameter
ThePKCS11_CACHE_TIMEOUT
parameter sets how long a master encryption key is available in the in-memory cache. - PKCS11_PERSISTENT_CACHE_TIMEOUT Parameter
ThePKCS11_PERSISTENT_CACHE_TIMEOUT
parameter sets how long the master encryption is available in the persistent cache. - PKCS11_PERSISTENT_CACHE_FIRST Parameter
ThePKCS11_PERSISTENT_CACHE_FIRST
parameter sets the persistent master encryption key cache operation mode. - PKCS11_CONFIG_PARAM_REFRESH_INTERVAL Parameter
ThePKCS11_CONFIG_PARAM_REFRESH_INTERVAL
parameter describes the frequency at which a long-running process will re-read theokvclient.ora
configuration file. - PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW Parameter
ThePKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
parameter extends time the master encryption key is available after it is cached in the persistent master encryption key cache. - EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN Parameter
TheEXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
parameter ensures that the PKCS#11 persistent cache for a given endpoint database automatically expires upon shutdown of the endpoint database.
Parent topic: Using the Persistent Master Encryption Key Cache
PKCS11_CACHE_TIMEOUT Parameter
The PKCS11_CACHE_TIMEOUT
parameter sets how long a master encryption key is available in the in-memory cache.
You must specify the value in minutes. When the specified duration of time elapses, the master encryption key expires. Keys are deleted from the in-memory cache.
The default value for PKCS11_CACHE_TIMEOUT
is 60
(minutes). Oracle recommends that you set the PKCS11_CACHE_TIMEOUT
parameter in the Oracle Key Vault management console.
Related Topics
Parent topic: Persistent Master Encryption Key Cache Parameters
PKCS11_PERSISTENT_CACHE_TIMEOUT Parameter
The PKCS11_PERSISTENT_CACHE_TIMEOUT
parameter sets how long the master encryption is available in the persistent cache.
This time starts when the database retrieves the key from the Oracle Key Vault
server and puts it in the cache. After this duration has elapsed, the master
encryption key expires. At this time, the endpoint will attempt to contact the
Oracle Key Vault server in order to retrieve the key, and if it succeeds, the key
remains available for another duration specified by this parameter. If it is unable
to retrieve the key, the key remains available for the amount of time dictated by
the PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
parameter, after which
the database can no longer use the key without successfully retrieving it again from
the Oracle Key Vault server. Encryption keys are deleted from persistent master
encryption key cache.
The Cache Start Time
and Maximum Use Time
values displayed in the OKV Persistent Cache entries
list is updated when the master encryption key is refreshed.
The default value for PKCS11_PERSISTENT_CACHE_TIMEOUT
is 1440
(minutes).
You can disable the persistent master encryption key cache by setting both the PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
and the PKCS11_PERSISTENT_CACHE_TIMEOUT
parameters to 0
(zero).
Oracle recommends that you set this global parameter in the Oracle Key Vault management console.
Note:
The parameterPKCS11_PERSISTENT_CACHE_TIMEOUT
and its default value are included by default in the okvclient.ora
file.
Related Topics
Parent topic: Persistent Master Encryption Key Cache Parameters
PKCS11_PERSISTENT_CACHE_FIRST Parameter
The PKCS11_PERSISTENT_CACHE_FIRST
parameter sets the persistent master encryption key cache operation mode.
You set the PKCS11_PERSISTENT_CACHE_FIRST
parameter in the okvclient.ora
file.
The following are the modes of operation:
-
Oracle Key Vault First Mode: To enable Oracle Key Vault first mode, set the value of the
PKCS11_PERSISTENT_CACHE_FIRST
parameter to0
(zero). -
Persistent Master Encryption Key Cache First Mode: Persistent master encryption key cache first mode is the default mode.
To enable persistent master encryption key cache first mode, set the value of the
PKCS11_PERSISTENT_CACHE_FIRST
parameter to1
.
PKCS11_CONFIG_PARAM_REFRESH_INTERVAL Parameter
The PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
parameter describes the frequency at which a long-running process will re-read the okvclient.ora
configuration file.
This parameter also describes the frequency at which a process will attempt to remove expired master encryption keys from the persistent cache.
When the process cannot use a key from the in-memory cache and instead reaches out to the persistent cache or the Oracle Key Vault server, if it has been longer than the value specified by PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
since okvclient.ora
was last read, the process will re-read okvclient.ora
, start using any changed parameters, re-read the okvclient.ora
configuration file, start using any changed parameters, and remove expired master encryption keys from the persistent cache. Note that if the parameter for the in-memory cache and if PKCS11_CACHE_TIMEOUT
, is larger than PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
, then these operations will be performed at intervals described by the PKCS11_CACHE_TIMEOUT
parameter instead.
Oracle recommends that you set the PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
parameter in the Oracle Key Vault management console. You must specify this value in minutes. The default value for PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
is 10
(minutes).
You can disable this parameter by setting the PKCS11_CONFIG_PARAM_REFRESH_INTERVAL
parameter to 0
(zero).
Related Topics
Parent topic: Persistent Master Encryption Key Cache Parameters
PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW Parameter
The PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
parameter extends time the master encryption key is available after it is cached in the persistent master encryption key cache.
Oracle recommends that you set these global parameters in the Oracle Key Vault management console. You must specify the value in minutes. The default value for PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
is 30
(minutes).
You can disable the persistent master encryption key cache by setting the PKCS11_PERSISTENT_CACHE_REFRESH_WINDOW
and PKCS11_PERSISTENT_CACHE_TIMEOUT
parameters to 0
(zero).
Related Topics
Parent topic: Persistent Master Encryption Key Cache Parameters
EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN Parameter
The EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
parameter ensures that the PKCS#11 persistent cache for a given endpoint database automatically expires upon shutdown of the endpoint database.
When enabled, the EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
protects the persistent cache by using a system-generated random password that is independent of the password that was set when an endpoint database was enrolled in Oracle Key Vault, even if an auto-login wallet was used. Having the persistent cache password protected provides better security.
Before you can use the EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
parameter, ensure that the endpoint database has had the patch for bug 29869906: AUTO-LOGIN OKV NEEDS PERSISTENT CACHE PROTECTION KEY FROM RDBMS
applied to it. This patch applies to Oracle Database releases 12.1 through 19c. Contact Oracle Support for more information.
You can set EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
for individual endpoint databases that have been enrolled with Oracle Key Vault, or globally for all endpoint databases that have been enrolled in Oracle Key Vault. This parameter is not available in the okvclient.ora
configuration file for the database endpoint. To set this parameter, use the Oracle Key Vault management console.
After you have enabled EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
, the PKCS#11 persistent cache is created when keys are fetched from Oracle Key Vault. The cache remains available to the endpoint database only as long as the database instance is mounted or open. When the endpoint database is shut down, the PKCS#11 persistent cache is no longer available, but is recreated the next time the endpoint database is started. The persistent cache does, however, remain available when an endpoint pluggable database (PDB) is closed and then re-opened.
Be aware that after you have enabled EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
for a given endpoint database, you can no longer use the okvutil list -t okv_persistent_cache
command to view the contents of the persistent cache. In addition, you must ensure that Oracle Key Vault is available when keys are fetched after the endpoint database is started.
Setting EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN for Individual Endpoint Databases
- Log in to the Oracle Key Vault management console as a user who has the System Administrator role.
- Click the Endpoints tab.
- On the Endpoints page, select the endpoint for which you want to set
EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
. - On the Endpoint Details page, scroll to the bottom and then set the Expire PKCS11 Persistent Cache on Database Shutdown checkbox.
- Click Save.
Setting EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN Globally
The following procedure will apply the EXPIRE PKCS11 PERSISTENT CACHE ON DATABASE SHUTDOWN
to all current and future endpoint databases that have been enrolled with Oracle Key Vault.
- Log in to the Oracle Key Vault management console as a user who has the System Administrator role.
- Select the Endpoints tab, and then Settings from the left side bar.
- In the Global Endpoint Configuration Parameters page, set the Expire PKCS11 Persistent Cache on Database Shutdown checkbox.
- Click Save.
Parent topic: Persistent Master Encryption Key Cache Parameters
Listing the Contents of the Persistent Master Key Cache
The okvutil
list command can be used to list the master encryption keys that are cached in the persistent master encryption key cache.
okvutil list
command on the persistent
cache.
Parent topic: Using the Persistent Master Encryption Key Cache
Oracle Database Deployments and Persistent Master Encryption Key Cache
The persistent master encryption key cache affects the integration of other Oracle features with Oracle Key Vault.
-
Database restart when the Oracle Key Vault Server is offline: When you configure Oracle Key Vault to use an auto-login wallet, the database connects to the Oracle Key Vault server when the database is restarted. If the Oracle Key Vault server is offline when the database restarts, then the database retrieves master encryption keys from the persistent master encryption key cache. Database operations resume normally if the master encryption keys are active and have not expired.
Ensure that the passwords of the persistent master encryption key cache and the Oracle Key Vault endpoint wallet are synchronized.
Note:
The persistent master encryption key cache must be deleted when the endpoint wallet credentials are modified. -
Using the persistent master encryption key cache in an Oracle Real Application Cluster (Oracle RAC) environment: In an Oracle RAC environment, each Oracle RAC node is an unique database endpoint, and uses a unique persistent master encryption key cache.
In an Oracle RAC Environment, you must query the database from each Oracle RAC node to cache the most recent version of the master encryption key in the persistent master encryption key cache of each Oracle RAC node.
-
Using persistent master encryption key cache in an Oracle Data Guard Environment: Rotation of the master encryption key in the primary server’s database caches the master encryption key in the persistent master encryption key cache of the primary server’s database.
The standby server retrieves and caches the new master encryption key in the persistent master encryption key cache of the standby server’s database after the new
REDO
logs from the primary server are applied on the standby server. To avoid disruptions, you should synchronize the primary and standby servers immediately after the rotation of the master encryption key in the primary server’s database.
Parent topic: Using the Persistent Master Encryption Key Cache
Configuring an Oracle Key Vault to a New TDE-Enabled Database Connection
You can configure a connection between Oracle Key Vault and a database that has not yet been configured for Transparent Data Encryption.
- About Configuring an Oracle Key Vault to a New TDE-Enabled Database Connection
You can configure a connection between Oracle Key Vault and a database that has not yet been configured for TDE. - Limitations to Transparent Data Encryption Endpoint Integration
This type of Transparent Data Encryption (TDE) endpoint integration can have problems if the versions are incompatible. - Step 1: Configure the Oracle Key Vault Server Environment
Before you can configure the connection, you must ensure that Oracle Database and Oracle Key Vault settings are correct. - Step 2: Integrate Transparent Data Encryption with Oracle Key Vault
This integration enables Oracle Key Vault to directly manage the TDE master encryption keys.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About Configuring an Oracle Key Vault to a New TDE-Enabled Database Connection
You can configure a connection between Oracle Key Vault and a database that has not yet been configured for TDE.
Before you start configuring the connection, ensure that the Oracle Key Vault client installation environment is the same as the database runtime environment. The environment variables ORACLE_HOME
, ORACLE_BASE
, and ORACLE_SID
must be set to the same values in svrctl
and operating system environment variables. This also applies if you are using the Oracle Key Vault RESTful services utility to enroll endpoints.
For information about configuring Oracle Data Guard so that it can work with TDE and Oracle Key Vault:
- Oracle Database Advanced Security Guide, release 19c
- Oracle Database Advanced Security Guide, release 18c
- Oracle Database Advanced Security Guide, release 12.2.0.1
For information about configuring Oracle Real Application Clusters (Oracle RAC) to work with TDE and Oracle Key Vault:
- Oracle Database Advanced Security Guide, release 19c
- Oracle Database Advanced Security Guide, release 18c
- Oracle Database Advanced Security Guide, release 12.2.0.1
Limitations to Transparent Data Encryption Endpoint Integration
This type of Transparent Data Encryption (TDE) endpoint integration can have problems if the versions are incompatible.
The limitations to TDE endpoint integration are as follows:
-
All endpoints on the same computer must use the same version of the Oracle Key Vault library. There is only one location per computer for the
liborapkcs.so
file, which is/opt/oracle/expapi/64/hsm/oracle/1.0.0/liborapkcs.so
. -
If you have multiple databases on the same host, and those databases share the same
sqlnet.ora
file, then you must migrate all databases at the same time. If each database has its ownsqlnet.ora
file (controlled by individual settings for theTNS_ADMIN
parameter), then you can migrate the databases into Oracle Key Vault at independent points in time.
Caution:
Oracle strongly recommends that you never remove keys from a wallet or the wallet itself after TDE is configured. Loss of keys will result in the loss of the database. This is true even in the following scenarios:-
If you had created or opened a keystore (wallet or Oracle Key Vault), even before setting the first key and before encrypting data in your database
-
If all of the encrypted data has been decrypted
-
If you have migrated your keys and wallets to a hardware security module
Step 1: Configure the Oracle Key Vault Server Environment
Before you can configure the connection, you must ensure that Oracle Database and Oracle Key Vault settings are correct.
COMPATIBILITY
parameter.
sqlnet.ora
file correctly along with the rest of the TDE
configuration, then a TDE master encryption key is created in Oracle Key Vault when you
set the encryption key by using one of the following SQL statements:
ALTER SYSTEM SET [ENCRYPTION] KEY IDENTIFIED BY "password";
ADMINISTER KEY MANAGEMENT SET [ENCRYPTION] KEY IDENTIFIED BY "password"
With both of these SQL statements, the password was defined when the
Oracle Key Vault client software was installed. If no password was defined at that
time, then the password for these two statements is
NULL
.
Migrating Existing TDE Wallets to Oracle Key Vault
A migrated TDE wallet can be used to restore database contents that were previously encrypted by TDE.
- About Migrating Existing TDE Wallets to Oracle Key Vault
Thesqlnet.ora
file enables the migration of existing TDE wallets to Oracle Key Vault. - Migrating an Existing TDE Wallet to Oracle Key Vault
You can use theokvutil upload
command to start the migration of a TDE-enabled database from an existing TDE wallet to Oracle Key Vault. - Restoring Database Contents Previously Encrypted by TDE Using an Oracle Wallet
You perform the restoration process on the endpoint where you downloaded the Oracle wallet.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About Migrating Existing TDE Wallets to Oracle Key Vault
The sqlnet.ora
file enables the migration of existing TDE wallets to Oracle Key Vault.
For Oracle Database release 12.2.0.1 or earlier, the
sqlnet.ora
file enables the migration of existing TDE wallets to
Oracle Key Vault. For Oracle Database release 18c or later, you must set the parameters
TDE_CONFIGURATION
and WALLET_ROOT
to migrate
wallets to Oracle Key Vault.
When the Transparent Data Encryption (TDE) wallets already exist, you must
modify the sqlnet.ora
file or the TDE_CONFIGURATION
parameter to recognize Oracle Key Vault before you can migrate the existing TDE wallets
to Oracle Key Vault.
Along with the current TDE master encryption key, Oracle wallets maintain historical TDE master encryption keys that are replaced by each rekey operation that rotates the TDE master encryption key. These historical TDE master encryption keys help to restore Oracle Database backups that were previously made using one of the historical TDE master encryption keys. During the TDE migration from an Oracle wallet file to Oracle Key Vault, Key Vault generates new master encryption keys. After this master encryption key generation, Oracle Key Vault maintains all new keys.
Oracle recommends that you upload the Oracle wallet to Oracle Key Vault before you perform the migration. This enables you to keep a backup of the wallet with all of the historical key information, before you begin the migration. When the migration is complete, manually delete the old wallet on the client system.
If you are operating on an Oracle Real Application Clusters (Oracle RAC) configuration, ensure that you migrate from a shared TDE wallet (in Oracle Automatic Storage Management (Oracle ASM) or Oracle Advanced Cluster File System (Oracle ACFS)) to Oracle Key Vault. Individual wallets for each Oracle RAC node are not supported.
Related Topics
Parent topic: Migrating Existing TDE Wallets to Oracle Key Vault
Migrating an Existing TDE Wallet to Oracle Key Vault
You can use the okvutil upload
command to start the migration of a TDE-enabled database from an existing TDE wallet to Oracle Key Vault.
Parent topic: Migrating Existing TDE Wallets to Oracle Key Vault
Restoring Database Contents Previously Encrypted by TDE Using an Oracle Wallet
You perform the restoration process on the endpoint where you downloaded the Oracle wallet.
Finance_DB
database had recently migrated to use an online master encryption key to Oracle Key Vault after you have uploaded the premigration wallet. If a system failure forces you to restore from a database backup taken before the migration to Oracle Key Vault, then you can still restore the contents of the database by using an Oracle wallet downloaded from the Oracle virtual wallet that contains the Finance_DB
wallet data that you had uploaded earlier.
Related Topics
Parent topic: Migrating Existing TDE Wallets to Oracle Key Vault
Uploading and Downloading Oracle Wallets
To store and share Oracle wallets, you must upload them to Oracle Key Vault.
- About Uploading and Downloading Oracle Wallets
You use theokvutil
utility to upload and download Oracle wallets. - Uploading Oracle Wallets
Theokvutil upload
command uploads wallets to Oracle Key Vault. - Downloading Oracle Wallets
Theokvutil download
command downloads an Oracle wallet from the Oracle Key Vault server to an endpoint. - Guidelines for Uploading and Downloading Oracle Wallets
Oracle provides guidelines for uploading and downloading wallets to and from Oracle Key Vault.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About Uploading and Downloading Oracle Wallets
You use the okvutil
utility to upload and download Oracle wallets.
After you upload a wallet to Oracle Key Vault, you can then create a new virtual wallet in Key Vault, and add security objects to it that you want to share. You must grant endpoints access to the virtual wallet before they can download it. You can use the okvutil upload
and okvutil download
commands to upload and download Oracle wallets between Oracle Key Vault and its endpoints. The okvutil
utility is packaged with the endpoint software that you install at the endpoint.
The Oracle Key Vault okvutil
software can read an Oracle wallet at the granularity level of an individual security object, and it supports security objects up to 128 KB in size. It therefore uploads the wallet contents as individual items. During download you can recreate the original wallet with the same set of security objects, or create a new wallet with different set of security objects.
You can upload and download both password-based wallets and auto-login wallets. The wallet contents can be downloaded later into a new wallet of either type. For example, an uploaded password-protected wallet can be downloaded as an auto-login wallet, or an uploaded auto-login wallet can be downloaded as a password-protected wallet.
You can use Oracle Key Vault to construct a new virtual wallet containing security objects from previously uploaded Oracle wallets. For example, given a previously uploaded Oracle wallet containing five symmetric keys and three opaque objects, you can create a new virtual wallet consisting of only three of the original five symmetric keys and one of the three original opaque objects. This virtual wallet can be downloaded like the original wallet to provide the endpoint with access to only a subset of the keys. This process does not modify the original wallet.
Be aware that the Extractable attribute setting for the objects that are created in Oracle Key Vault using okvutil upload
is inherited from the endpoint. You can download the wallet, but if the wallet's objects have the Extractable attribute set to FALSE
, then those objects cannot be downloaded.
Uploading Oracle Wallets
The okvutil upload
command uploads wallets to Oracle Key Vault.
okvutil upload
is inherited from the endpoint.
At this point, the upload is complete. You can now share the virtual wallet with other users and endpoints.
Downloading Oracle Wallets
The okvutil download
command downloads an Oracle wallet from the Oracle Key Vault server to an endpoint.
Guidelines for Uploading and Downloading Oracle Wallets
Oracle provides guidelines for uploading and downloading wallets to and from Oracle Key Vault.
-
If there is a change to the content of the original wallet, such as a key rotation or a rekey operation, then upload the wallet again to Oracle Key Vault so that Key Vault has the latest copy of the wallet.
-
Use care if you plan to use the
okvutil upload
andokvutil download
commands, which provide an overwrite (-o
) option. This option overwrites data in the virtual wallet that conflicts with the data to be uploaded. Before you use the-o
option, you should create a local backup of the wallet file. -
Do not try to upload the same physical Oracle wallet to more than one virtual wallet on the Oracle Key Vault server. If you want to share an Oracle wallet with multiple endpoints, then create an endpoint group.
Related Topics
Parent topic: Uploading and Downloading Oracle Wallets
Uploading and Downloading JKS and JCEKS Keystores
The okvutil upload
and okvutil download
commands can upload and download JKS and JCEKS keystores.
- About Uploading and Downloading JKS and JCEKS Keystores
You use theokvutil
utility to upload and download JKS and JCEKS keystores. - Uploading JKS or JCEKS Keystores
Theokvutil upload
command can upload a JKS or JCEKS to the Oracle Key Vault server. - Downloading JKS or JCEKS Keystores
Theokvutil download
command can download an uploaded JKS or JCEKS keystore. - Guidelines for Uploading and Downloading JKS and JCEKS Keystores
Oracle provides recommendations for when you upload and download JKS and JCEKS keystores.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About Uploading and Downloading JKS and JCEKS Keystores
You use the okvutil
utility to upload and download JKS and JCEKS keystores.
You can upload JKS and JCEKS keystores to Oracle Key Vault for long-term retention, recovery, and sharing, and when you need them, download them to an endpoint.
Similar to wallets, when you upload a JKS or JCEKS keystore, Oracle Key Vault can read each item within the keystore. It uploads the keystore contents as individual items, and it supports an item up to 128 KB in size.
Be aware that the Extractable attribute setting for the objects that are created in Oracle Key Vault using okvutil upload
is inherited from the endpoint. You can download the JKS and JCEKS keystore, but if this keystore's objects have the Extractable attribute set to FALSE
, then those objects cannot be downloaded.
Uploading JKS or JCEKS Keystores
The okvutil upload
command can upload a JKS or JCEKS to the Oracle Key Vault server.
okvutil upload
is inherited from the endpoint. You can download the JKS and JCEKS keystore, but if this keystore's objects have the Extractable attribute set to FALSE
, then those objects cannot be downloaded.
At this point, the upload is complete. You are now ready to share or download the Java keystore as needed.
Parent topic: Uploading and Downloading JKS and JCEKS Keystores
Downloading JKS or JCEKS Keystores
The okvutil download
command can download an uploaded JKS or JCEKS keystore.
Guidelines for Uploading and Downloading JKS and JCEKS Keystores
Oracle provides recommendations for when you upload and download JKS and JCEKS keystores.
-
If there is a change to the content of the original JKS or JCEKS keystore, then upload the keystore again to Oracle Key Vault so that Key Vault has the latest copy of the keystore.
-
Use care if you plan to use the
okvutil upload
andokvutil download
commands, which provide an overwrite (-o
) option. This option overwrites data in the file. Before you use the-o
option, you should create backups of the keystore files before downloading them. -
Do not try to upload the same physical JKS or JCEKS keystore to more than one virtual wallet on the Oracle Key Vault server. If you want to share a Java keystore with multiple endpoints, then create an endpoint group.
Related Topics
Parent topic: Uploading and Downloading JKS and JCEKS Keystores
Using a User-Defined Key as the TDE Master Encryption Key
You can import a generated key to be used as the Transparent Data Encryption (TDE) master encryption key in Oracle Key Vault.
- About Using a User-Defined Key as the TDE Master Encryption Key
Users who have the Key Administrator role can upload a user-defined key to the virtual wallet to which they have write access. - Step 1: Upload the User-Defined Key
Use theokvutil upload
command to upload user-defined master encryption keys to Oracle Key Vault. - Step 2: Activate the User-Defined Key as a TDE Master Encryption Key
After you upload the user-defined key, you are ready to activate the key as a TDE master encryption key.
Parent topic: Managing Oracle Key Vault Master Encryption Keys
About Using a User-Defined Key as the TDE Master Encryption Key
Users who have the Key Administrator role can upload a user-defined key to the virtual wallet to which they have write access.
This enables it so that it can be used as the Transparent Data Encryption (TDE) master encryption key. This feature provides key administrators with more control on creation of the master encryption key used to encrypt TDE data encryption keys.
The type
parameter of the okvutil upload
command includes the option TDE_KEY_BYTES
, which enables you to upload user-defined key bytes to Oracle Key Vault to be used as the TDE master encryption key. You must then activate the key as a TDE master encryption key by running the ADMINISTER KEY MANAGEMENT
SQL statement on the database.
Be aware that the Extractable attribute setting for the objects that are created in Oracle Key Vault using okvutil upload
is inherited from the endpoint. You can download the TDE master encryption key, but if this the key's objects have the Extractable attribute set to FALSE
, then those objects cannot be downloaded.
Step 1: Upload the User-Defined Key
Use the okvutil upload
command to upload user-defined master encryption keys to Oracle Key Vault.
The raw bytes data of the user-defined key is stored in a text file and uploaded to
Oracle Key Vault. The raw bytes data uploaded to Oracle Key Vault forms part of the
TDE Master Encryption Key
and the TDE Master Encryption
Key Identifier
. Additional metadata is added to the raw bytes data to
enable the database to identify and activate the data as the TDE Master
Encryption Key
and the TDE Master Encryption Key
. In
the text file, the raw bytes data that forms the TDE Master Key is prefixed by
TDE Master Encryption Key Identifier
. The raw bytes data that
forms the TDE Master Key Identifier
is prefixed by TDE
Master Key Identifier
. TDE Master Key Identifier
represents the master encryption key in the database. Once the key is activated, you
should see the user-defined raw bytes that form the TDE Master Key
Identifier
as the subset of the KEY_ID
column of the
V$ENCRYPTION_KEYS
view. In Oracle Key Vault, the TDE
Master Key
and TDE Master Key Identifier
values are
stored as managed KMIP objects with a symmetric key as a KMIP object type.
Be aware that the Extractable attribute setting for the objects that are created in Oracle Key Vault using okvutil upload
is inherited from the endpoint.
Step 2: Activate the User-Defined Key as a TDE Master Encryption Key
After you upload the user-defined key, you are ready to activate the key as a TDE master encryption key.
The raw bytes data uploaded to Oracle Key Vault for the TDE Master Key Identifier
is displayed as the NAME
attribute of the KMIP object that is created as the corresponding TDE master encryption key in Oracle Key Vault.