# Elastic cloud 8.6 read only role

**URL:** https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569
**Category:** Elasticsearch
**Created:** [February 2, 2023, 5:28pm UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569 "2023-02-02T17:28:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aneeshks1982](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@aneeshks1982](https://discuss.elastic.co/u/aneeshks1982)
#### Post date: [February 2, 2023, 5:28pm UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/1 "2023-02-02T17:28:34Z")

</div>

Hi,  
Can someone tell me how to create a read-only role in elastic cloud 8.6 version

---

<div class="post-metadata">

### Author: ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)
#### Post date: [February 3, 2023, 8:22am UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/2 "2023-02-03T08:22:33Z")

</div>

Hi @aneeshks1982,

Are you asking how to create a read-only role API key? See [api key documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html) on how to. Notice the read privilege in the example shared.

Joe

---

<div class="post-metadata">

### Author: ![aneeshks1982](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@aneeshks1982](https://discuss.elastic.co/u/aneeshks1982)
#### Post date: [February 3, 2023, 8:54am UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/3 "2023-02-03T08:54:14Z")

</div>

Hi Joe,  
My requirement is, I should have a user with read-only permission. I have created the user, now I need to assign a read only role(user should able to read all the indices) to that user. I couldn't find any in-built role created for read-only purpose.

---

<div class="post-metadata">

### Author: ![joemcelroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joemcelroy/32/103757_2.png) [@joemcelroy](https://discuss.elastic.co/u/joemcelroy)
#### Post date: [February 3, 2023, 10:57am UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/4 "2023-02-03T10:57:36Z")

</div>

Ok - couple of clarifying questions:

- How did you create the user? Was it through stack management \> security \> users?
- Have you looked at creating a new role within stack management \> security \> roles and created an index privilege and adding a wildcard to indices and read only privilege, then assigning the new user to the role?

---

<div class="post-metadata">

### Author: ![aneeshks1982](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@aneeshks1982](https://discuss.elastic.co/u/aneeshks1982)
#### Post date: [February 3, 2023, 11:20am UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/5 "2023-02-03T11:20:06Z")

</div>

I have created user using "Create or update users API", which is too complex.

Now I tried your method and that works for me.. thanks a lot.

---

<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: [March 3, 2023, 11:20am UTC](https://discuss.elastic.co/t/elastic-cloud-8-6-read-only-role/324569/6 "2023-03-03T11:20:35Z")

</div>

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