SOARCA FIN lib allows for extending custom SOARCA capabilities through a python library
Project description
SOARCA Fin Library
A Python implementation for the SOARCA FIN, compatible with: SOARCA the TNO orchestrator for Open-C2, CACAO and STIX
building / starting / stopping
Requirements
- Python3
Setup
Install requirements
pip3 install -r requirements.txt
Create .env file with the following entries:
MQTT_USERNAME = "{INSERT_USERNAME_HERE}"
MQTT_PASSWD = "{INSERT_PASSWORD_HERE}"
Quick Run
python3 main.py
Setup SOARCA Capabilities
To register a fin to SOARCA, first create a SoarcaFin object pass the fin_id in the constructor.
Call set_config_MQTT_server()
to set the required configurations for the fin to connect to the MQTT broker.
For each capability to be registered, call create_fin_capability()
. The capability callback funtion should return an object of type ResultStructure
.
When all capabilities are initialized, call start_fin()
for the SOARCA Fin to connect to the MQTT broker and register itself to SOARCA.
Documentation
For documentation about the fin protocol we refer the reader to de documention page of SOARCA
For class diagrams and example sequence diagrams of the Fin implementation plantUML is used.
Application Layout
The main object of the application is the SoarcaFin
object, which is responsible for configuring and creating and controlling the capabilities.
The SoarcaFin creates MQTTClient
s for each capability registered, plus one for registering, unregistering and controlling the fin.
MQTTClient
s each have their own connection to the MQTT Broker and own Parser
and Executor
objects.
The Parser
object parsers the raw MQTT messages and tries to convert them to one of the objects in src/models
.
The Executor
runs in their own thread and handles the actual execution of the messages.
The Executor
polls a thread-safe queue for new messages and performs IO operations, such as sending messages to the MQTT broker and calling capability callbacks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for soarca_fin_library-0.0.1rc5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f31f1add0053b459675614787fb78a168fa58e00f02240884e9b27eba3c43d30 |
|
MD5 | 9abb74ac703c6d0a6b19f4a05882f4c8 |
|
BLAKE2b-256 | b0eaa95ac13cba7bd04eb0d813e32e4b2095fc811c0a17efecbf5fd28e4914ef |
Hashes for soarca_fin_library-0.0.1rc5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 429583cb72a6d3f2ccffb2b004f244dfab9532644f60a48c9a8e457ef6986838 |
|
MD5 | 02307d4f94c27cf2b28314add9525169 |
|
BLAKE2b-256 | 6eb91df684b4cf660dd7118f6463f5e87b58c45194bcd011198d483abf38bfb5 |