📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 7.2-8.9

简而言之,当 Elasticsearch 尝试对其安全配置中不存在的领域(realm)进行用户身份验证时,就会出现此错误。这可能是由于领域名称拼写错误或领域未正确配置造成的。要解决此问题,您可以检查 Elasticsearch 安全设置,确保领域已正确定义。同时,请验证身份验证请求中的领域名称。如果最近添加了领域,可能需要重启 Elasticsearch 才能使更改生效。

日志上下文 #

日志"Authenticating realm {} does not exist"的类名是 TransportOpenIdConnectLogoutAction.java。我们从 Elasticsearch 源代码中提取了以下内容,供需要深入了解上下文的用户参考:

if (ref == null || Strings.isNullOrEmpty(ref.getName())) {
 throw new ElasticsearchSecurityException("Authentication {} has no authenticating realm"; authentication);
 }
 final Realm realm = this.realms.realm(authentication.getEffectiveSubject().getRealm().getName());
 if (realm == null) {
 throw new ElasticsearchSecurityException("Authenticating realm {} does not exist"; ref.getName());
 }
 if (realm instanceof OpenIdConnectRealm == false) {
 throw new IllegalArgumentException("Access token is not valid for an OpenID Connect realm");
 }
 }