Merge pull request #4549 from Security-Onion-Solutions/kilo

Elastic auth: Fun with Salt
This commit is contained in:
Jason Ertel
2021-06-16 17:57:58 -04:00
committed by GitHub
33 changed files with 100 additions and 167 deletions

0
salt/common/tools/sbin/so-airgap-hotfixapply Normal file → Executable file
View File

0
salt/common/tools/sbin/so-airgap-hotfixdownload Normal file → Executable file
View File

9
salt/common/tools/sbin/so-elastic-auth Normal file → Executable file
View File

@@ -29,12 +29,17 @@ if ! grep -q "enabled: " "$ES_AUTH_PILLAR"; then
exit 1
fi
function restart() {
so-elastic-stop
salt-call state.highstate queue=True
}
if [[ "$authEnable" == "true" ]]; then
if grep -q "enabled: False" "$ES_AUTH_PILLAR"; then
sed -i 's/enabled: False/enabled: True/g' "$ES_AUTH_PILLAR"
if [[ -z "$ELASTIC_AUTH_SKIP_HIGHSTATE" ]]; then
echo "Applying highstate - this may take a few minutes..."
salt-call state.highstate queue=True
restart
fi
echo "Elastic auth is now enabled."
if grep -q "argon" "$ES_USERS_FILE"; then
@@ -50,7 +55,7 @@ elif [[ "$authEnable" == "false" ]]; then
sed -i 's/enabled: True/enabled: False/g' "$ES_AUTH_PILLAR"
if [[ -z "$ELASTIC_AUTH_SKIP_HIGHSTATE" ]]; then
echo "Applying highstate - this may take a few minutes..."
salt-call state.highstate queue=True
restart
fi
echo "Elastic auth is now disabled."
else

0
salt/common/tools/sbin/so-elasticsearch-query Normal file → Executable file
View File

View File

@@ -0,0 +1,5 @@
#!/bin/bash
. /usr/sbin/so-common
wait_for_web_response "https://localhost:9200/_cat/indices/.kibana*" "green open" 300 "{{ ELASTICCURL }}"

0
salt/common/tools/sbin/so-influxdb-clean Normal file → Executable file
View File

0
salt/common/tools/sbin/so-influxdb-migrate Normal file → Executable file
View File

0
salt/common/tools/sbin/so-pcap-export Normal file → Executable file
View File