Original Publish date : 2/5/2016
Oracle Wallet can be used to securely store the database credentials. Multiple credentials for multiple database can be stored in a single wallet file.
Below are the steps to create a datasource which uses Oracle wallet to store database credentials :
Step 1 :
Create a wallet in a secured location :
Command :
$ORACLE_HOME/oracle_common/bin/mkstore -wrl <wallet_location> -create

Step 2:
Add database login credentials to the wallet
Command :
$ORACLE_HOME/oracle_common/bin/mkstore -wrl <wallet_location> -createCredential <db_connect_string> <username> <password>

Step 3 :
Create a new datasource as shown below :
This is how you used to create a datasource in WLS using a DB username / password :

Now you can specify a wallet in the datasource configuration (and avoid using DB username / password) :

“>NOTE the change in DB connection URL format :
It is changed from “jdbc:oracle:thin:@//xxxx:1521/sl11g” to “jdbc:oracle:thin:/@xxxx:1521/sl11g”
<Additional Info>
Command to list the credentials stored in a wallet :
$ORACLE_HOME/oracle_common/bin/mkstore -wrl <wallet_location> -listCredential
Command to modify credential stored in wallet :
$ORACLE_HOME/oracle_common/bin/mkstore -wrl <wallet_location> -modifyCredential <dbase_alias> <username> <password>
Command to delete credentials stored in a wallet :
$ORACLE_HOME/oracle_common/bin/mkstore -wrl <wallet_location> -deleteCredential <db_alias>
