I've installed and set up Shield plugin for Elasticsearch 2.2.0. Then I added an admin user via the esusers realm. It all seems to work, I can authenticate and make queries, but when I try to enable some Document Level Security, it keeps giving this error response:
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:data/read/search] is unauthorized for user [my_user]"
}
],
"type": "security_exception",
"reason": "action [indices:data/read/search] is unauthorized for user [my_user]"
},
"status": 403
}
I've tried many different query combinations. I have enabled all privileges so there shouldn't shouldn't be a problem with the action indices:data/read/search
, although I also tried to specifically add this privilege. I tried both analyzed
and not_analyzed
fields, integers and strings, but no matter what I try I am getting this error. And only when I remove the "query" it starts working.
This is my defualt admin role, I've only added a query line to it:
admin:
cluster: all
indices:
'*':
privileges: all
query: '{"term" : {"studentStudentId" : "0612112953"}}'