-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add new extensible method to DocRequest to specify type #19313
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
Add new extensible method to DocRequest to specify type #19313
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
|
❌ 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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good in terms of bwc as well since it's a default method
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:
|
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Ankit Jain <[email protected]>
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Ankit Jain <[email protected]>
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
…roject#19313) * Add new extensible method to DocRequest to specify type Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> * Add CHANGELOG entry Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
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.