forked from wazuh/wazuh-docker
Disabling opendistro security plugin
This commit is contained in:
@@ -3,6 +3,9 @@
|
|||||||
|
|
||||||
elastic_config_file="/usr/share/elasticsearch/config/elasticsearch.yml"
|
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(){
|
remove_single_node_conf(){
|
||||||
if grep -Fq "discovery.type" $1; then
|
if grep -Fq "discovery.type" $1; then
|
||||||
sed -i '/discovery.type\: /d' $1
|
sed -i '/discovery.type\: /d' $1
|
||||||
@@ -54,4 +57,5 @@ else
|
|||||||
remove_single_node_conf $elastic_config_file
|
remove_single_node_conf $elastic_config_file
|
||||||
remove_cluster_config $elastic_config_file
|
remove_cluster_config $elastic_config_file
|
||||||
echo "discovery.type: single-node" >> $elastic_config_file
|
echo "discovery.type: single-node" >> $elastic_config_file
|
||||||
fi
|
fi
|
||||||
|
echo "opendistro_security.disabled: true" >> $elastic_config_file
|
||||||
@@ -17,9 +17,13 @@ WAZUH_MAJOR=3
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
# Customize elasticsearch ip
|
# 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
|
if [ "$ELASTICSEARCH_KIBANA_IP" != "" ]; then
|
||||||
sed -i "s:#elasticsearch.hosts:elasticsearch.hosts:g" /usr/share/kibana/config/kibana.yml
|
sed -i '/elasticsearch.hosts/d' /usr/share/kibana/config/kibana.yml
|
||||||
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_KIBANA_IP'|g' /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
|
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.
|
# 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user