-
Notifications
You must be signed in to change notification settings - Fork 281
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
[CVE-2022-35980] Ensure concrete indexes included during index resolution for DLS/FLS/Masking checks #1999
[CVE-2022-35980] Ensure concrete indexes included during index resolution for DLS/FLS/Masking checks #1999
Conversation
Resolving index patterns into concrete indices had some confusing logic make it hard to verify its behavior. Updated this code to be easier to read and added test cases to confirm resolution patterns. Also added unit tests to ensure line/by line coverage was correct. Signed-off-by: Peter Nied <[email protected]>
6c000d5
to
107cd4f
Compare
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.
Thank you for the additional tests around the index pattern resolution logic. This is a good addition to making it clearer about how the process works.
src/test/java/org/opensearch/security/securityconf/impl/v7/IndexPatternTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/security/securityconf/impl/v7/IndexPatternTests.java
Show resolved
Hide resolved
src/test/java/org/opensearch/security/securityconf/impl/v7/IndexPatternTests.java
Show resolved
Hide resolved
The fix looks good to me! But the CI failed. I'll redo approval when CI passes. |
…unresolved index Signed-off-by: Peter Nied <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1999 +/- ##
============================================
+ Coverage 61.03% 61.04% +0.01%
Complexity 3232 3232
============================================
Files 256 256
Lines 18085 18084 -1
Branches 3222 3221 -1
============================================
+ Hits 11038 11040 +2
Misses 5471 5471
+ Partials 1576 1573 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
(cherry picked from commit 42b936e)
(cherry picked from commit 42b936e)
(cherry picked from commit 42b936e) Co-authored-by: Peter Nied <[email protected]>
(cherry picked from commit 42b936e) Co-authored-by: Peter Nied <[email protected]>
* Update indices resolution to be clearer (#1999) * Resolving backing indices of data streams when resolving for aliases * Fixing resolution of indices for non-wild card scenarios / exact matches * Adding tests for DLS/FLS/Field-Masking on Data Streams Signed-off-by: Craig Perkins <[email protected]> Co-authored-by: Sandesh Kumar <[email protected]> Co-authored-by: Peter Nied <[email protected]> Co-authored-by: Dave Lago <[email protected]> Co-authored-by: Sandesh Kumar <[email protected]>
Signed-off-by: Stephen Crawford <[email protected]>
…ensearch-project#2002) (cherry picked from commit 42b936e) Co-authored-by: Peter Nied <[email protected]>
Resolving index patterns into concrete indices had some confusing logic
make it hard to verify its behavior. Updated this code to be easier
to read and added test cases to confirm resolution patterns. Also added
unit tests to ensure line/by line coverage was correct.
Issues Resolved
Testing
Check List
New functionality has been documentedBy 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.