-
Notifications
You must be signed in to change notification settings - Fork 343
Introduced setting for disabling denormalized privilege data structures #5465
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
Introduced setting for disabling denormalized privilege data structures #5465
Conversation
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5465 +/- ##
==========================================
+ Coverage 72.57% 72.62% +0.05%
==========================================
Files 397 397
Lines 24562 24575 +13
Branches 3734 3736 +2
==========================================
+ Hits 17825 17848 +23
+ Misses 4904 4895 -9
+ Partials 1833 1832 -1
🚀 New features to boost your workflow:
|
Signed-off-by: Nils Bandener <[email protected]>
...nTest/java/org/opensearch/security/privileges/actionlevel/RoleBasedActionPrivilegesTest.java
Show resolved
Hide resolved
cwperks
left a comment
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.
The new settings looks ok to me. What would be the effort required to run more of the automated tests with plugins.security.privileges_evaluation.precomputed_privileges.enabled set to false?
We already run all unit tests for RoleBasedActionPrivileges and the AbstractRuleBasedPrivileges family. Due to slight implementation differences, it is explicitly implemented in AbstractRuleBasedPrivileges. In RoleBasedActionPrivileges, it is just implicitly tested via the test param NON_STATEFUL: Lines 792 to 796 in da7d66a
|
|
Thanks @nibix !
Do you think an async method should be implemented as a follow-up to still allow building of pre-computed privileges and keep most of the benefits from #3870 ? I see your comment here - did you see any challenges while trying an async method or is it just a pending TODO? |
That's not a TODO, async processing is already in place. The only exception is currently the security config update process. However, from the test results so far, I can not really imagine that the CPU time is a real issue here. My tests showed so far maybe 1000 ms of processing time, which is of course not fast, but which also should not lead to timeout issues. I am still actively looking for the cause of the issue in #5464 but so far I could not really pinpoint anything. |
we can continue to discuss on the open issue #5464 |
|
The backport to To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-3.1 3.1
# Navigate to the new working tree
pushd ../.worktrees/security/backport-3.1
# Create a new branch
git switch --create backport/backport-5465-to-3.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8d5988014c1304210ba48ddff421c63f0306db3f
# Push it to GitHub
git push --set-upstream origin backport/backport-5465-to-3.1
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-3.1Then, create a pull request where the |
|
@pranu2502 good point, thank you for the heads up, I will take care ASAP. |
|
Do we know how PR #5374 got missed in 3.1 ? |
|
See #5483 |
This is only needed for support of features which are also both not part of 3.1:
Thus, I guess, there's no real point to have that in 3.1 |
Ok. got it. Yeah, if the change is not needed for 3.1, we can skip it and accordingly fix #5483 |
Description
This introduces the setting
plugins.security.privileges_evaluation.precomputed_privileges.enabledwhich can be used to disable the creation of denormalized privilege data structures. It is enabled by default to provide the best action throughput. It can make sense to disable the setting when it is seen that the initialisation process takes so much time/resources that it negatively affects the cluster performance (like observed in #5464) . This come at the price of a reduced action throughput.Testing
Check List
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.