Kibana Granted document query for multiple filter

Hello,

I have an requirement of creating a role which has limited permission of data in index privileges using granted document query.

For example: User1 should be restricted when installation id: 1 and stageid:2 d matches in granted document query. Applied with the following query but its not working.

{
"query": {
"bool": {
"filter": [{
"match": {
"installationid": "JohnMX"
}
},
{
"match": {
"stageid": "UAT"
}
}
]
}
}
}

Data is coming blank as there is data in it.

kindly suggest me with different query or share some link for how to write query in kibana>Roles>Indexprivileges>Granted document query.
Thanks in advance.

If that's a literal copy of what you entered, then the issue is that you have a top-level "query" field.

The DLS query is a query not a search, so it should be:

{
  "bool": {
    "filter": [
      {
        "match": {
          "installationid": "JohnMX"
        }
      },
      {
        "match": {
          "stageid": "UAT"
        }
      }
    ]
  }
}
1 Like

@TimV Thanks alot, now my query is working properly!!

Hello TimV,

I have another requirment for the granted document query level in kibana roles tab.

For Example: User1 should be restricted to customer id: 1 and installation id: 1 and
Stage id: {1,2,3} n granted document query.

Applied with the following query but its not working.

{
"bool": {
"filter": [
{
"match": {
"customerid": "John"
}
},
{
"match": {
"installationid": "JohnMX"
}
},
{

	"terms": {
      "stageid": [ "PAT", "UAT" ]
	  }
	}
]	 

}
}

Please help

Regards,
Anjali

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