-
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
Fix data-stream name resolution for wild-cards #1723
Merged
Merged
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: Sandesh Kumar <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1723 +/- ##
============================================
- Coverage 62.88% 62.88% -0.01%
+ Complexity 3265 3264 -1
============================================
Files 253 253
Lines 18097 18102 +5
Branches 3246 3247 +1
============================================
+ Hits 11380 11383 +3
- Misses 5063 5064 +1
- Partials 1654 1655 +1
Continue to review full report at Codecov.
|
Signed-off-by: Sandesh Kumar <[email protected]>
peternied
approved these changes
Mar 31, 2022
davidlago
approved these changes
Mar 31, 2022
cliu123
added
backport 1.x
backport to 1.x branch
backport 1.2
backport to 1.2 branch
backport 1.3
backport to 1.3 branch
backport 1.1
backport to 1.1 branch
backport 1.0
backport to 1.0 branch
labels
Mar 31, 2022
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9)
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9)
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9)
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9)
This was referenced Mar 31, 2022
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9)
peternied
pushed a commit
that referenced
this pull request
Mar 31, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9) Co-authored-by: Sandesh Kumar <[email protected]>
cliu123
pushed a commit
that referenced
this pull request
Apr 3, 2022
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9) Co-authored-by: Sandesh Kumar <[email protected]>
cliu123
pushed a commit
that referenced
this pull request
Apr 4, 2022
Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9) Co-authored-by: Sandesh Kumar <[email protected]>
cliu123
pushed a commit
that referenced
this pull request
Apr 4, 2022
Signed-off-by: Sandesh Kumar <[email protected]> (cherry picked from commit 8dccda9) Co-authored-by: Sandesh Kumar <[email protected]>
peternied
pushed a commit
that referenced
this pull request
Apr 7, 2022
* Fix data-stream name resolution for wild-cards (cherry picked from commit 8dccda9) Signed-off-by: Sandesh Kumar <[email protected]> Co-authored-by: Sandesh Kumar <[email protected]>
wuychn
pushed a commit
to ochprince/security
that referenced
this pull request
Mar 16, 2023
* Fix data-stream name resolution for wild-cards Signed-off-by: Sandesh Kumar <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 1.x
backport to 1.x branch
backport 1.0
backport to 1.0 branch
backport 1.1
backport to 1.1 branch
backport 1.2
backport to 1.2 branch
backport 1.3
backport to 1.3 branch
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.
Signed-off-by: Sandesh Kumar [email protected]
Description
[Describe what this change achieves]
Category: Bug fix
Security plugin is not able to invalidate non-permitted data-stream (get/delete/stats) requests sent using wild-card expressions.
This is because the list of 'allIndices' in 'ResolvedIndicesProvider' class does not has the resolved names of data streams. If the 'allIndices' variable when resolved, is empty -> leads the authorization to succeed as there are no eligible index patterns to block the request.
In this change, we add the the names of resolved data streams to 'allIndices' so data stream names also can get resolved.
Additional Information: This PR (code changes) was already reviewed and merged in 1.3 branch but was reverted back because 1.3 branch was finalized.
Refer: Fix data-stream name resolution for wild-cards #1716
What is the old behavior before changes and new behavior after changes?
Suppose the indices are as follows in a OS cluster.
Assume the user
sandesh
to have the following data-streams related permissions:The ideal (expected) behavior is that user
sandesh
should not be able to access data-streams other than logs-nginx1 & logs-nginx11.Old Behaviour:
New Behaviour:
Issues Resolved
#1498
Is this a backport? If so, please add backport PR # and/or commits #
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.