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

版本: 6.8-7.15

简而言之,当 Elasticsearch 由于缺少权限字段而无法解析权限检查时,会出现此错误。这通常发生在请求中的权限字段未正确定义或完全缺失时。要解决此问题,您可以:1) 检查您的请求,确保包含所有必需的权限字段并正确定义。2) 验证您的 JSON 语法,确保没有错误。3) 如果您正在使用安全插件,确保其配置正确且与您的 Elasticsearch 版本兼容。

日志上下文 #

日志 “failed to parse privileges check [{}]. All privilege fields [{};{};{}] are missing” 的类名是 RoleDescriptor.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:

    throw new ElasticsearchParseException("failed to parse privileges check [{}]. unexpected field [{}]";
    description; currentFieldName);
}
}
if (indexPrivileges == null && clusterPrivileges == null && applicationPrivileges == null) {
    throw new ElasticsearchParseException("failed to parse privileges check [{}]. All privilege fields [{};{};{}] are missing";
    description; Fields.CLUSTER; Fields.INDEX; Fields.APPLICATIONS);
}
if (indexPrivileges != null) {
    if (Arrays.stream(indexPrivileges).anyMatch(IndicesPrivileges::isUsingFieldLevelSecurity)) {
        throw new ElasticsearchParseException("Field [{}] is not supported in a has_privileges request";