You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: reflect enrichment, TLS, and detached sources in architecture
The README ASCII diagram and assets/architecture.mmd predated three
unreleased features already documented in CHANGELOG.md: post-evaluation
enrichment (#134), server-side TLS for the daemon API listener (#128),
and detached dynamic sources (#135). Update both surfaces so they match
what the next release ships.
README prose and ASCII diagram:
- Add an Enrichment bullet to the streaming-runtime section listing the
four primitives (template, lookup, http, command), the kind-aware
${detection.*} / ${correlation.*} namespaces, scope filter, HTTP
response cache, and the on_error policies.
- Insert an enrichment/ block in the rsigma-runtime ASCII diagram
between RuntimeEngine and io/, and route the flow through it.
- Mention TLS termination (mTLS, cert hot-reload) on the shared API
listener in the io/ block.
- Mention DaemonSourceRegistry (external --source + pipeline-embedded
deprecated, collision-error) in the sources/ block.
- Note the enrichments map in the EvaluationResult output box and the
Output bullet of the prose.
Mermaid diagram (assets/architecture.mmd):
- Add 'enrichments' to the RuleHeader line in the OUTPUT node.
- Add a new RENRICH node and wire RENG --> RENRICH --> RIO.
- Mention TLS termination in the RIO node.
- Mention DaemonSourceRegistry, --source, and the collision-error
semantics in the RSRC node.
Verified with mmdc: assets/architecture.mmd renders cleanly.
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,8 @@ When running as a streaming detection engine, `rsigma-eval` feeds into `rsigma-r
402
402
-**Input:** Format adapters parse raw log lines (JSON, syslog, logfmt\*, CEF\*, plain text, with auto-detection) into `EventInputDecoded`. EVTX\* files are parsed directly from binary via `EvtxFileReader`. Sources include stdin, HTTP POST, NATS JetStream, and OTLP\* (HTTP protobuf/JSON and gRPC).
403
403
-**Dynamic sources:**`SourceResolver` fetches data from files, commands, HTTP APIs, and NATS subjects. Resolved values are injected into pipelines via `TemplateExpander`. A `SourceCache` (in-memory + optional SQLite) provides fallback data. `RefreshScheduler` manages auto-refresh (interval, file watch, NATS push, on-demand). Extraction supports jq, JSONPath, and CEL. `DaemonSourceRegistry` unifies sources from external files (`--source`) and pipeline-embedded declarations with collision-error semantics.
404
404
-**Processing:**`LogProcessor` runs batch evaluation with parallel detection and sequential correlation. `RuntimeEngine` wraps `Engine` and `CorrelationEngine` with rule loading and `ArcSwap` hot-reload.
405
-
-**Output:** Sinks write evaluation results to stdout, files, or NATS as one flat JSON object per result. Multiple sinks can run in fan-out. The output type is `EvaluationResult` (a composition of `RuleHeader` + `ResultBody::Detection|Correlation`), carrying rule title, id, level, tags, matched selections, field matches, aggregated values, and optionally the triggering events.
405
+
-**Enrichment:**`EnrichmentPipeline` runs between the engine and the sinks, injecting context (asset info, IP reputation, identity, GeoIP, KEV flags, runbook URLs, ...) into each result's `RuleHeader.enrichments` map. Four primitives (`template`, `lookup`, `http`, `command`) compose into recipes. Kind-aware template namespaces (`${detection.*}` for detection-kind enrichers, `${correlation.*}` for correlation-kind) are validated at config-load time. Optional HTTP response cache, scope filtering by rule glob, tag set, and severity, and `on_error` policies (`skip`, `null`, `drop`).
406
+
-**Output:** Sinks write evaluation results to stdout, files, or NATS as one flat JSON object per result. Multiple sinks can run in fan-out. The output type is `EvaluationResult` (a composition of `RuleHeader` + `ResultBody::Detection|Correlation`), carrying rule title, id, level, tags, the `enrichments` map written by the enrichment pipeline, matched selections, field matches, aggregated values, and optionally the triggering events.
406
407
407
408
Feature-gated items are marked with \* in the diagram.
408
409
@@ -485,6 +486,9 @@ Feature-gated items are marked with \* in the diagram.
485
486
│ ↓ raw line → EventInputDecoded │
486
487
│ │
487
488
│ sources/ ──> dynamic pipelines: │
489
+
│ DaemonSourceRegistry: external │
490
+
│ (--source) + pipeline-embedded │
491
+
│ (deprecated), collision-error │
488
492
│ SourceResolver (HTTP, command, │
489
493
│ file, NATS subjects) │
490
494
│ TemplateExpander (${source.*}) │
@@ -505,8 +509,21 @@ Feature-gated items are marked with \* in the diagram.
505
509
│ RuntimeEngine ──> wraps Engine + │
506
510
│ CorrelationEngine with rule loading │
507
511
│ │
512
+
│ enrichment/ ──> post-eval pipeline: │
513
+
│ primitives: template, lookup, │
514
+
│ http, command │
515
+
│ kind-aware namespaces: │
516
+
│ ${detection.*}, ${correlation.*} │
517
+
│ scope filter (rules, tags, levels) │
518
+
│ HTTP response cache, on_error policy │
519
+
│ └──> writes RuleHeader.enrichments │
520
+
│ between engine and sinks │
521
+
│ │
508
522
│ io/ ──> EventSource (stdin, HTTP, NATS) │
509
523
│ OTLP* (HTTP + gRPC) │
524
+
│ TLS* termination (mTLS, cert │
525
+
│ hot-reload) on shared API │
526
+
│ listener │
510
527
│ Sink (stdout, file, NATS) │
511
528
│ DLQ (failed events) │
512
529
└──────────────────────────────────────────┘
@@ -515,9 +532,10 @@ Feature-gated items are marked with \* in the diagram.
0 commit comments