mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-23 01:13:09 +01:00
Merge pull request #4549 from Security-Onion-Solutions/kilo
Elastic auth: Fun with Salt
This commit is contained in:
0
salt/common/tools/sbin/so-airgap-hotfixapply
Normal file → Executable file
0
salt/common/tools/sbin/so-airgap-hotfixapply
Normal file → Executable file
0
salt/common/tools/sbin/so-airgap-hotfixdownload
Normal file → Executable file
0
salt/common/tools/sbin/so-airgap-hotfixdownload
Normal file → Executable file
9
salt/common/tools/sbin/so-elastic-auth
Normal file → Executable file
9
salt/common/tools/sbin/so-elastic-auth
Normal file → Executable 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
0
salt/common/tools/sbin/so-elasticsearch-query
Normal file → Executable file
5
salt/common/tools/sbin/so-elasticsearch-wait
Executable file
5
salt/common/tools/sbin/so-elasticsearch-wait
Executable 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
0
salt/common/tools/sbin/so-influxdb-clean
Normal file → Executable file
0
salt/common/tools/sbin/so-influxdb-migrate
Normal file → Executable file
0
salt/common/tools/sbin/so-influxdb-migrate
Normal file → Executable file
0
salt/common/tools/sbin/so-pcap-export
Normal file → Executable file
0
salt/common/tools/sbin/so-pcap-export
Normal file → Executable file
Reference in New Issue
Block a user