Add integration tests for analytics engine index-level authorization#5462
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit caa0189.
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 Code Suggestions ✨Explore these optional code suggestions:
|
1deac38 to
87eda6a
Compare
12dc610 to
dca4329
Compare
Adds AnalyticsEngineSecurityIT which validates that the analytics engine's
FGAC check (indices:data/read/analytics/query) is enforced end-to-end
through the production SQL plugin PPL endpoint (/_plugins/_ppl) when
querying composite (analytics-engine-backed) indices.
Tests:
- Authorized user with indices:data/read* can query a composite index
- Unauthorized user (no index permissions) gets 403
- Authorized user cannot access an index outside their permissions (403)
- User with indices:data/read/search* but NOT indices:data/read/analytics/query
gets 403, proving the specific analytics action permission is evaluated
The test cluster installs the full analytics plugin stack (analytics-engine,
arrow-base, arrow-flight-rpc, analytics-backend-lucene,
analytics-backend-datafusion, parquet-data-format, composite-engine) plus
the security and SQL plugins.
Run locally with local plugin zips:
./gradlew :integ-test:analyticsEngineSecurityIT \
-PanalyticsEngineZip=/path/to/analytics-engine.zip \
-ParrowBaseZip=/path/to/arrow-base.zip \
-ParrowFlightRpcZip=/path/to/arrow-flight-rpc.zip \
-PanalyticsBackendLuceneZip=/path/to/analytics-backend-lucene.zip \
-PanalyticsBackendDatafusionZip=/path/to/analytics-backend-datafusion.zip \
-PparquetDataFormatZip=/path/to/parquet-data-format.zip \
-PcompositeEngineZip=/path/to/composite-engine.zip \
-PnativeLibPath=/path/to/rust/target/release
Signed-off-by: carrofin <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
dca4329 to
dc53c24
Compare
Signed-off-by: Finn Carroll <carrofin@amazon.com>
dd6f489 to
caa0189
Compare
Diff analyzer is upset we are downloading he analytics plugin CI artifacts. This pattern was already in use. |
|
Still failing: |
|
PR for the remaining CLI failure due to dependency conflict in sql-cli: |
Description
The test cluster installs the full analytics plugin stack (analytics-engine, arrow-base, arrow-flight-rpc, analytics-backend-lucene, analytics-backend-datafusion, parquet-data-format, composite-engine) plus the security and SQL plugins.
Adds AnalyticsEngineSecurityIT which validates that the analytics engine's FGAC check (
indices:data/read/analytics/query) is enforced end-to-end through the SQL plugin PPL/SQL endpoints when querying composite (analytics-engine-backed) indices.Tests:
Note: This change is still pending while i try to figure out how to correctly provide this test environment in CI.
Run locally with local in the meantime with plugin zips:
Related Issues
Core PR - opensearch-project/OpenSearch#21789
Check List
--signoffor-s.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.