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.

Richard
  • 62,943
  • 126
  • 334
  • 542
  • 2
    Figured it out - need to supply basic-auth username and password in the URL, like `https://username:password@....`. The documentation doesn't make this clear. – Richard Jun 15 '17 at 14:49

1 Answers1

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.

Nick
  • 1,417
  • 1
  • 14
  • 21
  • This did not work for me. Received error: org.glassfish.jersey.server.internal.process.MappableException: java.io.IOException: :@d972dd7d665aee2.us-east-1.aws.found.io: invalid IPv6 address This is with the Hight Level REST client for Java – GNG Mar 02 '20 at 18:07
  • **curl -XGET https://:@..aws.<...>:/_nodes/stats** output- **{"statusCode":404,"error":"Not Found","message":"Not Found"}** I checked another way also- **curl -XGET --user : "https://..gcp.<....>:/_cluster/health?pretty" ** **{"statusCode":404,"error":"Not Found","message":"Not Found"}** I am getting error 404 for both the curl requests – Divyank Dec 20 '21 at 05:53