Disabling opendistro security plugin

This commit is contained in:
Manuel J. Bernal
2019-08-01 20:28:56 +02:00
parent 95c473e7d4
commit 335c103b2d
2 changed files with 11 additions and 3 deletions
+5 -1
View File
@@ -3,6 +3,9 @@
elastic_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
# Disable the Open distro security plugin
sed -i '/opendistro_security/d' $elastic_config_file
remove_single_node_conf(){
if grep -Fq "discovery.type" $1; then
sed -i '/discovery.type\: /d' $1
@@ -54,4 +57,5 @@ else
remove_single_node_conf $elastic_config_file
remove_cluster_config $elastic_config_file
echo "discovery.type: single-node" >> $elastic_config_file
fi
fi
echo "opendistro_security.disabled: true" >> $elastic_config_file
+6 -2
View File
@@ -17,9 +17,13 @@ WAZUH_MAJOR=3
##############################################################################
# Customize elasticsearch ip
##############################################################################
sed -i 's|https://localhost:9200|http://elasticsearch:9200|g' /usr/share/kibana/config/kibana.yml
sed -i '/opendistro_security/d' /usr/share/kibana/config/kibana.yml
if [ "$ELASTICSEARCH_KIBANA_IP" != "" ]; then
sed -i "s:#elasticsearch.hosts:elasticsearch.hosts:g" /usr/share/kibana/config/kibana.yml
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_KIBANA_IP'|g' /usr/share/kibana/config/kibana.yml
sed -i '/elasticsearch.hosts/d' /usr/share/kibana/config/kibana.yml
echo "elasticsearch.hosts: $ELASTICSEARCH_KIBANA_IP" >> /usr/share/kibana/config/kibana.yml
sed -i 's|https://elasticsearch:9200|'$ELASTICSEARCH_KIBANA_IP'|g' /usr/share/kibana/config/kibana.yml
fi
# If KIBANA_INDEX was set, then change the default index in kibana.yml configuration file. If there was an index, then delete it and recreate.