store password in a cryptic form
Rakesh, January 20, 2004 - 11:21 pm UTC
Hi Tom
In a hurry to post the question , i deviated from what i wanted to ask.
Actually my question regarding encrypt password was how do we store the username & password in cryptic form in the application before connecting to the database.
Normally if we have the username & password in the java file it is there for any one to see who can view the .java file
or decompile .class file & view the username & passwrod hardcoded in the .java file.
Another way is to have teh username & password stored in a properties file
But anyone with access to the o/s where the application is running can view the properties file
Regards
Rakesh
January 21, 2004 - 6:24 am UTC
for that you would have to ask the java programmers for a "good" solution.
they will have to
a) pick the encryption class they want to use
b) figure out how the heck to do the key management (once the password is encrypted -- what do you do with the encryption key)
I know what he means
RP, December 16, 2005 - 12:30 pm UTC
Hi Tom,
i think you misunderstood what Rakesh is asking.
In Java, to establish the connection pool, the values for the database such as username and password are put in configuration files in clear text.
Rakesh is asking if there is a way round this. I looked at the JDBC guide and Chapter 10 talks about Oracle Wallet. That seems to be the answer but unfortunately, there are no examples of how you can use it in a java app.
Do you know how?
Thanks
RP
December 16, 2005 - 1:12 pm UTC
He seemed to be asking very straight forward "how can I store a password in say my code or a properties file encrypted"
You still have the problem with the wallet, somebody now has to provide the password to get to the wallet. It would not be different here.
A reader, March 30, 2006 - 1:45 am UTC
Password encryption in JDBC config file
John, February 03, 2023 - 7:55 am UTC
Hi,
The original question on this thread was posted in 2004. I have the exact same question in 2023 but DB is on Oracle 19c (19.11).
I have this request from Developer.
Currently, on client side, in JDBC config/property file, DB related password is stored in plain text. Application side they are using Apache web server. They want to keep the password in encrypted format for security reasons.
Question -
1. Is it something DBA needs to do anything on DB side for them to keep DB password encrypted Or its for Java developer to figure out on Java side for any feature ?
2. Does implementing database stored procedure using dbms_obfuscation_toolkit will help here in any ways in current version of oracle (19.11). Does storing username/encrypted password in a table and compare... Is this right API to approach it ?
Thank you!