# Which xpack/elasticsearch priviliges to use HEAD?

**URL:** https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [November 21, 2018, 4:03pm UTC](https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741 "2018-11-21T16:03:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cbarton](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@cbarton](https://discuss.elastic.co/u/cbarton)
#### Post date: [November 21, 2018, 4:03pm UTC](https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741/1 "2018-11-21T16:03:27Z")

</div>

I have a user that's running some 3rd party code utilizing the python client. It looks like it tries to do a HEAD request on a non-existent index (checking that it isn't there before creating it, I'm told) but instead of getting a 404, it's receiving a 403. The account being used has read, create\_index, delete\_index, and write on indices with names fitting the pattern it's trying to HEAD for, but it's getting a 'denied' rather than 'not found'. What privilege would need to be added to that account to permit a HEAD operation in addition to GET/PUT/POST/DELETE? I can't find anything specific to it in the docs.

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [November 22, 2018, 6:35am UTC](https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741/2 "2018-11-22T06:35:19Z")

</div>

Hi Chris,

This is not because of the HTTP operation used. A `GET` would have the same results as `HEAD`.  
Your user also needs the `view_index_metadata` privilege on that index pattern

---

<div class="post-metadata">

### Author: ![cbarton](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@cbarton](https://discuss.elastic.co/u/cbarton)
#### Post date: [November 29, 2018, 3:25pm UTC](https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741/3 "2018-11-29T15:25:00Z")

</div>

That took care of it, many 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: [December 27, 2018, 3:25pm UTC](https://discuss.elastic.co/t/which-xpack-elasticsearch-priviliges-to-use-head/157741/4 "2018-12-27T15:25:06Z")

</div>

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