Mike Lunn
Mike Lunn

Reputation: 2470

ElasticSearch Node Prompting For Authentication

I followed the following instructions for installing Elasticsearch 7.5.2 on windows. The only modification I made to setup was selecting the basic license as opposed to the trial license. After installation, I issued a get request to my elasticsearch node on port 9200 and I receive the following response:

{
error: {
root_cause: [
{
type: "security_exception",
reason: "missing authentication credentials for REST request [/]",
header: {
WWW-Authenticate: "Basic realm="security" charset="UTF-8""
}
}
],
type: "security_exception",
reason: "missing authentication credentials for REST request [/]",
header: {
WWW-Authenticate: "Basic realm="security" charset="UTF-8""
}
},
status: 401
}

I've tried authenticating through browser based auth popup using credentials user:elastic with no password, as well as user:elastic password: changeme as suggested from other elastic forums with no success. I've also attempted the same method via postman, with basic authentication. Is there a way to simply turn off authentication for testing purposes?

Upvotes: 2

Views: 855

Answers (1)

Mike Lunn
Mike Lunn

Reputation: 2470

I was able to turn off authentication by editing the elasticsearch.yml file located in C:\ProgramData\Elastic\Elasticsearch\config

Setting xpack.security.enabled: false did the trick.

In my case, I also had to restart the elasticsearch windows service as well.

Upvotes: 1

Related Questions