Disable ES authorization

Authorization not needed for dev purposes.
X-Pack can easily be restored by setting the *xpack.security.enabled* to true if needed

Change-Id: Id6d5993d560a8ef57ccf886af39e3d35b89c97b0
diff --git a/README.md b/README.md
index 0147b34..46a4333 100644
--- a/README.md
+++ b/README.md
@@ -6,14 +6,15 @@
 ```
 bin/spark-submit \
     --conf spark.es.nodes=es.mycompany.com \
-    --conf spark.es.net.http.auth.user=elastic \
-    --conf spark.es.net.http.auth.pass=changeme \
     $JARS/SparkAnalytics-assembly-1.0.jar \
     --since 2000-06-01 \
     --aggregate email_hour \
     --url http://gerrit.mycompany.com \
     -e gerrit/analytics
 ```
+
+Should ElasticSearch need authentication (i.e.: if X-Pack is enabled), credentials can be
+passed through the *spark.es.net.http.auth.pass* and *spark.es.net.http.auth.user* parameters.
 ### Parameters
 - since, until, aggregate are the same defined in Gerrit Analytics plugin
     see: https://gerrit.googlesource.com/plugins/analytics/+/master/README.md
@@ -54,10 +55,6 @@
 
 Kibana will run on port `5601` and Elastisearch on port `9200`
 
-### Default credentials
-
-The Elastisearch default user is `elastic` and the default password `changeme`
-
 ### Caveats
 
 If Elastisearch dies with `exit code 137` you might have to give Docker more memory ([check this article for more details](https://github.com/moby/moby/issues/22211))
\ No newline at end of file
diff --git a/dashboard-importer/docker-entrypoint.sh b/dashboard-importer/docker-entrypoint.sh
index fdfcbea..9318f83 100755
--- a/dashboard-importer/docker-entrypoint.sh
+++ b/dashboard-importer/docker-entrypoint.sh
@@ -2,13 +2,13 @@
 /wait-for-elasticsearch
 
 echo "** Creating Gerrit index"
-curl -XPUT "http://$ES_USER:$ES_PWD@elasticsearch:9200/gerrit?pretty" -H 'Content-Type: application/json'
+curl -XPUT "http://elasticsearch:9200/gerrit?pretty" -H 'Content-Type: application/json'
 
 echo "** Importing Kibana setting from: "
 for file in `ls -v /*.json`;
     do  echo "--> $file";
         /usr/lib/node_modules/elasticdump/bin/elasticdump \
-        --output=http://$ES_USER:$ES_PWD@elasticsearch:9200/.kibana \
+        --output=http://elasticsearch:9200/.kibana \
         --input=$file \
         --type=data \
         --headers '{"Content-Type": "application/json"}';
diff --git a/dashboard-importer/wait-for-elasticsearch b/dashboard-importer/wait-for-elasticsearch
index 6f05499..fddba5e 100755
--- a/dashboard-importer/wait-for-elasticsearch
+++ b/dashboard-importer/wait-for-elasticsearch
@@ -2,7 +2,7 @@
 
 wait_for() {
   for i in `seq 30` ; do
-    curl -f -u $ES_USER:$ES_PWD http://elasticsearch:9200/_cluster/health > /dev/null 2>&1
+    curl -f http://elasticsearch:9200/_cluster/health > /dev/null 2>&1
 
     result=$?
     if [ $result -eq 0 ] ; then
diff --git a/docker-compose.yaml b/docker-compose.yaml
index a7300e1..f2df129 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -6,8 +6,6 @@
     build: dashboard-importer
     networks:
       - ek
-    env_file:
-      - ./dashboard-importer/credentials.env
     links:
       - elasticsearch
       - kibana
@@ -30,6 +28,7 @@
       - ES_JAVA_OPTS=-Xmx256m -Xms256m
       - http.host=0.0.0.0
       - http.publish_host=127.0.0.1
+      - xpack.security.enabled=false
     networks:
       - ek