问题
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