I am trying to control read access to an index using DLS, based on matching the host field with a given regexp.
Documentation for this is limited and I haven't found any examples that use a regexp. I've tried a few different things but at this point I would like to at least confirm this is even possible.
Currently the query looks like:
elastic_dls_test:
- indices:
'index1_*':
'*':
- READ
_dls_: '{"bool": { "filter": { "regexp": { "host.keyword": {"value": "/hostname_to_match[0-9]*/"} }}}}}'
This doesn't seem to filter anything for users in the role elastic_dls_test.