-
Notifications
You must be signed in to change notification settings - Fork 358
Improve the security permission check in cat indices (_cat/indices) API #2257
Description
Is your feature request related to a problem? Please describe.
Today, to be able to call _cat/indices successfully, you need to have a permission at least with these permissions:
"cluster_permissions" : [
"cluster:monitor/state",
"cluster:monitor/health"
],
"index_permissions" : [
{
"index_patterns" : [
"*"
],
"allowed_actions" : [
"indices:monitor/settings/get",
"indices:monitor/stats"
]
}
]
If the index_patterns is not set to "*" but "log-*", _cat/indices fails with a security exception:
"no permissions for [indices:monitor/settings/get] and User [name=bowen, backend_roles=[], requestedTenant=__user__]
I suppose this is because cluster has other indices that don't match "log-*" and security check fails.
You will be able to call _cat/indices/log-* successfully though.
Describe the solution you'd like
Instead of failing the full request, can we improve the user experience of _cat/indices to return the indices user has permission of?
To be specific, if user has index permission on "log-*", calling _cat/indices can return the indices start with log- in the cluster.