Password secure way to use Spark JDBC
Hello,
Studying the documentation below I found a good example of how to use Spark with JDBC to connect to external databases.
https://spark.apache.org/docs/latest/sql-data-sources-jdbc.html
I already tested the example and it worked very well. However, when I looked carefully I saw that the password (its text) was being manipulated directly by the program. This way, from the tests I did, the password is open both in the Spark log and the connection, if it is intercepted on the network, the password will be open in open text.
I'm looking for a way to make this connection safely. One mechanism that comes to mind is the hadoop credential provider that I already used with good old sqoop. So in sqoop the password was protected and no visible in any form, even if the connection was intercepted.
Could anyone tell me what mechanisms I can use to make this connection securely, without exposing credentials? It can be a credential provider or something else.
I didn't find anything like that in the Spark documentation.

