# SSL and Basic Authentication is not working

**URL:** <https://discuss.elastic.co/t/ssl-and-basic-authentication-is-not-working/240896>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [July 13, 2020, 6:49am UTC](https://discuss.elastic.co/t/ssl-and-basic-authentication-is-not-working/240896 "2020-07-13T06:49:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SunilNagamalla](https://avatars.discourse-cdn.com/v4/letter/s/6bbea6/32.png) [@SunilNagamalla](https://discuss.elastic.co/u/SunilNagamalla)\
**Post date:** [July 13, 2020, 6:49am UTC](https://discuss.elastic.co/t/ssl-and-basic-authentication-is-not-working/240896/1 "2020-07-13T06:49:39Z")

</div>

Hi Team,

I have configured the SSL and basic authentication in my dev enviornment. It is not working and not sure why it was failing. The following are the steps configured to enable the SSL and Basic Authentication. can you please help me in setting up the SSL and Basic Auth

Version: elasticsearch-7.8.0

1. Installed the ELK elasticsearch-7.8.0/ in the 3 servers
2. The following are the servers which i have installed the elk  
server1 - Master, data nodes  
server2 - master, data nodes  
server3 - data node
3. the following are configuration from elasticsearch.yml for all the 3 servers

## Servrer1

cluster.name: dev-elk-cluster  
node.name: server1-node-1  
node.master: true  
node.data: true  
node.voting\_only: false  
node.ingest: false  
node.ml: false  
path.data: /opt/elasticsearch/data/elasticsearch  
path.logs: /opt/elasticsearch/logs/elasticsearch  
network.host: 1.10.11.12  
http.port: 9300  
discovery.seed\_hosts: ["1.10.11.12","1.10.11.13","1.10.11.14"]  
cluster.initial\_master\_nodes: ["server1-node-1","server2-node-2"]  
discovery.zen.minimum\_master\_nodes: 2  
gateway.recover\_after\_nodes: 2  
gateway.recover\_after\_time: 10m  
gateway.expected\_nodes: 3  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12  
xpack.license.self\_generated.type: basic  
xpack.security.authc.accept\_default\_password: true  
node.store.allow\_mmap: false

## Server2

cluster.name: dev-elk-cluster  
node.name: server2-node-2  
node.master: true  
node.data: true  
node.voting\_only: false  
node.ingest: false  
node.ml: false  
path.data: /opt/elasticsearch/data/elasticsearch  
path.logs: /opt/elasticsearch/logs/elasticsearch  
network.host: 1.10.11.13  
http.port: 9300  
discovery.seed\_hosts: ["1.10.11.12","1.10.11.13","1.10.11.14"]  
cluster.initial\_master\_nodes: ["server1-node-1","server2-node-2"]  
discovery.zen.minimum\_master\_nodes: 2  
gateway.recover\_after\_nodes: 2  
gateway.recover\_after\_time: 10m  
gateway.expected\_nodes: 3  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12  
xpack.license.self\_generated.type: basic  
xpack.security.authc.accept\_default\_password: true  
node.store.allow\_mmap: false

## Server3

cluster.name: dev-elk-cluster  
node.name: server3-node-3  
node.master: false  
node.data: true  
node.voting\_only: false  
node.ingest: false  
node.ml: false  
path.data: /opt/elasticsearch/data/elasticsearch  
path.logs: /opt/elasticsearch/logs/elasticsearch  
network.host: 1.10.11.14  
http.port: 9300  
discovery.seed\_hosts: ["1.10.11.12","1.10.11.13","1.10.11.14"]  
cluster.initial\_master\_nodes: ["server1-node-1","server2-node-2"]  
discovery.zen.minimum\_master\_nodes: 2  
gateway.recover\_after\_nodes: 2  
gateway.recover\_after\_time: 10m  
gateway.expected\_nodes: 3  
xpack.security.enabled: true  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12  
xpack.license.self\_generated.type: basic  
xpack.security.authc.accept\_default\_password: true  
node.store.allow\_mmap: false

1. Created the certifacates using following commands

2. restarted all the nodes.

3. Tried changing the existing elastic user password but it is giving the following issue  
/opt/elasticsearch/elasticsearch-7.8.0/bin/elasticsearch-setup-passwords interactive

ailed to determine the health of the cluster running at [http://1.10.11.12:9300](http://1.10.11.12:9300)  
Unexpected response code [503] from calling GET [http://1.10.11.12:9300/\_cluster/health?pretty](http://1.10.11.12:9300/_cluster/health?pretty)  
Cause: master\_not\_discovered\_exception

It is recommended that you resolve the issues with your cluster before running elasticsearch-setup-passwords.  
It is very likely that the password changes will fail when run against an unhealthy cluster.

I followed the following URL for configuring:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 10, 2020, 6:50am UTC](https://discuss.elastic.co/t/ssl-and-basic-authentication-is-not-working/240896/2 "2020-08-10T06:50:00Z")

</div>

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