Skip to content

feat: Suricata EVE JSON output for the IDS#394

Open
pigri wants to merge 3 commits into
mainfrom
feat/eve-json-output
Open

feat: Suricata EVE JSON output for the IDS#394
pigri wants to merge 3 commits into
mainfrom
feat/eve-json-output

Conversation

@pigri

@pigri pigri commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Adds opt-in Suricata-compatible EVE JSON output for the IDS.

What

  • synapse-core — a non-blocking EVE JSON sink (logging.eve_log: enabled / file / event_types). Producers publish onto a broadcast; one async subscriber owns the writer and flushes on an interval, so a slow sink drops (lagged-counted) rather than stalling the inspect path. stdout/stderr/file sinks; disabled by default.
  • synapse-idp — map alerts to EVE alert records (with the JA4+ suite, and the triggering HTTP transaction embedded on the L7 path) across the XDP, AF_PACKET and L7-ingest paths; emit standalone http records per decrypted transaction and a periodic stats record.
  • synapse-proxy — carry the downstream server address into the post-TLS HttpTxn so the IDS sees a real destination (node host IP via SYNAPSE_NODE_IP, local-socket fallback) instead of a loopback stand-in; synthesize a Host header from the HTTP/2 :authority so http.host rules / JA4H / the hostname field populate on h2.

Records use Suricata field spellings (dest_ip/dest_port), ISO8601-µs timestamps, action: allowed|blocked, and carry the JA4+ suite. Placeholder loopback/unspecified endpoints are omitted.

Tests

fmt + clippy --deny warnings + cargo check --workspace green; unit tests for the serializer shape, placeholder omission, and config parsing.

pigri added 3 commits June 18, 2026 00:36
Add an opt-in Suricata-compatible EVE JSON sink (logging.eve_log:
enabled/file/event_types). Producers publish non-blocking onto a
broadcast; a single async subscriber owns the writer and flushes on an
interval (lossy/lagged-counted), so a slow sink never stalls the IDS hot
path. Disabled by default; stdout/stderr/file sinks. Emits the common
EVE envelope (timestamp, flow_id, src/dest, proto, app_proto) plus typed
alert/http/stats objects; placeholder loopback/unspecified endpoints are
omitted. Wired up at app boot alongside the other inspect-channel sinks.
Map thalamus alerts to EVE alert records (with JA4+ fingerprints and, on
the L7 path, the triggering HTTP transaction embedded) across the XDP,
AF_PACKET and L7-ingest paths. Emit a standalone EVE http record per
decrypted transaction, and a periodic EVE stats record from the stats
loop. All gated on the sink being enabled so the disabled path is free.
Carry the downstream server address into the post-TLS HttpTxn so the IDS
sees a real destination instead of a loopback stand-in: dest_ip uses the
node host IP (SYNAPSE_NODE_IP downward-API env) with the local socket as
fallback, dest_port is the real listener port. Synthesize a Host header
from the HTTP/2 :authority pseudo-header when absent so http.host rules,
JA4H, and the hostname field are populated on h2 traffic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant