Oracle Transparent Data Encryption
Oracle Transparent Data Encryption
Need for secure information Automatic encryption of sensitive information : ex) , , o Embedded in the Oracle database o No need to change application logic o Encrypts data and index values Using an encryption key o Master key for the entire database o Stored in Oracle Wallet master key : + (oracle )
Master Key Setting SQL> alter system set encryption key identified by "welcome1";
Wallet
Backup the wallet [oracle@edrsr4p1 ~]$ cat $ORACLE_HOME/network/admin/sqlnet.ora # sqlnet.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools.
[oracle@edrsr4p1 ~]$ ls /u01/app/oracle/product/10.2.0/db_1/ewallet.p12 /u01/app/oracle/product/10.2.0/db_1/ewallet.p12 [oracle@edrsr4p1 ~]$ cp /u01/app/oracle/product/10.2.0/db_1/ewallet.p12 ./ [oracle@edrsr4p1 ~]$ [oracle@edrsr4p1 ~]$ rman target /
Starting backup at 23-AUG-09 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=136 devtype=DISK channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_3trzflmk_.dbf channel ORA_DISK_1: starting piece 1 at 23-AUG-09
channel ORA_DISK_1: finished piece 1 at 23-AUG-09 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_08_23/o1_mf_nnndf_TAG2009 0823T155611_591t0d36_.bkp tag=TAG20090823T155611 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 23-AUG-09
new RMAN configuration parameters: CONFIGURE ENCRYPTION FOR DATABASE ON; new RMAN configuration parameters are successfully stored
Starting backup at 23-AUG-09 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_3trzflmk_.dbf channel ORA_DISK_1: starting piece 1 at 23-AUG-09 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of backup command on ORA_DISK_1 channel at 08/23/2009 15:56:28 ORA-19914: unable to encrypt backup ORA-28365: wallet is not open
S SYS> alter system set encryption key identified by "welcome1"; => Wallet
System altered.
using target database control file instead of recovery catalog old RMAN configuration parameters: CONFIGURE ENCRYPTION FOR DATABASE ON; new RMAN configuration parameters: CONFIGURE ENCRYPTION FOR DATABASE ON; new RMAN configuration parameters are successfully stored
Starting backup at 23-AUG-09 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=135 devtype=DISK channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_3trzflmk_.dbf channel ORA_DISK_1: starting piece 1 at 23-AUG-09 channel ORA_DISK_1: finished piece 1 at 23-AUG-09 piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_08_23/o1_mf_nnndf_TAG2009 0823T155702_591t1yvl_.bkp tag=TAG20090823T155702 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 23-AUG-09
Existing Tables and TDE Add encrypted columns o ALTER TABLE emp ADD (ssn VARCHAR2(11) ENCYPT); Encrupt unencrypted columns o ALTER TABLE emp MODIFY (first_name ENCRYPT); Disable column encryption o ALTER TABLE emp MODIFY (first_name DECRYPT); Add or remove salt o ALTER TABLE emp MODIFY (first_name ENCRYPT [NO] SALT); Change keys and the encryption algorithm o ALTER TABLE emp REKEY USING '3DES168';