Alias requests are not allowed for – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.15

Briefly, this error occurs when you try to perform an operation that is not permitted on an Elasticsearch alias. An alias in Elasticsearch is a secondary name used to refer to one or more indices. However, certain operations like creating an index with the same name as an existing alias, or trying to delete an alias directly, are not allowed. To resolve this issue, you can either rename the alias or the index, or perform the operation on the actual index instead of the alias.

This guide will help you check for common problems that cause the log ” Alias requests are not allowed for ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, alias.

Log Context

Log “Alias requests are not allowed for” class name is IndicesAliasesRequestInterceptor.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 indicesAccessControl.getIndexPermissions(index);
 if (indexAccessControl != null) {
 final boolean fls = indexAccessControl.getFieldPermissions().hasFieldLevelSecurity();
 final boolean dls = indexAccessControl.getDocumentPermissions().hasDocumentLevelPermissions();
 if ((fls || dls) && licenseChecker.get()) {
 listener.onFailure(new ElasticsearchSecurityException("Alias requests are not allowed for " +
 "users who have field or document level security enabled on one of the indices";
 RestStatus.BAD_REQUEST));
 return;
 }
 }

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?