mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-25 14:07:49 +02:00
Merge pull request #4549 from Security-Onion-Solutions/kilo
Elastic auth: Fun with Salt
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
+7
-2
@@ -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
|
||||
|
||||
Regular → Executable
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /usr/sbin/so-common
|
||||
|
||||
wait_for_web_response "https://localhost:9200/_cat/indices/.kibana*" "green open" 300 "{{ ELASTICCURL }}"
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Reference in New Issue
Block a user