Give wildcard read privileges to specific documents

Hello,

I added custom permissions for new role like this:
{"match": {"computerName.keyword" : "HOST-depName-ABC"}}

in this case user will see documents only with "HOST-depName-ABC" computerName.keyword.

I want to use wildcard in this extension like this:
{"match": {"computerName.keyword" : "HOST-depName-*"}}
in this case user does not see anything.

Note: I`m using cloud subscription.

Could you please help me with this?

Does https://www.elastic.co/guide/en/elasticsearch/reference/current/document-level-security.html help?

Thank you. Yes it helps but how can I use wildcard :slight_smile:

You can use them in the query part that the example shows.

Thank you.
{"wildcard": {"computerName.keyword" : "HOST-depName-*"}}

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.