The blue team is able to delete by query, but the same task fails for the red team. The most likely difference in the configuration is that the red teams config includes: “kibana_access: rw”.
Does the wildcard “indices:data/write/delete*” include “indices:data/write/delete/byquery”? Some lines have the wildcard symbol after a forward slash. That’s a rhetoric question and I do not need an answer, it’s just a hint to the possible cause.
OK so the issue is really the kibana_access as it says authorization is ok and kibana access did not match (false).
I created a unit test case, but it passes. Need to go the end-to-end way. Could you provide the body of your POST request? Or even better a curl command to reproduce it?
In Dev Tools, run the following query.
GET index-name/_search
{ “query”: { “term”: { “host”: “LAPTOP1” } }}
result is OK
In Dev Tools, run the following query.
POST index-name/_delete_by_query
{ “query”: { “term”: { “host”: “LAPTOP1” } }}
result is not OK.
A popup, login dialog appears, but filling in the correct user name and password fails to complete the query successfully and the login popup reappears. Additionally, the RoR audit log shows forbidden in the final_state.
Request details for step 3 (obtained using fiddler)
POST https://kibana.example.com/api/console/proxy?path=*index-name*%2F_delete_by_query&method=POST HTTP/1.1
Response details for step 3 (obtained using fiddler)
Hey, let’s have a step back. I think this is expected. the “kibana_access” is a rule to be used to allow the minimum set of actions on the minimum set of indices to support a complete Kibana session.
This clearly (to me!) excludes rogue attempt to delete data from the dev tools console.
As you experimented, removing the kibana_access rule would simply relax this constraint and allow any request to be sent through the dev tools (or from curl).