mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
The Hive - Just scripted filed left
This commit is contained in:
@@ -78,3 +78,8 @@ so-thehive:
|
|||||||
- /opt/so/conf/hive/etc/application.conf:/opt/thehive/conf/application.conf:ro
|
- /opt/so/conf/hive/etc/application.conf:/opt/thehive/conf/application.conf:ro
|
||||||
- port_bindings:
|
- port_bindings:
|
||||||
- 0.0.0.0:9000:9000
|
- 0.0.0.0:9000:9000
|
||||||
|
|
||||||
|
hivescript:
|
||||||
|
cmd.script:
|
||||||
|
- source: salt://hive/thehive/scripts/hive_init.sh
|
||||||
|
- template: jinja
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ hive_init(){
|
|||||||
HIVE_KEY="{{HIVEKEY}}"
|
HIVE_KEY="{{HIVEKEY}}"
|
||||||
|
|
||||||
# Create intial TheHive user
|
# Create intial TheHive user
|
||||||
curl -v -k "https://$HIVE_IP/thehive/api/user" -H "Content-Type: application/json" -d "{\"login\" : \"$HIVE_USER\",\"name\" : \"$HIVE_USER\",\"roles\" : [\"read\",\"write\",\"admin\"],\"preferences\" : \"{}\",\"password\" : \"$HIVE_PASSWORD\", \"key\": \"$HIVE_KEY\"}"
|
curl -v -k "https://$HIVE_IP/thehive/api/user" -H "Content-Type: application/json" -d "{\"login\" : \"$HIVE_USER\",\"name\" : \"$HIVE_USER\",\"roles\" : [\"read\",\"alert\",\"write\",\"admin\"],\"preferences\" : \"{}\",\"password\" : \"$HIVE_PASSWORD\", \"key\": \"$HIVE_KEY\"}"
|
||||||
|
|
||||||
# Update SOCtopus config with apikey value
|
# Update SOCtopus config with apikey value
|
||||||
#sed -i "s/hive_key = .*/hive_key = $HIVE_KEY/" $SOCTOPUS_CONFIG
|
#sed -i "s/hive_key = .*/hive_key = $HIVE_KEY/" $SOCTOPUS_CONFIG
|
||||||
|
|||||||
Reference in New Issue
Block a user