# Kibana Xpack User roles

**URL:** <https://discuss.elastic.co/t/kibana-xpack-user-roles/133273>\
**Category:** Kibana\
**Created:** [May 25, 2018, 7:35am UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273 "2018-05-25T07:35:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhanashree](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dhanashree](https://discuss.elastic.co/u/Dhanashree)\
**Post date:** [May 25, 2018, 7:35am UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273/1 "2018-05-25T07:35:13Z")

</div>

Hi,  
Is there a way to create users and roles dynamically with the incoming data in kibana on the basis of field names ?  
Or some specific file where i can add these users and roles apart from kibana UI.

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [May 25, 2018, 8:04am UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273/2 "2018-05-25T08:04:10Z")

</div>

Hi @Dhanashree,

It depends what your ultimate goal is, your description of the problem statement is too vague.

Just from what I understood, you want to create users and roles dynamically based on some incoming data and then provide them access to Kibana UI.

For Authentication and Authorization with X-Pack, Kibana depends on Elasticsearch X-Pack configuration.  
You can see more details here:  
[https://www.elastic.co/guide/en/kibana/current/using-kibana-with-security.html](https://www.elastic.co/guide/en/kibana/current/using-kibana-with-security.html)

Users and roles are managed by Elasticseach and for this you would need x-pack plugin installed.  
You can use following APIs to manager users and roles on Elasticsearch.  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.2/security-api-users.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/security-api-users.html)  
[https://www.elastic.co/guide/en/elasticsearch/reference/6.2/security-api-roles.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/security-api-roles.html)

Where you do this, would depend on how the data is brought into Elasticsearch.

Please let us know more in detail if you need more information.

Regards,  
Yogesh Gaikwad

---

<div class="post-metadata">

**Author:** ![Dhanashree](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dhanashree](https://discuss.elastic.co/u/Dhanashree)\
**Post date:** [May 25, 2018, 8:12am UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273/3 "2018-05-25T08:12:07Z")

</div>

Hi @Yogesh_Gaikwad  
I am already using the xpack for creating users and roles.But my question is suppose i have a field a and i am getting live data so i will keep on getting different values for the field a. Now i want to create user and roles for a particular value of field a based on the live data how can i do that dynamically.

---

<div class="post-metadata">

**Author:** ![Yogesh\_Gaikwad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yogesh_gaikwad/32/27025_2.png) [@Yogesh\_Gaikwad](https://discuss.elastic.co/u/Yogesh_Gaikwad)\
**Post date:** [May 25, 2018, 1:41pm UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273/4 "2018-05-25T13:41:57Z")

</div>

Hi @Dhanashree,

I think this is what you want document level security:  
[https://www.elastic.co/guide/en/x-pack/current/field-and-document-access-control.html#document-level-security](https://www.elastic.co/guide/en/x-pack/current/field-and-document-access-control.html#document-level-security)  
Please check your x-pack license for features as per [https://www.elastic.co/subscriptions](https://www.elastic.co/subscriptions), you need Platinum/Enterprise license to have field level, document level security.

Regards,  
Yogesh Gaikwad

---

<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:** [June 22, 2018, 1:42pm UTC](https://discuss.elastic.co/t/kibana-xpack-user-roles/133273/5 "2018-06-22T13:42:06Z")

</div>

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