Command cat/indices will filter results per the Do Not Fail On Forbidden setting#3236
Merged
RyanL1997 merged 9 commits intoopensearch-project:mainfrom Aug 29, 2023
Merged
Conversation
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
derek-ho
commented
Aug 24, 2023
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
peternied
reviewed
Aug 24, 2023
src/integrationTest/java/org/opensearch/security/privileges/PrivilegesEvaluatorDNFOFTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3236 +/- ##
==========================================
Coverage 62.49% 62.49%
- Complexity 3351 3400 +49
==========================================
Files 254 259 +5
Lines 19732 20056 +324
Branches 3334 3370 +36
==========================================
+ Hits 12331 12534 +203
- Misses 5773 5872 +99
- Partials 1628 1650 +22
🚀 New features to boost your workflow:
|
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
peternied
reviewed
Aug 25, 2023
src/integrationTest/java/org/opensearch/security/DoNotFailOnForbiddenTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
derek-ho
commented
Aug 25, 2023
src/test/java/org/opensearch/security/privileges/PrivilegesEvaluatorUnitTest.java
Show resolved
Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
peternied
reviewed
Aug 26, 2023
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
cat/indices will filter results per the Do Not Fail On Forbidden setting
peternied
approved these changes
Aug 28, 2023
RyanL1997
approved these changes
Aug 29, 2023
Contributor
|
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-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-3236-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4c095d27fd30ec279dd4214e72a831ea9123a693
# Push it to GitHub
git push --set-upstream origin backport/backport-3236-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.xThen, create a pull request where the |
Member
|
Backport likely failed due to the integration tests not being backported |
derek-ho
added a commit
to derek-ho/security
that referenced
this pull request
Aug 29, 2023
…idden setting (opensearch-project#3236) This change allows for DNFOF behavior on the _cat/_indices API. It adds the required index permissions into the DNFOF regex to be picked up in the DNFOF code path. Previously it was being skipped/returning 403, since the index permissions were not in the regex. Fix: opensearch-project#1815 Is this a backport? If so, please add backport PR # and/or commits # [Please provide details of testing done: unit testing, integration testing and manual testing] - [ ] New functionality includes testing - [ ] New functionality has been documented - [ ] Commits are signed per the DCO using --signoff 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Derek Ho <dxho@amazon.com> (cherry picked from commit 4c095d2) Signed-off-by: Derek Ho <dxho@amazon.com>
3 tasks
cwperks
pushed a commit
that referenced
this pull request
Aug 29, 2023
…ot fail on forbidden setting (#3258) ### Description Backport 4c095d2 of #3236 ### Check List - [ ] New functionality includes testing - [ ] New functionality has been documented - [X] Commits are signed per the DCO using --signoff 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Derek Ho <dxho@amazon.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 allows for DNFOF behavior on the _cat/_indices API. It adds the required index permissions into the DNFOF regex to be picked up in the DNFOF code path. Previously it was being skipped/returning 403, since the index permissions were not in the regex.
Issues Resolved
Fix: #1815
Is this a backport? If so, please add backport PR # and/or commits #
Testing
[Please provide details of testing done: unit testing, integration testing and manual 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.