cs0815
cs0815

Reputation: 17418

Secure Elasticsearch installation retrospectively

I have an Elasticsearch installation (V7.3.2). Is it possible to secure this retrospectively? This link states that a password can only be set "during the initial configuration of the Elasticsearch". Basically, I require consumers of the restful API to provide a password (?) going forward.

Upvotes: 2

Views: 66

Answers (2)

Botond Kopacz
Botond Kopacz

Reputation: 942

Here you can find a complete guide to install and secure ElasticSearch.

Basically the bootstrap password is used initially to setup the built-in ElasticSearch users (like "elastic", "kibana"). Once this is done, you won't be able access ElasticSearch anonymously but only with one of the built in users, e.g. "elastic".

Then you can use "elastic" user to create additional users (with their own password) and roles (e.g. to asses specific indexes only in read-only mode).

As @ibexit wrote it's highly recommended to secure your cluster and don't expose it directly (use a proxy server, secured with SSL).

Upvotes: 0

ibexit
ibexit

Reputation: 3667

The elastic bootstrap password is used to init the internal/reserved users used by the components or features of the elastic stack (kibana, logstash, beats, monitoring, ...).

If you want to secure the API, you need to create users/roles for your scenario on top.

Please use TLS in your cluster when handling with passwords and don't expose the cluster directly for security reasons.

Here are all informations regarding a secure cluster including some tutorials: https://www.elastic.co/guide/en/elasticsearch/reference/7.3/secure-cluster.html

EDIT: Added links as requested. Feel free to raise a new question here at SO if you're facing serious problems!

Upvotes: 1

Related Questions