# Logstash: Unable to create index in elasticsearch protected by Shield

**URL:** <https://discuss.elastic.co/t/logstash-unable-to-create-index-in-elasticsearch-protected-by-shield/39187>\
**Category:** Logstash\
**Created:** [January 14, 2016, 5:26am UTC](https://discuss.elastic.co/t/logstash-unable-to-create-index-in-elasticsearch-protected-by-shield/39187 "2016-01-14T05:26:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krushnat\_khawale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krushnat_khawale/32/6652_2.png) [@krushnat\_khawale](https://discuss.elastic.co/u/krushnat_khawale)\
**Post date:** [January 14, 2016, 5:26am UTC](https://discuss.elastic.co/t/logstash-unable-to-create-index-in-elasticsearch-protected-by-shield/39187/1 "2016-01-14T05:26:05Z")

</div>

```
 I've protected elasticsearch using SHIELD and elasticsearch is prompting me
 for credentials when trying to access using SENSE, or KIBANA as expected.
       But It is not allowing me to create index using logstash. It show security
  exception message,

```

Settings: Default filter workers: 2  
←[31m[401] {"error":{"root\_cause":[{"type":"security\_exception","reason":"missin  
g authentication token for REST request [/\_template/logstash]","header":{"WWW-Au  
thenticate":"Basic realm="shield""}}],"type":"security\_exception","reason":"mi  
ssing authentication token for REST request [/\_template/logstash]","header":{"WW  
W-Authenticate":"Basic realm="shield""}},"status":401} {:class=\>"Elasticsearch  
::Transport::Transport::Errors::Unauthorized", :level=\>:error}←[0m

```
  My question is how do I send credentials so as to authenticate logstash?
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 14, 2016, 5:44am UTC](https://discuss.elastic.co/t/logstash-unable-to-create-index-in-elasticsearch-protected-by-shield/39187/2 "2016-01-14T05:44:40Z")

</div>

Have you been through [https://www.elastic.co/guide/en/shield/current/logstash.html](https://www.elastic.co/guide/en/shield/current/logstash.html)

---

<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, 5:15am UTC](https://discuss.elastic.co/t/logstash-unable-to-create-index-in-elasticsearch-protected-by-shield/39187/3 "2017-07-06T05:15:47Z")

</div>


