Deep dive into various configurations with Oracle Weblogic Server

  • February 5, 2016

How to store database credentials in Oracle Wallet (for WLS datasource definitions)

Puneeth Prakash
Principal Software Engineer

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> 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.