We will use the basic-auth plugin for ElasticSearch by Asquera.
- Download the current version from https://github.com/Asquera/elasticsearch-http-basic/releases and copy it to plugins/http-basic within your instance
cd /usr/share/elasticsearch/plugins
mkdir http-basic
cd http-basic
wget "https://github.com/Asquera/elasticsearch-http-basic/releases/download/1.2.0/elasticsearch-http-basic-1.2.0.jar"
- configure username + password in your
elasticsearch.yml
http.basic.enabled: true
http.basic.user: "my-user"
http.basic.password: "my-secret-password"
- reboot instance, rejoice!