-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[9.0] Bugfix: Prevent invalid privileges in manage roles privilege #128847
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
Conversation
…#128532) This PR addresses the bug reported in [elastic#127496](elastic#127496) **Changes:** - Added validation logic in `ConfigurableClusterPrivileges` to ensure privileges defined for a global cluster manage role privilege are valid - Added unit test to `ManageRolePrivilegesTest` to ensure invalid privilege is caught during role creation - Updated `BulkPutRoleRestIT` to assert that an error is thrown and that the role is not created. Both existing and new unit/integration tests passed locally.
|
@jfreden On the original PR, I used another function ( IndexPrivilege.resolveBySelectorAccess() )- but that didn't exist on this branch. I saw this IndexPrivilege.get() function essentially does the same thing, so I wanted to make sure I could use it interchangeably. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Since you are planing to backport the fix to 8.18 and 8.17 branches, I suggest you label this PR auto-backport and add appropriate version labels. This way you wont need to do it manually.
…elastic#128847) This PR addresses the bug reported in [elastic#127496](elastic#127496) **Changes:** - Added validation logic in `ConfigurableClusterPrivileges` to ensure privileges defined for a global cluster manage role privilege are valid - Added unit test to `ManageRolePrivilegesTest` to ensure invalid privilege is caught during role creation - Updated `BulkPutRoleRestIT` to assert that an error is thrown and that the role is not created. Both existing and new unit/integration tests passed locally.
…elastic#128847) This PR addresses the bug reported in [elastic#127496](elastic#127496) **Changes:** - Added validation logic in `ConfigurableClusterPrivileges` to ensure privileges defined for a global cluster manage role privilege are valid - Added unit test to `ManageRolePrivilegesTest` to ensure invalid privilege is caught during role creation - Updated `BulkPutRoleRestIT` to assert that an error is thrown and that the role is not created. Both existing and new unit/integration tests passed locally.
…) (#129155) This PR addresses the bug reported in [#127496](#127496) **Changes:** - Added validation logic in `ConfigurableClusterPrivileges` to ensure privileges defined for a global cluster manage role privilege are valid - Added unit test to `ManageRolePrivilegesTest` to ensure invalid privilege is caught during role creation - Updated `BulkPutRoleRestIT` to assert that an error is thrown and that the role is not created. Both existing and new unit/integration tests passed locally.
…) (#129156) This PR addresses the bug reported in [#127496](#127496) **Changes:** - Added validation logic in `ConfigurableClusterPrivileges` to ensure privileges defined for a global cluster manage role privilege are valid - Added unit test to `ManageRolePrivilegesTest` to ensure invalid privilege is caught during role creation - Updated `BulkPutRoleRestIT` to assert that an error is thrown and that the role is not created. Both existing and new unit/integration tests passed locally.
Backport of #128532