Hi,
Ran into trouble after defining a terms lookup query as a part of a DLS filter. Query fails with type":“illegal_state_exception”,“reason”:“async actions are left after rewrite”. The lookup-query executes without issue if submitted directly with a non-DLS enabled user.
Are lookup queries supported?
Using search-guard-6:6.7.2-25.0, DLS def:
dls: {“terms”:{“somefield”:{“index”:“some-index”,“id”:“${attr.jwt.someproperty}”,“path”:“somepath”,“type”:“sometype”}}}’
response:
{
“error”:{“root_cause”:
[
{“type”:“query_shard_exception”,
“reason”:"failed to create query: { “terms” : { “somefield” : { “index” : “some-index”, “type” : “sometype”, “id” : “asdf, “path” : “somepath” }, “boost” : 1.0 }}”,“index_uuid”:“sRhY1f7mQOu0tDTZMvM4YQ”,“index”:“some-other-index”}],
“type”:“search_phase_execution_exception”,
“reason”:“all shards failed”,
“phase”:“query”,
“grouped”:true,
“failed_shards”:[
{“shard”:0,
“index”:“some-other-index”,
“node”:“wCxy-6KbSoWrbDXCTtTvWQ”,
“reason”:{“type”:“query_shard_exception”,
“reason”:“failed to create query: { “terms” : { “somefield” : { “index” : “some-index”, “type” : “sometype”, “id” : “asdf”, “path” : “somepath” }, “boost” : 1.0 }}”,
“index_uuid”:“sRhY1f7mQOu0tDTZMvM4YQ”,
“index”:“some-other-index”,
“caused_by”:{
“type”:“illegal_state_exception”,
“reason”:“async actions are left after rewrite”
}
}
}
]
},
“status”:400
}