Specify password hash instead of clear password in Oracle JDBC client
I'm using Oracle JDBC driver in my Java app to reach Oracle DB. Creating the connection using code:
DriverManager.getConnection( "jdbc:oracle:thin:@myserver:port:mySID", "myuser", "mypassword");
requires the real password. Is there a way to specify the password hash instead such as:
DriverManager.getConnection( "jdbc:oracle:thin:@myserver:port:mySID", "myuser", "mypasswordHash");
According to Does the Oracle JDBC client encrypt password when you make a connection? there is no need to use a hash when connecting. If you just want nobody to be able to read the password in plain text then have a look at Encrypt Password in Configuration Files? (Java).
Oracles approach closest to obfuscation seems to be wallets with "auto login": For a Java example see http://sysapp.wordpress.com/2010/08/31/how-to-oracle-wallet-with-jdbc-thin-driver-datasource-tomcat/. But this seems to require specific Oracle Admin actions: see How to Create a Complete Wallet (maybe your DBA knows more about it). For other options to connect without a password in the clear see JDBC Client-Side Security Features.