您能帮助我理解这个 ElasticSearch 权限错误吗?

您能帮助我理解这个 ElasticSearch 权限错误吗?

我正在尝试向 Elastic.co 托管的 ElasticSearch 实例发出请求。我收到此错误:

AuthorizationException(403, 'security_exception', 'action [indices:monitor/stats] is unauthorized for user [my-username]')

这究竟在告诉我什么,我无法访问?这是什么indices:意思?这是什么monitor意思monitor/stats?这个错误消息试图告诉我什么?

答案1

我认为这些是索引权限

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-privileges.html

monitor - 
All cluster read-only operations, like cluster health and state, hot threads, node info, node and cluster stats, and pending cluster tasks.

答案2

根据 Andrei 共享的安全权限,您需要先创建一个新的自定义角色,选择以下权限:https://www.elastic.co/guide/en/elasticsearch/reference/current/defining-roles.html

我想知道你是否可以使用内置角色到达你想去的地方 ->https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html

尝试使用用户 API 来更新现有用户以分配新角色 ->https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api.html#security-user-apis

POST /_xpack/security/user/jacknich
{
  "password" : "j@rV1s",
  "roles" : [ "admin", "other_role1" ],
  "full_name" : "Jack Nicholson",
  "email" : "[email protected]",
  "metadata" : {
    "intelligence" : 7
  }
}

相关内容