# Kibana privileges by file

**URL:** <https://discuss.elastic.co/t/kibana-privileges-by-file/223623>\
**Category:** Kibana\
**Created:** [March 14, 2020, 4:32pm UTC](https://discuss.elastic.co/t/kibana-privileges-by-file/223623 "2020-03-14T16:32:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![samsalvatico](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samsalvatico/32/47498_2.png) [@samsalvatico](https://discuss.elastic.co/u/samsalvatico)\
**Post date:** [March 14, 2020, 4:32pm UTC](https://discuss.elastic.co/t/kibana-privileges-by-file/223623/1 "2020-03-14T16:32:34Z")

</div>

Hi, this is my scenario:  
I have a 2 nodes elastic cluster and kibana managed by kubernetes.  
I've successfully created users and roles for elasticsearch using roles.yml file.

But I cannot find a way to manage kibana privileges by file and looking in docs they doesn't refer to them in roles file. Is it possible?  
Because I want to have some written configuration that will be the same for different environments and I cannot find the right way.

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [March 16, 2020, 3:45pm UTC](https://discuss.elastic.co/t/kibana-privileges-by-file/223623/2 "2020-03-16T15:45:19Z")

</div>

Hi @samsalvatico,

I am not aware of a roles.yml file for Kibana, but you can use the Kibana API to achieve this.

[https://www.elastic.co/guide/en/kibana/current/role-management-api.html](https://www.elastic.co/guide/en/kibana/current/role-management-api.html)

Thanks,  
Liza

---

<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, 2020, 3:56pm UTC](https://discuss.elastic.co/t/kibana-privileges-by-file/223623/3 "2020-04-13T15:56:37Z")

</div>

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