2

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
  • 2
    Figured it out - need to supply basic-auth username and password in the URL, like https://username:password@<id>.<region>.... The documentation doesn't make this clear. Commented Jun 15, 2017 at 14:49

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

This did not work for me. Received error: org.glassfish.jersey.server.internal.process.MappableException: java.io.IOException: <my username>:<my password>@d972<hidden characters>dd7d665aee2.us-east-1.aws.found.io: invalid IPv6 address This is with the Hight Level REST client for Java
curl -XGET https://<user>:<pass>@<id>.<region>.aws.<...>:<port>/_nodes/stats output- {"statusCode":404,"error":"Not Found","message":"Not Found"} I checked another way also- curl -XGET --user <uname>:<pass> "https://<id>.<region>.gcp.<....>:<port>/_cluster/health?pretty" ** **{"statusCode":404,"error":"Not Found","message":"Not Found"} I am getting error 404 for both the curl requests

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.