Skip to content

Conversation

@gmjehovich
Copy link
Contributor

This PR addresses the bug reported in #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.

@gmjehovich gmjehovich added >bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC :Security/Security Security issues without another label Team:Security Meta label for security team labels May 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @gmjehovich, I've created a changelog YAML for you.

@n1v0lg n1v0lg self-requested a review May 28, 2025 08:49
@n1v0lg n1v0lg assigned gmjehovich and unassigned gmjehovich and n1v0lg May 28, 2025
@n1v0lg n1v0lg added v8.19.0 auto-backport Automatically create backport pull requests when merged and removed :Security/Security Security issues without another label labels May 28, 2025
Copy link
Contributor

@n1v0lg n1v0lg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work 🚀 A couple comments but nothing that requires another round of review.

gmjehovich and others added 8 commits May 28, 2025 18:31
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
…security/authz/privilege/ManageRolesPrivilegesTests.java

Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
@gmjehovich gmjehovich added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label May 28, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @gmjehovich, I've updated the changelog YAML for you.

@gmjehovich gmjehovich marked this pull request as ready for review May 28, 2025 22:42
@gmjehovich gmjehovich requested a review from a team as a code owner May 28, 2025 22:42
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine elasticsearchmachine merged commit 57d4e15 into elastic:main May 29, 2025
23 checks passed
@gmjehovich gmjehovich deleted the managed-role-bug branch May 29, 2025 16:15
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.19
9.0 Commit could not be cherrypicked due to conflicts
8.17 Commit could not be cherrypicked due to conflicts
8.18 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 128532

joshua-adams-1 pushed a commit to joshua-adams-1/elasticsearch that referenced this pull request Jun 3, 2025
…#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.
gmjehovich added a commit to gmjehovich/elasticsearch that referenced this pull request Jun 3, 2025
…#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.
Samiul-TheSoccerFan pushed a commit to Samiul-TheSoccerFan/elasticsearch that referenced this pull request Jun 5, 2025
…#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.
gmjehovich added a commit that referenced this pull request Jun 9, 2025
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.
gmjehovich added a commit to gmjehovich/elasticsearch that referenced this pull request Jun 9, 2025
…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.
gmjehovich added a commit to gmjehovich/elasticsearch that referenced this pull request Jun 9, 2025
…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.
elasticsearchmachine pushed a commit that referenced this pull request Jun 9, 2025
…) (#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.
elasticsearchmachine pushed a commit that referenced this pull request Jun 9, 2025
…) (#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.
elasticsearchmachine pushed a commit that referenced this pull request Jun 9, 2025
#128626)

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.

Co-authored-by: Joe Gallo <joe.gallo@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v8.17.8 v8.18.3 v8.19.0 v9.0.2 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants