Skip to content

Fix permissions issue with _update_by_query API that requires permission for indices:data/read/scroll/clear#17250

Open
cwperks wants to merge 4 commits intoopensearch-project:mainfrom
cwperks:fix-update-by-query
Open

Fix permissions issue with _update_by_query API that requires permission for indices:data/read/scroll/clear#17250
cwperks wants to merge 4 commits intoopensearch-project:mainfrom
cwperks:fix-update-by-query

Conversation

@cwperks
Copy link
Copy Markdown
Member

@cwperks cwperks commented Feb 4, 2025

Description

I discovered an issue with the _update_by_query API where is requires a user to have permissions for indices:data/read/scroll/clear in order to call this API.

The reason for this is that it internally uses scroll to perform the update. Since these are internal calls, I think it would be better to wrap them in a system context which doesn't require authorization so that end users can be permitted to use _update_by_query by simply having the permission for indices:data/write/update/byquery

A test to replicate the permissions issue would be added in the security plugin.

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

…ion for indices:data/read/scroll/clear

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2025

❌ Gradle check result for e4f58ca: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2025

✅ Gradle check result for 346dae6: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.42%. Comparing base (865704b) to head (346dae6).
Report is 353 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17250      +/-   ##
============================================
- Coverage     72.43%   72.42%   -0.01%     
- Complexity    65725    65752      +27     
============================================
  Files          5318     5318              
  Lines        305675   305678       +3     
  Branches      44350    44350              
============================================
- Hits         221408   221381      -27     
- Misses        66055    66131      +76     
+ Partials      18212    18166      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Mar 7, 2025
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Apr 7, 2025
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added the stalled Issues that have stalled label May 10, 2025
cwperks added 2 commits May 19, 2025 15:45
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks requested a review from a team as a code owner May 19, 2025 19:46
@cwperks
Copy link
Copy Markdown
Member Author

cwperks commented May 19, 2025

Sync'ed with main

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for a52d91e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for a52d91e: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant