# How to auto login in Kibana using apache?

**URL:** <https://discuss.elastic.co/t/how-to-auto-login-in-kibana-using-apache/242596>\
**Category:** Kibana\
**Created:** [July 25, 2020, 8:14am UTC](https://discuss.elastic.co/t/how-to-auto-login-in-kibana-using-apache/242596 "2020-07-25T08:14:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyungsun\_lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hyungsun_lim/32/50790_2.png) [@hyungsun\_lim](https://discuss.elastic.co/u/hyungsun_lim)\
**Post date:** [July 25, 2020, 8:14am UTC](https://discuss.elastic.co/t/how-to-auto-login-in-kibana-using-apache/242596/1 "2020-07-25T08:14:53Z")

</div>

I have seen many post about auto login using Nginx.

However, how can i auto login to Kibana using apache?

I want to user only acess 'sample' space without login.

So i configured apache configuration like below:

```auto
    ProxyPass /sample http://my.web.site/s/visualization_sample/app/kibana
        ProxyPassReverse /sample http://my.web.site/s/visualization_sample/app/kibana
        <Location ~ "/s/visualization_sample/login?next=%2Fs%2Fvisualization_sample%2Fapp%2Fkibana#?_g=()">
            RequestHeader set Authorization "Basic 123asdasdasd="
        </Location>

```

Help me...

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 1, 2020, 6:20am UTC](https://discuss.elastic.co/t/how-to-auto-login-in-kibana-using-apache/242596/2 "2020-08-01T06:20:31Z")

</div>

You have to set the authorization header for all requests sent to Kibana - there are also a lot of Javascript bundles fetched from other places.

To restrict this login to just a single space, create a separate user and role for the reverse proxy and only allow this user access to the desired space (when creating the role, scroll down to the "Kibana" section). This way, Kibana will make sure the user can't access other spaces and you don't have to handle that in the proxy.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2020, 6:20am UTC](https://discuss.elastic.co/t/how-to-auto-login-in-kibana-using-apache/242596/3 "2020-08-29T06:20:41Z")

</div>

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