I am using jdbc input to pull data from a Microsoft Azure SQL server. In my .conf file USERNAME and PASSWORD is in cleartext. Is there any way to hide those, encrypt them or another way to secure them?
This is an example of jdbc input to illustrate my point
input {
jdbc {
jdbc_driver_library => "C:/Elastic/logstash-6.4.2/plugin/sqljdbc_7.2/enu/mssql-jdbc-7.2.2.jre8.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string =>"jdbc:sqlserver://srvsqldb.database.windows.net:1433;database=IVsqlDB;user=USERNAME@srvsqldb;password={PASSWORD};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;"
jdbc_user => "USERNAME"
jdbc_password => "PASSWORD"
statement => "SELECT * FROM [dbo].[DimDate];"
}
}
filter {
}
output {
stdout { codec => rubydebug }
}
Why do I ask? My logstash is going to run on a PC outside my supervision, so others could gain access to the credential in the .conf file, and that is not secure.