Java REST Client Auth Security

(delly) #1


Reading below link to implement Basic Authentication for my application to integrate with ElasticSearch

But, how to secure my password? I could not put my password in cleartext in the Java code.

new UsernamePasswordCredentials("user", "password"));

any help is appreciated.

(Tim Vernum) #2

That is entirely up to you. How do you secure your passwords for other data sources?

You could read it from a file, read it from the classpath, access a secret store. Those are all possible here.

(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.