Skip to content
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

[2.x] Optimize privilege evaluation for index permissions across '*' index pattern (i.e. all_access role) #4926

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Nov 21, 2024

Description

Creating this backport to explore a small optimization for the all_access role when evaluating index permissions in clusters with a large number of indices.

This PR is not a strategic fix like #4898. #4898 takes a holistic approach to optimize privilege evaluation for any type of role definition.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Performance improvement

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@cwperks cwperks changed the title [2.x] Optimize privilege evaluation for all_access role [2.x] Optimize privilege evaluation for index permissions across '*' index pattern (i.e. all_access role) Nov 21, 2024
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.93%. Comparing base (55ff20e) to head (53ada80).
Report is 15 commits behind head on 2.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x    #4926      +/-   ##
==========================================
+ Coverage   63.91%   63.93%   +0.01%     
==========================================
  Files         330      330              
  Lines       23118    23148      +30     
  Branches     3745     3752       +7     
==========================================
+ Hits        14777    14800      +23     
- Misses       6509     6514       +5     
- Partials     1832     1834       +2     
Files with missing lines Coverage Δ
...pensearch/security/securityconf/ConfigModelV7.java 67.54% <100.00%> (+0.24%) ⬆️

... and 12 files with indirect coverage changes

---- 🚨 Try these New Features:

Signed-off-by: Craig Perkins <[email protected]>
Copy link
Contributor

@shikharj05 shikharj05 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, can we add some tests?

Signed-off-by: Craig Perkins <[email protected]>
@cwperks
Copy link
Member Author

cwperks commented Nov 22, 2024

Thanks for the contribution, can we add some tests?

Added unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants