# No 403 response if user is not allowed to read index

**URL:** <https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500>\
**Category:** Elasticsearch\
**Created:** [April 25, 2017, 7:20am UTC](https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500 "2017-04-25T07:20:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanrinderle](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@stefanrinderle](https://discuss.elastic.co/u/stefanrinderle)\
**Post date:** [April 25, 2017, 7:20am UTC](https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500/1 "2017-04-25T07:20:59Z")

</div>

Hi,

we are currently upgrading our elk stack from 2.X to 5.X and are working with the 5.3.1 versions.

An example role is defined like this in roley.yml  
examplerole:  
cluster:  
- monitor  
indices:  
- names: 'extint-\*'  
privileges:  
- view\_index\_metadata  
- read

If i now try to access an index which the user is not permitted to see (e.g. extint\_res-_) with GET .../extint\_res-_ and the user credentials i get an empty JSON response:  
{}

Users which do have the extint\_res index in the permissions see the full response.

In prior versions, i got an "404 Not Found" error accessing the index. Is this intended? Or did we miss something in the config?

So, bug or feature 🙂 ?

Cheers,  
Stefan

---

<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 25, 2017, 12:58pm UTC](https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500/2 "2017-04-25T12:58:16Z")

</div>

Are you using wildcards in your requests?

This is the result of a feature that was added and highly requested; we tried to make the responses more consistent with elasticsearch (without x-pack) especially when expanding wildcards and handling indices that do not exist.

---

<div class="post-metadata">

**Author:** ![stefanrinderle](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@stefanrinderle](https://discuss.elastic.co/u/stefanrinderle)\
**Post date:** [April 25, 2017, 2:17pm UTC](https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500/3 "2017-04-25T14:17:17Z")

</div>

Ok, i checked the same request without a wildcard and got the 403.

If it was highly requested, ok. But for me it's now inconsistent. Requesting extint-\* returns an empty response and extint-2017.03.22 returns 403.

But i can live with that. As it was changed, i change my tests.

Thanks for the quick answer

Stefan

---

<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:** [May 23, 2017, 2:30pm UTC](https://discuss.elastic.co/t/no-403-response-if-user-is-not-allowed-to-read-index/83500/4 "2017-05-23T14:30:31Z")

</div>

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