9 Administering Isolated Mode
Administering isolated mode means managing the keystores, master encryption keys, and general Transparent Database Encryption (TDE) functionality.
- Administering Keystores and TDE Master Encryption Keys in Isolated Mode
After you create a keystore and a TDE master encryption key in isolated mode, you can perform administration tasks such as rekeying or tagging encryption keys. - Administering Transparent Data Encryption in Isolated Mode
You can perform a number of general administrative tasks with Transparent Data Encryption in isolated mode.
9.1 Administering Keystores and TDE Master Encryption Keys in Isolated Mode
After you create a keystore and a TDE master encryption key in isolated mode, you can perform administration tasks such as rekeying or tagging encryption keys.
To change the password of an external keystore, you must use the administrative interface of the external keystore. You cannot perform this operation by using the ADMINISTER KEY MANAGEMENT
statement.
- Changing the Keystore Password in Isolated Mode
You can change the password of a TDE wallet when the PDB is in isolated mode. - Backing Up a Password-Protected TDE Wallet in Isolated Mode
TheBACKUP KEYSTORE
clause of theADMINISTER KEY MANAGEMENT
statement backs up a password-protected TDE wallet. - Merging TDE Wallets in Isolated Mode
In isolated mode, you can merge TDE wallets. - Closing Keystores in Isolated Mode
You can close both software and external keystores in isolated mode, unless the system tablespace is encrypted. - Creating a User-Defined TDE Master Encryption Key in Isolated Mode
To create a user-defined TDE master encryption key, use theADMINISTER KEY MANAGEMENT
statement with theSET | CREATE [ENCRYPTION] KEY
clause. - Creating a TDE Master Encryption Key for Later Use in Isolated Mode
A keystore must be open before you can create a TDE master encryption key for use later on in isolated mode. - Activating a TDE Master Encryption Key in Isolated Mode
To activate a TDE master encryption key in isolated mode, you must open the keystore and useADMINISTER KEY MANAGEMENT
with theUSE KEY
clause. - Rekeying the TDE Master Encryption Key in Isolated Mode
You can use theADMINISTER KEY MANAGEMENT
statement with theSET KEY
clause to rekey a TDE master encryption key. - Moving a TDE Master Encryption Key into a New Keystore in Isolated Mode
In isolated mode, you can move an existing TDE master encryption key into a new TDE wallet from an existing password TDE wallet. - Creating a Custom Attribute Tag in Isolated Mode
To create a custom attribute tag in isolated mode, you must use theSET TAG
clause of theADMINISTER KEY MANAGEMENT
statement. - Exporting and Importing the TDE Master Encryption Key in Isolated Mode
You can export and import the TDE master encryption key in different ways in isolated mode. - Storing Oracle Database Secrets in Isolated Mode
Secrets are data that support internal Oracle Database features that integrate external clients such as Oracle GoldenGate into the database. - Storing Oracle GoldenGate Secrets in a Keystore in Isolated Mode
You can store Oracle GoldenGate secrets in Transparent Data Encryption keystores. - Migrating Keystores in Isolated Mode
You can perform migration and reverse migration operations between TDE wallets and external keystores in isolated mode. - Uniting a Pluggable Database Keystore
Uniting a PDB keystore moves the TDE master encryption keys from the PDB keystore into the keystore of the CDB root. This enables the administrator of the keystore of the CDB root to manage the keys. - Creating a Keystore When the PDB Is Closed
When you create a keystore in a PDB that is closed, the new keystore is empty and the PDB is converted to isolated mode.
Parent topic: Administering Isolated Mode
9.1.1 Changing the Keystore Password in Isolated Mode
You can change the password of a TDE wallet when the PDB is in isolated mode.
To change the password of an external keystore, you must use the administrative interface of the external keystore. You cannot perform this operation by using the ADMINISTER KEY MANAGEMENT
statement.
- Changing the Password-Protected TDE Wallet Password in Isolated Mode
To change the password of a password-protected TDE wallet in isolated mode, you must use theADMINISTER KEY MANAGEMENT
statement. - Changing the Password of an External Keystore in Isolated Mode
To change the password of an external keystore, you must close the external keystore and then change the password from the external keystore’s management interface.
9.1.1.1 Changing the Password-Protected TDE Wallet Password in Isolated Mode
To change the password of a password-protected TDE wallet in isolated mode, you must use the ADMINISTER KEY MANAGEMENT
statement.
WITH BACKUP
clause, and thus forced to make a backup of the current TDE wallet. During the password change operation, Transparent Data Encryption operations such as encryption and decryption will continue to work normally. You can change this password at any time. You may want to change this password if you think it was compromised.
Related Topics
Parent topic: Changing the Keystore Password in Isolated Mode
9.1.1.2 Changing the Password of an External Keystore in Isolated Mode
To change the password of an external keystore, you must close the external keystore and then change the password from the external keystore’s management interface.
Related Topics
Parent topic: Changing the Keystore Password in Isolated Mode
9.1.2 Backing Up a Password-Protected TDE Wallet in Isolated Mode
The BACKUP KEYSTORE
clause of the ADMINISTER KEY MANAGEMENT
statement backs up a password-protected TDE wallet.
Related Topics
9.1.3 Merging TDE Wallets in Isolated Mode
In isolated mode, you can merge TDE wallets.
- Merging One TDE Wallet into an Existing TDE Wallet in Isolated Mode
In isolated mode, you can use theADMINISTER KEY MANAGEMENT
statement with theMERGE KEYSTORE
clause to merge one TDE wallet into another existing TDE wallet. - Merging Two TDE Wallets into a Third New TDE Wallet in Isolated Mode
In isolated mode, you can merge two TDE wallets into a third new TDE wallet, so that the two existing TDE wallets are not changed and the new TDE wallet contains the keys of both source TDE wallets.
9.1.3.1 Merging One TDE Wallet into an Existing TDE Wallet in Isolated Mode
In isolated mode, you can use the ADMINISTER KEY MANAGEMENT
statement with the MERGE KEYSTORE
clause to merge one TDE wallet into another existing TDE wallet.
TDE_wallet2
) remains a password-protected TDE wallet after the TDE wallet merge operation.
Related Topics
Parent topic: Merging TDE Wallets in Isolated Mode
9.1.3.2 Merging Two TDE Wallets into a Third New TDE Wallet in Isolated Mode
In isolated mode, you can merge two TDE wallets into a third new TDE wallet, so that the two existing TDE wallets are not changed and the new TDE wallet contains the keys of both source TDE wallets.
Related Topics
Parent topic: Merging TDE Wallets in Isolated Mode
9.1.4 Closing Keystores in Isolated Mode
You can close both software and external keystores in isolated mode, unless the system tablespace is encrypted.
- Closing a TDE Wallet in Isolated Mode
You can close password-protected TDE wallets, auto-login TDE wallets, and local auto-login TDE wallets in isolated mode. - Closing an External Keystore in Isolated Mode
To close an external keystore, you must use theADMINISTER KEY MANAGEMENT
statement with theSET KEYSTORE CLOSE
clause.
9.1.4.1 Closing a TDE Wallet in Isolated Mode
You can close password-protected TDE wallets, auto-login TDE wallets, and local auto-login TDE wallets in isolated mode.
Related Topics
Parent topic: Closing Keystores in Isolated Mode
9.1.4.2 Closing an External Keystore in Isolated Mode
To close an external keystore, you must use the ADMINISTER KEY MANAGEMENT
statement with the SET KEYSTORE CLOSE
clause.
IDENTIFIED BY
clause. Enclose the password in double quotation marks.
Related Topics
Parent topic: Closing Keystores in Isolated Mode
9.1.5 Creating a User-Defined TDE Master Encryption Key in Isolated Mode
To create a user-defined TDE master encryption key, use the ADMINISTER KEY MANAGEMENT
statement with the SET | CREATE [ENCRYPTION] KEY
clause.
9.1.6 Creating a TDE Master Encryption Key for Later Use in Isolated Mode
A keystore must be open before you can create a TDE master encryption key for use later on in isolated mode.
9.1.7 Activating a TDE Master Encryption Key in Isolated Mode
To activate a TDE master encryption key in isolated mode, you must open the keystore and use ADMINISTER KEY MANAGEMENT
with the USE KEY
clause.
Related Topics
9.1.8 Rekeying the TDE Master Encryption Key in Isolated Mode
You can use the ADMINISTER KEY MANAGEMENT
statement with the SET KEY
clause to rekey a TDE master encryption key.
Related Topics
9.1.9 Moving a TDE Master Encryption Key into a New Keystore in Isolated Mode
In isolated mode, you can move an existing TDE master encryption key into a new TDE wallet from an existing password TDE wallet.
9.1.10 Creating a Custom Attribute Tag in Isolated Mode
To create a custom attribute tag in isolated mode, you must use the SET TAG
clause of the ADMINISTER KEY MANAGEMENT
statement.
Related Topics
9.1.11 Exporting and Importing the TDE Master Encryption Key in Isolated Mode
You can export and import the TDE master encryption key in different ways in isolated mode.
- Exporting a TDE Master Encryption Key in Isolated Mode
In isolated mode, you can use theADMINISTER KEY MANAGEMENT
statement to export a TDE master encryption key. - Importing a TDE Master Encryption Key in Isolated Mode
TheADMINISTER KEY MANAGEMENT
statement with theIMPORT [ENCRYPTION] KEYS WITH SECRET
clause can import a TDE master encryption key.
9.1.11.1 Exporting a TDE Master Encryption Key in Isolated Mode
In isolated mode, you can use the ADMINISTER KEY MANAGEMENT
statement to export a TDE master encryption key.
9.1.12 Storing Oracle Database Secrets in Isolated Mode
Secrets are data that support internal Oracle Database features that integrate external clients such as Oracle GoldenGate into the database.
- About Storing Oracle Database Secrets in a Keystore in Isolated Mode
Keystores (both TDE wallets and external keystores) can store secrets that support internal Oracle Database features and integrate external clients such as Oracle GoldenGate. - Storing Oracle Database Secrets in a TDE Wallet in Isolated Mode
TheADMINISTER KEY MANAGEMENT ADD SECRET|UPDATE SECRET|DELETE SECRET
statements can add secrets, update secrets, and delete secrets in a TDE wallet. - Example: Adding an Oracle Key Vault Password to a TDE Wallet
TheADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an Oracle Key Vault password to a TDE wallet. - Example: Changing an Oracle Key Vault Password Stored as a Secret in a TDE Wallet
TheADMINISTER KEY MANAGEMENT UPDATE SECRET
statement can change an Oracle Key Vault password that is stored as a secret in a TDE wallet. - Example: Deleting an Oracle Key Vault Password Stored as a Secret in a TDE Wallet
TheADMINISTER KEY MANAGEMENT DELETE SECRET
statement can delete Oracle Key Vault passwords that are stored as secrets in a TDE wallet. - Storing Oracle Database Secrets in an External Keystore in Isolated Mode
TheADMINISTER KEY MANAGEMENT ADD SECRET|UPDATE SECRET|DELETE SECRET
statements can add secrets, update secrets, and delete secrets in a keystore. - Example: Adding an Oracle Database Secret to an External Keystore
TheADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an Oracle Database secret to an external keystore. - Example: Changing an Oracle Database Secret in an External Keystore
TheADMINISTER KEY MANAGEMENT MANAGEMENT UPDATE SECRET
statement can change an Oracle Database secret in an external keystore. - Example: Deleting an Oracle Database Secret in an External Keystore
TheADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT
statement can delete an Oracle Database secret that is in an external keystore.
9.1.12.1 About Storing Oracle Database Secrets in a Keystore in Isolated Mode
Keystores (both TDE wallets and external keystores) can store secrets that support internal Oracle Database features and integrate external clients such as Oracle GoldenGate.
The secret key must be a string adhering to Oracle identifier rules. You can add, update, or delete a client secret in an existing keystore. The Oracle GoldenGate Extract process must have data encryption keys to decrypt the data that is in data files and in REDO
or UNDO
logs. Keys are encrypted with shared secrets when you share the keys between an Oracle database and an Oracle GoldenGate client. The TDE wallet stores the shared secrets.
Depending on your site's requirements, you may require automated open keystore operations even when an external keystore is configured. For this reason, the external key manager password can be stored in an auto-login TDE wallet, which enables the auto-login capability for the external key manager. The Oracle Database side can also store the credentials for the database to log in to an external storage server in the TDE wallet.
You can store Oracle Database secrets in both TDE wallets and external keystores:
-
TDE wallets: You can store secrets in password-based, auto-login, and local auto-login TDE wallets. If you want to store secrets in an auto-login (or auto-login local) TDE wallet, then note the following:
-
If the auto-login TDE wallet is in the same location as its corresponding password-based TDE wallet, then the secrets are added automatically.
-
If the auto-login TDE wallet is in a different location from its corresponding password-based TDE wallet, then you must create the auto-login TDE wallet again from the password-based TDE walllet, and keep the two walltets in synchronization.
-
-
External keystores: You can store secrets in standard external key managers.
Related Topics
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.2 Storing Oracle Database Secrets in a TDE Wallet in Isolated Mode
The ADMINISTER KEY MANAGEMENT ADD SECRET|UPDATE SECRET|DELETE SECRET
statements can add secrets, update secrets, and delete secrets in a TDE wallet.
Related Topics
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.3 Example: Adding an Oracle Key Vault Password to a TDE Wallet
The ADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an Oracle Key Vault password to a TDE wallet.
Example 9-1 shows how to add an Oracle Key Vault password as a secret into an existing TDE wallet (for example, after migrating to Oracle Key Vault, the Oracle Key Vault password can be added to the old TDE wallet to set up an auto-open connection into Oracle Key Vault.
Example 9-1 Adding an Oracle Database Secret to a TDE wallet
ADMINISTER KEY MANAGEMENT ADD SECRET 'external_key_manager_password' FOR CLIENT 'OKV_PASSWORD' IDENTIFIED BY TDE_wallet_password WITH BACKUP;
Before migrating from a TDE wallet to Oracle Key Vault, you can upload the TDE wallet into the virtual wallet of that endpoint in Oracle Key Vault. After migrating, you now can delete the old TDE wallet, because its key is in Oracle Key Vault. In order to configure auto-open Oracle Key Vault without a wallet being already present, run the following statement:
ADMINISTER KEY MANAGEMENT ADD SECRET 'external_keystore_password' FOR CLIENT 'OKV_PASSWORD' INTO [LOCAL] AUTO_LOGIN KEYSTORE 'WALLET_ROOT/tde';
Note that the setting TDE_CONFIGURATION='KEYSTORE_CONFIGUARTION=OKV'
is for a password-protected connection into Oracle Key Vault. After the Oracle Key Vault password has been inserted into an existing or newly created wallet, change the TDE_CONFIGURATION
setting to 'KEYSTORE_CONFIGURATION=OKV|FILE'
.
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.4 Example: Changing an Oracle Key Vault Password Stored as a Secret in a TDE Wallet
The ADMINISTER KEY MANAGEMENT UPDATE SECRET
statement can change an Oracle Key Vault password that is stored as a secret in a TDE wallet.
Example 9-2 shows how to change an Oracle Key Vault password that is stored as a secret in a TDE wallet.
Example 9-2 Changing an Oracle Key Vault Password Secret to a TDE Wallet
ADMINISTER KEY MANAGEMENT UPDATE SECRET admin_password FOR CLIENT 'admin@myhost' USING TAG 'new_host_credentials' FORCE KEYSTORE IDENTIFIED BY TDE_wallet_password;
In this version, the password for the keystore is in an external store:
DMINISTER KEY MANAGEMENT UPDATE SECRET admin_password FOR CLIENT 'admin@myhost' USING TAG 'new_host_credentials' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.5 Example: Deleting an Oracle Key Vault Password Stored as a Secret in a TDE Wallet
The ADMINISTER KEY MANAGEMENT DELETE SECRET
statement can delete Oracle Key Vault passwords that are stored as secrets in a TDE wallet.
Example 9-3 shows how to delete an Oracle Key Vault password that is stored as a secret in the TDE wallet.
Example 9-3 Deleting an Oracle Key Vault Password Secret in a TDE Wallet
ADMINISTER KEY MANAGEMENT
DELETE SECRET FOR CLIENT 'OKV_PASSWORD'
FORCE KEYSTORE
IDENTIFIED BY TDE_wallet_password WITH BACKUP;
In this version, the password for the TDE wallet is in an external store:
ADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT 'OKV_PASSWORD' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE WITH BACKUP;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.6 Storing Oracle Database Secrets in an External Keystore in Isolated Mode
The ADMINISTER KEY MANAGEMENT ADD SECRET|UPDATE SECRET|DELETE SECRET
statements can add secrets, update secrets, and delete secrets in a keystore.
Related Topics
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.7 Example: Adding an Oracle Database Secret to an External Keystore
The ADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an Oracle Database secret to an external keystore.
Example 9-4 shows how to add a password for a user to an external keystore.
Example 9-4 Adding an Oracle Database Secret to an External Keystore
ADMINISTER KEY MANAGEMENT ADD SECRET 'password' FOR CLIENT 'admin@myhost' USING TAG 'myhost admin credentials' IDENTIFIED BY "external_key_manager_password";
In this version, the keystore password is in an external store, so the EXTERNAL STORE
setting is used for IDENTIFIED BY
:
ADMINISTER KEY MANAGEMENT ADD SECRET 'password'
FOR CLIENT 'admin@myhost' USING TAG 'myhost admin credentials'
IDENTIFIED BY EXTERNAL STORE;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.8 Example: Changing an Oracle Database Secret in an External Keystore
The ADMINISTER KEY MANAGEMENT MANAGEMENT UPDATE SECRET
statement can change an Oracle Database secret in an external keystore.
Example 9-5 shows how to change a password that is stored as a secret in an external keystore.
Example 9-5 Changing an Oracle Database Secret in an External Keystore
ADMINISTER KEY MANAGEMENT MANAGEMENT UPDATE SECRET 'password2' FOR CLIENT 'admin@myhost' USING TAG 'New host credentials' IDENTIFIED BY "external_key_manager_password";
In this version, the password for the keystore is in an external store:
ADMINISTER KEY MANAGEMENT MANAGEMENT UPDATE SECRET 'password2'
FOR CLIENT 'admin@myhost' USING TAG 'New host credentials'
IDENTIFIED BY EXTERNAL STORE;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.12.9 Example: Deleting an Oracle Database Secret in an External Keystore
The ADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT
statement can delete an Oracle Database secret that is in an external keystore.
Example 9-6 shows how to delete an external key manager password that is stored as a secret in the external keystore.
Example 9-6 Deleting an Oracle Database Secret in an External Keystore
ADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT 'admin@myhost'
IDENTIFIED BY "external_key_manager_password";
In this version, the password for the keystore is in an external store:
ADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT 'admin@myhost' IDENTIFIED BY EXTERNAL STORE;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
9.1.13 Storing Oracle GoldenGate Secrets in a Keystore in Isolated Mode
You can store Oracle GoldenGate secrets in Transparent Data Encryption keystores.
- About Storing Oracle GoldenGate Secrets in Keystores in Isolated Mode
You can use a keystore (TDE wallet or external keystore) to store secret keys for tools and external clients such as Oracle GoldenGate. - Oracle GoldenGate Extract Classic Capture Mode TDE Requirements
Ensure that you meet the requirements for Oracle GoldenGate Extract to support Transparent Data Encryption capture. - Configuring Keystore Support for Oracle GoldenGate
You can configure Transparent Data Encryption keystore support for Oracle GoldenGate by using a shared secret for the keystore.
9.1.13.1 About Storing Oracle GoldenGate Secrets in Keystores in Isolated Mode
You can use a keystore (TDE wallet or external keystore) to store secret keys for tools and external clients such as Oracle GoldenGate.
The secret key must be a string adhering to Oracle identifier rules. You can add, update, or delete a client secret in an existing keystore. This section describes how to capture Transparent Data Encryption encrypted data in the Oracle GoldenGate Extract (Extract) process using classic capture mode.
TDE support when Extract is in classic capture mode requires the exchange of the following keys:
-
TDE support for Oracle GoldenGate in the classic capture mode of the Extract process requires that an Oracle database and the Extract process share the secret to encrypt sensitive information being exchanged. The shared secret is stored securely in the Oracle database and Oracle GoldenGate domains. The shared secret is stored in the TDE wallet or the external keystore as the database secret.
-
The decryption key is a password known as the shared secret that is stored securely in the Oracle database and Oracle GoldenGate domains. Only a party that has possession of the shared secret can decrypt the table and redo log keys.
After you configure the shared secret, Oracle GoldenGate Extract uses the shared secret to decrypt the data. Oracle GoldenGate Extract does not handle the TDE master encryption key itself, nor is it aware of the keystore password. The TDE master encryption key and password remain within the Oracle database configuration.
Oracle GoldenGate Extract only writes the decrypted data to the Oracle GoldenGate trail file, which Oracle GoldenGate persists during transit. You can protect this file using your site's operating system standard security protocols, as well as the Oracle GoldenGate AES encryption options. Oracle GoldenGate does not write the encrypted data to a discard file (specified with the DISCARDFILE
parameter). The word ENCRYPTED
will be written to any discard file that is in use.
Oracle GoldenGate does require that the keystore be open when processing encrypted data. There is no performance effect of Oracle GoldenGate feature on the TDE operations.
9.1.13.2 Oracle GoldenGate Extract Classic Capture Mode TDE Requirements
Ensure that you meet the requirements for Oracle GoldenGate Extract to support Transparent Data Encryption capture.
The requirements are as follows:
-
To maintain high security standards, ensure that the Oracle GoldenGate Extract process runs as part of the Oracle user (the user that runs the Oracle database). That way, the keys are protected in memory by the same privileges as the Oracle user.
-
Run the Oracle GoldenGate Extract process on the same computer as the Oracle database installation.
9.1.13.3 Configuring Keystore Support for Oracle GoldenGate
You can configure Transparent Data Encryption keystore support for Oracle GoldenGate by using a shared secret for the keystore.
- Step 1: Decide on a Shared Secret for the Keystore
A shared secret for a keystore is a password. - Step 2: Configure Oracle Database for TDE Support for Oracle GoldenGate
TheDBMS_INTERNAL_CLKM
PL/SQL package enables you to configure TDE support for Oracle GoldenGate. - Step 3: Store the TDE GoldenGate Shared Secret in the Keystore
TheADMINISTER KEY MANAGEMENT
statement can store a TDE GoldenGate shared secret in a keystore. - Step 4: Set the TDE Oracle GoldenGate Shared Secret in the Extract Process
The GoldenGate Software Command Interface (GGSCI) utility sets the TDE Oracle GoldenGate shared secret in the extract process.
9.1.13.3.1 Step 1: Decide on a Shared Secret for the Keystore
A shared secret for a keystore is a password.
-
Decide on a shared secret that meets or exceeds Oracle Database password standards.
Do not share this password with any user other than trusted administrators who are responsible for configuring Transparent Data Encryption to work with Oracle GoldenGate Extract.
Related Topics
Parent topic: Configuring Keystore Support for Oracle GoldenGate
9.1.13.3.2 Step 2: Configure Oracle Database for TDE Support for Oracle GoldenGate
The DBMS_INTERNAL_CLKM
PL/SQL package enables you to configure TDE support for Oracle GoldenGate.
Parent topic: Configuring Keystore Support for Oracle GoldenGate
9.1.13.3.3 Step 3: Store the TDE GoldenGate Shared Secret in the Keystore
The ADMINISTER KEY MANAGEMENT
statement can store a TDE GoldenGate shared secret in a keystore.
Parent topic: Configuring Keystore Support for Oracle GoldenGate
9.1.13.3.4 Step 4: Set the TDE Oracle GoldenGate Shared Secret in the Extract Process
The GoldenGate Software Command Interface (GGSCI) utility sets the TDE Oracle GoldenGate shared secret in the extract process.
Parent topic: Configuring Keystore Support for Oracle GoldenGate
9.1.14 Migrating Keystores in Isolated Mode
You can perform migration and reverse migration operations between TDE wallets and external keystores in isolated mode.
- Reverse Migrating an Isolated PDB from Oracle Key Vault to a TDE Wallet
Isolated PDBs have individual keystores (TDE wallets or Oracle Key Vault external keystores), and can individually be migrated from the TDE wallet to Oracle Key Vault, and individually reverse migrated from Oracle Key Vault back to the TDE wallet. - Migrating from an External Keystore to a Password-Protected TDE Wallet in Isolated Mode
In isolated mode, you can migrate from an external keystore to a password-protected TDE wallet.
9.1.14.1 Reverse Migrating an Isolated PDB from Oracle Key Vault to a TDE Wallet
Isolated PDBs have individual keystores (TDE wallets or Oracle Key Vault external keystores), and can individually be migrated from the TDE wallet to Oracle Key Vault, and individually reverse migrated from Oracle Key Vault back to the TDE wallet.
Parent topic: Migrating Keystores in Isolated Mode
9.1.14.2 Migrating from an External Keystore to a Password-Protected TDE Wallet in Isolated Mode
In isolated mode, you can migrate from an external keystore to a password-protected TDE wallet.
HSM_PASSWORD
client secret into it. For example: ADMINISTER KEY MANAGEMENT ADD SECRET 'external_key_manager_password' FOR CLIENT 'EXTERNAL_PASSWORD' TO LOCAL AUTO_LOGIN KEYSTORE TDE_wallet_location WITH BACKUP;
9.1.15 Uniting a Pluggable Database Keystore
Uniting a PDB keystore moves the TDE master encryption keys from the PDB keystore into the keystore of the CDB root. This enables the administrator of the keystore of the CDB root to manage the keys.
ADMINISTER KEY MANAGEMENT ISOLATE KEYSTORE
statement.
ORA-46694 error: If a wallet is created in the in a PDB context, then it changes the keystore type of the PDB to isolated, and unless a key is set for the PDB, the wallet status will be OPEN_NO_MASTER_KEY
. Uniting this type of PDB using the ADMINISTER KEY MANAGEMENT UNITE KEYSTORE
statement will result in an ORA-46694: The keys are already in the root keystore
error. To change the KEYSTORE_MODE
to UNITED
for this PDB, you must change the TDE configuration for the PDB. In the PDB, run the following statement:
ALTER SYSTEM RESET TDE_CONFIGURATION;
Related Topics
9.1.16 Creating a Keystore When the PDB Is Closed
When you create a keystore in a PDB that is closed, the new keystore is empty and the PDB is converted to isolated mode.
- About Creating a Keystore When the PDB Is Closed
Creating a keystore in a PDB that is closed could inadvertently cause problems in rekey operations, but the keystore creation can be reverted. - Reverting a Keystore Creation Operation When a PDB Is Closed
If you have inadvertently created a keystore in a PDB (and thereby caused it to become configured in isolated mode), then you should reverse the keystore creation operation.
9.1.16.1 About Creating a Keystore When the PDB Is Closed
Creating a keystore in a PDB that is closed could inadvertently cause problems in rekey operations, but the keystore creation can be reverted.
In previous releases, if you tried to create a keystore in a closed PDB, you were prevented and an ORA-65040: operation not allowed from within a pluggable database
error would appear. Starting in Oracle Database release 18c, for convenience, when the keystore of the PDB is closed and if you run the ADMINISTER KEY MANAGEMENT CREATE KEYSTORE
statement in the PDB, Oracle Database allows the operation.
If the closed PDB has not been configured to use encryption (that is, it has never had an ADMINISTER KEY MANAGEMENT SET KEY
statement performed in it), after you run ADMINISTER KEY MANAGEMENT CREATE KEYSTORE
, resulting in an empty keystore and the configuration of the PDB being changed to isolated mode, then you can create a TDE master encryption key in this empty keystore.
If, however, the PDB was already configured to use encryption, then the PDB may be configured in united mode (and thus have its TDE master encryption key being managed in the keystore of the CDB root).
Mistakenly running an ADMINISTER KEY MANAGEMENT CREATE KEYSTORE
statement on such a closed PDB will create an additional keystore (which will be empty), and will then configure the PDB to be in isolated mode. This effectively misconfigures the PDB, because the PDB is now in isolated mode (whereas it should be in united mode), yet its TDE master encryption key is still in the keystore of the CDB root. This misconfiguration can cause problems later on, if you try to rekey the TDE master encryption key by using the ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY
statement . An ORA-28362: master key not found
error will appear, because when encryption has already been enabled and a key has been set, Oracle Database treats the ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY
statement as a rekey operation. In order to perform a rekey operation, Oracle Database must locate the currently active TDE master encryption key of the PDB. But in this misconfigured PDB, Oracle Database cannot locate the TDE master encryption key, because the PDB is now in isolated mode and the necessary key is in the keystore of the CDB root. Hence, the PDB is no longer configured to search in the keystore of the PDB, and the rekey operation fails.
To remedy the misconfiguration of the PDB, you must reconfigure the PDB to united mode and you must remove the empty keystore. (Always make a backup before removing any keystore.) When the PDB is configured back to united mode, then the currently active TDE master encryption key is once again available for rekey and other TDE master encryption key operations.
If later on you want to configure the PDB to be in isolated mode, then you can open the PDB and run the ADMINISTER KEY MANAGEMENT ISOLATE KEYSTORE
statement, which isolates the PDB and moves its TDE master encryption key and previously-active (historical) keys from the keystore of the CDB root to a newly-created keystore for the isolated PDB.
Related Topics
Parent topic: Creating a Keystore When the PDB Is Closed
9.1.16.2 Reverting a Keystore Creation Operation When a PDB Is Closed
If you have inadvertently created a keystore in a PDB (and thereby caused it to become configured in isolated mode), then you should reverse the keystore creation operation.
- Connect to the isolated mode PDB as a user who has been granted the
ADMINISTER KEY MANAGEMENT
orSYSKM
privilege. - Confirm the mode of the PDB by querying the
KEYSTORE_MODE
column of theV$ENCRYPTION_WALLET
dynamic view. - If the
V$ENCRYPTION_WALLET
output isISOLATED
, then run theALTER SYSTEM
statement to reconfigure the PDB to united mode.- When pfile is in use, clear the
TDE_CONFIGURATION
parameter by using the following statement:ALTER SYSTEM RESET TDE_CONFIGURATION SCOPE=MEMORY;
In an Oracle Real Application Clusters environment, include the
SID
parameter:ALTER SYSTEM RESET TDE_CONFIGURATION SCOPE=MEMORY SID='*';
- When spfile is in use, clear the
TDE_CONFIGURATION
parameter by using this statement:ALTER SYSTEM RESET TDE_CONFIGURATION SCOPE=BOTH;
In an Oracle Real Application Clusters environment, include the
SID
parameter:ALTER SYSTEM RESET TDE_CONFIGURATION SCOPE=BOTH SID='*';
- When pfile is in use, clear the
- In the
WALLET_ROOT/pdb_guid/tde
directory, find and back up theewallet.p12
keystore file that was mistakenly created. - Delete the mistakenly-created empty keystore file.
Parent topic: Creating a Keystore When the PDB Is Closed
9.2 Administering Transparent Data Encryption in Isolated Mode
You can perform a number of general administrative tasks with Transparent Data Encryption in isolated mode.
- Cloning or Relocating Encrypted PDBs in Isolated Mode
You can clone or relocate encrypted PDBs within the same container database, or across container databases. - Unplugging and Plugging a PDB with Encrypted Data in a CDB in Isolated Mode
In isolated mode, for a PDB that has encrypted data, you can plug it into a CDB. Conversely, you can unplug this PDB from the CDB. - Cloning a PDB with Encrypted Data in a CDB in Isolated Mode
TheCREATE PLUGGABLE DATABASE
statement with theKEYSTORE IDENTIFIED BY
clause can clone a PDB that has encrypted data. - Remotely Cloning an Encrypted PDB in Isolated Mode
TheCREATE PLUGGABLE DATABASE
statement with theKEYSTORE IDENTIFIED BY
clause can remotely clone a PDB that has encrypted data. - Relocating an Encrypted PDB in Isolated Mode
TheCREATE PLUGGABLE DATABASE
statement with theKEYSTORE IDENTIFIED BY
clause can relocate across CDBs a cloned PDB that has encrypted data. - How Keystore Open and Close Operations Work in Isolated Mode
You should be aware of how keystore (TDE wallets or external keystores) open and close operations work in isolated mode. - Exporting and Importing Master Encryption Keys for a PDB in Isolated Mode
In isolated mode, theEXPORT
andIMPORT
clauses ofADMINISTER KEY MANAGEMENT EXPORT
can export or import master encryption keys for a PDB.
Parent topic: Administering Isolated Mode
9.2.1 Cloning or Relocating Encrypted PDBs in Isolated Mode
You can clone or relocate encrypted PDBs within the same container database, or across container databases.
If you are trying to move a PDB in which the SYSTEM
, SYSAUX
, UNDO
, or TEMP
tablespace is encrypted, and using the manual export or import of keys, then you must first import the keys for the PDB in the target database's CDB$ROOT
before you create the PDB. Import of the keys are again required inside the PDB to associate the keys to the PDB.
Related Topics
9.2.2 Unplugging and Plugging a PDB with Encrypted Data in a CDB in Isolated Mode
In isolated mode, for a PDB that has encrypted data, you can plug it into a CDB. Conversely, you can unplug this PDB from the CDB.
- Unplugging a PDB That Has Encrypted Data in Isolated Mode
You can unplug a PDB (that has encrypted data) from one CDB and then optionally plug it into another CDB. - Plugging a PDB That Has Encrypted Data into a CDB in Isolated Mode
After you plug a PDB that has encrypted data into a CDB, you can set the encryption key in the PDB. - Unplugging a PDB That Has Master Encryption Keys Stored in an External Keystore in Isolated Mode
You can unplug a PDB from one CDB that has been configured with an external keystore and then plug it into another CDB also configured with an external keystore. - Plugging a PDB That Has Master Keys Stored in an External Keystore in Isolated Mode
TheADMINISTER KEY MANAGEMENT
statement can import an external keystore master encryption key to a PDB that has been moved to another CDB.
9.2.2.1 Unplugging a PDB That Has Encrypted Data in Isolated Mode
You can unplug a PDB (that has encrypted data) from one CDB and then optionally plug it into another CDB.
ENCRYPT
clause in the ALTER PLUGGABLE DATABASE
statement. The database that is unplugged contains data files and other associated files. Because each PDB can have its own unique keystore, you do not need to export the TDE master encryption key of the PDB that you want to unplug. You can check if a PDB has already been unplugged by querying the STATUS
column of the DBA_PDBS
data dictionary view.
9.2.2.2 Plugging a PDB That Has Encrypted Data into a CDB in Isolated Mode
After you plug a PDB that has encrypted data into a CDB, you can set the encryption key in the PDB.
DECRYPT
clause in the CREATE PLUGGABLE DATABASE
statement. When you plug an unplugged PDB into another CDB, the key version is set to 0
because this operation invalidates the history of the previous keys. You can check the key version by querying the KEY_VERSION
column of the V$ENCRYPTED_TABLESPACES
dynamic view. Similarly, if a control file is lost and recreated, then the previous history of the keys is reset to 0
. You can check if a PDB has already been plugged in by querying the STATUS
column of the DBA_PDBS
data dictionary view.
-
Create the PDB by plugging the unplugged PDB into the CDB.
-
For example, if you had exported the PDB data into a metadata XML file:
CREATE PLUGGABLE DATABASE CDB1_PDB2 USING '/tmp/cdb1_pdb2.xml' NOCOPY KEYSTORE IDENTIFIED BY password;
-
If you had exported the PDB into an archive file:
CREATE PLUGGABLE DATABASE CDB1_PDB2 USING '/tmp/cdb1_pdb2.pdb';
During the open operation of the PDB after the plug operation, Oracle Database determines if the PDB has encrypted data. If so, it opens the PDB in the
RESTRICTED
mode.You can find if the source database has encrypted data or a TDE master encryption key set in the keystore by querying the
V$ENCRYPTION_KEYS
dynamic view. -
-
Open the PDB.
For example:
ALTER PLUGGABLE DATABASE CDB1_PDB2 OPEN;
-
Open the keystore in the CDB root.
For example:
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY password;
Optionally, open the keystore in the PDB.
-
In the PDB, open the keystore and set the TDE master encryption key for the PDB.
For example:
ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY keystore_password WITH BACKUP USING 'emp_key_backup';
9.2.2.3 Unplugging a PDB That Has Master Encryption Keys Stored in an External Keystore in Isolated Mode
You can unplug a PDB from one CDB that has been configured with an external keystore and then plug it into another CDB also configured with an external keystore.
Related Topics
9.2.3 Cloning a PDB with Encrypted Data in a CDB in Isolated Mode
The CREATE PLUGGABLE DATABASE
statement with the KEYSTORE IDENTIFIED BY
clause can clone a PDB that has encrypted data.
9.2.4 Remotely Cloning an Encrypted PDB in Isolated Mode
The CREATE PLUGGABLE DATABASE
statement with the KEYSTORE IDENTIFIED BY
clause can remotely clone a PDB that has encrypted data.
Related Topics
9.2.5 Relocating an Encrypted PDB in Isolated Mode
The CREATE PLUGGABLE DATABASE
statement with the KEYSTORE IDENTIFIED BY
clause can relocate across CDBs a cloned PDB that has encrypted data.
Related Topics
9.2.6 How Keystore Open and Close Operations Work in Isolated Mode
You should be aware of how keystore (TDE wallets or external keystores) open and close operations work in isolated mode.
For each PDB in isolated mode, you must explicitly open the password-protected TDE wallet or external keystore in the PDB to enable the Transparent Data Encryption operations to proceed. (Auto-login and local auto-login TDE wallets open automatically.) Closing a keystore on a PDB blocks all of the Transparent Data Encryption operations on that PDB.
The open and close keystore operations in a PDB depend on the open and close status of the keystore in the PDB.
Note the following:
-
You can create a separate keystore password for each PDB in the multitenant environment.
-
Before you can manually open a password-protected software or an external keystore in an individual PDB, you must open the keystore in the CDB root.
-
If an auto-login TDE wallet is in use, or if the TDE wallet is closed, then include the
FORCE KEYSTORE
clause in theADMINISTER KEY MANAGEMENT
statement when you open the TDE wallet. -
If the keystore is a password-protected TDE wallet that uses an external store for passwords, then replace the password in the
IDENTIFIED BY
clause withEXTERNAL STORE
. -
Before you can set a TDE master encryption key in an individual PDB, you must set the key in the CDB root. Oracle highly recommends that you include the
USING TAG
clause when you set keys in PDBs. For example:SELECT ' ADMINISTER KEY MANAGEMENT SET KEY USING TAG '''||SYS_CONTEXT('USERENV', 'CON_NAME')||' '||TO_CHAR (SYSDATE, 'YYYY-MM-DD HH24:MI:SS')||''' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE WITH BACKUP CONTAINER = CURRENT;' AS "SET KEY COMMAND" FROM DUAL;
Including the
USING TAG
clause enables you to quickly and easily identify the keys that belong to a certain PDB, and when they were created. -
Auto-login and local auto-login TDE wallets open automatically. You do not need to manually open these from the root first, or from the PDB.
-
If there is any PDB configured in isolated mode that has its keystore open, then an attempt to close the keystore in the CDB root would fail with an
ORA-46692 cannot close wallet
error. Use theFORCE CLOSE
clause in theADMINISTER KEY MANAGEMENT
statement to override this behavior. -
If you perform an
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN
statement in the CDB root and set theCONTAINER
clause toALL
, then the keystore will only be opened in each open PDB that is configured in united mode. Keystores for any PDBs that are configured in isolated mode are not opened.
9.2.7 Exporting and Importing Master Encryption Keys for a PDB in Isolated Mode
In isolated mode, the EXPORT
and IMPORT
clauses of ADMINISTER KEY MANAGEMENT EXPORT
can export or import master encryption keys for a PDB.
- About Exporting and Importing Master Encryption Keys for a PDB in Isolated Mode
In isolated mode, you can export and import master encryption keys from the CDB root. - Exporting or Importing a Master Encryption Key for a PDB in Isolated Mode
In isolated mode, theADMINISTER KEY MANAGEMENT
statement can export or import a master encryption key for a PDB. - Example: Exporting a Master Encryption Key from a PDB in Isolated Mode
TheADMINISTER KEY MANAGEMENT EXPORT ENCRYPTION KEYS
statement can export master encryption keys for a PDB. - Example: Importing a Master Encryption Key into a PDB in Isolated Mode
TheADMINISTER KEY MANAGEMENT IMPORT ENCRYPTION KEYS
statement can import a master encryption key into a PDB.
9.2.7.1 About Exporting and Importing Master Encryption Keys for a PDB in Isolated Mode
In isolated mode, you can export and import master encryption keys from the CDB root.
You can export and import all of the master encryption keys that belong to the PDB by exporting and importing the master encryption keys from within a PDB. Export and import operations of master encryption keys in a PDB supports the PDB unplug and plug operations. During a PDB unplug and plug operations, all the master encryption keys that belong to a PDB, as well as the metadata, are involved. Therefore, the WITH IDENTIFIER
clause of the ADMINISTER KEY MANAGEMENT EXPORT
statement is not allowed when you export keys from within a PDB. The WITH IDENTIFIER
clause is only permitted in the CDB root.
You should include the FORCE KEYSTORE
clause if the CDB root has an auto-login keystore or if the keystore is closed. If the keystore has been configured to use an external store for the password, then use the IDENTIFIED BY EXTERNAL STORE
clause. For example, to perform an export operation for this scenario:
ADMINISTER KEY MANAGEMENT EXPORT KEYS WITH SECRET "my_secret" TO '/etc/TDE/export.exp' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE;
This ADMINISTER KEY MANAGEMENT EXPORT
operation exports not only the keys but creates metadata that is necessary for PDB environments (as well as for cloning operations).
Inside a PDB, the export operation of master encryption keys exports the keys that were created or activated by a PDB with the same GUID as the PDB where the keys are being exported. Essentially, all of the keys that belong to a PDB where the export is being performed will be exported.
The importing of master encryption keys from an export file within a PDB takes place only if the master encryption key was exported from another PDB with the same GUID. To support the plug-in of a non-CDB as PDB into a CDB, you must have already exported the TDE master encryption keys from the non-CDB and imported them into the PDB without the WITH IDENTIFIER
clause. Because the PDB-specific details, such as the PDB name and database ID, can change from one CDB to the next, the PDB-specific information is modified during the import to reflect the updated PDB information.
Note:
Within a PDB, you can only export the keys of a PDB as a whole. The ability to export them selectively based on a query or an identifier is restricted to the root.
9.2.7.2 Exporting or Importing a Master Encryption Key for a PDB in Isolated Mode
In isolated mode, the ADMINISTER KEY MANAGEMENT
statement can export or import a master encryption key for a PDB.
9.2.7.3 Example: Exporting a Master Encryption Key from a PDB in Isolated Mode
The ADMINISTER KEY MANAGEMENT EXPORT ENCRYPTION KEYS
statement can export master encryption keys for a PDB.
Example 9-7 shows how to export a master encryption key from the PDB hrpdb
. In this example, the FORCE KEYSTORE
clause is included in case the auto-login keystore is in use, or if the keystore is closed.
Example 9-7 Exporting a Master Encryption Key from a PDB
ADMINISTER KEY MANAGEMENT EXPORT ENCRYPTION KEYS
WITH SECRET "my_secret" TO '/tmp/export.p12'
FORCE KEYSTORE
IDENTIFIED BY password;
9.2.7.4 Example: Importing a Master Encryption Key into a PDB in Isolated Mode
The ADMINISTER KEY MANAGEMENT IMPORT ENCRYPTION KEYS
statement can import a master encryption key into a PDB.
Example 9-8 shows how to import a master encryption key into the PDB hrpdb
.
Example 9-8 Importing a Master Encryption Key into a PDB
ADMINISTER KEY MANAGEMENT IMPORT ENCRYPTION KEYS
WITH SECRET "my_secret"
FROM '/tmp/export.p12'
FORCE KEYSTORE
IDENTIFIED BY password
WITH BACKUP;