And I've set up a role and a user as shown in the screenshots below.
I think I originally did something wrong because when I logged in as that user and went to the Kibana/Discover page I got a Error 400 Bad Request: [parse_exception] Failed to derive xcontent However, since changing to what you see in the screenshots when I login the user sees no data at all.
Any ideas why? The user should see at least 2 other documents that have the name not of Tom Cruise. I've also included a screenshot that shows the query I put in the role works in the console tool.
OK I have it working in the opposite manor than the docs say. It is now returning data. The issue was the "Optional" granted fields box. It was blank and it needed to be *. Can I suggest if it's optional that * is applied if not entered into that box? Thanks
Restricts has the meaning of limits in that sentence. That is, this role gives read permission to the documents that match the query, not the other way around. I'll make sure we revisit the wording of that sentence to make it less ambiguous.
This is where Field Level Security comes into place. You have removed all Granted Fields from the role definition ( * is the default ), this is why you don't see any documents
* is the default value for that field when one opens the new Role definition. If someone removes it while adding the role definition, the assumption is that it is on purpose.
Ok thanks, must have missed that. However when you put the cursor into that box and you get intellisense for the fields * is not in the dropdown. I think it should be to give the user the hint that it can be selected to mean all fields
@ikakavas is there any tips on how to create/edit roles on the Granted Documents Query? Whenever I paste queries and then login as a user I always seem to get Discover: Failed to derive xcontent It's definitely down to json escaping etc.
For example using the dev tools this is successful but the user gets the xcontent error when loggedin:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.