In Elastic cloud i have configured a Keystore setting named ES_PWD, its a single string containing a value of elastic:myelasticpassword.
I tried to use this in my beat configuration, cloud.auth: ${ES_PWD} but when i test the output config it fails, eg: winlogbeat.exe test output results in talk to server... ERROR 401 Unauthorized:
The keystore is just an alternative way of storing sensitive parameters that used to live in the YAML, with all the same restrictions
It doesn't provide any generic key-value storage capabilities (and even if it did, it wouldn't provide them to external services like beats)
I believe you have to store the cloud login details somewhere accessible to beats - it might be worth asking in the beats forum for best practices if you're worried about leaving creds lying around in plaintext?
PS C:\Program Files\winlogbeat> .\winlogbeat.exe keystore add ES_PWD --force
Created keystore
Enter value for ES_PWD:
Successfully updated the keystore
I've moved this to beats, since the folks that inhabit the cloud forum aren't necessarily experts in the ins and outs of beats config (eg I just learned about the beats keystore from this post - now I'm going to go start using it everywhere).
You could try setting cloud.id to be from the keystore as well, that way since the logs would contain the value and you could confirm whether it's hitting the keystore at all?
(I assume you've tried with cloud.auth pasted directly in and confirmed that works?)
I made two changes, firstly as you suggested I created a keystore value for CLOUD_ID, tested that with the clear text elastic user password and it worked.
Secondly i included the whole elastic:password in the ES_PWD keystore as well and now that also works!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.