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
tweetlevel, store group name allowed access information blogmore complex, there metadata (title,description,nature, ...) of informations can restricted groups of user (onlyadmin, orlogged_inusers)
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
tweettweet.ugroup: "anonymous", inblogblog.fields.*.ugroup: "anonymous"
is there way write such query ?
Comments
Post a Comment