我想向集群添加一个只读用户,我的应用程序的所有索引都以myapp_
作为前缀。在https://www.elastic.co/blog/user-impersonation-with-x-pack-integrating-third-party-auth-with-kibana之后(对于此上唯一实际可用的博客文章,这是一个奇怪的标题...),我首先在curl -XPOST '$ELASTIC_URL:9200/_xpack/security/role/name_of_readonly_role' -H 'Content-Type: application/json' -d'{"indices":[{"names":"myapp_*","privileges":["read"]}]}'
中添加了一个角色,然后将其添加到用户curl -XPOST $ELASTIC_URL:9200/_xpack/security/user/name_of_user -H 'Content-Type: application/json' -d'{"roles":["name_of_readonly_role"],"password":"some_password"}'
中,但是当打开$ELASTIC_URL:9200
我得到
action [cluster:monitor/main] is unauthorized for user
下一步是什么?