mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-16 14:02:52 +01:00
Avoid running highstate during setup when flipping auth flag
This commit is contained in:
@@ -30,8 +30,10 @@ fi
|
|||||||
if [[ "$authEnable" == "true" ]]; then
|
if [[ "$authEnable" == "true" ]]; then
|
||||||
if grep -q "enabled: False" "$ES_AUTH_PILLAR"; then
|
if grep -q "enabled: False" "$ES_AUTH_PILLAR"; then
|
||||||
sed -i 's/enabled: False/enabled: True/g' "$ES_AUTH_PILLAR"
|
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..."
|
echo "Applying highstate - this may take a few minutes..."
|
||||||
salt-call state.highstate queue=True
|
salt-call state.highstate queue=True
|
||||||
|
fi
|
||||||
echo "Elastic auth is now enabled."
|
echo "Elastic auth is now enabled."
|
||||||
if grep -q "argon" "$ES_USERS_FILE"; then
|
if grep -q "argon" "$ES_USERS_FILE"; then
|
||||||
echo ""
|
echo ""
|
||||||
@@ -44,8 +46,10 @@ if [[ "$authEnable" == "true" ]]; then
|
|||||||
elif [[ "$authEnable" == "false" ]]; then
|
elif [[ "$authEnable" == "false" ]]; then
|
||||||
if grep -q "enabled: True" "$ES_AUTH_PILLAR"; then
|
if grep -q "enabled: True" "$ES_AUTH_PILLAR"; then
|
||||||
sed -i 's/enabled: True/enabled: False/g' "$ES_AUTH_PILLAR"
|
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..."
|
echo "Applying highstate - this may take a few minutes..."
|
||||||
salt-call state.highstate queue=True
|
salt-call state.highstate queue=True
|
||||||
|
fi
|
||||||
echo "Elastic auth is now disabled."
|
echo "Elastic auth is now disabled."
|
||||||
else
|
else
|
||||||
echo "Auth is already disabled."
|
echo "Auth is already disabled."
|
||||||
|
|||||||
@@ -752,7 +752,7 @@ echo "1" > /root/accept_changes
|
|||||||
|
|
||||||
set_progress_str 60 "$(print_salt_state_apply 'manager')"
|
set_progress_str 60 "$(print_salt_state_apply 'manager')"
|
||||||
salt-call state.apply -l info manager >> $setup_log 2>&1
|
salt-call state.apply -l info manager >> $setup_log 2>&1
|
||||||
bash /opt/so/saltstack/default/salt/common/tools/sbin/so-elastic-auth
|
ELASTIC_AUTH_SKIP_HIGHSTATE=true bash /opt/so/saltstack/default/salt/common/tools/sbin/so-elastic-auth
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set_progress_str 61 "$(print_salt_state_apply 'firewall')"
|
set_progress_str 61 "$(print_salt_state_apply 'firewall')"
|
||||||
|
|||||||
Reference in New Issue
Block a user