enabling authentication for kibana using Apache web server

Hello Techrunnr Readers, This document deals with enabling authentication for kibana using Apache web server.

Kibana is an open source data visualization plugin for Elasticsearch. It provides visualization capabilities on top of the content indexed on an Elasticsearch cluster.
By default, kibana doesn’t support authentication for the dashboard. Here we restrict the kibana dashboard using Apache web server by setting by creating htuser.
This provides one more layer of security. This protects your analytics system from unauthorized access from hackers.

1. Install Apache web server.

sudo yum install httpd            //Centos/Redhat

apt-get install apache2          //Ubuntu/Debian

2. Create a http user and provide the password.

sudo htpasswd -c /etc/kiabana_pass admin

3. Step Proxy pass and authentication configuration

By default, Kibana dashboard works on port 5601. For user easy accessible we do process so we can access the dashboard as kiabana.techrunnr.com rather than kibana.techrunnr.com:5601

sudo vi /etc/httpd/conf/httpd.conf

Add the following lines

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
DocumentRoot /var/www
<Proxy *>
AuthType Basic
AuthName “Authentication Required”
AuthUserFile “/etc/kiabana_pass admin”
Require valid-user
</Proxy>
ProxyPass / http://192.168.22.15:5601/
ProxyPassReverse / http://192.168.22.15:5601/
</VirtualHost>

4. Once you complete the above step. Restart the Apache web server service to apply the effect.

5. Now open the browser and browse Ip address or FQDN, you get a User authentication POP UP asking for Username and password.

Don’t forget to close the port 5601 in your firewall ! because if you don’t kibana will still be accessible without basic authentication on the port 5601

© 2018, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

prabhin

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.