Prevent invalid named privileges in manage roles privilege #127496
Labels
>bug
:Security/Authorization
Roles, Privileges, DLS/FLS, RBAC/ABAC
Team:Security
Meta label for security team
Elasticsearch Version
8.16 and up
Installed Plugins
No response
Java Version
bundled
OS Version
irrelevant
Problem Description
#110633 introduced the global cluster manage role privilege. This privilege allows limiting the resources and privileges an Elasticsearch user can grant permissions to.
Currently, it's possible to include invalid named privileges in its definition, e.g.,:
This results in a broken role -- a user assigned with this role will receive failures at runtime when attempting to authenticate.
We can instead prevent this by adding a validation step during role creation, here-abouts.
Steps to Reproduce
Create a role with the global manage role permission that includes an unknown named privilege:
Create a user with that role:
Call an Elasticsearch API with that user:
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: