2

Followed the below configuration https://opendistro.github.io/for-elasticsearch-docs/docs/install/docker/

We are able to run the docker-compose without any issues. Trying to overrite the default credentials(admin/admin) to opendistro for elasticsearch and kibana using env parameters in docker-compose.

Is there a way to run with our own credentials instead of default credentials

klee
  • 1,554
  • 2
  • 19
  • 31

1 Answers1

0

If you want to have your own default credentials as soon as you deploy elasticsearch in docker:

The changes for default master credentials are present in the opendistro security plugin, so you will have to make changes in the plugin, build the artefact and deploy it in your docker environment.

The changes will be in internal_users.yml, where you can replace admin user with your own user, and the hashed password needs to be generated and replaced with the default hashed password.

To generate hash, one way would be to use the inbuilt /usr/share/elasticsearch/plugins/opendistro_security/tools/hash.sh script present in the plugin.

To use your own plugin artefact in a docker elasticsearch environment, you can refer this documentation: https://github.com/opendistro-for-elasticsearch/opendistro-build/tree/main/elasticsearch#build-a-docker-image-with-local-artifacts

Dhiresh Jain
  • 464
  • 5
  • 15