Encrypted password

Is there a way to encrypt and store password in logstash config file

You're not saying which password you're talking about, but regardless I'm pretty sure the answer is no.

Thanks @magnusbaeck
Is there a way to avoid the hard coded password in logstash config file ?

You can ask the same question over and over but my answer will still be the same.