Separated DLS/FLS privilege evaluation from action privilege evaluation#4490
Merged
cwperks merged 7 commits intoopensearch-project:mainfrom Jul 9, 2024
Merged
Conversation
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]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4490 +/- ##
==========================================
- Coverage 65.27% 65.22% -0.05%
==========================================
Files 313 314 +1
Lines 22058 22090 +32
Branches 3563 3563
==========================================
+ Hits 14398 14408 +10
- Misses 5889 5906 +17
- Partials 1771 1776 +5
|
cwperks
reviewed
Jul 1, 2024
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Show resolved
Hide resolved
cwperks
reviewed
Jul 1, 2024
src/main/java/org/opensearch/security/filter/SecurityFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/filter/SecurityFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluationContext.java
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Show resolved
Hide resolved
src/main/java/org/opensearch/security/filter/SecurityFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Show resolved
Hide resolved
…TRO_SECURITY_INJECTED_ROLES_VALIDATION handling back to evaluate() Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: Nils Bandener <[email protected]>
cwperks
approved these changes
Jul 5, 2024
Member
cwperks
left a comment
There was a problem hiding this comment.
The new changes look good. Let's capture the role re-assignment for the injected roles validation set in an issue to discuss further.
shikharj05
approved these changes
Jul 8, 2024
DarshitChanpura
approved these changes
Jul 9, 2024
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluationContext.java
Show resolved
Hide resolved
Member
|
@cwperks @scrawfor99 this is blocked by each of your un-resolved conversations. Would you mind going through them and closing as needed? |
stephen-crawford
approved these changes
Jul 9, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jul 9, 2024
…on (#4490) Signed-off-by: Nils Bandener <[email protected]> (cherry picked from commit dabff35) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or 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
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 change is in preparation for #3870 and #4380 .
This cuts off some parts from the quite big and monolithic method
PrivilegesEvaluator.evaluate()into separate methods and modules.This achieves several things:
PrivilegesEvaluationContextcombines commonly needed information for privilege evaluation and thus allows to shorten the parameter lists of many methods in this context. For this PR, only thePrivilegesEvaluator.evaluate()method itself is changed, but further adaptions will follow up when due.Issues Resolved
Contributes to #3870
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.