我遇到了_msearch
最奇怪的权限问题。
当对同一个查询运行simple _search时,一切都运行得很完美。POST /job/_search
个
{"query":{"bool":{"must":[{"bool":{"must":{"bool":{"should":[{"multi_match":{"query":"s","fields":["title"],"type":"best_fields","operator":"or","fuzziness":2}},{"multi_match":{"query":"s","fields":["title"],"type":"phrase","operator":"or"}},{"multi_match":{"query":"s","fields":["title"],"type":"phrase_prefix","operator":"or"}}],"minimum_should_match":"1"}}}}]}},"size":10,"_source":{"includes":["*"],"excludes":[]}}
字符串
当使用_msearch
运行它时,我得到权限错误POST /job/_msearch
个
{}
{"query":{"bool":{"must":[{"bool":{"must":{"bool":{"should":[{"multi_match":{"query":"s","fields":["title"],"type":"best_fields","operator":"or","fuzziness":2}},{"multi_match":{"query":"s","fields":["title"],"type":"phrase","operator":"or"}},{"multi_match":{"query":"s","fields":["title"],"type":"phrase_prefix","operator":"or"}}],"minimum_should_match":"1"}}}}]}},"size":10,"_source":{"includes":["*"],"excludes":[]}}
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "no permissions for [indices:data/read/msearch] and User [name=public_api, backend_roles=[], requestedTenant=null]"
}
],
"type": "security_exception",
"reason": "no permissions for [indices:data/read/msearch] and User [name=public_api, backend_roles=[], requestedTenant=null]"
},
"status": 403
}
的数据
以下是我在Kibana的权限:
的数据
我正在AWS ElasticSearch服务中运行OpenDistro。
4条答案
按热度按时间w1jd8yoj1#
我使用以下步骤解决了上述权限问题
admin
或使用higher previledges
登录到Kibana
1.单击
security
选项x1c 0d1x的数据
1.单击
roles
选项,然后根据您的要求为用户选择所需的角色。在我的情况下,用户需要所有访问权限,因此选择all_access
角色1.单击
Mapped users
,然后单击Manage mapping
选项。1.在
Users
部分中,键入/粘贴IAM-arn/internal-user
,然后按Enter键1.最后,单击Map
就这样,用户将被Map到角色和相应的权限,此后您将不会面临问题中提到的权限问题
的数据
6qfn3psc2#
通过设置以下群集权限进行修复:
的数据
yebdmbv43#
我通过不使用细粒度访问控制解决了这个问题。
6l7fqoea4#
基于来自@Bolein95的答案,它完美地工作,如果有人在寻找Terraform,你可以添加以下集群:
字符串