Set elasticsearch credentials with plugin


Is there any way that I can pass elasticsearch credentials to environment-config.yaml file with @Bean or plugin.

I reviewed docs about plugins(Optimize plugin system | Camunda Platform 8 Docs).

I didn’t see custom beans like Camunda Run. Optimize has several plugins like “Engine Rest Filter” or “Elasticsearch Header”.

In summary, I want to set credentials while Optimize starting up. Is this possible?

Hi @Mert_Mahanoglu,
All the available plugins are listed in the docs you’ve linked to there, we dont have anything specifically for setting ES credentials, just the one to set custom headers for ES requests.
Other than setting your credentials in the config file you can also opt to use the environment variables CAMUNDA_OPTIMIZE_ELASTICSEARCH_SECURITY_USERNAME and CAMUNDA_OPTIMIZE_ELASTICSEARCH_SECURITY_PASSWORD to set credentials for basic auth.

1 Like

Hi @Helene,

After defining environment variables and set in the environment-config.yaml file, Optimize started successfully.

Anyone looking at how to implement environment variables in the config file can define it as follows

Thank you for your answer and that was what I’m looking. I’m grateful for that.