Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 


Oracle Wallet Secure external password file

Oracle Database Tips by Donald BurlesonApril 15, 2015


Question:  I want to secure an external UNIX password file on my Oracle server for a batch job executing a shell script from a crontab.  What are the options for locking-down an external password file in Oracle?  Can Oracle wallet lock down a file?

Answer:  You can use UNIX permissions to secure any file with the "740" permission, and you can also use the Oracle wallet in 10g release 2 and beyond.

Step 1:  Update the sqlnet.ora file for Oracle wallet to point to a directory for secure files:

WALLET_LOCATION =
(SOURCE =
   (METHOD = FILE)
      (METHOD_DATA =

          (DIRECTORY = u01/app/oracle/secure)
   )
)


SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0

Step 2: Issue the mkstore command to password protect the secure file directory:

oracle>  mkstore -wrl "u01/app/oracle/secure" -create

Enter password:

Enter password again:

Step 3:  Add the wallet password credentials (alias, user ID, password) to the wallet with the mkstore command and the -createCredential option: 

oracle>  mkstore -wrl "u01/app/oracle/secure" -createCredential mydb11g myuser mypass

Enter password:

In this example, we pass the user ID of myuser and the password mypass

In this case, our wallet  alias will be called mydb11g, such that we would connect using select from customer@mydb11g_test, just as-if it was a database link.

Step 4:  Add your mydb11g alias to your tnsnanems.ora file

   mydb11g_test =
      (DESCRIPTION =
        (SDU=4202)
         (TDU=4202)
         (ADDRESS =
            (PROTOCOL = TCP)
            (HOST = fu.bar)
            (PORT = 1521)
         )
         (CONNECT_DATA = (server=dedicated) (service_name = mydb11g.world))
      )

Step 5: Test the secure connection.  In this case, specifying the mydb11g TNS alias signs us on using the myuser ID and supplies the hidden wallet password of mypass:

oracle>sqlplus /@mydb11g_test

connected.

SQL> show user

USER is "MYUSER"

Here we see that using our TNS mydb11g alias automatically sign us on with the myuser user ID and supplies the password from the secure wallet file.


Alternatively, you can connect using Java with a JDBC OCI command like this:

Connection conn = DriverManager.getConnection ("jdbc:oracle:oci:/@mydb11g_test");

To override external authentication, such as Windows native authentication or Secure Sockets Layer (SSL), in the client sqlnet.ora file:

SQLNET.WALLET_OVERRIDE = TRUE

Managing External Password Store Credentials

To list the contents of the external password store:

mkstore -wrl <wallet_location> -listCredential

To add database login credentials to an existing client wallet:

mkstore -wrl <wallet_location> -
createCredential <db_alias> <username>
<password>

To modify database login credentials in a wallet:

mkstore -wrl <wallet_location> -
modifyCredential <dbase_alias> <username>
<password>

To delete database login credentials from a wallet:

mkstore -wrl <wallet_location> -
deleteCredential <db_alias>

 

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster