# Security Exception with data/write/bulk

**URL:** <https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696>\
**Category:** Logstash\
**Created:** [December 21, 2016, 6:33pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696 "2016-12-21T18:33:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggp](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@ggp](https://discuss.elastic.co/u/ggp)\
**Post date:** [December 21, 2016, 6:33pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/1 "2016-12-21T18:33:46Z")

</div>

I am trying to run logstash pipeline and getting below exception

> 13:10:00.102 [[main]\>worker0] WARN logstash.outputs.elasticsearch - Failed action. {:status=\>403, :action=\>["index", {:\_id=\>"notifyuserprofile-webservice-pega", :\_index=\>"myindex", :\_type=\>"inventory", :\_routing=\>nil}, 2016-12-21T18:10:00.051Z %{host} %{message}], :response=\>{"index"=\>{"\_index"=\>"myindex", "\_type"=\>"xxxx", "\_id"=\>"12345", "status"=\>403, "error"=\>{"type"=\>"security\_exception", "reason"=\>" myindex[indices:data/write/bulk[s]] is unauthorized for user [**logstash\_interna** l]"}}}}

followed [Logstash Reference [8.11] | Elastic](https://www.elastic.co/guide/en/x-pack/current/logstash.html)

and updated roles for user **logstash\_internal**

> {  
> "logstash\_writer": {  
> "cluster": [  
> "manage\_index\_templates",  
> "monitor",  
> "all",  
> "manage",  
> "manage\_security"  
> ],  
> "indices": [  
> {  
> "names": [  
> "myindex-\*"  
> ],  
> "privileges": [  
> "write",  
> "delete",  
> "create\_index",  
> "create",  
> "all"  
> ]  
> }  
> ],  
> "run\_as": ,  
> "metadata": {}  
> }  
> }

appreciate any help here

---

<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:** [December 21, 2016, 11:06pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/2 "2016-12-21T23:06:04Z")

</div>

> [@ggp](#):
>
> index=\>"actmon"

But you've only allowed;

> [@ggp](#):
>
> "indices": [{ "names": ["myindex-\*"],

---

<div class="post-metadata">

**Author:** ![ggp](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@ggp](https://discuss.elastic.co/u/ggp)\
**Post date:** [December 21, 2016, 11:40pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/3 "2016-12-21T23:40:54Z")

</div>

sorry i corrected my data above, the index is **myindex** only

---

<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:** [December 21, 2016, 11:46pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/4 "2016-12-21T23:46:38Z")

</div>

There's still a difference between what you are setting and what it's using.

---

<div class="post-metadata">

**Author:** ![ggp](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@ggp](https://discuss.elastic.co/u/ggp)\
**Post date:** [December 22, 2016, 12:24pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/5 "2016-12-22T12:24:26Z")

</div>

let me know what difference you see i can provide any settings

---

<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:** [December 22, 2016, 9:14pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/6 "2016-12-22T21:14:34Z")

</div>

> [@ggp](#):
>
> :index=\>"myindex"

> [@ggp](#):
>
> "indices": [ { "names": [ "myindex-\*"

^^^^

---

<div class="post-metadata">

**Author:** ![ggp](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@ggp](https://discuss.elastic.co/u/ggp)\
**Post date:** [December 23, 2016, 3:54pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/7 "2016-12-23T15:54:45Z")

</div>

its working now, . i had logstash\*. as indices privileges in the admin console when i configured the logstash writer,i updated the indices privileges to "myindex"

---

<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:** [January 20, 2017, 3:55pm UTC](https://discuss.elastic.co/t/security-exception-with-data-write-bulk/69696/8 "2017-01-20T15:55:20Z")

</div>

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