# How to define cutsom roles in sheild with kibana integration for each user one index

**URL:** <https://discuss.elastic.co/t/how-to-define-cutsom-roles-in-sheild-with-kibana-integration-for-each-user-one-index/59300>\
**Category:** Elasticsearch\
**Created:** [August 30, 2016, 11:35am UTC](https://discuss.elastic.co/t/how-to-define-cutsom-roles-in-sheild-with-kibana-integration-for-each-user-one-index/59300 "2016-08-30T11:35:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![balubollam](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@balubollam](https://discuss.elastic.co/u/balubollam)\
**Post date:** [August 30, 2016, 11:35am UTC](https://discuss.elastic.co/t/how-to-define-cutsom-roles-in-sheild-with-kibana-integration-for-each-user-one-index/59300/1 "2016-08-30T11:35:48Z")

</div>

Hi,

My ES version is :1.5.2  
shield is:2.3  
kibana:4.1.11

[1.in](http://1.in) /etc/elasticsearch/shield/roles.yml i have edited predefined role in the below way to only read the index '.marvel-2016.08.30' through the kibana  
kibana4:  
cluster:  
- cluster:monitor/nodes/info  
- cluster:monitor/health  
indices:  
'.marvel-2016.08.30':  
- indices:admin/mappings/fields/get  
- indices:admin/validate/query  
- indices:data/read/search  
- indices:data/read/msearch  
- indices:admin/get  
'.kibana':  
- 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/write/delete  
- indices:data/write/index  
- indices:data/write/update  
- indices:admin/create

2.created user  
bin/shield/esusers useradd A -r kibana4 -p pwd

in kibana.yml added  
kibana\_elasticsearch\_username: A  
kibana\_elasticsearch\_password: pwd

now when i go to the kibana iam logging in to that user A ,Hence my user can can only view index '.marvel-2016.08.30'.

now my requirement is to another user B need to acces only diffferent index '.marvel-2016.08.29'..  
can u do with custom role?..if yes how to create custom roles and add users to kibana

How to do this !Please help me out

Thanks

---

<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 5, 2017, 10:24pm UTC](https://discuss.elastic.co/t/how-to-define-cutsom-roles-in-sheild-with-kibana-integration-for-each-user-one-index/59300/2 "2017-07-05T22:24:02Z")

</div>


