mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-22 10:18:09 +02:00
Migrate FleetDM user mgt to fleetctl
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
#so-fleet-setup $FleetEmail $FleetPassword
|
||||
|
||||
. /usr/sbin/so-common
|
||||
|
||||
if [[ $# -ne 2 ]] ; then
|
||||
echo "Username or Password was not set - exiting now."
|
||||
exit 1
|
||||
@@ -19,6 +21,11 @@ docker exec so-fleet fleetctl config set --address https://127.0.0.1:8080 --tls-
|
||||
docker exec so-fleet bash -c 'while [[ "$(curl -s -o /dev/null --insecure -w ''%{http_code}'' https://127.0.0.1:8080/fleet)" != "301" ]]; do sleep 5; done'
|
||||
docker exec so-fleet fleetctl setup --email $1 --password $2 --name admin --org-name SO
|
||||
|
||||
# Create Security Onion Fleet Service Account
|
||||
FLEET_SA_EMAIL=$(lookup_pillar_secret fleet_sa_email)
|
||||
FLEET_SA_PW=$(lookup_pillar_secret fleet_sa_password)
|
||||
docker exec so-fleet fleetctl user create --email $FLEET_SA_EMAIL --name SO_ServiceAccount --password $FLEET_SA_PW --global-role admin
|
||||
|
||||
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/MacOS/osquery.yaml
|
||||
docker exec so-fleet fleetctl apply -f /packs/palantir/Fleet/Endpoints/Windows/osquery.yaml
|
||||
docker exec so-fleet fleetctl apply -f /packs/so/so-default.yml
|
||||
|
||||
Reference in New Issue
Block a user