How to manage fine grain permissions in Elasticsearch? -


i need store in consistent way role/groups can access information i'm not sure what's best way it.

summary: have 2 kinds of docs "tweet" , "blog":

  • at tweet level, store group name allowed access information
  • blog more complex, there metadata (title, description, nature, ...) of informations can restricted groups of user (only admin, or logged_in users)

what best way map elasticsearch ?

as of today, end documents like:

/tweet/455 {     id: 112,     ugroups: [ "restricted_user", "admin" ],     description: "foo", }, {     id: 113,     ugroups: [ "anonymous" ]     description: "foo", } 

and

/blog/500 {     id: 5,     fields: [         {             "nature": {                 "value": "foo",                 "ugroup": [ "admin" ]             }         }     ] } {     id: 6,     fields: [         {             "comment": {                 "value": "foo",                 "ugroup": [ "anonymous" ]             }         }     ] } 

when user want search in tweet, that's easy, build term query words submitted user , append groups user belongs query.

but how make query take "ugroup" thing @ various level ?

ideally issue query like:

  • search in tweet tweet.ugroup: "anonymous" , in blog blog.fields.*.ugroup: "anonymous"

is there way write such query ?


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -