Set username and password for Kibana without using xpack

This is my setup:
Kibana 6.2.4
Elasticsearch 6.2.4
Filebeat 6.2.4
Logstash 6.2.4
OS: Red Hat Linux

I am setting up a basic test environment for testing out the features in Kibana for my organization. I want to have a username and a password to login to Kibana with. How can I do this without installing Xpack? I don't want to use Xpack because it is not free.

See here:


Nginx supports basic access authentication out-of-the-box so do read on from Basic Authentication downwards in regards to using nginx for your needs.

1 Like

This is what I have done:

sudo apt-get install nginx apache2-utils
sudo htpasswd -c /etc/nginx/htpasswd.users kibanaadmin

Then edit nginx config:

sudo nano /etc/nginx/sites-available/default

Config:

server {
  listen 80;
    server_name kibana;


  error_log   /var/log/nginx/kibana.error.log;
  access_log  /var/log/nginx/kibana.access.log;



  location / {
    rewrite ^/(.*) /$1 break;
    proxy_ignore_client_abort on;
    proxy_pass http://localhost:5601;
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  Host $http_host;
   
  }
}

Then restart:
sudo service nginx restart

But I can still access Kibana on http://localhost:5601 without password.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.