# Index name in roles.yml / only wildcard seems to work

**URL:** <https://discuss.elastic.co/t/index-name-in-roles-yml-only-wildcard-seems-to-work/36979>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 11, 2015, 12:59pm UTC](https://discuss.elastic.co/t/index-name-in-roles-yml-only-wildcard-seems-to-work/36979 "2015-12-11T12:59:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyz](https://avatars.discourse-cdn.com/v4/letter/x/b5a626/32.png) [@xyz](https://discuss.elastic.co/u/xyz)\
**Post date:** [December 11, 2015, 12:59pm UTC](https://discuss.elastic.co/t/index-name-in-roles-yml-only-wildcard-seems-to-work/36979/1 "2015-12-11T12:59:30Z")

</div>

I want to give public read access to an index named "suggest".  
If the roles configuration looks like this it would work:

```
anonymous:
  indices:
    '*': read

```

But when I define the index name like this I can't access the index:

```
anonymous:
  indices:
    'suggest': read

```

"suggest" is only an alias for "suggest-1", but both don't work. Whats the fault?

---

<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:** [December 15, 2015, 6:47pm UTC](https://discuss.elastic.co/t/index-name-in-roles-yml-only-wildcard-seems-to-work/36979/2 "2015-12-15T18:47:33Z")

</div>

Can you give us more details on the exception/error you are seeing and the indices/aliases that exist in your cluster?

---

<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:47pm UTC](https://discuss.elastic.co/t/index-name-in-roles-yml-only-wildcard-seems-to-work/36979/3 "2017-07-06T13:47:27Z")

</div>


