Architecture overview
Architecture
Heimdall Shield has two planes joined by files and a plugin socket: a data plane that sees every request, and a control plane that configures it and shows you what happened.

The data plane
The security-engine binary is the heart. HAProxy terminates TLS and splices the
raw byte stream to the engine over a TCP-mode inline backend (see
Traffic capture and ADR-0001); the engine owns all HTTP
parsing, normalization, analysis and proxying to the origin. Internally it is a
pipeline:
| Stage | Package | Page |
|---|---|---|
| Ingress / HTTP engine | internal/proxy, internal/httpengine, internal/proxyproto |
Traffic capture |
| Normalization | internal/normalize |
Normalization |
| Protocol parsers | internal/parsers |
Parsers |
| Canonical Request Model | internal/canonical |
Concepts |
| Feature extraction | internal/features |
Features |
| Detection engines | internal/detect/* |
Detection |
| Risk | internal/risk |
Risk & decision |
| Decision | internal/decision |
Risk & decision |
| Telemetry | internal/telemetry |
Telemetry |
| Plugin host | pkg/plugin, internal/enrich |
Plugins |
The control plane
The hs-api binary stores and distributes policy, tails the telemetry stream, and
serves the Svelte GUI (it is embedded in the binary). Its flagship view is the
Attack Explorer: for any request it shows the raw → canonical trace, the
findings each engine produced, the risk breakdown, and the final decision — the
why behind every verdict. Policy changes are written as versioned JSON and
hot-reloaded by the data plane without dropping a connection. See
Control plane & GUI.
The plugin boundary
Learned and at-scale intelligence lives in separate, out-of-process programs that
attach over a gRPC contract. The engine spawns them from the -plugins flag,
hands them connection and request context, and folds their findings into the same
risk pipeline as the built-in engines. This keeps the open-source core decoupled
from the commercial intelligence and lets either side crash without taking the
other down. See Intelligence plugins.
What is built, and what is planned
The deterministic protection path is complete and runs live; the learned tier is the frontier.
| Subsystem | Status |
|---|---|
| Traffic capture · HTTP engine · PROXY v2 + JA3/JA4 | live |
| Normalization | live |
| Protocol parsers (JSON, XML, multipart, JWT, GraphQL, SOAP, WebSocket, forms) | live |
| Detection engines (10 + custom rules + access control) | live |
| Risk & decision (+ shadow mode) | live |
| Telemetry + data-lake ingest | live |
| Feature extraction | partial |
| Control plane, GUI, policy distribution, certs/ACME | partial |
| Endpoint Intelligence (statistical) | partial |
| Challenge / anti-scraping (PoW) | enterprise |
| Browser Identity & Reputation | enterprise |
| Offline ML (anomaly, clustering, LLM analyst, federated) | planned |
Every page repeats the status marker for its own subsystem, so the distinction between the original plan and how it works today is always explicit.