mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-25 10:23:20 +01:00
63 lines
2.6 KiB
Django/Jinja
63 lines
2.6 KiB
Django/Jinja
{% from 'vars/globals.map.jinja' import GLOBALS %}
|
|
{% from 'soc/defaults.map.jinja' import SOCDEFAULTS with context %}
|
|
{% set SOCMERGED = salt['pillar.get']('soc', SOCDEFAULTS, merge=true) %}
|
|
|
|
{# if SOCMERGED.server.modules.cases == httpcase details come from the soc pillar #}
|
|
{% if SOCMERGED.server.modules.cases != 'soc' %}
|
|
{% do SOCMERGED.server.modules.elastic.update({'casesEnabled': false}) %}
|
|
{% do SOCMERGED.server.client.update({'casesEnabled': false}) %}
|
|
{% do SOCMERGED.server.client.hunt.update({'escalateRelatedEventsEnabled': false}) %}
|
|
{% do SOCMERGED.server.client.alerts.update({'escalateRelatedEventsEnabled': false}) %}
|
|
{% if SOCMERGED.server.modules.cases == 'elasticcases' %}
|
|
{% do SOCMERGED.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.server.modules.pop('cases') %}
|
|
|
|
{# change some options if this is airgap #}
|
|
{% if GLOBALS.airgap %}
|
|
{% do SOCMERGED.server.client.update({
|
|
'docsUrl': '/docs/',
|
|
'cheatsheetUrl': '/docs/cheatsheet.pdf',
|
|
'releaseNotesUrl': '/docs/#release-notes'
|
|
})
|
|
%}
|
|
{% endif %}
|
|
|
|
{% if pillar.manager.playbook == 0 %}
|
|
{% do SOCMERGED.server.client.inactiveTools.append('toolPlaybook') %}
|
|
{% endif %}
|
|
|
|
{% do SOCMERGED.server.client.inactiveTools.append('toolFleet') %}
|
|
|
|
{% if pillar.manager.grafana == 0 %}
|
|
{% do SOCMERGED.server.client.inactiveTools.append('toolGrafana') %}
|
|
{% endif %}
|
|
|
|
|
|
{% set standard_actions = SOCMERGED.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.server.client.hunt.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.server.client.dashboards.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.server.client.update({'job': {'actions': standard_actions}}) %}
|
|
{% do SOCMERGED.server.client.alerts.update({'actions': standard_actions}) %}
|
|
{% do SOCMERGED.server.client.cases.update({'actions': standard_actions}) %}
|