Logstash keystore password access issue

security

(Sachin) #1

Hi ,

I was using below code to check the Logstash/elasticsearch node status

ElasticResponse() {
wget -S --no-check-certificate --spider --user {USER} --password {PASSWORD} https://${LOGSTASH_HOST} 2>&1 | tee -a $LOGFILE
cat LOGFILE |grep 'HTTP/1.0 200 OK' if [ ? == 0 ]; then
echo "date $SCRIPTNAME Connected to the elastic server" | tee -a $LOGFILE
else
return_code=10;
echo "date $SCRIPTNAME Elastic server is not working response code($return_code)" | tee -a $LOGFILE
exit $return_code
fi
}

Now with the latest upgrade 6.3.2 , I have added USER and PASSWORD to keystore ,
But Iam not able to access it in .ksh file (above code), where its accessible for .conf file

input {
elasticsearch {
hosts => ["LOGSTASH_HOST"]
user => "{USER}" password => "{PASSWORD}"
ssl => true
}

how can I access keystore password in my .ksh file or on unix machine ?