# How to create a role in order to have access in Kibana 4 for some indexes

**URL:** https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898
**Category:** Kibana
**Created:** [April 20, 2016, 10:40am UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898 "2016-04-20T10:40:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![djvidov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djvidov/32/6135_2.png) [@djvidov](https://discuss.elastic.co/u/djvidov)
#### Post date: [April 20, 2016, 10:40am UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/1 "2016-04-20T10:40:50Z")

</div>

Hello,

I have a ELK server into a redhat OS, with kibana version 4.4.1.

In order to have access from kibana to indexes I have made this role:

> ```
> config_user:
> cluster: monitor
> indices:
> '*':
> privileges: all
> 
> ```

and this works, because it's similar with power\_user.

But What I need is to have access in kibana only in read mode ( to be able to use some saved queries, views and dashboards) and for that I have change the script like that:

> ```
> config_user:
> cluster: monitor
> indices:
> '*':
> privileges: indices:data/read/get, indices:data/read/mget, indices:data/read/search
> 
> ```

but this one it shows me a blank kibana.

What indices i have missed in order to have access on kibana for idexes in read mode?

Thank you,  
Ovidiu

---

<div class="post-metadata">

### Author: ![djvidov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djvidov/32/6135_2.png) [@djvidov](https://discuss.elastic.co/u/djvidov)
#### Post date: [April 20, 2016, 12:46pm UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/2 "2016-04-20T12:46:32Z")

</div>

the error is: Visualize: [index\_not\_found\_exception] no such index, with: {"index":"[dev-\*]"}

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [April 20, 2016, 10:49pm UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/3 "2016-04-20T22:49:35Z")

</div>

I'm not sure Kibana will run correctly if you don't give the user write access to the .kibana index, but I've never actually tried it, so it might be fine until you go to save something, which sounds like what you want anyway. Still there are some writes that Kibana does behind the scenes even without saving items directly, so you could still run in to problems.

The suggest Kibana user roles changed in 2.3, but you can look at the [recommendation in 2.2](https://www.elastic.co/guide/en/shield/2.2/kibana.html#default-roles) to get an idea of what you'll probably need access to in order for Kibana to work.

---

<div class="post-metadata">

### Author: ![djvidov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djvidov/32/6135_2.png) [@djvidov](https://discuss.elastic.co/u/djvidov)
#### Post date: [April 21, 2016, 6:08am UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/4 "2016-04-21T06:08:15Z")

</div>

thanks Joe for the answer, I'll try to add write access to .kibana index. 🙂

---

<div class="post-metadata">

### Author: ![djvidov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djvidov/32/6135_2.png) [@djvidov](https://discuss.elastic.co/u/djvidov)
#### Post date: [April 21, 2016, 8:48am UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/5 "2016-04-21T08:48:03Z")

</div>

Hello,

I have tried these two roles and I still have the same error: Visualize: [index\_not\_found\_exception] no such index, with: {"index":"[dev-\*]"}

First configuration looks like:

> ```
> config_user:
> cluster: monitor
> indices:
> '.kibana':
> privileges: all
> '*':
> privileges: indices:admin/validate/query, indices:admin/get, indices:data/read/get, indices:data/read/mget, indices:data/read/search, indices:data/read/msearch, indices:admin/mappings/fields/get, indices:admin/refresh, indices:admin/exists, indices:admin/mapping/put, indices:data/write/delete, indices:data/write/index, indices:data/write/update
> 
> ```

And the second configuration looks like that:

> ```
> config_user2:
> cluster:
> - cluster: monitor
> indices:
> '.kibana':
> - indices:admin/create
> - indices:admin/exists
> - indices:admin/mapping/put
> - indices:admin/mappings/fields/get
> - indices:admin/refresh
> - indices:admin/validate/query
> - indices:data/read/get
> - indices:data/read/mget
> - indices:data/read/search
> - indices:data/read/msearch
> - indices:data/write/delete
> - indices:data/write/index
> - indices:data/write/update
> '*':
> - indices:admin/mappings/fields/get
> - indices:admin/validate/query
> - indices:data/read/search
> - indices:data/read/msearch
> - indices:admin/get
> 
> ```

But no one helps me, and at this moment I don't have any idea...

---

<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, 1:55pm UTC](https://discuss.elastic.co/t/how-to-create-a-role-in-order-to-have-access-in-kibana-4-for-some-indexes/47898/6 "2017-07-06T13:55:31Z")

</div>


