Skip to content

Horizon Hub Architecture

Horizon is a multi-tenant hub that ingests threat signals from Synapse sensors, correlates them into campaigns, and distributes intelligence to dashboards and the fleet.

System Overview

Internal Services

ServicePurpose
Sensor GatewayAuthenticates sensors, receives signals over /ws/sensors
AggregatorBatches, deduplicates, and enriches signals with tenant/sensor context
CorrelatorDetects cross-tenant campaigns using anonymized SHA-256 fingerprints
BroadcasterPushes real-time alerts to dashboards, auto-creates blocklist entries
Hunt ServiceRoutes time-based queries: <24h → PostgreSQL, >24h → ClickHouse
War Room ServiceIncident collaboration, activity logging, @horizon-bot automation
Fleet ManagementSensor metrics, config template deployment, command orchestration

Multi-Tenant Model

  • Tenant-scoped data — all rows have tenantId foreign keys in PostgreSQL
  • Fleet-wide data — cross-tenant campaigns and blocklist entries use tenantId = null
  • Cross-tenant correlation — uses anonymized fingerprints (SHA-256) to protect tenant identities
  • Fleet admin — keys with fleet:admin scope can access fleet-wide intelligence

Storage Strategy

PostgreSQL (Source of Truth)

All signals, threats, campaigns, war rooms, and fleet state. Queries for dashboards and REST endpoints are backed by PostgreSQL.

ClickHouse (Historical Analytics)

Optional. Used for time-series and high-cardinality queries. Writes are asynchronous — failures do not block signal ingestion. Enables hunt timelines, hourly stats, and longer retention windows.

In-Memory Caches

  • Blocklist cache for fast lookup and dashboard pushes
  • Saved hunt queries (in-memory for demo/development mode)

Reliability Patterns

PatternImplementation
BackpressureAggregator enforces max queue size to prevent memory exhaustion
BatchingFlushes at SIGNAL_BATCH_SIZE or SIGNAL_BATCH_TIMEOUT_MS
DeduplicationMerges signals by signalType + (sourceIp or fingerprint)
Dual-writePostgreSQL is authoritative; ClickHouse writes are non-blocking
Heartbeat monitoringSensors and dashboards have configurable heartbeat/ping timeouts
Retry logicAggregator batch retries; command sender retries with max attempts
Graceful shutdownServices close WebSocket connections and flush pending batches
Structured loggingPino across all services with consistent context

Security Model

Authentication Layers

LayerMethodLifetime
Sensor → HorizonmTLS + API keyPermanent (revocable)
User → DashboardOAuth 2.0 / SAMLSession-based
API accessAPI key + scopesConfigurable
Dashboard sessionJWT60 minutes

Key Principles

  • API key auth — keys stored as SHA-256 hashes, never plaintext
  • Scope enforcement — each route checks required scopes (signal:write, dashboard:read, fleet:admin)
  • Tenant enforcement — non-admin keys are filtered to their own tenant data

UI Modules

The Horizon UI is organized into three navigation domains:

ModuleDomainWhat It Contains
SYNAPSEDefenseActors, campaigns, war rooms, threat hunting, global intel, session tracking
BRIDGEDeploymentSensor deploy, topology, canary, health, push rules
BEAMObservabilityReal-time metrics, traffic, latency, block rates, API catalog

Licensed under AGPL-3.0 · atlascrew.dev