diff --git a/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesResolver.java b/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesResolver.java index 5ba0d23b931..af2c8ac001c 100644 --- a/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesResolver.java +++ b/src/main/java/org/elasticsearch/shield/authz/indicesresolver/DefaultIndicesResolver.java @@ -71,6 +71,9 @@ public class DefaultIndicesResolver implements IndicesResolver //If we can't replace because we got an empty set, we can only throw exception. //Downside of this is that a single item exception is going to its composite requests fail as a whole. if (indices == null || indices.isEmpty()) { + if (MetaData.isAllIndices(indicesRequest.indices())) { + throw new IndexMissingException(new Index(MetaData.ALL)); + } throw new IndexMissingException(new Index(Arrays.toString(indicesRequest.indices()))); } ((IndicesRequest.Replaceable)indicesRequest).indices(indices.toArray(new String[indices.size()]));