Limit tenant checks to multi-doc actions - #6335
Conversation
Signed-off-by: Craig Perkins <craig5008@gmail.com>
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 7338a02.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6335 +/- ##
==========================================
- Coverage 75.41% 75.36% -0.06%
==========================================
Files 456 456
Lines 29923 29924 +1
Branches 4529 4530 +1
==========================================
- Hits 22567 22552 -15
- Misses 5264 5277 +13
- Partials 2092 2095 +3
🚀 New features to boost your workflow:
|
283edfc
into
opensearch-project:main
|
The coordinated provenance follow-up is now working in three draft PRs:
Core carries an all-indices-origin marker through stats/health child requests and broadcast fan-out. Security accepts it only with the local Core ThreadContext proof or authenticated node-to-node transport; the serialized marker alone is not sufficient. ML Commons establishes that trusted local context only when ListIndexTool originally targeted all indices. The positive legacy list/system-index flow passes all 27 integration tests, direct concrete tenant-index stats/health requests remain denied, and the ML caller tests verify that explicit-index requests receive neither the marker nor local proof. The tactical fix in this PR can remain narrowly scoped while those coordinated changes mature. |
Description
Narrows the legacy Dashboards multi-tenancy concrete-index check to the multi-document request types it is intended to protect: bulk, multi-get, multi-search, and multi-term-vectors.
The check was being applied to every action. As a result, APIs such as
_list/indiceswere denied when they issued internalindices:monitor/statsandcluster:monitor/healthrequests against a page containing a concrete Dashboards tenant index.This is a tactical fix for #6327. A follow-up can carry trusted request provenance from the originating list-indices request so Security can distinguish internal derived requests from user requests that explicitly target a concrete tenant index.
Testing
_list/indices/.kib*with a tenant header../gradlew :integrationTest --tests 'org.opensearch.security.privileges.int_tests.DashboardMultiTenancyIntTests' -Pcrypto.standard=FIPS-140-3./gradlew :precommit -Pcrypto.standard=FIPS-140-3The aggregate
precommittask also reaches the sample resource plugin and currently fails on two pre-existing forbiddenURL.openStream()uses in its transport actions; the root:precommittask passes.