Filter with "terms" does not seem to work

Hello,

I am trying to set up an ACL block with a filter rule containing a "terms" filter like this:

- name: "site_restriction"
  users: 
      - "user_xxx"
  indices: ["my_indice"]
  filter: '{"bool": {"filter": [{"terms": {"site_id": [1,2,3...]}}]}}'
  ...

But when I query the my_indice index with that user, I get documents with site_id values that do not match the specified values in filter. The syntax of the filter seems ok, as I get the expected behaviour if I explicitely add the exact same filter to the query.

Interestingly, when I filter on a single site with a “term” query on a single site id, it works as expected and only return documents with that site id:

- name: "site_restriction"
  users: 
      - "user_xxx"
  indices: ["my_indice"]
  filter: '{"bool": {"filter": [{"term": {"site_id": 1}}]}}'
  ...

Is terms filtering supported?

Thanks,
Renaud

An update on this topic: actually the latter rule does not work either, my bad.
It seems like DLS filter rules are simply not applied to the query.

I am on a (very!) old version of both the plugin (1.18.2) and elasticsearch (6.7.1). For now I am stuck with elasticsearch 6.7.1, but I will try upgrade the plugin. What is the latest version supporting es 6.7.1 ?

Thanks for reporting this problem. We will check it and let you know here

As I said in my second message, I am on a very outdated version of the plugin (1.18.2) and I think I am facing an issue that has already been fixed in later versions.

I just checked the weather: it looks like a wonderful day to upgrade the latest ROR plugin, Reanaud :slight_smile:

As usual, we are here to assist you if you have issues.

It is indeed :slight_smile:
My team has just contacted you to obtain latest versions of the Kibana and Elastic plugins compatible with es 6.7.1

Thanks for the help!