…index patterns
New test cases verify that the security plugin correctly evaluates
indices:data/read/analytics/query for AnalyticsQueryAction requests.
Since DefaultPlanExecutor does not implement TransportIndicesResolvingAction,
security uses the fallback path (IndexNameExpressionResolver) to resolve
wildcards, aliases, and index patterns against cluster state.
Tests added:
- Exact permission: indices:data/read/analytics/query is necessary AND sufficient
- Response body assertion: 403 mentions the missing analytics/query action
- Alias-based query access (allowed via alias name)
- Alias grants concrete index access (security resolves alias → concrete)
- Wildcard index in query (allowed when role covers all resolved indices)
- Wildcard query denied when user lacks matching permissions
- Partial access denied (alias-only user, wildcard expands beyond alias)
Signed-off-by: Finnegan Carroll <carrofin@amazon.com>
Signed-off-by: Finn Carroll <carrofin@amazon.com>
Description
Tests verify that the security plugin correctly resolves indices for AnalyticsQueryAction requests (which use the fallback path through IndexNameExpressionResolver since DefaultPlanExecutor does not implement TransportIndicesResolvingAction).
New test cases:
Related Issues
N/A
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.