How to Create Oracle Wallets – Oracle 12cR2
PURPOSE: All
documents are provided on this Blog just for educational purposes only. Please make sure that you run it in your test
environment before to move on to production environment.
Based of Security
concern you do not want to keep the password in file.
1. Create
directory where you want to keep the wallet
mkdir
–p /u01/product/admin/wallets
Enter
the directory detail in the sqlnet.ora
vi sqlnet.ora
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY =
/u01/product/admin/wallets)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
2. Create credentials
and wallet
$ mkstore
-wrl /u01/product/admin/wallets -create
Oracle Secret
Store Tool : Version 12.2.0.1.0
Copyright (c)
2004, 2016, Oracle and/or its affiliates. All rights reserved.
Enter
password:
Enter
password again:
$ mkstore
-wrl /u01/product/admin/wallets -createCredential KARDBTST01 walletTst
Oracle Secret
Store Tool : Version 12.2.0.1.0
Copyright (c)
2004, 2016, Oracle and/or its affiliates. All rights reserved.
Your
secret/Password is missing in the command line
Enter your
secret/Password:
Re-enter your
secret/Password:
Enter wallet
password:
mkstore -wrl /u01/product/admin/wallets -listCredential
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.
Enter wallet password:
List credential (index: connect_string username)
1: KARDBTST01 walletTst
Check the directory
and created files.
cd /u01/product/admin/wallets
-rw------- 1 oracle dba 589 Mar 3 12:00 cwallet.sso
-rw------- 1 oracle dba 0 Mar
3 11:56 cwallet.sso.lck
-rw------- 1 oracle dba 544 Mar 3 12:00 ewallet.p12
-rw------- 1 oracle dba 0 Mar
3 11:56 ewallet.p12.lck
Do not worry about, if you need to reset the password of the user. You can modify the wallet credential as follow.
mkstore -wrl /u01/product/admin/wallets -modifyCredential KARDBTST01
walletTst
Oracle Secret Store Tool : Version 12.2.0.1.0
Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights
reserved.
Your secret/Password is missing in the command line
Enter your secret/Password:
Re-enter your secret/Password:
Enter wallet password:
To delete database login credentials from a wallet:
mkstore -wrl <wallet_location> -deleteCredential
<db_alias>
You can use wallet
command line orapki to view the detail.
orapki wallet display -wallet .
NOTE:
If your JDBC
connection string looks like jdbc:oracle:thin:/@kardbtst.th.com:1521/KARDBTST01
You must use the
command as follow.
mkstore -wlr /foopath
-createCredential kardbtst.th.com:1521/KARDBTST01 USER PASSWORD
No comments:
Post a Comment