Skip to main content

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 MQTTClients for each capability registered, plus one for registering, unregistering and controlling the fin. MQTTClients 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soarca_fin_library-0.0.1rc5.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

soarca_fin_library-0.0.1rc5-py3-none-any.whl (26.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page