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.
Parent topic: Using Transparent Data Encryption
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 software keystore when the PDB is in isolated mode. - Backing Up a Password-Protected Software Keystore in Isolated Mode
TheBACKUP KEYSTORE
clause of theADMINISTER KEY MANAGEMENT
statement backs up a password-protected software keystore. - Merging Software Keystores in Isolated Mode
In isolated mode, you can merge software keystores. - 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 keystore from an existing software password keystore. - 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 software keystores 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
Changing the Keystore Password in Isolated Mode
You can change the password of a software keystore 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 Software Keystore Password in Isolated Mode
To change the password of a password-protected software keystore 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.
Changing the Password-Protected Software Keystore Password in Isolated Mode
To change the password of a password-protected software keystore in isolated mode, you must use the ADMINISTER KEY MANAGEMENT
statement.
BACKUP
clause, and thus forced to make a backup of the current keystore. 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
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
Backing Up a Password-Protected Software Keystore in Isolated Mode
The BACKUP KEYSTORE
clause of the ADMINISTER KEY MANAGEMENT
statement backs up a password-protected software keystore.
Related Topics
Merging Software Keystores in Isolated Mode
In isolated mode, you can merge software keystores.
- Merging One Software Keystore into an Existing Software Keystore in Isolated Mode
In isolated mode, you can use theADMINISTER KEY MANAGEMENT
statement with theMERGE KEYSTORE
clause to merge one software keystore into another existing software keystore. - Merging Two Software Keystores into a Third New Keystore in Isolated Mode
In isolated mode, you can merge two software keystores into a third new keystore, so that the two existing keystores are not changed and the new keystore contains the keys of both source keystores.
Merging One Software Keystore into an Existing Software Keystore in Isolated Mode
In isolated mode, you can use the ADMINISTER KEY MANAGEMENT
statement with the MERGE KEYSTORE
clause to merge one software keystore into another existing software keystore.
keystore2
) remains a password-protected keystore after the keystore merge operation.
Related Topics
Parent topic: Merging Software Keystores in Isolated Mode
Merging Two Software Keystores into a Third New Keystore in Isolated Mode
In isolated mode, you can merge two software keystores into a third new keystore, so that the two existing keystores are not changed and the new keystore contains the keys of both source keystores.
Related Topics
Parent topic: Merging Software Keystores in Isolated Mode
Closing Keystores in Isolated Mode
You can close both software and external keystores in isolated mode, unless the system tablespace is encrypted.
- Closing a Software Keystore in Isolated Mode
You can close password-protected keystores, auto-login keystores, and local auto-login software keystores 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.
Closing a Software Keystore in Isolated Mode
You can close password-protected keystores, auto-login keystores, and local auto-login software keystores in isolated mode.
Related Topics
Parent topic: Closing Keystores in Isolated Mode
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
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.
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 use ADMINISTER KEY MANAGEMENT
with the USE KEY
clause.
Related Topics
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
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 keystore from an existing software password keystore.
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
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.
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.
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 can store secrets that support internal Oracle Database features and integrate external clients such as Oracle GoldenGate. - Storing Oracle Database Secrets in a Software 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 HSM Password to a Software Keystore
TheADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an HSM password to a software keystore. - Example: Changing an HSM Password Stored as a Secret in a Software Keystore
TheADMINISTER KEY MANAGEMENT UPDATE SECRET
statement can change an HSM password that is stored as a secret in a software keystore. - Example: Deleting an HSM Password Stored as a Secret in a Software Keystore
TheADMINISTER KEY MANAGEMENT DELETE SECRET
statement can delete HSM passwords that are stored as secrets in a software keystore. - 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.
About Storing Oracle Database Secrets in a Keystore in Isolated Mode
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 software keystore stores the shared secrets.
Depending on your site's requirements, you may require automated open keystore operations even when a hardware security module is configured. For this reason, the hardware security module password can be stored in a software auto-login keystore, which enables the auto-login capability for the hardware security module. The Oracle Database side can also store the credentials for the database to log in to an external storage server in the software keystore.
You can store Oracle Database secrets in both software keystores and external keystores:
-
Software keystores: You can store secrets in software password-based, auto-login, and local auto-login software keystores. If you want to store secrets in an auto-login (or auto-login local) keystore, then note the following:
-
If the software auto-login keystore is in the same location as its corresponding password-based software keystore, then the secrets are added automatically.
-
If the software auto-login keystore is in a different location from its corresponding password-based software keystore, then you must create the auto-login keystore again from the password-based keystore, and keep the two keystores in synchronization.
-
-
External keystores: You can store secrets in standard hardware security modules.
Related Topics
Parent topic: Storing Oracle Database Secrets in Isolated Mode
Storing Oracle Database Secrets in a Software 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
Example: Adding an HSM Password to a Software Keystore
The ADMINISTER KEY MANAGEMENT ADD SECRET
statement can add an HSM password to a software keystore.
Example 9-1 shows how to add an Oracle Key Vault hardware security module (HSM) password as a secret to a software keystore.
Example 9-1 Adding an Oracle Database Secret to a Software Keystore
ADMINISTER KEY MANAGEMENT ADD SECRET 'psmith:password' FOR CLIENT 'OKV_PASSWORD' USING TAG 'HSM credentials' FORCE KEYSTORE IDENTIFIED BY password WITH BACKUP;
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 'psmith:password' FOR CLIENT 'OKV_PASSWORD'
USING TAG 'HSM credentials' FORCE KEYSTORE
IDENTIFIED BY EXTERNAL STORE WITH BACKUP;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
Example: Changing an HSM Password Stored as a Secret in a Software Keystore
The ADMINISTER KEY MANAGEMENT UPDATE SECRET
statement can change an HSM password that is stored as a secret in a software keystore.
Example 9-2 shows how to change an HSM password that is stored as a secret in a software keystore.
Example 9-2 Changing an Oracle Database Secret to a Software Keystore
ADMINISTER KEY MANAGEMENT UPDATE SECRET admin_password FOR CLIENT 'admin@myhost' USING TAG 'new_host_credentials' FORCE KEYSTORE IDENTIFIED BY software_keytore_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
Example: Deleting an HSM Password Stored as a Secret in a Software Keystore
The ADMINISTER KEY MANAGEMENT DELETE SECRET
statement can delete HSM passwords that are stored as secrets in a software keystore.
Example 9-3 shows how to delete a third-party HSM password that is stored as a secret in the software keystore.
Example 9-3 Deleting an Oracle Database Secret in a Software Keystore
ADMINISTER KEY MANAGEMENT
DELETE SECRET FOR CLIENT 'HSM_PASSWORD'
FORCE KEYSTORE
IDENTIFIED BY password WITH BACKUP;
In this version, the password for the keystore is in an external store:
ADMINISTER KEY MANAGEMENT DELETE SECRET FOR CLIENT 'HSM_PASSWORD' FORCE KEYSTORE IDENTIFIED BY EXTERNAL STORE WITH BACKUP;
Parent topic: Storing Oracle Database Secrets in Isolated Mode
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
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 "psmith: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
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 "psmith: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
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 a hardware security module 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 "psmith: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
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 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.
About Storing Oracle GoldenGate Secrets in Keystores in Isolated Mode
You can use a 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 software keystore or the HSM 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.
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.
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.
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
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
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
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
Migrating Keystores in Isolated Mode
You can perform migration and reverse migration operations between software keystores and external keystores in isolated mode.
- Migrating from a Password-Protected Software Keystore to an External Keystore in Isolated Mode
In isolated mode, you can migrate from a password-protected software keystore to an external keystore. - Migrating from an External Keystore to a Password-Protected Software Keystore in Isolated Mode
In isolated mode, you can migrate from an external keystore to a password-protected software keystore.
Migrating from a Password-Protected Software Keystore to an External Keystore in Isolated Mode
In isolated mode, you can migrate from a password-protected software keystore to an external keystore.
Migrating from an External Keystore to a Password-Protected Software Keystore in Isolated Mode
In isolated mode, you can migrate from an external keystore to a password-protected software keystore.
HSM_PASSWORD
client secret into it. For example: ADMINISTER KEY MANAGEMENT ADD SECRET 'user_name:password' FOR CLIENT 'HSM_PASSWORD' TO LOCAL AUTO_LOGIN KEYSTORE software_keystore_location WITH BACKUP;
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, execute the following statement:
ALTER SYSTEM RESET TDE_CONFIGURATION;
Related Topics
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.
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 execute 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
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.
Parent topic: Creating a Keystore When the PDB Is Closed
Administering Transparent Data Encryption in Isolated Mode
You can perform a number of general administrative tasks with Transparent Data Encryption in isolated mode.
- Moving PDBs from One CDB to Another in Isolated Mode
In isolated mode, you can automatically move a PDB from one CDB to another (for example, for load balancing or adding new functionality). - 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. - Performing a Remote Clone of PDB with Encrypted Data Between Two CDBs in Isolated Mode
TheCREATE PLUGGABLE DATABASE
statement with theKEYSTORE IDENTIFIED BY
clause can remotely clone a PDB that has encrypted data. - Relocating Across CDBs a Cloned PDB with Encrypted Data 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 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
Moving PDBs from One CDB to Another in Isolated Mode
In isolated mode, you can automatically move a PDB from one CDB to another (for example, for load balancing or adding new functionality).
ONE_STEP_PLUGIN_FOR_PDB_WITH_TDE
dynamic system parameter to TRUE
to enable the PDB to include the TDE keys in the PDB move operation. This setting enables cloning or relocating PDBs across container databases (when the source PDB is Oracle Database release 12.2.0.1 or later). This parameter avoids you having to manually provide a keystore password when you import the TDE keys into the PDB after it has moved to a different CDB. When ONE_STEP_PLUGIN_FOR_PDB_WITH_TDE
is set to TRUE
, the database caches the keystore password in memory, obfuscated at the system level, and then uses it for the import operation. The default for ONE_STEP_PLUGIN_FOR_PDB_WITH_TDE
is FALSE
.
If you are trying to move a non-CDB or 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 non-CDB or 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
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.
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.
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';
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
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.
Performing a Remote Clone of PDB with Encrypted Data Between Two CDBs 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
Relocating Across CDBs a Cloned PDB with Encrypted Data 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
How Keystore Open and Close Operations Work in Isolated Mode
You should be aware of how keystore open and close operations work in isolated mode.
For each PDB in isolated mode, you must explicitly open the password-protected software keystore or external keystore in the PDB to enable the Transparent Data Encryption operations to proceed. (Auto-login and local auto-login software keystores 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 keystore is in use, or if the keystore is closed, then include the
FORCE KEYSTORE
clause in theADMINISTER KEY MANAGEMENT
statement when you open the keystore. -
If the keystore is a password-protected software keystore 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 software keystores 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.
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.
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.
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.
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;
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;