Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix allow_no_indices request option in special cases (#89622)
The `allow_no_indices` request option, when set to `false` (it is `true` by default for all APIs), should fail indices requests that contain any wildcard expression that resolves to no resources. This PR addresses some cases where a wildcard can expand to no resources, and the request is nevertheless successful. The fixed cases are when the wildcard resolves only to hidden and/or system resources and the given request context prohibits such resources. Another case is when the wildcard resolves to only open or closed indices and again the request context prohibits such resources. Note that the fix only applies when Security is disabled (when enabled the behavior is already correct). This is another step towards reusing the Core's `WildcardExpressionResolver#innerResolve` in Security, following #89311 .
- Loading branch information