From 98273c1e27d2789a82d7204f9523ca232eb079a8 Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez <1380243+xr09@users.noreply.github.com> Date: Fri, 28 Aug 2020 14:36:55 +0200 Subject: [PATCH] Enable HTTPS for status checks --- kibana-opendistro/config/kibana_settings.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kibana-opendistro/config/kibana_settings.sh b/kibana-opendistro/config/kibana_settings.sh index 63535605..19cae116 100644 --- a/kibana-opendistro/config/kibana_settings.sh +++ b/kibana-opendistro/config/kibana_settings.sh @@ -29,7 +29,7 @@ if [ "$KIBANA_INDEX" != "" ]; then echo "kibana.index: $KIBANA_INDEX" >> /usr/share/kibana/config/kibana.yml fi -while [[ "$(curl -XGET -I -s -o /dev/null -w '%{http_code}' http://127.0.0.1:5601/login)" != "200" ]]; do +while [[ "$(curl -XGET -I -s -o /dev/null -w '%{http_code}' -k https://127.0.0.1:5601/login)" != "200" ]]; do echo "Waiting for Kibana API. Sleeping 5 seconds" sleep 5 done @@ -49,12 +49,12 @@ EOF sleep 5 # Add the wazuh alerts index as default. -curl ${auth} -POST http://127.0.0.1:5601/api/kibana/settings -H "Content-Type: application/json" -H "kbn-xsrf: true" -d@${default_index} +curl ${auth} -POST -k https://127.0.0.1:5601/api/kibana/settings -H "Content-Type: application/json" -H "kbn-xsrf: true" -d@${default_index} rm -f ${default_index} sleep 5 # Configuring Kibana TimePicker. -curl ${auth} -POST "http://127.0.0.1:5601/api/kibana/settings" -H "Content-Type: application/json" -H "kbn-xsrf: true" -d \ +curl ${auth} -POST -k "https://127.0.0.1:5601/api/kibana/settings" -H "Content-Type: application/json" -H "kbn-xsrf: true" -d \ '{"changes":{"timepicker:timeDefaults":"{\n \"from\": \"now-12h\",\n \"to\": \"now\",\n \"mode\": \"quick\"}"}}' echo "End settings"