Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stream/qradar/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
- OPENCTI_URL=http://localhost
- OPENCTI_TOKEN=ChangeMe
- CONNECTOR_ID=ChangeMe
- CONNECTOR_LIVE_STREAM_ID=live # ID of the live stream created in the OpenCTI UI
- CONNECTOR_LIVE_STREAM_ID=changeme # ID of the live stream created in the OpenCTI UI
- CONNECTOR_LIVE_STREAM_LISTEN_DELETE=true
- CONNECTOR_LIVE_STREAM_NO_DEPENDENCIES=true
- CONNECTOR_NAME=OpenCTI QRADAR Connector
Expand Down
2 changes: 1 addition & 1 deletion stream/qradar/src/config.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ opencti:

connector:
id: 'ChangeMe'
live_stream_id: 'live' # ID of the live stream created in the OpenCTI UI
live_stream_id: 'changeme' # ID of the live stream created in the OpenCTI UI
live_stream_listen_delete: true
live_stream_no_dependencies: true
name: 'QRadar'
Expand Down
11 changes: 11 additions & 0 deletions stream/qradar/src/qradar.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ def __init__(self):
)
sys.exit(0)

def check_stream_id(self):
"""
In case of stream_id configuration is missing, raise ValueError
"""
if (
not self.helper.connect_live_stream_id
or self.helper.connect_live_stream_id.lower() == "changeme"
):
raise ValueError("Missing stream ID, please check your configurations.")

def _initialize_reference_sets(self):
"""
:return:
Expand Down Expand Up @@ -367,6 +377,7 @@ def _process_message(self, msg):
return None

def start(self):
self.check_stream_id()
self.helper.listen_stream(self._process_message)


Expand Down