mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #12497 from Security-Onion-Solutions/jppsensoroni
fix sensoroni for non sensor
This commit is contained in:
@@ -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,8 +22,11 @@
|
|||||||
"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 %}
|
||||||
|
{% 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 %}
|
{%- if PCAPMERGED.enabled %}
|
||||||
},
|
},
|
||||||
"stenoquery": {
|
"stenoquery": {
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
"pcapInputPath": "/nsm/suripcap",
|
"pcapInputPath": "/nsm/suripcap",
|
||||||
"pcapOutputPath": "/nsm/pcapout"
|
"pcapOutputPath": "/nsm/pcapout"
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
set GLOBALS = {
|
set GLOBALS = {
|
||||||
'hostname': INIT.GRAINS.nodename,
|
'hostname': INIT.GRAINS.nodename,
|
||||||
'is_manager': false,
|
'is_manager': false,
|
||||||
|
'is_sensor': false,
|
||||||
'manager': INIT.GRAINS.master,
|
'manager': INIT.GRAINS.master,
|
||||||
'minion_id': INIT.GRAINS.id,
|
'minion_id': INIT.GRAINS.id,
|
||||||
'main_interface': INIT.PILLAR.host.mainint,
|
'main_interface': INIT.PILLAR.host.mainint,
|
||||||
@@ -63,5 +64,8 @@
|
|||||||
{% do GLOBALS.update({'is_manager': true}) %}
|
{% do GLOBALS.update({'is_manager': true}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if GLOBALS.role in GLOBALS.sensor_roles %}
|
||||||
|
{% do GLOBALS.update({'is_sensor': true}) %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% do salt['defaults.merge'](GLOBALS, ROLE_GLOBALS, merge_lists=False, in_place=True) %}
|
{% do salt['defaults.merge'](GLOBALS, ROLE_GLOBALS, merge_lists=False, in_place=True) %}
|
||||||
|
|||||||
Reference in New Issue
Block a user