# Total Limits of Users and Roles while using X-Pack Plugin?

**URL:** https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066
**Category:** Elasticsearch
**Created:** [April 6, 2018, 10:02am UTC](https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066 "2018-04-06T10:02:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![amitmjadav](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@amitmjadav](https://discuss.elastic.co/u/amitmjadav)
#### Post date: [April 6, 2018, 10:02am UTC](https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066/1 "2018-04-06T10:02:04Z")

</div>

Hi,

Can any one let me know Wile using X-pack plugin with elasticsearch

1:How many roles can be created.Is there any limit to create roles?  
2:Can a user have multiple roles?  
3:How many users can be created.IS there any limit to create users?

I know that we can Assign multiple roles to single user... but just want confirm ...

Thanks,  
Amit

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [April 9, 2018, 2:33am UTC](https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066/2 "2018-04-09T02:33:54Z")

</div>

> How many roles can be created. Is there any limit to create roles?

There is a limit, because everything has a limit. Roles are either stored in [files](https://www.elastic.co/guide/en/x-pack/6.2/defining-roles.html#roles-management-file) or in an [index](https://www.elastic.co/guide/en/x-pack/6.2/defining-roles.html#roles-management-api). The file will be limited by the amount of disk space you have and by the maximum allowed file size on your platform. The index will be limited by the disk space on your cluster and the maximum size of a lucene index.  
It is unlikely that you will hit those limits, but it depends on your cluster setup.

There is a cache for role lookup that defaults to a limit of 10,000 roles. If you wish to use more roles than that, then you should consider increasing that limit (which will have an impact on memory usage).

> Can a user have multiple roles?

Yes, from [Configuring Role-based Access Control | X-Pack for the Elastic Stack [6.2] | Elastic](https://www.elastic.co/guide/en/x-pack/6.2/authorization.html)

```
 A user can be associated with an arbitrary number of roles

```

> How many users can be created. Is there any limit to create users?

The answer to this is essentially the same as your first question. Although, if you are really trying to create a very large number of users, I would recommend you consider using an external identity source such as an LDAP directory, rather than trying to manage users directly in Elasticsearch.

---

<div class="post-metadata">

### Author: ![amitmjadav](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@amitmjadav](https://discuss.elastic.co/u/amitmjadav)
#### Post date: [April 9, 2018, 5:11pm UTC](https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066/3 "2018-04-09T17:11:34Z")

</div>

Thank you very much TimV

---

<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: [May 7, 2018, 5:11pm UTC](https://discuss.elastic.co/t/total-limits-of-users-and-roles-while-using-x-pack-plugin/127066/4 "2018-05-07T17:11:50Z")

</div>

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