版本: 6.8-8.9
简而言之,当Elasticsearch由于活动salt(盐值)的问题而无法生成密钥时,就会发生此错误。这可能是由于配置错误或salt损坏导致的。要解决此问题,您可以尝试重新生成salt或检查配置文件中是否存在任何错误。如果问题仍然存在,请考虑重置安全设置或重新安装Elasticsearch以确保干净的设置。
日志上下文 #
日志"Failed to compute secret key for active salt"的类名是 TokenService.java。我们从Elasticsearch源代码中提取了以下内容,以供那些寻求深入上下文的人参考:
Cipher cipher = Cipher.getInstance(ENCRYPTION_CIPHER);
BytesKey salt = keyAndCache.getSalt();
try {
cipher.init(Cipher.ENCRYPT_MODE, keyAndCache.getOrComputeKey(salt), new GCMParameterSpec(128, iv), secureRandom);
} catch (ExecutionException e) {
throw new ElasticsearchSecurityException("Failed to compute secret key for active salt", e);
}
cipher.updateAAD(ByteBuffer.allocate(4).putInt(version.id()).array());
cipher.updateAAD(salt.bytes);
return cipher;
}





