Skip to content

Implementation plan / Session plan / Handover RC-3-S01

Handover RC-3-S01 Contract: Contracts and stubs: D10 ESS (slice RC-3)

Card: RC-3-S01. Issue: cema-care/his#57. Branch: session/RC-3-S01. Slice: RC-3. Decision record: ADR-HIS-082.

What was built and where

The slice needs one D10 requirement, FR-ESS-AUD-003 (security-event forwarding and audit review support, MOD-ESS-006). This session adds it to the existing ESS contracts in contracts/ess/ as compatible additions. Nothing of RC-1 or RC-2 is changed or removed.

api/audit.v1.openapi.yaml goes from version 1.0 to 1.1, with 16 new operations:

Part of FR-ESS-AUD-003 Operations
6.1 to 6.3, 10, 11: forwarding, state per event, durable queue, error queue readAuditEventForwarding, readForwardedRecord, listForwardingDestinations, submitForwardingReceipts (called by the D02 pipeline), listForwardingFailures, resendForwardingFailures
3, 7: forwarding rules (CFG-ESS-019), approved through the configuration lifecycle validateForwardingRule, the validation hook of configuration item type ess.audit-forwarding-rule
6.4, PR-AUD-003-2: reconciliation and exception listForwardingReconciliations. A mismatch creates task ess.audit-forwarding-exception in queue ess.security-operations
6.5: the six review views runReviewView
6.6: dashboard measures for Domain 8 readSecurityIndicators
6.7, PR-AUD-003-3, PR-AUD-003-4, AC-04: evidence holds and the refused disposal placeEvidenceHold, listEvidenceHolds, readEvidenceHold, releaseEvidenceHold, startDisposalRun, listDisposalRuns

Also in this change:

  • schemas/ForwardedAuditRecord.v1.schema.json: the documented JSON payload of the syslog message to Wazuh (EXT-ESS-004). It carries the stored event unaltered, as IF-ISE-006 requires. The RFC 5424 header rules are in its description. The schema is checked through readForwardedRecord, which answers it.
  • Section 7.3 additions in D10-ESS data, under DE-ESS-013, for approval by the domain leads: audit forwarding rule, forwarding record, forwarding reconciliation, evidence hold, disposal run.
  • README.md: the names ESS registers for RC-3 (policy resource types, configuration item types, task type and queue) and a section on forwarding.
  • TRACE.md: the trace of every new field.
  • CONTRACT-POINTS.md: the points RC-3-S04, RC-3-S09 with RC-3-S03, and RC-3-S23 must meet.
  • stubs/stub.json: regenerated.
  • ADR-HIS-082 and its row in the decision record index (79 records). It records four decisions:
  • the payload is the stored event in an envelope;
  • Domain 2 pushes receipts back to the audit API;
  • forwarding rules are configuration;
  • a disposal request touching a held event is refused as a whole.

No event was added or changed. The event catalogue is untouched.

Checks and their result

Run in contracts/ess, after pnpm install --frozen-lockfile in contracts/common and here:

pnpm build              # his-contract lint .                       -> lint: passed
pnpm test               # his-contract check . against origin/main  -> check .: passed (audit.v1 1.0 -> 1.1, 16 new operations, no breaking change)
pnpm stub               # stubs up to date
scripts/ends-when.sh    # with 'his-env env' of the full profile exported

scripts/ends-when.sh passed on the full profile started as HIS_SESSION=RC-3-S01:

  • the conventions, the compatibility check and the stubs up to date;
  • verify against the stub, 532 cases, with no violation recorded;
  • the same with a token of the environment's Keycloak realm his;
  • the ESS event schemas registered in Apicurio twice, the second time unchanged.

After the review round 1 fixes (2026-11-27), lint, the compatibility check, the stub regeneration and scripts/verify-stub.sh (532 cases, no violations) were run again and pass. The fixes touch no event schema, so the registry step was not repeated.

python3 docs/implementation_plan/tools/check_links.py found no broken link, and mkdocs build passed.

The host's Node.js 22.22 (distribution build) has no TypeScript type stripping (ERR_NO_TYPESCRIPT), so the his-contract tool does not run on it. The checks ran in the pinned image node:22.18-bookworm, with the repository and its git directory mounted, and with --network host for the full-profile step. This is a fact about the host, not about the repository. The CI pipeline uses actions/setup-node.

Requirements and test scenarios

