Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] incorrect opensearch cluster:monitor/tasks/list permission instead of cluster:monitor/tasks/lists #3671

Closed
FelixFeliciant opened this issue Mar 23, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@FelixFeliciant
Copy link

FelixFeliciant commented Mar 23, 2023

Hi,

I stumbled upon an issue when I tried to add cluster permission in OpenSearch-dashboards 2.5 to a role with the following permission:
cluster:monitor/tasks/list
I then tried to query with a user that has that role
GET _cat/tasks in opensearch-dashboards dev tools and I got
security_exception
no permissions for [cluster:monitor/tasks/lists] and User [name=my_user, backend_roles=[my_role], requestedTenant=]"
403

in opensearch-dashboards -> Security -> Roles ->edit\create role -> Cluster Permissions
I cannot add cluster:monitor/tasks/lists it autocompletes to cluster:monitor/tasks/list
as this is the original permission from ElasticSearch:
References:
https://www.elastic.co/guide/en/elasticsearch/reference/8.6/cat-tasks.html#cat-tasks-api-examples
https://opensearch.org/docs/2.5/security/access-control/permissions/

is there a workaround?

Thank you

@FelixFeliciant FelixFeliciant added bug Something isn't working untriaged labels Mar 23, 2023
@minalsha minalsha transferred this issue from opensearch-project/OpenSearch Mar 23, 2023
@cwperks
Copy link
Member

cwperks commented Mar 23, 2023

Hi @FelixFeliciant , the fix for this was released in 2.6 with the folllowing PR: opensearch-project/security-dashboards-plugin#1341

You can add cluster:monitor/tasks/lists or cluster:monitor/tasks/list* to the role via the Security API: https://opensearch.org/docs/2.6/security/access-control/api/#patch-role

@joshuarrrr
Copy link
Member

Thanks @cwperks for the update. I'm closing for now but feel free to reopen @FelixFeliciant if you still have issues or questions about the fix in 2.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants