# Wildcards in run\_as\_role

**URL:** https://discuss.elastic.co/t/wildcards-in-run-as-role/46318
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [April 5, 2016, 3:02am UTC](https://discuss.elastic.co/t/wildcards-in-run-as-role/46318 "2016-04-05T03:02:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tusharm](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@tusharm](https://discuss.elastic.co/u/tusharm)
#### Post date: [April 5, 2016, 3:02am UTC](https://discuss.elastic.co/t/wildcards-in-run-as-role/46318/1 "2016-04-05T03:02:30Z")

</div>

Hey guys,

I am playing with user/role management API in Shield 2.3 (thanks for getting this out!).

I observed that I can specify users in the run\_as\_role list using wildcards! This is super useful to me. However, this feature is not documented here: [https://www.elastic.co/guide/en/shield/current/submitting-requests-for-other-users.html](https://www.elastic.co/guide/en/shield/current/submitting-requests-for-other-users.html).

Just wanted to make sure the configuration works as intended and this is merely a documentation issue 😉

Thx!

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [April 5, 2016, 11:32am UTC](https://discuss.elastic.co/t/wildcards-in-run-as-role/46318/2 "2016-04-05T11:32:00Z")

</div>

The wildcard usage is definitely intended and I agree that we can improve the documentation here so I will open up a issue to get some more detail added. Also, if it helps, not only are wildcards supported but you can also use the special [regular expression syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html#regexp-syntax). Note: you'll need to[wrap the expression in `/` characters](https://www.elastic.co/guide/en/shield/current/defining-roles.html) at the beginning and end.

---

<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:45pm UTC](https://discuss.elastic.co/t/wildcards-in-run-as-role/46318/3 "2017-07-06T13:45:33Z")

</div>


