# Opensearch role creation for user with few index pattern permission only

**URL:** <https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890>\
**Category:** Security\
**Tags:** troubleshoot, index-management\
**Created:** [December 23, 2024, 8:48am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890 "2024-12-23T08:48:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [December 23, 2024, 8:48am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/1 "2024-12-23T08:48:45Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
2.16.0

**Describe the issue** :  
I have created role to see few index pattern only like alb-logs\*,cloudfront-logs\*, i created the role and assign it to one user, but my user still can’t able to see the data, i will share the screenshot of role here,

**Configuration** :

**Relevant Logs or Screenshots** :

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/0/0521782b67888b8bfafe04c70c3270b2685bace9.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/0/0069cbdf181010593935cf3c0516f9746bac943b.jpeg)

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [December 23, 2024, 8:57am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/2 "2024-12-23T08:57:34Z")

</div>

In permission given user, I’m getting this error

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/a/a9068ebad27422436de5d07872b1a8b5f9476b59.png)  
in data source it shows empty and can’t able to see the logs

---

<div class="post-metadata">

**Author:** ![cwperks](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/cwperks/32/4968_2.png) [@cwperks](https://forum.opensearch.org/u/cwperks)\
**Post date:** [December 24, 2024, 3:06am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/3 "2024-12-24T03:06:21Z")

</div>

Have you assigned `cluster_composite_ops` in the `cluster_permissions` section?

> **[Defining users and roles](https://opensearch.org/docs/latest/security/access-control/users-roles/#defining-a-basic-read-only-role)**
>
> Defining users and roles

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [December 26, 2024, 9:05am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/4 "2024-12-26T09:05:01Z")

</div>

Yes, I provided cluster\_composite\_ops permission already, still i’m not able to see the specific index pattern logs

---

<div class="post-metadata">

**Author:** ![cwperks](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/cwperks/32/4968_2.png) [@cwperks](https://forum.opensearch.org/u/cwperks)\
**Post date:** [December 30, 2024, 1:03pm UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/5 "2024-12-30T13:03:47Z")

</div>

I think its trying to search through all indices. Create an [index pattern](https://opensearch.org/docs/latest/dashboards/management/index-patterns/) that is selectable from the dropdown so that it is only querying accessible indices.

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [December 31, 2024, 5:36pm UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/6 "2024-12-31T17:36:32Z")

</div>

> [@cwperks](#):
>
> t it is only querying accessible indices.

I created the index pattern, still i can’t able to see the indices

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [January 2, 2025, 9:48am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/7 "2025-01-02T09:48:19Z")

</div>

Hi @manojkumar.m,

Could you run the below in your `Dev Tools` and share the output:

`GET _plugins/_security/authinfo`

Best,  
mj

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [January 2, 2025, 12:41pm UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/8 "2025-01-02T12:41:11Z")

</div>

{  
“user”: “User [name=manoj, backend\_roles=, requestedTenant=]”,  
“user\_name”: “manoj”,  
“user\_requested\_tenant”: “”,  
“remote\_address”: “ip:47546”,  
“backend\_roles”: [  
“”  
],  
“custom\_attribute\_names”: ,  
“roles”: [  
“own\_index”,  
“lumen-logs-view”  
],  
“tenants”: {  
“manoj”: true,  
“global\_tenant”: false  
},  
“principal”: null,  
“peer\_certificates”: “0”,  
“sso\_logout\_url”: null  
}

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [January 2, 2025, 12:45pm UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/9 "2025-01-02T12:45:05Z")

</div>

Could you also run the below (this will require your admin access):

```auto
GET _plugins/_security/api/roles/lumen-logs-view

```

thanks,  
mj

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [January 3, 2025, 7:06am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/10 "2025-01-03T07:06:40Z")

</div>

{  
“status”: “FORBIDDEN”,  
“message”: “No permission to access REST API: User manoj with Security roles [own\_index, lumen-logs-view] does not have any role privileged for admin access. No client TLS certificate found in request”  
}

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [January 3, 2025, 10:49am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/11 "2025-01-03T10:49:36Z")

</div>

> [@manojkumar.m](#):
>
> “No permission to access REST API: User manoj

> [@Mantas](#):
>
> (this will require your admin access):

You’ll need to log in with your admin user to run it.

best,  
mj

---

<div class="post-metadata">

**Author:** ![manojkumar.m](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@manojkumar.m](https://forum.opensearch.org/u/manojkumar.m)\
**Post date:** [January 6, 2025, 9:10am UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/12 "2025-01-06T09:10:17Z")

</div>

{  
“lumen-logs-view”: {  
“reserved”: false,  
“hidden”: false,  
“cluster\_permissions”: [  
“cluster\_composite\_ops”  
],  
“index\_permissions”: [  
{  
“index\_patterns”: [  
“alb-logs-_"  
],  
“dls”: “”,  
“fls”: [],  
“masked\_fields”: [],  
“allowed\_actions”: [  
"indices:data/read/search_”,  
“get”  
]  
}  
],  
“tenant\_permissions”: [  
{  
“tenant\_patterns”: [  
“global\_tenant”  
],  
“allowed\_actions”: [  
“kibana\_all\_read”  
]  
}  
],  
“static”: false  
}  
}

---

<div class="post-metadata">

**Author:** ![Mantas](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Mantas](https://forum.opensearch.org/u/Mantas)\
**Post date:** [January 15, 2025, 12:17pm UTC](https://forum.opensearch.org/t/opensearch-role-creation-for-user-with-few-index-pattern-permission-only/22890/13 "2025-01-15T12:17:52Z")

</div>

> [@manojkumar.m](#):
>
> “index\_patterns”: [  
> “alb-logs-_"_

Hi, is there a \* missing?

shouldn`t it be “alb-logs-\*"?

Have you created an Index pattern for the “alb-logs-\*"?

best,  
mj
