-
Notifications
You must be signed in to change notification settings - Fork 282
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
Command cat/indices
will filter results per the Do Not Fail On Forbidden setting
#3236
Conversation
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/integrationTest/java/org/opensearch/security/privileges/PrivilegesEvaluatorDNFOFTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <[email protected]>
Codecov Report
@@ 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
|
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/integrationTest/java/org/opensearch/security/DoNotFailOnForbiddenTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <[email protected]>
src/test/java/org/opensearch/security/privileges/PrivilegesEvaluatorUnitTest.java
Show resolved
Hide resolved
Signed-off-by: Derek Ho <[email protected]>
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/privileges/PrivilegesEvaluator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <[email protected]>
cat/indices
will filter results per the Do Not Fail On Forbidden setting
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.x Then, create a pull request where the |
Backport likely failed due to the integration tests not being backported |
…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 <[email protected]> (cherry picked from commit 4c095d2) Signed-off-by: Derek Ho <[email protected]>
…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 <[email protected]>
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.