# Built in 'User' Role in Shield Vs x-pack

**URL:** <https://discuss.elastic.co/t/built-in-user-role-in-shield-vs-x-pack/102195>\
**Category:** Elasticsearch\
**Created:** [September 29, 2017, 12:14am UTC](https://discuss.elastic.co/t/built-in-user-role-in-shield-vs-x-pack/102195 "2017-09-29T00:14:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackhouston1](https://avatars.discourse-cdn.com/v4/letter/j/8c91f0/32.png) [@jackhouston1](https://discuss.elastic.co/u/jackhouston1)\
**Post date:** [September 29, 2017, 12:14am UTC](https://discuss.elastic.co/t/built-in-user-role-in-shield-vs-x-pack/102195/1 "2017-09-29T00:14:51Z")

</div>

Hi All,

I have just upgraded my Elastic Search to 5.6.1 as well as x-pack.

I am having hard time recreating the USER built in role available in shield into x-pack , for that i have defined the role in x-pack as

PUT /\_xpack/security/role/user?pretty  
{  
"run\_as": [],  
"cluster": [],  
"indices": [  
{  
"names": ["\*"],  
"privileges": ["read"]

```
}

```

]  
}

But once i assign the role to any users they are facing an issue when they try to run  
1.GET /\_cat/indices?v  
Error:  
{  
"error": {  
"root\_cause": [  
{  
"type": "security\_exception",  
"reason": "action [indices:admin/get] is unauthorized for user [dbodauser]"  
}  
],  
"type": "security\_exception",  
"reason": "action [indices:admin/get] is unauthorized for user [dbodauser]"  
},  
"status": 403  
}

2.GET /Salesproviders?pretty  
Error:  
{  
"error": {  
"root\_cause": [  
{  
"type": "security\_exception",  
"reason": "action [indices:admin/get] is unauthorized for user [dbodauser]"  
}  
],  
"type": "security\_exception",  
"reason": "action [indices:admin/get] is unauthorized for user [dbodauser]"  
},  
"status": 403  
}

Can some one please throw some light on where i am going wrong

Thanks in Advance.  
Jack

---

<div class="post-metadata">

**Author:** ![Julien](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien/32/19688_2.png) [@Julien](https://discuss.elastic.co/u/Julien)\
**Post date:** [October 6, 2017, 9:58am UTC](https://discuss.elastic.co/t/built-in-user-role-in-shield-vs-x-pack/102195/2 "2017-10-06T09:58:59Z")

</div>

Hi,

You gave user read access to all indices, this means the user will be able to read the content of any indices and run this :  
GET /indexname/\_search

The error you get are expected if the user is assigned a role which only allow reading data from indices :  
GET /indexname?pretty -\> you would need the view\_index\_metadata privilege

GET \_cat/indices?v -\> you would need the monitor privilege

Hope this helps.

---

<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:** [November 3, 2017, 9:59am UTC](https://discuss.elastic.co/t/built-in-user-role-in-shield-vs-x-pack/102195/3 "2017-11-03T09:59:13Z")

</div>

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