Kibana password encapsulation

Hi Team,
Is there a way we can use environment variables for username/password in logstash.conf and kibana.yml? please let me know how.

I tried profile values but it's not working (kibana.yml):

1:
elasticsearch.username: $kibanauser
elasticsearch.password: $kibanapwd

2:
elasticsearch.username: "$kibanauser"
elasticsearch.password: "$kibanapwd"

For plain text it's working fine.

Thanks & Regards,

also tried:

elasticsearch.username: ${kibanauser}
elasticsearch.password: ${kibanapwd}