From f56811e745b4c69ccb13c817175ce1ba44f9d6f7 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Fri, 10 Jul 2020 14:40:04 -0400 Subject: [PATCH] [feat] Use setup user+pass for TheHive, Cortex, and Fleet as well --- salt/thehive/scripts/cortex_init | 14 +++++++------- salt/thehive/scripts/hive_init | 8 ++++---- setup/so-functions | 11 ++++++----- setup/so-whiptail | 3 ++- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/salt/thehive/scripts/cortex_init b/salt/thehive/scripts/cortex_init index 063ae498d..922ad45dc 100644 --- a/salt/thehive/scripts/cortex_init +++ b/salt/thehive/scripts/cortex_init @@ -1,11 +1,11 @@ #!/bin/bash -{% set MASTERIP = salt['pillar.get']('static:masterip', '') %} -{%- set CORTEXUSER = salt['pillar.get']('static:cortexuser', '') %} -{%- set CORTEXPASSWORD = salt['pillar.get']('static:cortexpassword', '') %} -{%- set CORTEXKEY = salt['pillar.get']('static:cortexkey', '') %} -{%- set CORTEXORGNAME = salt['pillar.get']('static:cortexorgname', '') %} -{%- set CORTEXORGUSER = salt['pillar.get']('static:cortexorguser', '') %} -{%- set CORTEXORGUSERKEY = salt['pillar.get']('static:cortexorguserkey', '') %} +# {%- set MASTERIP = salt['pillar.get']('static:masterip', '') %} +# {%- set CORTEXUSER = salt['pillar.get']('static:cortexuser', '') %} +# {%- set CORTEXPASSWORD = salt['pillar.get']('static:cortexpassword', 'cortexchangeme') %} +# {%- set CORTEXKEY = salt['pillar.get']('static:cortexkey', '') %} +# {%- set CORTEXORGNAME = salt['pillar.get']('static:cortexorgname', '') %} +# {%- set CORTEXORGUSER = salt['pillar.get']('static:cortexorguser', '') %} +# {%- set CORTEXORGUSERKEY = salt['pillar.get']('static:cortexorguserkey', '') %} default_salt_dir=/opt/so/saltstack/default diff --git a/salt/thehive/scripts/hive_init b/salt/thehive/scripts/hive_init index 296004e77..0163b45f3 100755 --- a/salt/thehive/scripts/hive_init +++ b/salt/thehive/scripts/hive_init @@ -1,8 +1,8 @@ #!/bin/bash -{% set MASTERIP = salt['pillar.get']('static:masterip', '') %} -{%- set THEHIVEUSER = salt['pillar.get']('static:hiveuser', '') %} -{%- set THEHIVEPASSWORD = salt['pillar.get']('static:hivepassword', '') %} -{%- set THEHIVEKEY = salt['pillar.get']('static:hivekey', '') %} +# {%- set MASTERIP = salt['pillar.get']('static:masterip', '') %} +# {%- set THEHIVEUSER = salt['pillar.get']('static:hiveuser', '') %} +# {%- set THEHIVEPASSWORD = salt['pillar.get']('static:hivepassword', 'hivechangeme') %} +# {%- set THEHIVEKEY = salt['pillar.get']('static:hivekey', '') %} thehive_init(){ sleep 120 diff --git a/setup/so-functions b/setup/so-functions index a35393ddf..d9ebf0d15 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -979,15 +979,16 @@ master_static() { " broversion: $BROVERSION"\ " ids: $NIDS"\ " masterip: $MAINIP"\ - " hiveuser: hiveadmin"\ - " hivepassword: hivechangeme"\ + " hiveuser: $WEBUSER"\ + " hivepassword: $WEBPASSWD1"\ " hivekey: $HIVEKEY"\ - " cortexuser: cortexadmin"\ - " cortexpassword: cortexchangeme"\ + " cortexuser: $WEBUSER"\ + " cortexpassword: $WEBPASSWD1"\ " cortexkey: $CORTEXKEY"\ " cortexorgname: SecurityOnion"\ - " cortexorguser: soadmin"\ + " cortexorguser: $WEBUSER"\ " cortexorguserkey: $CORTEXORGUSERKEY"\ + " grafanapassword: $WEBPASSWD1"\ " fleet_custom_hostname: "\ " fleet_master: False"\ " fleet_node: False"\ diff --git a/setup/so-whiptail b/setup/so-whiptail index 20e4d7ee5..3b8b13f79 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -252,7 +252,8 @@ whiptail_create_web_user() { [ -n "$TESTING" ] && return WEBUSER=$(whiptail --title "Security Onion Install" --inputbox \ - "Please enter an email address to create an administrator account for the web interface." 10 60 3>&1 1>&2 2>&3) + "Please enter an email address to create an administrator account for the web interface. \ + This will also be used for TheHive, Cortex, and Fleet" 10 60 3>&1 1>&2 2>&3) local exitstatus=$? whiptail_check_exitstatus $exitstatus