Getting started with XPack features in basic licesne

Hello Team

I am using docker image of elasticsearch mentioned in

As mentioned in the above, These images are free to use under the Elastic license. They contain open source and free commercial features

And the Subscription link says, the basic version of elasticsearch has basic security like - Role-based access control, File and native authentication

So, I started my application with "" as true, and none of the other feature / settings. Now, I am not able to access my cluster, which says Missing authentication token for REST request [/_cluster/health]

Now, what should I do so that I can set up the access to my cluster and add users using

these APIs? What default roles was generated, and how should I use these default roles to use these APIs. I am not able to find a single concrete article, which starts from enabling xpack and go till adding user and checking access via API.

I do not want to go to individual nodes and add users

As I understand, these APIs are available under Basic license. (Correct me if I am wrong), if I am wrong, I would like to know what can be done with Basic License to add basic security. Any complete documentation will help.


Have you seen this:


@skydancer Tried it, but it is failing. My ES cluster is hosted in K8S, and I can access only via Ingress

I am accessing this with http and "" is set to false.

bin/elasticsearch-setup-passwords auto -u http://xx.xx.xx.xx (Ingress external IP)

and elasticsearch is installed locally, trying to change password in external hosted ES

Exception in thread "main" ElasticsearchParseException[Failed to parse content to map]; nested: JsonParseException[Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source:; line: 1, column: 2]];
	at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
	at org.elasticsearch.cli.MultiCommand.execute(
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
	at org.elasticsearch.cli.Command.main(
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source:; line: 1, column: 2]
	at com.fasterxml.jackson.core.JsonParser._constructError(
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(
	at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(
	at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(
	... 12 more

You need to use at least 6.8 I think.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.