ElasticSearch authentication error with ElasticCloud?

雨燕双飞 提交于 2021-02-08 05:04:02

问题


I have just set up a new ElasticSearch cluster on ElasticCloud and I am trying to follow the help documentation.

It says you can post a document as follows:

curl https://<id>.<region>.aws.found.io:9243/my_index/my_type -XPOST -d '{"title": "One", "tags": ["ruby"] }'

So I am trying this with my own URL, but I am getting:

{"error":{"root_cause":[{"type":"security_exception","reason":"action [indices:data/write/index] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"action [indices:data/write/index] requires authentication","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}

Is there something else I need to do first? The help documentation doesn't mention any extra steps.


回答1:


The authentication can be done in basic-auth format:

https://username:password@<id>.<region>.found.io:9243

Users and roles can be managed via Kibana in In Elasticsearch version 5.0 and later.



来源:https://stackoverflow.com/questions/44570228/elasticsearch-authentication-error-with-elasticcloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!