# Elasticsearch security use ldap how to config role

**URL:** <https://discuss.elastic.co/t/elasticsearch-security-use-ldap-how-to-config-role/267347>\
**Category:** Elasticsearch\
**Created:** [March 16, 2021, 10:30am UTC](https://discuss.elastic.co/t/elasticsearch-security-use-ldap-how-to-config-role/267347 "2021-03-16T10:30:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taoyantu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/taoyantu/32/124169_2.png) [@taoyantu](https://discuss.elastic.co/u/taoyantu)\
**Post date:** [March 16, 2021, 10:30am UTC](https://discuss.elastic.co/t/elasticsearch-security-use-ldap-how-to-config-role/267347/1 "2021-03-16T10:30:18Z")

</div>

hello master ,please help me ,i use the elasticsearch realms ldap ,the elasticsearch.yml like

realms:  
ldap:  
ldap1:  
follow\_referrals:false  
order: 10  
url: "xxxxx"  
bind\_dn: "xxxx"  
bind\_pasword: "xxxx"  
user\_search:  
base\_dn:"xxx"  
attribute:"xxx"  
group\_search:  
base\_dn: "xx"  
files:  
role\_mapping: /xxxx/role\_mapping.yml  
unmapped\_groups\_as\_roles: false

in the role\_mapping.yml have one role is estestuser

i want to config the every user role in elasticsearch not cfongi in the file, the user role like  
jack ,es\_admin  
tom, es\_user

how can i config it ,please help me.

---

<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:** [April 13, 2021, 10:30am UTC](https://discuss.elastic.co/t/elasticsearch-security-use-ldap-how-to-config-role/267347/2 "2021-04-13T10:30:45Z")

</div>

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