Question

I have a Java program which connects to an external service using a username/password. The password is currently encrypted but hard coded within the Java code itself. I would like to hide this password so that it is read from a location that is not visible. Does the java keystore API's provide this functionality ?

Reading the keystore doc http://docs.oracle.com/javase/tutorial/security/toolsign/index.html seems to be just associated with signing jar files ?

Please suggest if there are other api's which perform functionality I'm trying to implement.

Was it helpful?

Solution

If it's encrypted then just store it in a properties file.

At the end of the day if you store it locally then you store it locally, encryption is already the only thing you can do to really make it safe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top