版本: 6.8-8.9
简而言之,当 Elasticsearch 在不应包含此类信息的字段中检测到密码等敏感数据时,就会发生此错误。这是防止未经授权访问的安全措施。要解决此问题,您可以从字段中删除敏感数据,或在存储之前对数据进行加密。此外,您应该检查数据输入流程,以确保敏感数据不会无意中包含在不适当的字段中。
日志上下文 #
日志 “found redacted password in field [{}]” 的类名是 WatcherXContentParser.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:
if (parser instanceof WatcherXContentParser watcherParser) {
if (REDACTED_PASSWORD.equals(text)) {
if (watcherParser.allowRedactedPasswords) {
return null;
} else {
throw new ElasticsearchParseException("found redacted password in field [{}]"; parser.currentName());
}
} else if (watcherParser.cryptoService != null) {
return new Secret(watcherParser.cryptoService.encrypt(chars));
}
}





