Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

Migration Guides (v1 -> v2) — Auditing

Concrete upgrade steps between published NuGet major versions v1.0.0 → v2.0.0 (BC-001–BC-015 in CHANGELOG.md).

  1. Strongly-typed TenantId (BC-001–BC-003):
    v1.0.0
    // var query = new AuditQuery { TenantId = "tenant-acme" };
    // v2.0.0
    var query = new AuditQuery { TenantId = new TenantId("tenant-acme") };
    Also update any switch cases or attributes expecting const string SystemTenantId to reference the static readonly TenantId field at runtime.
  2. Opaque cursor properties (BC-004): Replace AfterRecordId on AuditQuery with ContinuationToken, and NextCursorId on AuditQueryResult with NextPageToken.
  3. Async enrichers and sanitizers (BC-005): Synchronous Apply(...) and Sanitize(...) methods on enricher/sanitizer contracts became ApplyAsync(...) and SanitizeAsync(...).
  4. Length-prefixed HMAC integrity (BC-006): HmacAuditIntegrityService switches to length-prefixed binary framing. Records hashed under v1.0.0 will not match v2.0.0 hashes unless verified with a legacy strategy during rollover.
  5. SQL schema & identifier validation (BC-007–BC-015): Apply the v2.0.0 schema migration adding idempotency_key and the (tenant_id, previous_hash) index, and ensure custom table/schema names match strict SQL identifier regex validation.

The local repository working tree (3.1.0) introduces IAuditRecordWriter/IAuditRecordReader segregation, a 4th optional TotalCount parameter on AuditQueryResult, SensitivityAuditStoreDecorator, fail-closed SQL Server RLS, and AES-GCM DLQ support. Avoid positional 3-element deconstruction of AuditQueryResult so your code remains forward-compatible.