Add new extensible method to DocRequest to specify type#19313
Merged
cwperks merged 4 commits intoopensearch-project:mainfrom Sep 17, 2025
Merged
Add new extensible method to DocRequest to specify type#19313cwperks merged 4 commits intoopensearch-project:mainfrom
cwperks merged 4 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
3 tasks
Contributor
|
❌ Gradle check result for cb7692d: 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? |
owaiskazi19
approved these changes
Sep 16, 2025
Member
owaiskazi19
left a comment
There was a problem hiding this comment.
Should be good in terms of bwc as well since it's a default method
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #19313 +/- ##
============================================
- Coverage 72.87% 72.84% -0.03%
+ Complexity 69796 69775 -21
============================================
Files 5672 5673 +1
Lines 320710 320711 +1
Branches 46360 46360
============================================
- Hits 233704 233610 -94
- Misses 68111 68201 +90
- Partials 18895 18900 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
asimmahmood1
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 23, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
pranikum
pushed a commit
to pranikum/OpenSearch
that referenced
this pull request
Sep 23, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Sep 26, 2025
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add CHANGELOG entry Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
This was referenced Jan 10, 2026
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 PR adds a new extensible method to DocRequest to specify type. By itself, this PR is not very interest in the core as all DocRequest would be of type
indices. The point of this PR is that this would be an extension point for plugins to start categorizing requests into buckets that have meaning to their use-case.The javadoc introduced in this PR brings up a use-case in the reporting plugin that would create REST APIs and corresponding transport actions for actions that pertain to a single report definitions such as creating a report definition, editing the definition, deleting it or getting it. In such cases, this method can be overridden to specify the type. When the security plugin is installed and resource sharing + authorization is used, this type would be used in the authorization process to figure out what actions the current user is allowed to perform on the single resource give its identifier (DocID). Without a change like this, it would need to be assumed that a single resource system index contains a single type of resource. This change would further allow multiple resource types to live in the same index (i.e. saved objects in dashboards).
Related Issues
Related to opensearch-project/security#4500
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.