<<Back to Oracle DB Security Main Page
How to Configure a Software Keystore
A software keystore is a container that stores the Transparent Data Encryption master encryption key.To configure a software Keystore follow the steps below.
Step 1: Set the Keystore Location in the sqlnet.ora File
You can store the software keystore (also known as wallet) in file system or in ASM Diskgroup. Does not matter where you want to store the keystore you have modify the sqlnet.ora and make an entry accordingly
Make an entry as shown below in $ORACLE_HOME/network/admin/sqlnet.ora file
Example1: If Storing the Wallet in ASM
ENCRYPTION_WALLET_LOCATION=
(SOURCE=(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=+DG_TST_DATA/$ORACLE_SID/wallet)
)
)
Example2: If Storing the Wallet in File System
(SOURCE=(METHOD=FILE)
(METHOD_DATA=
(DIRECTORY=/u01/dbatst1/admin/wallet/$ORACLE_SID)
)
)
NOTE: Ensure that the path you entered in DIRECTORY exists. If not create it
Step2: Create the Software KeyStore
There are three different types of software keystores. password-based,auto-login and local auto-login
You can read HERE about them in detail.
Creating the Password Based Software KeyStore
A> login as sysdba or as syskm$ sqlplus "/as sysdba"
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
B> The output below shows that there is no wallet present
SQL>set linesize 200
SQL>col WALLET_DIR for a32
SQL>col status for a21
SQL>select STATUS,WRL_PARAMETER WALLET_DIR,WALLET_TYPE from V$ENCRYPTION_WALLET;
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
NOT_AVAILABLE /u01/dbatst1/admin/wallet/TST1T/ UNKNOWN
C> Create the Wallet
SQL> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '/u01/dbatst1/admin/wallet/TST1T/' IDENTIFIED BY xxxx;
keystore altered.
D> Check the Wallet Status
SQL>select STATUS,WRL_PARAMETER WALLET_DIR,WALLET_TYPE from V$ENCRYPTION_WALLET;
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
CLOSED /u01/dbatst1/admin/wallet/TST1T/ UNKNOWN
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
CLOSED /u01/dbatst1/admin/wallet/TST1T/ UNKNOWN
$ ls -lrt /u01/dbatst1/admin/wallet/TST1T/
-rw------- 1 dbatst1 asmadmin 2408 Nov 20 16:03 ewallet.p12
-rw------- 1 dbatst1 asmadmin 2408 Nov 20 16:03 ewallet.p12
Creating the Auto Login Software KeyStore
Follow all the steps (from A to D) from Step2 and then step E as shown below
E> Create Auto Login Wallet from Password Based Wallet
SQL> ADMINISTER KEY MANAGEMENT CREATE AUTO_LOGIN KEYSTORE FROM KEYSTORE '/u01/dbatst1/admin/wallet/TST1T/' IDENTIFIED BY xxxx;
keystore altered.
F> Check The Wallet Status
SQL> select STATUS,WRL_PARAMETER WALLET_DIR,WALLET_TYPE from V$ENCRYPTION_WALLET;
F> Check The Wallet Status
SQL> select STATUS,WRL_PARAMETER WALLET_DIR,WALLET_TYPE from V$ENCRYPTION_WALLET;
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
OPEN_NO_MASTER_KEY /u01/dbatst1/admin/wallet/TST1T/ AUTOLOGIN
$ ls -lrt /u01/dbatst1/admin/wallet/TST1T/-rw------- 1 dbatst1 asmadmin 2408 Nov 20 16:03 ewallet.p12
-rw------- 1 dbatst1 asmadmin 2451 Nov 20 16:17 cwallet.sso
--------------------- -------------------------------- --------------------
OPEN_NO_MASTER_KEY /u01/dbatst1/admin/wallet/TST1T/ AUTOLOGIN
$ ls -lrt /u01/dbatst1/admin/wallet/TST1T/-rw------- 1 dbatst1 asmadmin 2408 Nov 20 16:03 ewallet.p12
-rw------- 1 dbatst1 asmadmin 2451 Nov 20 16:17 cwallet.sso
Creating the Local Auto Login Software KeyStore
Follow all the steps (from A to D) from Step2 and then step G as shown below
G> Create Local Auto Login Wallet from Password Based Wallet
SQL> ADMINISTER KEY MANAGEMENT CREATE LOCAL AUTO_LOGIN KEYSTORE FROM KEYSTORE '/u01/dbatst1/admin/wallet/TST1T/' IDENTIFIED BY xxxx;keystore altered.
H> Check The Wallet Status
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
OPEN_NO_MASTER_KEY /u01/dbatst1/admin/wallet/TST1T/ LOCAL_AUTOLOGIN
Step3: Open the Software KeyStore
A password-based software keystore must be manually opened before any TDE master encryption keys can be created or accessed in the keystore. You do not need to manually open auto-login or local auto-login software keystores These keystore are automatically opened when it is required.
Note: The auto-login or local auto-login software keystores are opened even as soon as you select from V$ENCRYPTION_WALLET view
A> Opening a Password Based Software Keystore
SQL> administer key management set keystore open identified by xxxx;
keystore altered.
SQL> select STATUS,WRL_PARAMETER WALLET_DIR,WALLET_TYPE from V$ENCRYPTION_WALLET;
STATUS WALLET_DIR WALLET_TYPE
--------------------- -------------------------------- --------------------
OPEN_NO_MASTER_KEY /u01/dbatst1/admin/wallet/TST1T/ PASSWORD
Step4: Set the Software TDE Master Encryption Key
For All PDBs in the CDB
SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxxx WITH BACKUP CONTAINER = ALL ;
keystore altered.
For a Specific PDB
SQL> ALTER SESSION SET CONTAINER=PDB01
SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxx WITH BACKUP USING 'tde_key_backup' CONTAINER = CURRENT ;
keystore altered.
FORCE KEYSTORE option enables the keystore operation if the auto-login keystore is in use, or the keystore is closed the option is available from version 12.2 if you are still at 12.1 and want to use this option apply the patch for BUG 22826718 (Doc ID 1944507.1)
- Once you have the KeyStore (wallet) you can store the master key for encrypting or decrypting the TDE table keys and tablespace encryption keys in this keystore.
- You can find if a keystore has no master key set or an unknown master key by querying the STATUS column of the V$ENCRYPTION_WALLET view.
- In a multitenant environment, you can create and manage the TDE master encryption key from either the root or the PDB
- You also can create TDE master encryption keys for use later on, and then manually activate them.
- To set the master encryption key password based wallet must be open. If the auto-login software keystore is open,then you must close it and open the password-based software keystore.
- If both the password-based keystore and auto-login keystores are present in the configured location and the password-based keystore is open, then the TDE master encryption key is automatically written to the auto-login keystore as well
Step5: Encrypt your Data
Once you are done with Wallet (KeyStore) and key setup starting encrypting the confidential tables and columns to keep your data protected
Related Posts
How to Encrypt Columns in Tables
Hello there! I could have sworn I've been to this site before but after browsing through some of the post I realized it's new to me. Anyways, I'm definitely happy I found it and I'll be bookmarking and checking back frequently! shipping container sizes and prices
ReplyDeleteweb methods online courses
ReplyDeletebusiness analyst online course
oracle adf online course
oracle rac online course
msbi online course
osb online training
Social Beat is a digital growth partner for hyperscaling startups & top brands - Google Premier Partner, Preferred Facebook Marketing Partner. By digital marketing company in IndiaThe Best digital marketing agency in India which not only offers SEO, PPC, SMM, Branding but also provides 360° online marketing.
ReplyDeleteFree Job Alert site is for Government,Sarkari Naukri,Banks,Railways,Police Recruitment, Results of IBPS,UPSC,SSC,RRB, Fresher IT Jobs and Walkins.
How can I contact a match? What can I do with a free membership? How do I cancel my Premium subscription? Getting started - Read more: Elite Singles Contact Information:
Qualified interior designers Gorakhpur has, will always ensure that the quality of work delivered is as per the expectations of their clients. Visit Now: Interior Designer in Gorakhpur, UP
Hi, I am John Smith I am Web Developer, It is an amazing blog thanks for the sharing the blog. Frantic infotech provide the ui /ux design android software such as an information about software development for costumer service. Franti infotech also provide the codeigniter web developer. The development of advanced web applications is Orient Software’s specialty and we will successfully fulfill all your web application development requirements, from small-sized to wider-ranged projects.
ReplyDeleteThanks For Sharing this Informative Blog. Here you will Get the Best Digital Marketing Agency in India and Select the Best services, Like - SEO Services, PPC Services, Google Ads, SMO Services, etc.
ReplyDeletePromote Abhi provide valuable & economical digital solutions for the customers in areas such as website designing, development & maintenance, graphic designing, digital marketing and mobile applications development. Promote Abhi provides best solutions for - website designing company delhi
ReplyDeleteProgressive Web Apps (PWAs) are a hybrid of a responsive website and a mobile application. They're mobile sites built with modern JavaScript frameworks and designed to function as if they were progressive native app. They can be added to the home screen of a mobile device via an icon. They, like apps, provide a full-screen experience to keep users engaged.
ReplyDelete