Skip to content

Commit

Permalink
Fix allow_no_indices request option in special cases (#89622)
Browse files Browse the repository at this point in the history
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
albertzaharovits committed Aug 31, 2022
1 parent 80c6d9f commit 843dc58
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 128 deletions.
5 changes: 5 additions & 0 deletions docs/changelog/89622.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 89622
summary: Fix `allow_no_indices` request option in special cases
area: Infra/Core
type: bug
issues: []

0 comments on commit 843dc58

Please sign in to comment.