Lompat ke konten Lompat ke sidebar Lompat ke footer

Configuring Transparent Data Encryption (TDE) in Oracle Database 19c

Data security is a non-negotiable requirement for enterprise applications. To protect sensitive information from unauthorized operating system access or physical theft of storage media, Oracle provides Transparent Data Encryption (TDE). Available as part of the Oracle Advanced Security option, TDE encrypts data at rest without requiring any changes to your application's source code.

This guide provides a professional walkthrough for configuring TDE in Oracle Database 19c to secure your data at the tablespace level.

1. Understanding the Keystore Architecture

TDE relies on a two-tiered key architecture. The data itself is encrypted using a Data Encryption Key (DEK), which is subsequently encrypted by a Master Encryption Key (MEK). The MEK is stored externally in a highly secure container known as a Keystore (formerly referred to as an Oracle Wallet).

Before implementing TDE, you must establish this Keystore directory structure on your database server to ensure the cryptographic keys are physically isolated from the data files.

2. Configuration Prerequisites

Before executing the encryption commands, ensure your server environment is properly prepared:

  • Verify that your organization possesses the appropriate Oracle Advanced Security licensing.

  • Ensure your database user has administrative privileges (specifically SYSKM or SYSDBA).

  • Create a physical directory on your operating system to host the Keystore (e.g., /u01/app/oracle/admin/orcl/wallet).

3. Step-by-Step Initialization

Follow these sequential steps to initialize the Keystore and generate your master key.

Step 1: Define the Keystore Location You must configure the sqlnet.ora network file to point to your physical directory. Add the following entry:

ENCRYPTION_WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /u01/app/oracle/admin/orcl/wallet)))

Step 2: Create the Software Keystore Log in to the database instance via SQL*Plus and create the Keystore utilizing a strong, compliant password.

SQL
ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/app/oracle/admin/orcl/wallet' IDENTIFIED BY "StrongPassword123!";

Step 3: Open the Keystore The Keystore must be explicitly opened into the instance memory before a key can be generated or utilized.

SQL
ADMINISTER KEY MANAGEMENT SET KEYSTORE OPEN IDENTIFIED BY "StrongPassword123!";

Step 4: Set the Master Encryption Key Generate the MEK. This crucial step initializes the encryption engine for the database.

SQL
ADMINISTER KEY MANAGEMENT SET KEY IDENTIFIED BY "StrongPassword123!" WITH BACKUP;

4. Encrypting a Tablespace

Once the MEK is active and the Keystore is open, you can create a fully encrypted tablespace. All tables and indexes created within this specific tablespace will automatically inherit the encryption.

SQL
CREATE TABLESPACE secure_data 
DATAFILE '/u01/app/oracle/oradata/orcl/secure01.dbf' SIZE 500M 
ENCRYPTION USING 'AES256' DEFAULT STORAGE (ENCRYPT);

By implementing TDE, database administrators can effectively comply with global security regulations like GDPR and PCI-DSS, ensuring that underlying database files remain completely unreadable if intercepted by unauthorized entities.

Posting Komentar untuk "Configuring Transparent Data Encryption (TDE) in Oracle Database 19c"