I've been reading the little documentation Elastic provides, but it is just about how to operate it. And I don't really understand the fundamentals of it.
- You initialise the keystore with a password:
bin/elasticsearch-keystore passwd - You add a key-value to it
bin/elasticsearch-keystore add mySecret(prompts for secret) - You refer to the key inside elasticsearch.yml i.e.
${mySecret} - Start Elasticsearch, and the value is magically extracted and replaced from the keystore.
My doubt is: how does Elasticsearch get the password to decrypt the keystore and use the values in the configuration file? Or is the keystore password stored somewhere?
If yes, where? In this case I don't see the benefit of using keystore at all?