mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Kafka init
Signed-off-by: reyesj2 <94730068+reyesj2@users.noreply.github.com>
This commit is contained in:
@@ -1242,6 +1242,7 @@ generate_passwords(){
|
||||
REDISPASS=$(get_random_value)
|
||||
SOCSRVKEY=$(get_random_value 64)
|
||||
IMPORTPASS=$(get_random_value)
|
||||
KAFKACLUSTERID=$(get_random_value 22)
|
||||
}
|
||||
|
||||
generate_interface_vars() {
|
||||
@@ -1269,7 +1270,7 @@ get_redirect() {
|
||||
get_minion_type() {
|
||||
local minion_type
|
||||
case "$install_type" in
|
||||
'EVAL' | 'MANAGERSEARCH' | 'MANAGER' | 'SENSOR' | 'HEAVYNODE' | 'SEARCHNODE' | 'FLEET' | 'IDH' | 'STANDALONE' | 'IMPORT' | 'RECEIVER')
|
||||
'EVAL' | 'MANAGERSEARCH' | 'MANAGER' | 'SENSOR' | 'HEAVYNODE' | 'SEARCHNODE' | 'FLEET' | 'IDH' | 'STANDALONE' | 'IMPORT' | 'RECEIVER' | 'KAFKANODE')
|
||||
minion_type=$(echo "$install_type" | tr '[:upper:]' '[:lower:]')
|
||||
;;
|
||||
esac
|
||||
@@ -1663,6 +1664,8 @@ process_installtype() {
|
||||
is_import=true
|
||||
elif [ "$install_type" = 'RECEIVER' ]; then
|
||||
is_receiver=true
|
||||
elif [ "$install_type" = 'KAFKANODE' ]; then
|
||||
is_kafka=true
|
||||
elif [ "$install_type" = 'DESKTOP' ]; then
|
||||
if [ "$setup_type" != 'desktop' ]; then
|
||||
exec bash so-setup desktop
|
||||
@@ -2105,7 +2108,8 @@ secrets_pillar(){
|
||||
" playbook_automation: $PLAYBOOKAUTOMATIONPASS"\
|
||||
" playbook_automation_api_key: "\
|
||||
" import_pass: $IMPORTPASS"\
|
||||
" influx_pass: $INFLUXPASS" > $local_salt_dir/pillar/secrets.sls
|
||||
" influx_pass: $INFLUXPASS"\
|
||||
" kafka_cluster_id: $KAFKACLUSTERID" > $local_salt_dir/pillar/secrets.sls
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -574,6 +574,16 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
check_manager_connection
|
||||
set_minion_info
|
||||
whiptail_end_settings
|
||||
|
||||
elif [[ $is_kafka ]]; then
|
||||
info "Setting up as node type Kafka broker"
|
||||
#check_requirements "kafka"
|
||||
networking_needful
|
||||
collect_mngr_hostname
|
||||
add_mngr_ip_to_hosts
|
||||
check_manager_connection
|
||||
set_minion_info
|
||||
whiptail_end_settings
|
||||
fi
|
||||
|
||||
if [[ $waitforstate ]]; then
|
||||
|
||||
@@ -640,13 +640,14 @@ whiptail_install_type_dist_existing() {
|
||||
Note: Heavy nodes (HEAVYNODE) are NOT recommended for most users.
|
||||
EOM
|
||||
|
||||
install_type=$(whiptail --title "$whiptail_title" --menu "$node_msg" 19 75 6 \
|
||||
install_type=$(whiptail --title "$whiptail_title" --menu "$node_msg" 19 75 7 \
|
||||
"SENSOR" "Create a forward only sensor " \
|
||||
"SEARCHNODE" "Add a search node with parsing " \
|
||||
"FLEET" "Dedicated Elastic Fleet Node " \
|
||||
"HEAVYNODE" "Sensor + Search Node " \
|
||||
"IDH" "Intrusion Detection Honeypot Node " \
|
||||
"RECEIVER" "Receiver Node " \
|
||||
"KAFKANODE" "Kafka Broker + Kraft controller" \
|
||||
3>&1 1>&2 2>&3
|
||||
# "HOTNODE" "Add Hot Node (Uses Elastic Clustering)" \ # TODO
|
||||
# "WARMNODE" "Add Warm Node to existing Hot or Search node" \ # TODO
|
||||
@@ -677,6 +678,8 @@ whiptail_install_type_dist_existing() {
|
||||
is_import=true
|
||||
elif [ "$install_type" = 'RECEIVER' ]; then
|
||||
is_receiver=true
|
||||
elif [ "$install_type" = 'KAFKANODE' ]; then
|
||||
is_kafka=true
|
||||
elif [ "$install_type" = 'DESKTOP' ]; then
|
||||
if [ "$setup_type" != 'desktop' ]; then
|
||||
exec bash so-setup desktop
|
||||
|
||||
Reference in New Issue
Block a user