Elasticsearch新增用户不能通过Kibana登录

场景

1.创建角色francisco_role

POST /_security/role/francisco_role
{
  "cluster": [
    "monitor"
  ],
  "indices": [
    {
      "names": [
        "hamlet"
      ],
      "privileges": [
        "all"
      ]
    }
  ]
}

2.创建用户francisco并分配角色francisco_role

POST /_security/user/francisco
{
  "password" : "francisco-password",
  "roles" : ["francisco_role" ]
}

3.使用用户francisco登录kibana报错
{"statusCode":403,"error":"Forbidden","message":"Forbidden"}

解决

给用户francisco分配角色kibana_user就可以了,如下

POST /_security/user/francisco
{
  "password" : "francisco-password",
  "roles" : ["francisco_role","kibana_user" ]
}

 

你可能感兴趣的:(ELK)