Skip to main content
The security administrator must make the CryptoHub accessible to the database before Oracle TDE can perform any encryption or decryption. This is comparable to opening the Oracle wallet or logging in to the hardware keystore. You can open the wallet or hardware keystore manually or automatically, but with the manual option, you must re-enable access to the CryptoHub every time you restart the database. The following sections describe these methods.

Manual option

If using the manual option, you must run the following OPEN command to access the CryptoHub every time you restart the database instance.
1
Run the following command to open the hardware keystore manually, thus making the CryptoHub accessible:
Sql
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "CryptoHub_Identity_Password";
2
You can disable access with the following command:
Sql
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE CLOSE IDENTIFIED BY "CryptoHub_Identity_Password";
You must re-enable access to the CryptoHub every time you restart the database instance, if using the manual option.

Automatic option

Choose one of the following operating systems to use the automatic option:
An auto-login wallet stores the credentials for the CryptoHub identity in an auto-login software keystore. This configuration reduces the security of the system as a whole; however, this configuration supports unmanned or automated operations and is useful in deployments where automatic re-login to the CryptoHub is necessary.

Linux

Perform the following steps to use the automatic option in Linux:
1
Run the following command to create the /etc/ORACLE/WALLETS/tde directory path:
Shell
sudo mkdir -p /etc/ORACLE/WALLETS/tde
2
Run the following command to change ownership of the /etc/ORACLE directory to the Oracle user:
Shell
chown -R oracle:oinstall /etc/ORACLE
3
Run the following command to set the WALLET_ROOT parameter to the WALLETS directory created in the first step:
Sql
SQL> ALTER SYSTEM SET WALLET_ROOT = '/etc/ORACLE/WALLETS' SCOPE=SPFILE;
4
Run the following command to set the TDE_CONFIGURATION parameter to FILE for the KEYSTORE_CONFIGURATION:
Sql
SQL> ALTER SYSTEM SET TDE_CONFIGURATION="KEYSTORE_CONFIGURATION=FILE" SCOPE=SPFILE;
5
Run the following command to stop and start the database after setting the WALLET_ROOT and TDE_CONFIGURATION parameters:
Sql
SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;
6
If you have not migrated from a software keystore, run the following command to create the software keystore with the hardware keystore password (any password you choose) in the appropriate location (such as /etc/ORACLE/WALLETS/tde):
Sql
SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE IDENTIFIED BY "Software_Keystore_Password";
7
Run the following command to open the new software keystore:
Sql
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Software_Keystore_Password";
8
Run the following command to add the secret to the software keystore. The secret is the CryptoHub identity password, and client is HSM_PASSWORD. HSM_PASSWORD is an Oracle-defined client name representing the HSM password as a secret in the software keystore.You must provide the secret and HSM_PASSWORD values within single quotes or the command fails.
Sql
SQL> ADMINISTER KEY MANAGEMENT ADD SECRET 'CryptoHub_Identity_Password' FOR CLIENT 'HSM_PASSWORD' IDENTIFIED BY "Software_Keystore_Password" WITH BACKUP;
9
Run the following command to create a new auto-login keystore by using the password of the Oracle software wallet:
Sql
SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE IDENTIFIED BY "Software_Keystore_Password";
10
Run the following command to reset the TDE_CONFIGURATION parameter to HSM|FILE for the KEYSTORE_CONFIGURATION:
Sql
SQL> ALTER SYSTEM SET TDE_CONFIGURATION = 'KEYSTORE_CONFIGURATION=HSM|FILE' SCOPE=SPFILE;
11
Run the following command to stop and start the database after setting the TDE_CONFIGURATION parameter:
Sql
SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;

Windows

Perform the following steps to use the automatic option in Windows:
1
Create a directory for the software wallet at a suitable location, such as C:\WALLETS\tde
2
Run the following command to set the WALLET_ROOT parameter to the WALLETS directory created in the first step:
Sql
SQL> ALTER SYSTEM SET WALLET_ROOT = 'C:\WALLET\tde' SCOPE=SPFILE;
3
Run the following command to set the TDE_CONFIGURATION parameter to FILE for the KEYSTORE_CONFIGURATION:
Sql
SQL> ALTER SYSTEM SET TDE_CONFIGURATION="KEYSTORE_CONFIGURATION=FILE" SCOPE=SPFILE;
4
Run the following command to stop and start the database after setting the WALLET_ROOT and TDE_CONFIGURATION parameters:
Sql
SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;
5
If you have not migrated from a software keystore, run the following command to create the software keystore with the hardware keystore password (any password you choose) in the appropriate location (such as C:\WALLETS\tde):
Sql
SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE IDENTIFIED BY "Software_Keystore_Password";
6
Run the following command to open the new software keystore:
Sql
SQL> ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "Software_Keystore_Password";
7
Run the following command to add the secret to the software keystore. The secret is the CryptoHub identity password, and client is HSM_PASSWORD. HSM_PASSWORD is an Oracle-defined client name that represents the HSM password as a secret in the software keystore.You must provide the secret and HSM_PASSWORD values within single quotes, or the command fails.
Sql
SQL> ADMINISTER KEY MANAGEMENT ADD SECRET 'CryptoHub_Identity_Password' FOR CLIENT 'HSM_PASSWORD' IDENTIFIED BY "Software_Keystore_Password" WITH BACKUP;
8
Run the following command to create a new auto-login keystore by using the password of the Oracle software wallet:
Sql
SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE IDENTIFIED BY "Software_Keystore_Password";
9
Run the following command to reset the TDE_CONFIGURATION parameter to HSM|FILE for the KEYSTORE_CONFIGURATION:
Sql
SQL> ALTER SYSTEM SET TDE_CONFIGURATION = 'KEYSTORE_CONFIGURATION=HSM|FILE' SCOPE=SPFILE;
10
Run the following command to stop and start the database after setting the TDE_CONFIGURATION parameter:
Sql
SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;