Architecture / Decision records / ADR-HIS-092
ADR-HIS-092 Security event pipeline: a durable relay in the observability unit in front of Wazuh, receipts only once indexed, rule identity in rule groups, and retention applied by the unit¶
| Status | Accepted |
| Decided | 2026-11-29 by session RC-3-S09 |
| Record | Drafted 2026-11-29; approved 2026-11-30 by the Enterprise Architecture Board |
| Where the rule lives | platform/observability/ (mod-ise-008/.../security/, V2__security_monitoring.sql, siem/, bin/wazuh-apply, README.md "Security monitoring") |
Context¶
RC-3-S09 builds FR-ISE-OBS-002, security monitoring, evidence preservation and SIEM integration, on the observability unit of ADR-HIS-054. DEC-ISE-009 selects Wazuh on OpenSearch, operated in-house, with events forwarded as syslog in a documented schema (technology stack row 16), and asks for the selection to be recorded. The contracts fix the two ends:
- the D10 audit service forwards ForwardedAuditRecord.v1 as RFC 5424 over mutually authenticated TLS (contracts/ess CONTRACT-POINTS), and wants a receipt only once security monitoring has indexed or refused each record, never on mere receipt by a collector;
contracts/isesecurity-monitoring.v1 asks for alerts with the rule's identity and version, five severities, forwarding health with buffering and completeness, and preservation orders that keep data past retention.
The requirement adds that no event is lost while the SIEM is down (AC-04), that the pipeline cannot alter forwarded events (section 3), and that detection rules live in the SIEM's own console (part 8).
Decision¶
- The relay is part of
ise-observability, module MOD-ISE-008, packagesecurity. - A syslog intake on mutual TLS (RFC 5425 octet counting) commits every message to a PostgreSQL buffer,
security_event, before it reads the next. The buffer is the durable queue: a SIEM outage or a restart of the unit loses nothing. - A client certificate the trust store accepts may connect. With
intake.allowed-peers, only the named certificates may send, each as the source it is mapped to. - Two documented formats are read:
his-audit-forward(contracts/ess) andhis-security-event(siem/schemas/SecurityEventRecord.v1.schema.json, this unit's), each checked against its schema. Anything else is stored raw and flagged, and forwarded wrapped ashis-raw. - Each record is held once per source and event identifier. A record sent again is not stored twice, and its receipt is given again.
- Wazuh is reached through its manager API,
POST /events, over HTTPS. - The API is TLS, which gives the integrity in transit part 2 asks for. Wazuh's syslog listener has no TLS.
- The relay's API user has a single role whose policy allows
event:ingestonly, so the pipeline can add events and cannot change or delete any (section 3).bin/wazuh-applysets it up. - The MSG goes unaltered as the event line. Wazuh decodes it as JSON.
- Every HIS record is indexed exactly once, and indexing is what counts as receipt.
- The rule set
siem/wazuh/rules/his_rules.xmlhas an evidence rule, 100100, that matches every HIS record at level 3. Each record therefore becomes one document in Wazuh's alert index: the most specific rule that matched, with the record's fields underdata. - The relay confirms a record by finding its event identifier there. Only then is it searchable evidence (AC-01).
- Only then is an audit record acknowledged to the audit service (
submitForwardingReceipts). A record the API refuses is reported as rejected, with the API's reason. - A record submitted but not seen indexed within
siem.confirm-withinis submitted again. Search shows a resubmitted event once. - A detection rule declares its identity, version, severity and category in its groups:
his-detection,his-rule:<id>,his-version:<n>,his-severity:<one of five>,his-category:<category>, and optionallyhis-privacy-reviewandhis-clinical. - Wazuh rules have no version field, and the console keeps groups.
- The relay reads detections from the alert index by the group
his-detection. It raises each one once as a security alert (New, Triaged, Escalated to incident, Closed). - It publishes SecurityAlertRaised 1.1 for low to critical. An informational alert is kept and searchable, not published (ADR-HIS-085 point 7).
- The rule set in the folder is the baseline, applied by
bin/wazuh-apply. Later changes are made in the console under change control (part 8) and keep these conventions. - Retention of security events is applied by the unit, not by the SIEM's index lifecycle.
- Each daily alert index past CFG-ISE-021's 3 years is deleted, unless an Active preservation order that holds security events covers it; then it is kept whole (PR-OBS-002-2).
- Orders are in event time, and an event can be indexed on a later day than its own: buffered through an outage, relay lag across midnight, late forwarding. So the unit records, as it confirms each event, the earliest and latest event time of the index it landed in (
siem_index_range). An index is covered when its day, widened to that range, overlaps the order's period; an index without a recorded range is judged by its day. - Placing an order and each deletion take the same transaction-scoped PostgreSQL advisory lock, and each deletion reads the Active orders again inside it. An order placed during a run is therefore seen by every deletion after its commit, and a deletion waits for an order being placed.
- The buffer keeps a confirmed record 7 days, longer under an order.
- Logs, traces and metrics live in backends that delete by age for the whole store. What an order covers there is copied, while it still exists, into the order's evidence package. Each item carries a SHA-256 chained to the item before it, and is kept until the order is lifted.
- System images, backups and message payloads belong to other units, which read the Active orders before they delete.
- Pipeline health (part 6, PR-OBS-002-1) has two parts.
- A gap is an expected source silent past its threshold (
sources.<source>), or a reconciled period of the audit service with fewer records received than it sent (completeness sampling, AC-02). - A gap or a SIEM outage raises two alerts, once per episode: a security alert of category
forwarding-gapfor security operations, and the unit's own operational alert, which pages SRE directly (ADR-HIS-054 point 4). - Detections do not wait for the API. They are read from the indexer on every cycle, also while the manager's API refuses events, and a connection the API drops is asked again once before it counts as an outage. The SIEM counts as available again only after a whole cycle without a failure.
- The pipeline is closed by default. Without a SIEM, an audit service or a Grafana configured, every call is unavailable: events stay buffered and the pipeline alerts, and nothing is dropped or acknowledged.
Consequences¶
- One unit sees the whole path from intake to index, so readForwardingHealth answers from what it holds, and receipts mean what the audit service needs them to mean.
- The buffer's size is bounded by the SIEM outage the platform rides through, at the rate of the sources.
his_security_forwarding_bufferedandhis_security_siem_availableshow it, and SiemUnavailable pages at the first failed cycle. - Every record takes one document in the alert index. That is the evidence store that search, retention and preservation work on; Wazuh's archive index is not used.
- Detection rules can be changed in the console without a release of this unit, and their identity and version still reach the console of UI-ISE-006. A rule written without the groups is not raised.
- The manager API's rate limit bounds the forwarding rate (100 events per call). A deployment raises
max_request_per_minuteto match the sources.
Alternatives considered¶
- Wazuh agent or syslog listener as the intake. The audit service could send straight to Wazuh's syslog port. But that port has no TLS, so mutual authentication and integrity are lost. Wazuh also gives the sender no receipt, and offers no hook to tell the audit service what was indexed.
- OpenTelemetry Collector or Fluent Bit as the relay. Either could buffer and forward. Neither can confirm indexing in Wazuh or call
submitForwardingReceipts, and both would add a second buffer to watch. - The archive index (
logall_json) as the evidence store. It would index every event without the evidence rule. But it doubles storage for alerts, and detections and evidence would then be searched in two places. - Index lifecycle (ISM) for SIEM retention. It deletes by age alone and cannot see a preservation order, which is what PR-OBS-002-2 forbids.