# How to implement document level security based on ldap groups

**URL:** <https://discuss.elastic.co/t/how-to-implement-document-level-security-based-on-ldap-groups/150253>\
**Category:** Elasticsearch\
**Created:** [September 27, 2018, 8:39pm UTC](https://discuss.elastic.co/t/how-to-implement-document-level-security-based-on-ldap-groups/150253 "2018-09-27T20:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yello](https://avatars.discourse-cdn.com/v4/letter/y/ecae2f/32.png) [@Yello](https://discuss.elastic.co/u/Yello)\
**Post date:** [September 27, 2018, 8:39pm UTC](https://discuss.elastic.co/t/how-to-implement-document-level-security-based-on-ldap-groups/150253/1 "2018-09-27T20:39:47Z")

</div>

I'm trying to find out how to implement document level security based on ldap groups.I have installed xpack plugin and configured ldap realm in elastic search.yml file successfully. Login /out is working based on ldap userid/password through kibana. However I'm looking for authorization of users based on ldap group they are in. User can be in multiple groups. For example if a document has permissions for users in group1,group2. So any user in ldap group1 should be able to access that particular document. user is recognized based on userid/username.  
Is it possible to get all ldap groups/roles of a user based on userid/username

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2018, 8:39pm UTC](https://discuss.elastic.co/t/how-to-implement-document-level-security-based-on-ldap-groups/150253/2 "2018-10-25T20:39:48Z")

</div>

Closed on October 25, 2018, 8:39pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
