You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, using the GET /_alias/<alias> API requires the caller to have the indices:admin/aliases/get permission on the * index pattern, even when the alias resolves to a specific index (or set of indices).
This is overly permissive and prevents least-privilege configurations. A user with access to a specific index (or alias) should not need cluster-wide alias permissions in order to resolve that alias.
This issue also manifests indirectly through the SQL plugin due to changes introduced in:
Description
Currently, using the
GET /_alias/<alias>API requires the caller to have theindices:admin/aliases/getpermission on the*index pattern, even when the alias resolves to a specific index (or set of indices).This is overly permissive and prevents least-privilege configurations. A user with access to a specific index (or alias) should not need cluster-wide alias permissions in order to resolve that alias.
This issue also manifests indirectly through the SQL plugin due to changes introduced in:
opensearch-project/sql#2960
After that change, SQL queries that rely on alias resolution fail unless the user has
indices:admin/aliases/geton*.Steps to Reproduce
Create an index and alias:
PUT my-index { "aliases": { "my-alias": {} } }Create a role with limited permissions:
{ "index_permissions": [ { "index_patterns": ["my-alias"], "allowed_actions": [ "read", "indices:admin/aliases/get" ] } ] }Assign the role to a user.
Call:
Actual Behavior
The request fails with a security exception unless
indices:admin/aliases/getis granted on the*index pattern.The same issue causes SQL queries involving aliases to fail unless the user has alias permissions on
*.Expected Behavior
GET /_alias/<alias>should authorize based on:A user with access to
my-aliasshould be able to resolvemy-indexwithout requiring cluster-wide alias privileges.Forces overly broad index permissions
Causes regressions in SQL usage involving aliases (post Resolve Alias Issues in Legacy SQL with Filters sql#2960)
Related