aimtiaz11 / oracle-jdbc-tester

A simple command line Java application to test JDBC connection to Oracle database
50 stars 44 forks source link

password handling #2

Closed torstenwerner closed 4 years ago

torstenwerner commented 5 years ago

Hi, nice tool. Could you mask the password in the output, please? It would be even greater, if the tool asks for the password without showing it – instead of having the password as a command line argument.

aimtiaz11 commented 4 years ago

Hi @torstenwerner , one approach would be to use read command in linux to store DB username and password into a variable and then using it as normal.

read DBUSER
read DBPASS
java -jar target/jdbc-tester-1.0.jar $DBUSER $DBPASS jdbc:oracle:thin:@//<host>:<port>/<SID>

Maybe I'll update the readme.md about this.

Making the tool ask for password might make it less usable. Eg. someone wants to run automate JDBC connectivity testing as part of some health check monitoring.