mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Rename PATH var to avoid collision with OS PATH var; wrapped password var in quotes to support spaces in Fleet/TheHive passwords
This commit is contained in:
@@ -31,7 +31,7 @@ if [[ $# -lt 1 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH=$1
|
QUERYPATH=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
{{ ELASTICCURL }} -s -k -L -H "Content-Type: application/json" "https://localhost:9200/${PATH}" "$@"
|
{{ ELASTICCURL }} -s -k -L -H "Content-Type: application/json" "https://localhost:9200/${QUERYPATH}" "$@"
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ function syncElasticSystemRole() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function syncElastic() {
|
function syncElastic() {
|
||||||
|
echo "Syncing users between SOC and Elastic..."
|
||||||
usersTmpFile="${elasticUsersFile}.tmp"
|
usersTmpFile="${elasticUsersFile}.tmp"
|
||||||
rolesTmpFile="${elasticRolesFile}.tmp"
|
rolesTmpFile="${elasticRolesFile}.tmp"
|
||||||
createElasticFile "${usersTmpFile}"
|
createElasticFile "${usersTmpFile}"
|
||||||
@@ -331,8 +332,8 @@ case "${operation}" in
|
|||||||
createUser "$email"
|
createUser "$email"
|
||||||
syncAll
|
syncAll
|
||||||
echo "Successfully added new user to SOC"
|
echo "Successfully added new user to SOC"
|
||||||
check_container thehive && echo $password | so-thehive-user-add "$email"
|
check_container thehive && echo "$password" | so-thehive-user-add "$email"
|
||||||
check_container fleet && echo $password | so-fleet-user-add "$email"
|
check_container fleet && echo "$password" | so-fleet-user-add "$email"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"list")
|
"list")
|
||||||
|
|||||||
Reference in New Issue
Block a user