Skip to content

Commit b188ec8

Browse files
authored
[qradar] remove live as default value (#5495)
1 parent 9cc9caa commit b188ec8

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

stream/qradar/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
- OPENCTI_URL=http://localhost
77
- OPENCTI_TOKEN=ChangeMe
88
- CONNECTOR_ID=ChangeMe
9-
- CONNECTOR_LIVE_STREAM_ID=live # ID of the live stream created in the OpenCTI UI
9+
- CONNECTOR_LIVE_STREAM_ID=changeme # ID of the live stream created in the OpenCTI UI
1010
- CONNECTOR_LIVE_STREAM_LISTEN_DELETE=true
1111
- CONNECTOR_LIVE_STREAM_NO_DEPENDENCIES=true
1212
- CONNECTOR_NAME=OpenCTI QRADAR Connector

stream/qradar/src/config.yml.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ opencti:
44

55
connector:
66
id: 'ChangeMe'
7-
live_stream_id: 'live' # ID of the live stream created in the OpenCTI UI
7+
live_stream_id: 'changeme' # ID of the live stream created in the OpenCTI UI
88
live_stream_listen_delete: true
99
live_stream_no_dependencies: true
1010
name: 'QRadar'

stream/qradar/src/qradar.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ def __init__(self):
6868
)
6969
sys.exit(0)
7070

71+
def check_stream_id(self):
72+
"""
73+
In case of stream_id configuration is missing, raise ValueError
74+
"""
75+
if (
76+
not self.helper.connect_live_stream_id
77+
or self.helper.connect_live_stream_id.lower() == "changeme"
78+
):
79+
raise ValueError("Missing stream ID, please check your configurations.")
80+
7181
def _initialize_reference_sets(self):
7282
"""
7383
:return:
@@ -367,6 +377,7 @@ def _process_message(self, msg):
367377
return None
368378

369379
def start(self):
380+
self.check_stream_id()
370381
self.helper.listen_stream(self._process_message)
371382

372383

0 commit comments

Comments
 (0)