docs(audit): record the removal of the hash chain and the two-login hardening
Component-AuditLog (Security & Tamper-Evidence now a removal note, archive format v2, config), Component-CLI, Component-ManagementService, HighLevelReqs AL-11/AL-12, docs/components/CLI, the CLI README, alog.md §11.4/§15 and CLAUDE.md. New production script docs/plans/sql/RemoveAuditLogHashChain.sql (idempotent, from migration 64); AddAuditLogHashChain.sql marked superseded. Historical plans, deployment records and deploy-prep packs are left as written. Claude-Session: https://claude.ai/code/session_01GT67AFKC45MBz1wPZnVbX8
This commit is contained in:
@@ -493,21 +493,11 @@ Audit Log page **Export** button streams CSV (current filter) server-side. Defau
|
||||
### 11.3 Payload redaction at write
|
||||
See §8.2. Contract: unredacted secrets never persist. Safety net over-redacts on misconfiguration.
|
||||
|
||||
### 11.4 Tamper-evidence hash chain (shipped, ScadaBridge#41 — default off)
|
||||
- Each row gains a `RowHash` column, plus a `ChainSeq` (position in its partition's chain).
|
||||
- `RowHash = SHA-256(prev.RowHash || canonical(row))` per partition (UTC calendar month).
|
||||
- Computed by a chaining job — implemented incrementally (every minute, both central
|
||||
nodes, serialised by a SQL application lock) rather than only after the month closes.
|
||||
- Purges keep the chain verifiable: the partition switch records a checkpoint anchor on
|
||||
the month's chain head; the per-channel DELETE leaves a tombstone per chained row.
|
||||
- Verifiable via `scadabridge audit verify-chain --month YYYY-MM` (first break reported
|
||||
with partition, `ChainSeq`, `EventId`). Unsigned (owner decision, ScadaBridge#107): instead
|
||||
the per-month heads are exported off-box (`AuditLog:HashChain:HeadExport`, append-only files
|
||||
or syslog, default off) and `scadabridge audit verify-heads` checks them against the database.
|
||||
The chain job and both purge paths can run on a separate maintenance login
|
||||
(`AuditLog:MaintenanceConnectionString`).
|
||||
- Default **off** (`AuditLog:HashChain:Enabled`). Full design: Component-AuditLog.md,
|
||||
Security & Tamper-Evidence.
|
||||
### 11.4 Tamper-evidence hash chain (REMOVED 2026-11-15)
|
||||
Shipped by ScadaBridge#41 (with the off-box head export and the two-login maintenance hardening,
|
||||
ScadaBridge#107/#113), then removed on 2026-11-15 at IT security's request, pending a family-wide
|
||||
general solution; migration `RemoveAuditLogHashChain` drops its schema. The shipped design is kept
|
||||
in the ScadaBridge#41/#107/#139 issues and `docs/plans/`.
|
||||
|
||||
### 11.5 Site SQLite security
|
||||
- File permissions: read/write by the ScadaBridge service account only.
|
||||
@@ -601,17 +591,16 @@ MS SQL handles this with batched ingest and the time-aligned indexes.
|
||||
New `scadabridge audit` command group:
|
||||
- `scadabridge audit query --site <s> --since <t> --kind <k> [...]` — same filter set as the UI.
|
||||
- `scadabridge audit export --since <t> --until <t> --format csv|jsonl|parquet --output <path>` — bulk export, server-side streaming.
|
||||
- `scadabridge audit verify-chain --month <YYYY-MM>` — hash-chain verification (when §11.4 is enabled).
|
||||
- `scadabridge audit verify-heads --path <file-or-dir>` — off-box exported chain heads vs the database (ScadaBridge#107).
|
||||
- `scadabridge audit archive list|verify|cleanup` — the Parquet archives (§15.2).
|
||||
|
||||
Requires the same **OperationalAudit** / **AuditExport** permissions as the UI.
|
||||
|
||||
### 15.2 Parquet archival (shipped, ScadaBridge#42 — default off)
|
||||
The retention purge dumps each expiring monthly partition to Parquet before switching it out — enabling indefinite cold retention without bloating MS SQL. Shipped as:
|
||||
- `AuditLog:Archive:Enabled` (default **off**) + `Directory` (absolute path both central nodes reach — a shared volume or UNC share; object storage is mounted, not called).
|
||||
- Per partition: `auditlog-YYYY-MM-<stamp>Z.parquet` (the stored columns + `ChainSeq`/`RowHash`), `.tombstones.parquet` (per-channel purge tombstones) and `.manifest.json` (counts, SHA-256 per file, the month's chain head at archive time), under `{Directory}/{YYYY}/`.
|
||||
- Archive before purge, fail closed: the switch runs only after the archive is durable, and re-checks under the chain lock that the partition still holds exactly the archived rows and chain head; otherwise nothing is purged and the next tick re-archives.
|
||||
- `scadabridge audit archive list` / `verify --name <archive>`: verify recomputes the archived chain and ties its end to the checkpoint anchor the purge left (§11.4).
|
||||
- Per partition: `auditlog-YYYY-MM-<stamp>Z.parquet` (the stored columns) and `.manifest.json` (row count, SHA-256 and size of the data file), under `{Directory}/{YYYY}/` (format v2; format-v1 archives from the hash-chain era also carry chain columns and a `.tombstones.parquet`).
|
||||
- Archive before purge, fail closed: the switch runs only after the archive is durable, and re-checks that the partition still holds exactly the archived row count; otherwise nothing is purged and the next tick re-archives.
|
||||
- `scadabridge audit archive list` / `verify --name <archive>`: verify checks the data file against its manifest (file integrity, not tamper evidence).
|
||||
- `audit export --format parquet` streams the export columns as Parquet.
|
||||
|
||||
---
|
||||
@@ -622,7 +611,7 @@ The retention purge dumps each expiring monthly partition to Parquet before swit
|
||||
|---|---|---|
|
||||
| 1 | Component number | **#23 Audit Log** (README matrix + HighLevelReqs). |
|
||||
| 2 | Nav placement | New top-level **Audit** nav group in Central UI. |
|
||||
| 3 | Hash-chain tamper evidence (§11.4) | Deferred to v1.x; shipped by ScadaBridge#41 (unsigned SHA-256 chain, default off). |
|
||||
| 3 | Hash-chain tamper evidence (§11.4) | Deferred to v1.x; shipped by ScadaBridge#41 (unsigned SHA-256 chain, default off); removed 2026-11-15 (IT security request). |
|
||||
| 4 | Parquet archival to object storage (§15.2) | Deferred to v1.x; shipped by ScadaBridge#42 (Parquet on a configured directory, default off). |
|
||||
| 5 | Per-channel retention overrides (§12.1) | Deferred to v1.x. v1 uses a single global `RetentionDays`. |
|
||||
| 6 | Default payload cap | **8 KB** for `RequestSummary` / `ResponseSummary`; **64 KB** on error rows (`Status IN ('Failed', 'Parked', 'Discarded')`). |
|
||||
|
||||
Reference in New Issue
Block a user