Elasticsearrch as a DataSource 401 Error

I am getting 401 error while adding elasticsearch as a DataSource.

These are the requests and responses.

Screenshot from 2017-09-04 14-14-55

What is wrong here ?

The HTTP status 401 means unauthorized. Do you know what type of authorization you are using with your Elasticsearch? Are you using Shield or something else?