# How to create a read-only user having access to specific indices (in discover page) and specific dashboard(s) only?

**URL:** <https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117>\
**Category:** Security\
**Created:** [February 25, 2021, 9:45am UTC](https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117 "2021-02-25T09:45:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/elasticheart/32/943_2.png) [@elasticheart](https://forum.opensearch.org/u/elasticheart)\
**Post date:** [February 25, 2021, 9:45am UTC](https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117/1 "2021-02-25T09:45:05Z")

</div>

Hi,

I went through `Security > Internal Users` and I was checking whether this is possible. I have 4 indices, say, `indexa`, `indexb`, `indexc` and `indexd`. I have 4 dashboards, say `dashboarda`, `dashboardb`, `dashboardc` and `dashboardd`.

I want to create a readonly user having `username` and `password` as `readonly_user`.

1. I want this user to be able to read only `indexa` and `indexb`.
2. I want this user to be able to access only `dashboarda` and `dashboardb`

I have two questions;

1. How to create a that user with KIbana UI
2. Is it possible to create user using API? If possible, how?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [March 2, 2021, 7:22pm UTC](https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117/2 "2021-03-02T19:22:56Z")

</div>

Hi @elasticheart The index access is easily accomplished using index patterns permissions in roles which can be done via both Kibana UI and APIs, however as far as I know the only way to limit access to certain kibana objects (dashboards, visualisations etc) is to use separate tenants. Would that work for your use case?

---

<div class="post-metadata">

**Author:** ![guhan](https://avatars.discourse-cdn.com/v4/letter/g/f9ae1b/32.png) [@guhan](https://forum.opensearch.org/u/guhan)\
**Post date:** [September 15, 2021, 12:19pm UTC](https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117/3 "2021-09-15T12:19:12Z")

</div>

I have the similar situation to test. I dont mind if readonly user able to see the menus but he should not have “EDIT” button in the dashboard and should not alter anything.

Any luck in the process?

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [September 15, 2021, 2:08pm UTC](https://forum.opensearch.org/t/how-to-create-a-read-only-user-having-access-to-specific-indices-in-discover-page-and-specific-dashboard-s-only/5117/4 "2021-09-15T14:08:32Z")

</div>

@guhan What odfe version are you running?

Have you tried providing kibana\_read\_only role with additional custom role which only grants read permission on the specific tenant? The button to edit will still be there, however will not allow the user to save changes
