I have read all some of the posts that pertain to this subject, but still couldn't make it work.
Getting this error, when trying to write some random generated data to ES
Failed action. {:status=>403, :action=>["index", {:_id=>nil, :_index=>"oganes-2016.11.09", :_type=>"logs", :_routing=>nil}, #<LogStash::Event:0x26d71e83 @metadata_accessors=#<LogStash::Util::Accessors:0x10579f4f @store={}, @lut={}>, @cancelled=false, @data={"message"=>"line 3", "@version"=>"1", "@timestamp"=>"2016-11-09T23:14:20.259Z", "host"=>"herd-blah.com", "sequence"=>2}, @metadata={}, @accessors=#<LogStash::Util::Accessors:0x2ca6fe96 @store={"message"=>"line 3", "@version"=>"1", "@timestamp"=>"2016-11-09T23:14:20.259Z", "host"=>"herd-blah.com", "sequence"=>2}, @lut={"host"=>[{"message"=>"line 3", "@version"=>"1", "@timestamp"=>"2016-11-09T23:14:20.259Z", "host"=>"herd-blah.com", "sequence"=>2}, "host"], "sequence"=>[{"message"=>"line 3", "@version"=>"1", "@timestamp"=>"2016-11-09T23:14:20.259Z", "host"=>"herd-blah.com", "sequence"=>2}, "sequence"], "type"=>[{"message"=>"line 3", "@version"=>"1", "@timestamp"=>"2016-11-09T23:14:20.259Z", "host"=>"herd-blah.com", "sequence"=>2}, "type"]}>>], :response=>{"index"=>{"_index"=>"oganes-2016.11.09", "_type"=>"logs", "_id"=>nil, "status"=>403, "error"=>{"type"=>"security_exception", "reason"=>"action [indices:admin/create] is unauthorized for user [lbviewer]"}}}, :level=>:warn}
my roles.yml
admin:
cluster:
- all
indices:
- names: '*'
privileges:
- all
The required role for logstash users
logstash:
cluster:
- manage_index_templates
indices:
- names: 'oganes*'
privileges:
- all
my role_mapping.yml
logstash:
- "CN=lbviewer,OU=Service Accounts,OU=System Accounts,DC=corp,DC=blah,DC=com"
if I move this under admin: mapping then it works fine, but I want to be able to run it as logstash role
What am I doing wrong?