i am trying to set up roles for users to log in but only see documents that is related to them.
This is the role that i created:
{
"events_admin": {
"cluster": [],
"indices": [
{
"names": [
"events*",
".kibana*"
],
"privileges": [
"all"
],
"query": """{"term":{"Consultant.keyword":"Terri"}}"""
}
],
"run_as": [],
"metadata": {},
"transient_metadata": {
"enabled": true
}
}
}
When i log in as this user i get the following error:
Config: Error 400 Bad Request: [security_exception] Can't execute an update request if field or document level security is enabled
I followed a example on Setting Up Field and Document Level Security | X-Pack for the Elastic Stack [6.2] | Elastic to create this roll:
For example, the following role grants read access to all indices, but restricts access to documents whose department_id equals 12.
{ "indices" : [ { "names" : [ "*" ], "privileges" : [ "read" ], "query" : { "term" : { "department_id" : 12 } } } ] }
But then i found the following:
Any query that makes remote calls to fetch data to query by isn’t supported. The following queries aren’t supported:
The terms query with terms lookup isn’t supported.
The geo_shape query with indexed shapes isn’t supported.
The percolate query isn’t supported.
Okay so can someone please give me the correct answer...
In Kibana with X Pack - Can i set up a role where the user will only be able to see the documents where the "Consultant" field is there name?
If so, please help... what am i doing wrong?