-
Notifications
You must be signed in to change notification settings - Fork 291
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 Backport] Optimized Privilege Evaluation: Action privileges ONLY, with feature flag #4998
Merged
DarshitChanpura
merged 12 commits into
opensearch-project:2.x
from
nibix:optimized-privilege-evaluation-2.x-2
Jan 13, 2025
Merged
[2.x Backport] Optimized Privilege Evaluation: Action privileges ONLY, with feature flag #4998
DarshitChanpura
merged 12 commits into
opensearch-project:2.x
from
nibix:optimized-privilege-evaluation-2.x-2
Jan 13, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
…d_privileges.include_indices See discussion in opensearch-project#4380 (comment) Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
nibix
requested review from
cwperks,
DarshitChanpura,
derek-ho,
peternied,
RyanL1997,
reta and
willyborankin
as code owners
December 30, 2024 16:04
3 tasks
Thanks @nibix ! |
5 tasks
5 tasks
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
cwperks
reviewed
Jan 10, 2025
sure. I will take a look at it. |
cwperks
approved these changes
Jan 13, 2025
DarshitChanpura
approved these changes
Jan 13, 2025
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This implements the optimized privilege evaluation as described in #3870 and partially backports the changes from #4380 to the 2.x branch.
This supersedes the PR #4898 . The changes are an outcome from the requests that came up in the review of #4898.
Particularly, this PR now contains both the new privilege evaluation implementation and the old privilege evaluation implementation. The new implementation is active by default; the old implementation can be restored by setting the opensearch.yml setting
plugins.security.privileges_evaluation.use_legacy_impl
totrue
.Additionally, this contains ONLY the changes related to action privileges. The DLS/FLS implementation is still the old one.
Performance tests indicate that the OpenSearch security layer adds a noticeable overhead to the indexing throughput of an OpenSearch cluster. The overhead may vary depending on the number of indices, the use of aliases, the number of roles and the size of the user object. The goal of these changes is to improve privilege evaluation performance and to make it less dependent on the number of indices, etc.
The additional preservation of the old implementation has been added on request in order to have an option to roll back to the old implementation in case issues are found in the new implementation. Unfortunately, this makes it necessary to double up quite a lot of code.
No significant behavioral changes in the "happy case", when privileges are present.
The undocumented config option config.dynamic.multi_rolespan_enabled is no longer evaluated. The code now behaves like it is always set to true - that is the former default. See #4495 for details.
Some slight changes are present in error cases:
Issues Resolved
Partially #3870
This is a partial backport from #4380
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.