only import pcap and suricata if sensor

This commit is contained in:
m0duspwnens
2024-03-05 09:54:40 -05:00
parent 08f2b8251b
commit 1a58aa61a0

View File

@@ -1,7 +1,5 @@
{%- from 'vars/globals.map.jinja' import GLOBALS %} {% from 'vars/globals.map.jinja' import GLOBALS %}
{%- from 'sensoroni/map.jinja' import SENSORONIMERGED %} {%- from 'sensoroni/map.jinja' import SENSORONIMERGED -%}
{%- from 'pcap/config.map.jinja' import PCAPMERGED %}
{%- from 'suricata/map.jinja' import SURICATAMERGED %}
{ {
"logFilename": "/opt/sensoroni/logs/sensoroni.log", "logFilename": "/opt/sensoroni/logs/sensoroni.log",
"logLevel":"info", "logLevel":"info",
@@ -24,24 +22,28 @@
"importer": {}, "importer": {},
"statickeyauth": { "statickeyauth": {
"apiKey": "{{ GLOBALS.sensoroni_key }}" "apiKey": "{{ GLOBALS.sensoroni_key }}"
{#- if PCAPMERGED.enabled is true then we know that steno is the pcap engine #} {% if GLOBALS.is_sensor %}
{#- if it is false, then user has steno disabled in ui or has selected suricata for pcap engine #} {% from 'pcap/config.map.jinja' import PCAPMERGED %}
{%- if PCAPMERGED.enabled %} {% from 'suricata/map.jinja' import SURICATAMERGED %}
{# if PCAPMERGED.enabled is true then we know that steno is the pcap engine #}
{# if it is false, then user has steno disabled in ui or has selected suricata for pcap engine #}
{%- if PCAPMERGED.enabled %}
}, },
"stenoquery": { "stenoquery": {
"executablePath": "/opt/sensoroni/scripts/stenoquery.sh", "executablePath": "/opt/sensoroni/scripts/stenoquery.sh",
"pcapInputPath": "/nsm/pcap", "pcapInputPath": "/nsm/pcap",
"pcapOutputPath": "/nsm/pcapout" "pcapOutputPath": "/nsm/pcapout"
} }
{%- elif GLOBALS.pcap_engine == "SURICATA" and SURICATAMERGED.enabled %} {%- elif GLOBALS.pcap_engine == "SURICATA" and SURICATAMERGED.enabled %}
}, },
"suriquery": { "suriquery": {
"executablePath": "/opt/sensoroni/scripts/suriquery.sh", "executablePath": "/opt/sensoroni/scripts/suriquery.sh",
"pcapInputPath": "/nsm/suripcap", "pcapInputPath": "/nsm/suripcap",
"pcapOutputPath": "/nsm/pcapout" "pcapOutputPath": "/nsm/pcapout"
} }
{%- else %} {%- else %}
} }
{% endif %}
{%- endif %} {%- endif %}
} }
} }