Requirement / scenario Where the contract covers it Who tests it
FR-ESS-AUD-003 AC-01: receipt by security monitoring confirmed submitForwardingReceipts, readAuditEventForwarding (state acknowledged) RC-3-S04 (unit); RC-3-S09 (pipeline acknowledges only after the SIEM has indexed the record); RC-3-S24 end to end
AC-02: outage, then no gap Durable queue (listForwardingDestinations availability and pendingCount), listForwardingReconciliations matched after the drain RC-3-S04; RC-3-S24
AC-03: emergency access forwarded within the alerting objective (NFR-ESS-006, p95 at most 5 s) ess.auz.btg in the minimum set; contract point 7 RC-3-S04; measured at RC-3-S24
AC-04: disposal of held events refused startDisposalRun refused with PR-AUD-003-3; placeEvidenceHold RC-3-S04
TEST-ESS-024: outage and recovery, reconciliation mismatch, evidence hold All of the above RC-3-S04, tagged FR-ESS-AUD-003 TEST-ESS-024

The card's "Leaves behind" and "Ends when" name the failing scenario test. The card's scope gives it to the last contract session of the slice, RC-3-S03, which joins the domains. This session therefore writes no scenario under e2e/scenarios/RC-3/.

Contract changes

All are additive within version 1. audit.v1 is 1.0 → 1.1 and his-contract check passes against origin/main. No field, answer or operation of 1.0 changed meaning. Consumers of 1.0 are unaffected.

Differences from the card or specification

  • Release of an evidence hold. The screen brief UI-ESS-008 assumes [A] that the security officer who placed a hold may release it. The specification (FR-ESS-AUD-003 part 6.7, updated) says otherwise:
  • the privacy officer or the legal and compliance officer who placed a hold releases it;
  • a hold placed by a security officer is released by a privacy officer;
  • in each case a second person authorizes in place.

The contract follows the specification, as rule 3 requires, and contract point RC-3-S23 says so. The brief's assumption is now superseded by the specification. Correcting the brief is a follow-up for the design owner (below). - Disposal comes from FR-ESS-AUD-002 part 6.7. Disposal is needed so that FR-ESS-AUD-003 AC-04 can be observed. A scheduled run applies the active approved version of the retention rule CFG-ESS-018. An on-demand run also needs its own approval: secondApproval, a second person who is not the requester, signing in place (added in review round 1). The specification gives disposal to no actor, and the audit administrator may not delete events (ACT-ESS-017, FR-ESS-AUD-002 part 3). So the contract names no one who may start or approve an on-demand run: the policy (ess.AuditDisposal, actions start and approve) grants both to no one until Q2 is answered (review round 2). Until then only the scheduled run disposes. - The minimum set of part 6.2, mapped to event type codes of D10-ESS 9.5, is in contract point 2 of RC-3-S04. The mapping is the technical reading of the six classes the requirement names. It adds no class.

Needs a person

These items are listed in the pull request. None of them blocks the merge.

  • Domain leads of the slice (D1 ADM, D2 ISE, D10 ESS): review of the contract and of the section 7.3 additions (session plan section 4, end of each contract session).
  • Enterprise Architecture Board: approval of ADR-HIS-082.
  • Q1, specification owner of D10-ESS: who may resend forwarded events that the destination refused, once the mapping is corrected? Part 10 names "integration support", which is not an actor of part 3. Until this is answered, contract point 4 of RC-3-S04 has the policy deny resend to everyone (403, audited), so no build picks a role. The answer needs no contract change, only policy content.
  • Q2, specification owner of D10-ESS: who may dispose of audit events? (a) Who may start an on-demand disposal run? No actor of FR-ESS-AUD-002 part 3 is given disposal, and the audit administrator may not delete events. (b) Who may approve one? (c) Is the approved retention rule (CFG-ESS-018) enough approval, or does each on-demand run need its own? Until this is answered, the policy permits neither start nor approve to anyone (403), and only the scheduled run disposes. The contract asks for a per-run second-person approval, the stricter reading. If the retention rule is enough, a later minor version makes secondApproval optional, which is compatible. Any answer to (a) or (b) is policy content, not a contract change.

Follow-ups outside the card

  • Design (UI-ESS-008 brief). Replace the assumption on hold release with the rule of FR-ESS-AUD-003 part 6.7: releaser, second person, both names recorded.
  • RC-3-S03.
  • Resolve the cross-domain references of this contract: IF-ISE-006 accepts this syslog and calls submitForwardingReceipts.
  • The forwarding interface's identifier in the D02 interface registry replaces the stub example IF-ISE-006 as interfaceId.
  • incidentRef may name ise.SecurityAlert by the alertId of EVT-ISE-013.
  • Decision record numbering. ADR-HIS-081 is taken by the open pull request #163 (RC-2-S06), so this record is ADR-HIS-082, checked free against origin/main and every open pull request on 2026-11-27. The index row count (79) will conflict with #163 at merge; whichever merges second brings the count to 80.
  • Host tooling. The server's /usr/bin/node cannot run the TypeScript contract tool. Installing an official Node.js 22 build, or documenting the container in platform/dev-environment, would spare later sessions the workaround.