-
Notifications
You must be signed in to change notification settings - Fork 113
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
Use adminClient when searching system index in integ tests #1286
Use adminClient when searching system index in integ tests #1286
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
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/index-management/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/index-management/backport-2.x
# Create a new branch
git switch --create backport/backport-1286-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ca2ada20d59be44d0cd10c38658eb9eb20c1d64c
# Push it to GitHub
git push --set-upstream origin backport/backport-1286-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/index-management/backport-2.x Then, create a pull request where the |
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/index-management/backport-2.18 2.18
# Navigate to the new working tree
pushd ../.worktrees/index-management/backport-2.18
# Create a new branch
git switch --create backport/backport-1286-to-2.18
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ca2ada20d59be44d0cd10c38658eb9eb20c1d64c
# Push it to GitHub
git push --set-upstream origin backport/backport-1286-to-2.18
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/index-management/backport-2.18 Then, create a pull request where the |
…h-project#1286) * Use adminClient when searching system index in integ tests Signed-off-by: Craig Perkins <[email protected]> * Replace more instances Signed-off-by: Craig Perkins <[email protected]> * Another instance Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit ca2ada2)
…h-project#1286) * Use adminClient when searching system index in integ tests Signed-off-by: Craig Perkins <[email protected]> * Replace more instances Signed-off-by: Craig Perkins <[email protected]> * Another instance Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit ca2ada2)
…1287) * Use adminClient when searching system index in integ tests Signed-off-by: Craig Perkins <[email protected]> * Replace more instances Signed-off-by: Craig Perkins <[email protected]> * Another instance Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit ca2ada2)
…1288) * Use adminClient when searching system index in integ tests Signed-off-by: Craig Perkins <[email protected]> * Replace more instances Signed-off-by: Craig Perkins <[email protected]> * Another instance Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit ca2ada2)
Description
This PR fixes test failures when running with Security. There are instances in integ tests where the integ test will directly search a system index and should be done with the adminClient.
The reason the tests passed in 2.17 and are failing now is due to a bugfix going into 2.18: opensearch-project/security#4774
In 2.17, security started protecting system indices registered with SystemIndexPlugin.getSystemIndexDescriptors() by default. Admin operations like delete index or write to index are explicitly denied for all users except a user connecting with the admin certificate. Search operations will give back a 200 response, but it will return empty results. In 2.17 there was an issue with the indices registered in core that allowed them to be directly searched by an admin user that has been fixed in 2.18.
Related Issues
Resolves #1269
Check List
--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.