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:
@@ -305,8 +305,8 @@ The new centralized Audit Log component (#23) is exposed via the `scadabridge au
|
||||
The `scadabridge audit` group targets the centralized Audit Log component (#23) and
|
||||
exposes the UI-equivalent operational audit surface. Permissions follow the same
|
||||
read-vs-export split the Central UI uses (see Component-AuditLog.md, Security &
|
||||
Tamper-Evidence, and Security & Auth #10): `audit query`, `audit tree`, and
|
||||
`audit verify-chain`, `audit verify-heads` and `audit archive list|verify` require the `OperationalAudit`
|
||||
Tamper-Evidence, and Security & Auth #10): `audit query`, `audit tree` and
|
||||
`audit archive list|verify` require the `OperationalAudit`
|
||||
permission; `audit export`
|
||||
additionally requires `AuditExport`; `audit backfill-source-node` requires the
|
||||
`Admin` role (maintenance path only). The server enforces permission checks and
|
||||
@@ -317,8 +317,6 @@ scadabridge audit query [--since <t>] [--until <t>] [--channel <c>] [--kind <k>]
|
||||
scadabridge audit export --since <t> --until <t> --format csv|jsonl|parquet --output <path> [--channel <c>] [--kind <k>] [--status <s>] [--site <s>] [--target <t>] [--actor <a>]
|
||||
scadabridge audit tree --execution-id <guid> [--format table|json]
|
||||
scadabridge audit backfill-source-node --before <ISO-8601-UTC> [--sentinel <value>] [--batch <n>]
|
||||
scadabridge audit verify-chain --month <YYYY-MM>
|
||||
scadabridge audit verify-heads --path <file-or-directory>
|
||||
scadabridge audit archive list
|
||||
scadabridge audit archive verify --name <archive>
|
||||
scadabridge audit archive cleanup [--dry-run]
|
||||
@@ -345,33 +343,14 @@ scadabridge audit archive cleanup [--dry-run]
|
||||
rows where `SourceNode IS NULL` and `OccurredAtUtc < --before`, in batches
|
||||
(`--batch`, default 5000). Admin-only maintenance command. Idempotent.
|
||||
Backed by `POST /api/audit/backfill-source-node`.
|
||||
- `audit verify-chain --month <YYYY-MM>` (ScadaBridge#41) — verifies the AuditLog
|
||||
hash chain for one UTC calendar month by sending the `VerifyAuditChain` management
|
||||
command over `POST /management` (the one `audit` leaf that is a management contract
|
||||
rather than a REST call). Reports `Intact` / `NotChained` / `Broken`, rows verified,
|
||||
tombstones applied, the partition-purge anchor, the head sequence and unchained rows;
|
||||
on `Broken`, the first break's partition, `ChainSeq`, `EventId` and kind. Exit code
|
||||
`0` intact or not chained, `3` broken, `1` error, `2` authorization failure. Requires
|
||||
`OperationalAudit` and a caller not scoped to specific sites. See
|
||||
Component-AuditLog.md, Security & Tamper-Evidence.
|
||||
- `audit verify-heads --path <file-or-directory>` (ScadaBridge#107) — reads the AuditLog
|
||||
chain heads exported off-box by `AuditLog:HashChain:HeadExport` (JSON lines from the file
|
||||
sink, or any log a syslog collector wrote — each line's JSON object is taken from its first
|
||||
`{` to its last `}`; a directory is read recursively for `*.jsonl`/`*.log`/`*.txt`),
|
||||
collapses duplicates and sends them in the `VerifyAuditChainHeads` management command. The
|
||||
server checks each exported head against the database chain — `Matches`, `Extended` (chain
|
||||
grew; the link at the exported sequence still carries the exported hash), `Purged` (removed
|
||||
by a partition purge; verify the archive), or the failures `Mismatch` (rewritten chain),
|
||||
`Regressed`, `MissingHead`, `MissingLink`, `CountMismatch`. Exit `0` verified, `3` a
|
||||
failure, `1` error (no records found, bad input, `CHAIN_BUSY`), `2` authorization failure.
|
||||
Same gate as `verify-chain`. Run it together with `verify-chain`: a forger who rewrites rows
|
||||
and re-hashes the chain inside SQL Server passes `verify-chain` but not `verify-heads`.
|
||||
- `audit verify-chain` and `audit verify-heads` were removed on 2026-11-15 with the AuditLog
|
||||
hash chain (IT security request; see Component-AuditLog.md, Security & Tamper-Evidence).
|
||||
- `audit archive list` / `audit archive verify --name <archive>` (ScadaBridge#42) —
|
||||
send the `ListAuditArchives` / `VerifyAuditArchive` management commands for the
|
||||
AuditLog Parquet cold archives the retention purge writes (`AuditLog:Archive`,
|
||||
default off). `verify` checks the files against their manifest, recomputes the
|
||||
archived hash chain and compares its end with the purge anchor; exit `0` verified,
|
||||
`3` not verified, `1` error, `2` authorization failure. Same gate as `verify-chain`.
|
||||
default off). `verify` checks the data file against its manifest (size, SHA-256, row
|
||||
count); exit `0` verified, `3` not verified, `1` error, `2` authorization failure.
|
||||
Requires `OperationalAudit` and a caller not scoped to specific sites.
|
||||
See Component-AuditLog.md, Retention & Purge.
|
||||
- `audit archive cleanup [--dry-run]` (ScadaBridge#109) — sends `CleanupAuditArchives`:
|
||||
deletes superseded stale archives (a retried purge's, once a later purged archive provably
|
||||
|
||||
Reference in New Issue
Block a user