fix(api): M9-audit NICE stragglers — server batch #193

Merged
amiryahaya merged 1 commit from fix/m9-audit-nice-server into main 2026-11-12 13:59:59 +01:00
Owner

Umbrella #167 NICE residue: tenant-root unique index + resolver convergence (self-healing migration demotes staging duplicates), pairing KEM-mismatch 400 before consume, TotpGuard consume-race catch, dead IdP pairing_code plumbing deleted, HMAC post-restart residue documented. 4 new tests; suite 1033/0/39.

Umbrella #167 NICE residue: tenant-root unique index + resolver convergence (self-healing migration demotes staging duplicates), pairing KEM-mismatch 400 before consume, TotpGuard consume-race catch, dead IdP pairing_code plumbing deleted, HMAC post-restart residue documented. 4 new tests; suite 1033/0/39.
fix(api): M9-audit NICE stragglers — server batch
All checks were successful
Security CI / security-scan (pull_request) Successful in 3m35s
API CI / build-and-test (pull_request) Successful in 7m38s
9bef8abe0a
- Tenant-root uniqueness: filtered unique index (TenantId WHERE
  IsTenantRoot AND ParentFolderId IS NULL) + resolver converges on the
  winner on unique-violation (both create and promote branches) — the
  check-promote-create race could duplicate roots and orphan files.
  Migration self-heals staging (demotes duplicates keeping earliest).
- Pairing approve rejects KEM-algorithm mismatch with 400 BEFORE the
  single-use consume — a bad request can no longer burn the challenge
  (and a stored wrap can no longer be labelled with the wrong algorithm).
- TotpSecurityGuard.MarkConsumed swallows the insert unique-violation —
  a concurrent duplicate submit no longer 500s a valid login.
- Dead IdP pairing_code plumbing deleted (param, state field, dev-plan
  mention — zero consumers since task 2.1).
- HMAC middleware documents the 5-min post-restart replay residue
  (accepted, bounded by MaxTimestampAge).

Tests: 4 new (M9AuditNiceBatchTests). Suite 1033/0/39.
Sign in to join this conversation.
No description provided.