版本: 7.7-8.3
简而言之,当Elasticsearch无法验证尝试生成API密钥的用户身份时,就会出现此错误。这可能是由于缺少或错误的身份验证凭据导致的。要解决此问题,请确保您提供了正确的用户名和密码。如果您使用API密钥进行身份验证,请确保其有效且具有必要的权限。此外,请检查您的Elasticsearch配置以确保安全功能已启用,因为身份验证可能需要这些功能。
日志上下文 #
日志"no authentication available to generate API key"的类名是 ApiKeyGenerator.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入上下文的人参考:
this.xContentRegistry = xContentRegistry;
}
public void generateApiKey(Authentication authentication; CreateApiKeyRequest request; ActionListenerlistener) {
if (authentication == null) {
listener.onFailure(new ElasticsearchSecurityException("no authentication available to generate API key"));
return;
}
apiKeyService.ensureEnabled();
final ActionListener> roleDescriptorsListener = ActionListener.wrap(roleDescriptors -> {





