How To Generate A New Master Encryption Key for the TDE_445147.1
How To Generate A New Master Encryption Key for the TDE (Doc ID 445147.1)
In this Document
Applies to:Advanced Networking Option - Version 10.2.0.3 to 11.2.0.2 [Release 10.2 to 11.2]Advanced Networking Option - Version 11.2.0.4 to 11.2.0.4 [Release 11.2] Information in this document applies to any platform. Checked for relevance on 12-Jun-2013 GoalIn order to get the data inserted as encrypted into a table Oracle uses a table encryption key which is unique for each table of the database. All the table encryption keys are encrypted using a master key and stored within the data dictionary. The master key is stored outside of the database into a wallet. The wallet can be either a file or a Hardware Security Module (HSM) . Sometimes when the master key has been compromised it is needed to generate a new master key. SolutionThe statements used to generate a new master key are : alter system set encryption key identified by "oracle1"; -- when using a file alter system set encryption key identified by usr:passwd; -- when using HSM(this is not available in 10gR2)
To check whether a new master key was generated dump the contents of the wallet before and after the operation:
[oracle@seclin4 wallet]$ orapki wallet display -wallet .-pwd welcome1
Oracle PKI Tool : Version 11.2.0.2.0 - Production Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. Requested Certificates: Subject: CN=oracle User Certificates: Oracle Secret Store entries: ORACLE.SECURITY.DB.ENCRYPTION.AV8kySrjGU/rv4vxZLV9/kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ORACLE.SECURITY.DB.ENCRYPTION.AXUWrqkVHU9LvysE2PqARpwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ORACLE.SECURITY.DB.ENCRYPTION.MASTERKEY ORACLE.SECURITY.TS.ENCRYPTION.BTJ9EEoIi7O8MokUyaU1SmMCAwAAAAAAAAAAAAAAAAAAAAAAAAAA Trusted Certificates: [oracle@seclin4 wallet]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Wed Feb 22 15:02:48 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining and Real Application Testing options SQL> alter system set encryption key identified by "welcome1"; System altered. SQL> ! orapki wallet display -wallet . -pwd welcome1 Oracle PKI Tool : Version 11.2.0.2.0 - Production Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. Requested Certificates: Subject: CN=oracle User Certificates: Oracle Secret Store entries: ORACLE.SECURITY.DB.ENCRYPTION.AV8kySrjGU/rv4vxZLV9/kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ORACLE.SECURITY.DB.ENCRYPTION.AVdps8EplE9Svy/okCRsTNMAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ORACLE.SECURITY.DB.ENCRYPTION.AXUWrqkVHU9LvysE2PqARpwAAAAAAAAAAAAAAAAAAAAAAAAAAAAA --> This is the new Master Key ORACLE.SECURITY.DB.ENCRYPTION.MASTERKEY ORACLE.SECURITY.TS.ENCRYPTION.BTJ9EEoIi7O8MokUyaU1SmMCAwAAAAAAAAAAAAAAAAAAAAAAAAAA Trusted Certificates:
When changing the master key it is recommended to : 1) Backup the database and the wallet file 2) Use the correct wallet password in the IDENTIFIED BY clause:
SQL> alter system set wallet open identified by "oracle1";
System altered. SQL> alter system set encryption key identified by "oracle1234"; alter system set encryption key identified by "oracle1234" * ERROR at line 1: ORA-28353: failed to open wallet SQL> alter system set wallet open identified by "oracle1"; System altered.
3) Check the permissions of the wallet file. The owner of the Oracle binaries should be able to write the file. If the wallet is not accessible while changing the master key then the encrypted data may be lost.
Observations: 1) Do not use the same wallet for several databases. Try to configure the system so that each database will use it's own wallet. If the master keys are stored within a wallet file then running the above statement several times will increase the size of the ewallet.p12 file. On average every 100 master keys are consuming 26KB. Up to 10.2.0.3 the wallet file size is limited to 65KB. Any attempt to regenerate the master key after this limit has been passed will end up with the following error :
alter system set encryption key identified by "welcome1"
* ERROR at line 1: ORA-00600: internal error code, arguments: [ztsmstore failed], [18446744073709550614], [], [], [], [], [], []
SQL> alter system set encryption key identified by "welcome1"; System altered. SQL> ! ls -ltr total 16 -rw-r--r-- 1 oracle oinstall 2365 Feb 22 15:11 ewallet.p12 -rw------- 1 oracle oinstall 2442 Feb 22 15:11 cwallet.sso SQL> alter system set encryption key identified by "welcome1"; System altered. SQL> ! ls -ltr total 16 -rw-r--r-- 1 oracle oinstall 2629 Feb 22 15:11 ewallet.p12 -rw------- 1 oracle oinstall 2706 Feb 22 15:11 cwallet.sso SQL>
ReferencesBUG:5985413 - ORA-00600[ZTSMSTORE FAILED] DURING CHANGE OF TDE MASTER KEYBUG:6161304 - FAILED TO OPEN WALLET WHEN TRYING TO REKEY THE MASTER KEY NOTE:317311.1 - Transparent Data Encryption (TDE) |
|
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1364370/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to generate HMAC-SHA1 in C#?MacC#
- Generate BKS File( Bouncy Castle KeyStore)AST
- How to Add a New Disk new partition in centos7CentOS
- How to find Master Node in Oracle RAC(zt)ASTOracle
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- How To Move The DB Audit Trails To A New TablespaceAI
- How to Brainstorm New IdeasAIORMIdea
- How to Configure a New Plant in SAP?
- Android uncovers master-key 漏洞分析AndroidAST
- unixODBC: How to Generate ODBC Driver Shared Library libsqora on Linux/UnixLinux
- Sublime: how to overwrite the Emmet plugin keyboard shortcutsPlugin
- SAP PP how to re-read master data for process order?AST
- ASM 11g New Features - How ASM Disk Resync WorksASM
- how to generate an analog output from a in-built pwm of Atmega 32AVR microcontrloller?UIVR
- Generating a new SSH key and adding it to the SSH-agent
- How To Move Datafiles On AIX Using Raw Logical Volumes To A New Location?AI
- How to change Volume Licence Key for Windows XP and 2003Windows
- Password is required when adding a database to AG group if the database has a master keyUIDatabaseAST
- MySQL 5.7 InnoDB Tablespace EncryptionMySql
- MySQL Master/Slave Master/MasterMySqlAST
- Api32 keygen: learn how to use RSA (4千字)API
- How To Restore 12cR1DB to New Host File System using RMAN(一)REST
- plsql generate xml functionSQLXMLFunction
- OGG How to handle / replicate tables with no (without) primary key (PK) or unique index (UI) (UPI) [IndexUI
- ACFS Security & Encryption特性使用須知
- Oracle Transparent Data Encryption 透明加密(一)Oracle加密
- Oracle Transparent Data Encryption 透明加密(二)Oracle加密
- 22. Generate Parentheses (recursion algorithm)Go
- nuxt-generate 靜態站UX
- Leetcode 22 Generate ParenthesesLeetCode
- Leetcode-Generate ParenthesesLeetCode
- Generate Parentheses leetcode javaLeetCodeJava
- Use the statspack to generate the accurate explain planAI
- Kafka security-Encryption and Authentication using SSLKafka
- ORA-28348, encryption column TDE, function indexFunctionIndex
- ! [rejected] master -> master (fetch first)AST
- Mysql5.6 Master+MasterMySqlAST
- New start new hope!