Skip to main content

Event-Driven Pipeline

AuroraSOC processes security events through a multi-stage pipeline using three complementary messaging systems.

Pipeline overview

The ingest plane uses Vector to parse and normalise raw feeds into OCSF 1.3 events and publishes them to NATS JetStream, the primary event bus between planes. The Rust detection workers consume from NATS, evaluate Sigma-compiled rules, and emit alerts. Redis holds ephemeral state and the agent task queue; it is not the primary event bus. The agent plane enriches IOCs against external threat-intel sources and issues queued containment actions, gated by human approval for L3 tiers, back to the EDR fleet through the collector bridge.

Why three messaging systems

SystemPurposePatternDurability
NATS JetStreamPrimary event bus, cross-site federationPub/Sub plus persistenceDisk-backed
Redis StreamsEphemeral state, agent task queueConsumer groupsIn-memory plus AOF
MQTTIoT device communicationPub/Sub plus QoS levelsBroker-dependent

NATS JetStream: the primary event bus

NATS JetStream carries normalised OCSF events between the ingest, detection, and agent planes and is the primary event bus within and across AuroraSOC sites. Cross-site, it provides persistent delivery with exactly-once semantics through consumer acknowledgment and deduplication, and NATS clusters span data centres with geographic distribution. Subjects include AURORA.alerts for alert federation and AURORA.ioc_sharing for IOC dissemination.

Redis: ephemeral state and the agent task queue

Redis is not the primary event bus. It holds ephemeral hot state and the agent task queue, exposed as Redis Streams with consumer groups:

  • aurora:agent:tasks for agent task queue
  • aurora:agent:results for agent results
  • aurora:agent:dead_letter for dead-letter stream
  • aurora:audit for audit log

Why Redis Streams for the queue: consumer groups share workload with each message processed once, failed messages can be re-processed, automatic stream trimming cleans up old messages, sub-millisecond latency, and Redis is already deployed for caching so no additional infrastructure is needed.

Agent task worker

A dedicated worker process at aurorasoc/workers/agent_task_worker.py executes queued tasks and publishes correlated results. Tasks from aurora:agent:tasks are consumed by the aurora-agents consumer group. Results are published to aurora:agent:results. Failed tasks retry up to 3 times before dead-lettering.

MQTT: IoT edge communication

MQTT connects resource-constrained IoT devices with minimal overhead (2-byte header). Topics follow aurora/sensors/+/telemetry, aurora/sensors/+/alerts, and aurora/sensors/+/attestation. QoS levels guarantee delivery even with intermittent connectivity. TLS encrypts device-to-broker communication.

Event processing guarantees

GuaranteeImplementation
At-least-once deliveryConsumer group ack plus re-delivery on timeout
OrderingPer-stream ordering via Redis Streams
DeduplicationSHA-256 hash-based dedup in scheduler, 5-min window
BackpressureConsumer groups naturally provide backpressure
Dead letterFailed tasks after 3 retries moved to dead letter stream

AuroraSOC follows the "smart endpoints, dumb pipes" philosophy. The messaging systems are simple transport. All business logic lives in the consuming services.

Event flow example: alert processing