rahul
rahul

Reputation: 316

how to password protect Elastic search

I have Es version 7.6.2 I saw on website that from version 6.2 onwards x-pack is included by default but i was not able to find or enable x-pack for security. how do i enable password protection in Elastic search.

Upvotes: 1

Views: 2356

Answers (3)

rahul
rahul

Reputation: 316

isseue resolved by using elastic user rather than kibana user

Upvotes: 0

jaspreet chahal
jaspreet chahal

Reputation: 9109

As per elastic search documentation

The first thing you have to do is download the default distribution of Elasticsearch and Kibana version 6.8+ or 7.1+. Security was added to the default distribution in 7.1 and 6.8, so if you’re on an older version, you’ll need to upgrade.

After downloading latest version , you need to enable xpack.security.enabled: true in elasticsearch.yml file

To generate passwords

elasticsearch-setup-passwords auto

in command prompt, your cmd path should be elasticsearch/bin. It will auto generate passwords for elasticsearch kibana etc. note them . If you want to provide your own username password instead of auto generated execute

elasticsearch-setup-passwords interactive

In kibana.yml update below two with user name and password for elastic search you got by executing set up password

elasticsearch.username: "<elastic>"
elasticsearch.password: "<password>"

Opening kubana it will prompt for username and password, enter password for "kibana" you got from set-up-password

Upvotes: 4

rahul
rahul

Reputation: 316

I am able to password protect ES however my kibana is now asking for UID and password when opened. The ES credentials dont work on the kibana screen. What password does Kibana looking for ?

Upvotes: 0

Related Questions