# Role based access control for Kibana and Elastic Search

**URL:** <https://discuss.elastic.co/t/role-based-access-control-for-kibana-and-elastic-search/132111>\
**Category:** Kibana\
**Created:** [May 16, 2018, 11:50am UTC](https://discuss.elastic.co/t/role-based-access-control-for-kibana-and-elastic-search/132111 "2018-05-16T11:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshal\_Yeole](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@Harshal\_Yeole](https://discuss.elastic.co/u/Harshal_Yeole)\
**Post date:** [May 16, 2018, 11:50am UTC](https://discuss.elastic.co/t/role-based-access-control-for-kibana-and-elastic-search/132111/1 "2018-05-16T11:50:57Z")

</div>

I am new to Elastic and Kibana. Using Version **6.2.4**.  
I have installed the ELK stack with the X-pack enabled on it.  
Now I have Kibana working on port 5601 with authentication and elastic working on 9200 with authentication.

Here is what I want to achieve by Kibana:

- Get visualisations for the data
- Give different roles to different users
- Based on role, restrict the user access for data
- Example users will be Admin, user and anonymous user

Can this be done using Kibana? If No, what wrong I am expecting?

If yes, then I am facing a issue I have stated below:

I know how to create the users. Curl call below create

```
curl -XPOST -u elastic 'localhost:9200/_xpack/security/user/ingestadmin' -H "Content-Type: application/json" -d '{
  "password" : "tudip123",
  "full_name" : "Ingest Admin",
  "email" : "ingest.admin@xyz.com",
  "roles" : ["ingest_admin"]
}'
```

---

<div class="post-metadata">

**Author:** ![djtecha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/djtecha/32/54011_2.png) [@djtecha](https://discuss.elastic.co/u/djtecha)\
**Post date:** [May 16, 2018, 3:59pm UTC](https://discuss.elastic.co/t/role-based-access-control-for-kibana-and-elastic-search/132111/2 "2018-05-16T15:59:10Z")

</div>

Yes, in fact I have tied it in to LDAP and used a mustache template to limit the users to specific documents based off of their role.

---

<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 13, 2018, 3:59pm UTC](https://discuss.elastic.co/t/role-based-access-control-for-kibana-and-elastic-search/132111/3 "2018-06-13T15:59:17Z")

</div>

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