Generate SOC SRVKey during setup

This commit is contained in:
Jason Ertel
2023-02-24 10:20:23 -05:00
parent d3c5d0569a
commit 316db85584
2 changed files with 11 additions and 1 deletions

View File

@@ -47,6 +47,11 @@ soc:
global: True global: True
advanced: True advanced: True
server: server:
srvKey:
description: Unique key for protecting the integrity of user submitted data via the web browser.
global: True
sensitive: True
advanced: True
maxPacketCount: maxPacketCount:
description: Maximum number of packets to show in the PCAP viewer. Larger values can cause more resource utilization on both the SOC server and the browser. description: Maximum number of packets to show in the PCAP viewer. Larger values can cause more resource utilization on both the SOC server and the browser.
global: True global: True

View File

@@ -1245,6 +1245,7 @@ generate_passwords(){
SENSORONIKEY=$(get_random_value) SENSORONIKEY=$(get_random_value)
KRATOSKEY=$(get_random_value) KRATOSKEY=$(get_random_value)
REDISPASS=$(get_random_value) REDISPASS=$(get_random_value)
SOCSRVKEY=$(get_random_value 64)
} }
generate_interface_vars() { generate_interface_vars() {
@@ -1380,7 +1381,11 @@ idstools_pillar() {
soc_pillar() { soc_pillar() {
title "Creating the SOC pillar" title "Creating the SOC pillar"
touch $adv_soc_pillar_file touch $adv_soc_pillar_file
touch $soc_pillar_file printf '%s\n'\
"soc:"\
" server:"\
" srvKey: '$SOCSRVKEY'"\
"" > "$soc_pillar_file"
} }
telegraf_pillar() { telegraf_pillar() {