# External "superuser" role with enabled unmapped\_groups\_as\_roles

**URL:** <https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182>\
**Category:** Elasticsearch\
**Created:** [February 7, 2017, 8:43am UTC](https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182 "2017-02-07T08:43:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [February 7, 2017, 8:43am UTC](https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182/1 "2017-02-07T08:43:33Z")

</div>

hi All,

I'm wondering if it is somehow possible to protect the internal (native) ES roles from being compromised by a "bad" AD admin, who could create an external (AD, LDAP) group "superuser" and add its own account to that group. As the result - full access to the ES cluster.

Again: supposed that an `active_directory` realm is configured with:

```
unmapped_groups_as_roles: true

```

Thanks!

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [February 7, 2017, 12:24pm UTC](https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182/2 "2017-02-07T12:24:10Z")

</div>

I think that if you want to protect against this scenario, you should not use `unmapped_groups_as_roles`.

---

<div class="post-metadata">

**Author:** ![jetnet](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jetnet](https://discuss.elastic.co/u/jetnet)\
**Post date:** [February 7, 2017, 12:57pm UTC](https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182/3 "2017-02-07T12:57:03Z")

</div>

sigh... it'd be so cool to use an AD to manage ES groups as well, e.g. by implementing a group\_blacklist parameter (with regex support ;))

---

<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:** [March 7, 2017, 12:57pm UTC](https://discuss.elastic.co/t/external-superuser-role-with-enabled-unmapped-groups-as-roles/74182/4 "2017-03-07T12:57:29Z")

</div>

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