0

I need to hide some fields from any find result in elasticsearch for non-admin users. For example object below exists in elasticsearch database

{
  "name": "John",
  "login": "john",
  "password": "123"
}

And if user login with admin role, he can see field password but if user has role 'simple_user' he can only see

{
  "name": "John",
  "login": "john"
}

Is it possible to make it without x-pack premium licence?

tosha220
  • 51
  • 1
  • 1
  • 4
  • Where does your user log into? You don't have X-pack security right? – Val Jan 11 '19 at 13:20
  • Now option xpack.security.enabled = false and x-pack isn't installed – tosha220 Jan 11 '19 at 14:09
  • What about my first question? – Val Jan 11 '19 at 14:15
  • Yes, you can use source filtering: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-source-filtering.html You have to build your request and the _source[field to keep...] according to your user level. – LeBigCat Jan 11 '19 at 14:46

0 Answers0