mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
59 lines
3.0 KiB
Django/Jinja
59 lines
3.0 KiB
Django/Jinja
{# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
|
or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
|
https://securityonion.net/license; you may not use this file except in compliance with the
|
|
Elastic License 2.0. #}
|
|
|
|
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
|
{% from 'soc/defaults.map.jinja' import SOCDEFAULTS with context %}
|
|
{% from 'logstash/map.jinja' import LOGSTASH_NODES %}
|
|
{% set DOCKER_EXTRA_HOSTS = LOGSTASH_NODES %}
|
|
{% do DOCKER_EXTRA_HOSTS.append({GLOBALS.influxdb_host:pillar.node_data[GLOBALS.influxdb_host].ip}) %}
|
|
|
|
{% set SOCMERGED = salt['pillar.get']('soc', SOCDEFAULTS, merge=true) %}
|
|
|
|
{# if SOCMERGED.config.server.modules.cases == httpcase details come from the soc pillar #}
|
|
{% if SOCMERGED.config.server.modules.cases != 'soc' %}
|
|
{% do SOCMERGED.config.server.modules.elastic.update({'casesEnabled': false}) %}
|
|
{% do SOCMERGED.config.server.client.update({'casesEnabled': false}) %}
|
|
{% do SOCMERGED.config.server.client.hunt.update({'escalateRelatedEventsEnabled': false}) %}
|
|
{% do SOCMERGED.config.server.client.alerts.update({'escalateRelatedEventsEnabled': false}) %}
|
|
{% if SOCMERGED.config.server.modules.cases == 'elasticcases' %}
|
|
{% do SOCMERGED.config.server.modules.update({
|
|
'elasticcases': {
|
|
'hostUrl': 'https://' ~ GLOBALS.manager_ip ~ ':5601',
|
|
'username': GLOBALS.elasticsearch.auth.users.so_elastic_user.user,
|
|
'password': GLOBALS.elasticsearch.auth.users.so_elastic_user.pass,
|
|
}
|
|
}) %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{# since cases is not a valid soc config item and only used for the map files, remove it from being placed in the config #}
|
|
{% do SOCMERGED.config.server.modules.pop('cases') %}
|
|
|
|
{% if pillar.manager.playbook == 0 %}
|
|
{% do SOCMERGED.config.server.client.inactiveTools.append('toolPlaybook') %}
|
|
{% endif %}
|
|
|
|
{% set standard_actions = SOCMERGED.config.pop('actions') %}
|
|
{% if pillar.global.endgamehost is defined %}
|
|
{% set endgame_dict = {
|
|
"name": "Endgame",
|
|
"description": "Endgame Endpoint Investigation and Response",
|
|
"icon": "fa-external-link-alt",
|
|
"target": "_blank",
|
|
"links": ["https://" ~ pillar.global.endgamehost ~ "/endpoints/{:agent.id}"]
|
|
}
|
|
%}
|
|
{% do standard_actions.append(endgame_dict) %}
|
|
{% endif %}
|
|
|
|
{% do SOCMERGED.config.server.client.hunt.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.config.server.client.dashboards.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.config.server.client.update({'job': {'actions': standard_actions}}) %}
|
|
{% do SOCMERGED.config.server.client.alerts.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.config.server.client.cases.update({'actions': standard_actions}) %}
|
|
|
|
{% set standard_eventFields = SOCMERGED.config.pop('eventFields') %}
|
|
{% do SOCMERGED.config.server.client.hunt.update({'eventFields': standard_eventFields}) %}
|
|
{% do SOCMERGED.config.server.client.dashboards.update({'eventFields': standard_eventFields}) %}
|