1
我想使用弹性云托管elasticsearch服务https://www.elastic.co/cloud弹性云 - 无法创建索引
我使用Python和elasticsearch-PY包在我flaks应用程序连接:
es_connection = Elasticsearch(
["https://myuser:[email protected]:9243"]
)
es_connection.indices.create(index="myindex", ignore=400, body=mapping_dict)
但我不断收到此错误:
08:55:56,240 elasticsearch DEBUG < {"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:admin/create] is unauthorized for user [myuser]"}],"type":"security_exception","reason":"action [indices:admin/create] is unauthorized for user [myuser]"},"status":403}
在屏蔽编辑,我已经将这个角色对于这些用户为:
admin: admin
myuser: admin
并且这些角色在编辑器中定义为 //这是所有角色的编辑器。 //以下是一些示例角色。要真正使用角色,请在上述编辑器中映射用户。
//管理员可以做的一切
admin:
cluster: all
indices:
'*': all
这意味着,myuser
设置为admin
作用,所以应该能够创建index..right?那么为什么我会出错?