# Per User Kibana Index

**URL:** <https://discuss.elastic.co/t/per-user-kibana-index/26015>\
**Category:** Kibana\
**Created:** [July 21, 2015, 7:12pm UTC](https://discuss.elastic.co/t/per-user-kibana-index/26015 "2015-07-21T19:12:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranav\_Sathyanarayan](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@Pranav\_Sathyanarayan](https://discuss.elastic.co/u/Pranav_Sathyanarayan)\
**Post date:** [July 21, 2015, 7:12pm UTC](https://discuss.elastic.co/t/per-user-kibana-index/26015/1 "2015-07-21T19:12:59Z")

</div>

Hi Everyone,

I am new to the community and I am attempting to extend some functionality for my product into Kibana. I currently have Kibana setup with Elasticsearch, where me end users will each have their own pre-made kibana index, usually something like:

.kibana-[user unique ID]

I am attempting to modifying the Kibana source code to support this dynamic redirect, and currently have a HTTPInterceptor which sets the HTTP Authorization header to the appropriate kibana index. In the Express.js side, I wrote a middleware which simply reads the HTTP Authorization header, and sets the config.kibana.kibana-index as the contents of the header.

But the issue is that there are other places in the AngularJS side which makes requests to the express.js side, and I cannot find them at all. A output log on the Express.js side shows that nearly all the initial requests (startup requests) have an `undefined` value for the Authorization header. Can anyone help me out.

Currently the data flow is as such:

- Cookie is set on end-user browser with their unique kibana index
- AngularJS aspect of Kibana reads the cookie, and sets the Authorization header (only in the main Kibana module)
- Express.JS middleware reads the Authorization header of each request and attempts to modify the kibana-index on the fly.

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [July 22, 2015, 5:46pm UTC](https://discuss.elastic.co/t/per-user-kibana-index/26015/2 "2015-07-22T17:46:58Z")

</div>

Ultimately, what are you trying to achieve? If it's a multi-tenant Kibana deployment, you may be interested in a discussion that takes a slightly different approach here: [Kibana 4 dashboards access control with Shield](https://discuss.elastic.co/t/kibana-4-dashboards-access-control-with-shield/2151)

---

<div class="post-metadata">

**Author:** ![Pranav\_Sathyanarayan](https://avatars.discourse-cdn.com/v4/letter/p/bc8723/32.png) [@Pranav\_Sathyanarayan](https://discuss.elastic.co/u/Pranav_Sathyanarayan)\
**Post date:** [July 23, 2015, 1:44pm UTC](https://discuss.elastic.co/t/per-user-kibana-index/26015/3 "2015-07-23T13:44:30Z")

</div>

Thanks for the response! I did read through that the other day, but I don't need "dashboard access control", I need each user that hits Kibana to only see and have access to a single kibana index that is decided based upon some external factors (data from my application database).

Based upon that thread above, I believe palmerabollo's response:

> My indexes are ".kibana-". I use nginx to authenticate the user, so I can use ngx.var.remote\_user in my lua code.  
> My requirements are simpler than yours, I only have to restrict access to indexes in a way that users can only see their data (each user has a "index-", without using Shield. What I'm doing right now is:

> replacing ".kibana" with ".kibana-" .. ngx.var.remote\_user both in the requested uri and in the request body (lua)  
> replacing the name of the index requested by the user with "index-" in the request body (lua)  
> modifying validateRequest.js to allow creation of ".kibana-\*" indexes (nodejs)

might be the way to do it from my end o.0, though I am not sure how to set that proxy stuff up in Nginx, time to learn I suppose!

---

<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:** [July 6, 2017, 2:15pm UTC](https://discuss.elastic.co/t/per-user-kibana-index/26015/4 "2017-07-06T14:15:54Z")

</div>


