I have a docker image of elasticsearch, version=7.0.1, I used the command to run the image
docker run -d -p 9200:9200 -p 9301:9301 --name elastic_search -e "discovery.type=single-node" -e "xpack.security.enabled=true" -e "ELASTICSEARCH_USERNAME=john" -e "ELASTICSEARCH_PASSWORD=deer" -v elastic_search_volume:/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:7.0.1
Without porviding any credentials for my curl command, curl localhost:9200
I got the following output,
$ curl localhost:9200
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 508 100 508 0 0 26736 0 --:--:-- --:--:-- --:--:-- 28222{
"name" : "f1a397cdc93b",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "sBiiYUlsSM6e-RzJJcTvvg",
"version" : {
"number" : "7.0.1",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "e4efcb5",
"build_date" : "2019-04-29T12:56:03.145736Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.7.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Although, I have provided the credentials for the docker image while starting in the form of environmental variables, still I am able to access the database without providing the credentials.
Even for the Kibana, without any configuration, still its able to access the database.
Can anyone help me on this?
Thanks