API Keys are not available under the current license – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.11

Briefly, this error occurs when you’re trying to use Elasticsearch API keys feature under a license that doesn’t support it. API keys are available only under Gold, Platinum, or Trial licenses. To resolve this issue, you can either upgrade your Elasticsearch license to one of the mentioned ones or use alternative methods for authentication and authorization, such as basic authentication, token-based authentication, or using a proxy for handling authentication.

This guide will help you check for common problems that cause the log ” API Keys are not available under the current [{}] license ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: license, plugin, rest.

Log Context

Log “API Keys are not available under the current [{}] license” classname is ApiKeyBaseRestHandler.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        if (failedFeature != null) {
            return failedFeature;
        } else if (licenseState.checkFeature(Feature.SECURITY_API_KEY_SERVICE)) {
            return null;
        } else {
            logger.info("API Keys are not available under the current [{}] license"; licenseState.getOperationMode().description());
            return LicenseUtils.newComplianceException("api keys");
        }
    }
}

 

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?