动作[clustering / cluster]未经授权用户[弹性]

时间:2018-04-28 03:51:50

标签: elasticsearch elasticsearch-x-pack

Elasticsearch在我的群集中有三个节点,我使用插件elasticsearch-carrot2,而elastic是elasticsearch中的超级用户。

我发送的请求如下:

curl -XPOST --user elastic:****  -H "Content-Type: application/json" 
    'http://ip:port/index/type/_search_with_clusters?pretty=true' -d '
 {
    "search_request": {
        "_source" : [
            "title",
            "body"
                   ],
        "query" : {
        "match" : {
          "title" : "something"
        }
    },
    "size": 100
          },
     "query_hint": "something",
       "field_mapping": {
          "title"  : ["_source.title", "_source.body"]
       }
 }'

不幸的是我收到以下错误:

{
    "error" : {
        "root_cause" : [
            {
                "type" : "security_exception",
                "reason" : "action [clustering/cluster] is unauthorized 
                            for user [elastic]"
            }
                       ],
    "type" : "security_exception",
    "reason" : "action [clustering/cluster] is unauthorized for user 
                [elastic]"
               },
    "status" : 403
}

1 个答案:

答案 0 :(得分:0)

问题来自于插件不能与XPack安全性一起使用。

在此问题中可以看到更多信息:https://github.com/carrot2/elasticsearch-carrot2/issues/69