Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions aqua-ethos-setup/aqua_ethos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@ function makePost {
fi
}

function makePut {
curl --silent -H "Content-Type: application/json" -H "$HEADER: Bearer $TOKEN" -X PUT -d "$2" "$WEB_URL/$1"

if [[ "$?" != "0" ]]; then
log "Error sending PUT to Aqua"
exit 1
fi
}

function getExistingImages {
EXISTING_IMAGES=$(curl --silent -H "$HEADER: Bearer $TOKEN" "$WEB_URL/settings/export" --data-binary '["images"]')
}
Expand Down Expand Up @@ -325,6 +334,9 @@ fi

}

# Update the enforcers
makePut "hostsbatch?update_enforcers=true" '{"network_protection": "true"}'

if [[ ! -z "$DATADOG_PASSWORD" ]]; then
createUser "datadog" "datadog" "Datadog" "$DATADOG_PASSWORD" "administrator"
fi
Expand Down