EricksonLopez.Auditing

dotnet-auditing · Observability & Compliance

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L2 Cross-Cutting & ReliabilityStableMaintenance: MaintainedAOT: PartialMIT LicenseConfidence: HIGH
Cross-CuttingInfrastructurenet8.0net9.0net10.0

2. Value Proposition & Problem Solved#

High-performance, Native AOT-ready, cryptographically verifiable, multi-tenant forensic audit trail and change-tracking ecosystem for modern .NET.

Standard ILogger text logs lack immutable schemas, cryptographic tamper evidence, and database-level tenant isolation required for forensic compliance.

3. Quick Install#

Primary package: EricksonLopez.Auditing

dotnet add package EricksonLopez.Auditing --version 2.0.0
Also published in this family:
EricksonLopez.Auditing.AbstractionsEricksonLopez.Auditing.PostgreSqlEricksonLopez.Auditing.MySqlEricksonLopez.Auditing.OracleEricksonLopez.Auditing.EntityFrameworkCoreEricksonLopez.Auditing.MongoDb

4. Verified Ecosystem Metrics#

v2.0.0
NuGet Published Version
v3.1.0
Repo HEAD Version
3,639
NuGet Downloads
16
Packable Packages
676
Public API Members
2
Benchmark Rows (RyuJIT)

Snapshot retrieved UTC: 2026-12-01

5. When to Use & When Not to Use#

When to use

  • You require structured AuditRecord evidence with HMAC-SHA256 predecessor chaining, field encryption/redaction, and multi-database stores.

When NOT to use

  • You only need ephemeral operational traces or metrics—use OpenTelemetry or diagnostic logging.

6. Core Capabilities & Design Invariants#

Cryptographic Integrity & Encryption

HmacAuditIntegrityService hash chaining, AesGcmAuditFieldEncryptor, and RFC 9562 UUIDv7 AuditId values.

6-Engine Storage & Multi-Tenancy

Providers for PostgreSQL (RLS), SQL Server, MySQL, MariaDB, Oracle, SQLite, MongoDB, and Azure Key Vault.

7. Included NuGet Packages & Adapters#

Package IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.AuditingPrimaryPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full273Core audit pipeline for EricksonLopez.Auditing: AuditScope, AuditConfiguration, HMAC integrity, sensitivity pipeline, and DI extensions. AOT-compatible. Requires an IAuditStore adapter (e.g., EricksonLopez.Auditing.PostgreSql).
EricksonLopez.Auditing.AbstractionsPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full629Foundation contracts and primitives for audit trails in .NET 8+. Zero external runtime dependencies. AOT-compatible.
EricksonLopez.Auditing.PostgreSqlPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full294PostgreSQL + Dapper adapter for EricksonLopez.Auditing. Includes append-only store, RLS tenant isolation, keyset pagination, monthly partitioning, and HMAC chain integrity. AOT-compatible.
EricksonLopez.Auditing.MySqlPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full282MySQL and MariaDB adapter for EricksonLopez.Auditing. Uses MySqlConnector for high-performance, async-first, AOT-compatible append-only audit persistence.
EricksonLopez.Auditing.OraclePublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full277Oracle Database adapter for EricksonLopez.Auditing. Supports Oracle 19c, 21c, and 23ai with Dapper and Oracle.ManagedDataAccess.Core. AOT-compatible.
EricksonLopez.Auditing.EntityFrameworkCorePublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Incompatible273Entity Framework Core storage provider for EricksonLopez.Auditing. Enables reliable, append-only, tenant-isolated audit persistence via EF Core.
EricksonLopez.Auditing.MongoDbPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Incompatible273MongoDB storage adapter for EricksonLopez.Auditing. Enables highly scalable, document-oriented, append-only audit persistence.
EricksonLopez.Auditing.OpenTelemetryPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full273OpenTelemetry distributed tracing, metrics, and semantic conventions for EricksonLopez.Auditing.
EricksonLopez.Auditing.SqlitePublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full272SQLite adapter for EricksonLopez.Auditing. Ideal for edge computing, desktop applications, local testing, and offline-first scenarios. AOT-compatible.
EricksonLopez.Auditing.SqlServerPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full269Microsoft SQL Server and Azure SQL adapter for EricksonLopez.Auditing. Includes append-only store, SESSION_CONTEXT + Security Policy RLS tenant isolation, keyset pagination, and HMAC chain integrity. AOT-compatible.
EricksonLopez.Auditing.TestingPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full268Test helpers for EricksonLopez.Auditing: in-memory audit store, assertion helpers, and store verification utilities. Do NOT reference in production code.
EricksonLopez.Auditing.DapperPublishedv2.0.0 / v3.1.0net8.0, net9.0, net10.0AOT: Full256Generic database-agnostic Dapper adapter for EricksonLopez.Auditing. Provides high-performance audit trail persistence over any ADO.NET IDbConnection using Dapper.
EricksonLopez.Auditing.AzureKeyVaultUnpublished— / v3.1.0net8.0, net9.0, net10.0AOT: Full0Azure Key Vault cryptographic integrity provider for EricksonLopez.Auditing. Enables dynamic HMAC audit key rotation and secure per-tenant key management.
EricksonLopez.Auditing.OutboxUnpublished— / v3.1.0net8.0, net9.0, net10.0AOT: Full0Transactional outbox storage decorator for EricksonLopez.Auditing. Ensures atomic audit persistence alongside business domain events. AOT-compatible.
EricksonLopez.Auditing.SerilogUnpublished— / v3.1.0net8.0, net9.0, net10.0AOT: Full0Serilog IDestructuringPolicy adapter for EricksonLopez.Auditing automatically redacting [AuditSensitive], [SensitiveData], [NotLogged], and [Pii] properties during structured log destructuring.
EricksonLopez.Auditing.AnalyzersAnalyzer / GeneratorUnpublished— / v3.1.0netstandard2.0AOT: N/A (Analyzer/Legacy)0Roslyn analyzers for EricksonLopez.Auditing: enforces compile-time audit trail safety, sensitivity classification, and configuration invariants.

8. Quick Start Code Example#

Grounded in verified public APIs from EricksonLopez.Auditing. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.

using EricksonLopez.Auditing;
using EricksonLopez.Auditing.PostgreSql;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Npgsql;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddAuditing(cfg =>
{
    cfg.DefaultFailureBehavior = AuditFailureBehavior.FailClosed;
    cfg.GlobalFieldDenylist.Add("InternalAuthSecret");
})
.UsePostgreSql(options =>
{
    options.ConnectionFactory = () =>
        new NpgsqlConnection(builder.Configuration.GetConnectionString("AuditDatabase"));
});

9. Architecture & Dependency Flow#

This library has no cross-family library dependencies or dependents recorded in dependencies.json.

flowchart LR
  lib_auditing["EricksonLopez.Auditing (L2)"]
EricksonLopez.Auditing Dependency Topology0 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

0 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.

flowchart LR
  lib_auditing["EricksonLopez.Auditing (L2)"]

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 16 packages: 13 Full, 0 Partial, 2 Incompatible, 1 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.AuditingtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.AbstractionstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.PostgreSqltruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.MySqltruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.OracletruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.EntityFrameworkCorefalsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Auditing.MongoDbfalsefalseIncompatiblenet8.0, net9.0, net10.0
EricksonLopez.Auditing.OpenTelemetrytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.SqlitetruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.SqlServertruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.TestingtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.DappertruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.AzureKeyVaulttruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.OutboxtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.SerilogtruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Auditing.AnalyzersnullfalseNotApplicablenetstandard2.0

11. Upstream Dependencies & Downstream Dependents#

Upstream Dependencies (0)

Zero cross-family upstream library dependencies (foundational node).

Downstream Dependents (0)

No other EricksonLopez.* libraries currently depend on this family.

12. Optional Adapters & Third-Party Integrations#

Internal Adapter Edges & Integration Packages

No optional cross-family adapter edges or integration packages are recorded for this library.

Verified External NuGet Dependencies (16)

Azure.IdentityAzure.Security.KeyVault.SecretsDapperMicrosoft.Data.SqlClientMicrosoft.Data.SqliteMicrosoft.EntityFrameworkCoreMicrosoft.EntityFrameworkCore.RelationalMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Logging.AbstractionsMongoDB.DriverMySqlConnectorNpgsqlOpenTelemetry.ApiOracle.ManagedDataAccess.CorePolly.CoreSerilog

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • AuditRecordBuilder.AddChange

    Adds a property modification change.

  • AuditRecordBuilder.AddRedactedChange

    Adds a redacted property change.

  • AuditingServiceCollectionExtensions.AddAuditing

    Adds core auditing services, configuration, pipeline, entity stamper, and default providers to the service collection.

  • AuditingServiceCollectionExtensions.AddSecurityAlertSink<TSink>

    Registers an `IAuditSecurityAlertSink` implementation and automatically enables real-time security alerting.

  • IAuditBuilder.AddEnricher<TEnricher>

    Registers an audit enricher to augment records in the logging pipeline.

  • IAuditBuilder.UseActorProvider<TProvider>

    Registers a custom actor provider type to resolve current actor identities.

  • IAuditBuilder.UseStore<TStore>

    Registers an audit persistence store implementation.

  • DapperAuditExtensions.UseDapper

    Registers `DapperAuditStore` as the audit storage provider in the service collection.

  • AuditingEfCoreExtensions.AddEntityFrameworkCoreAuditStore

    Registers `EfCoreAuditStore` as the audit storage provider in the service collection.

  • AuditingMongoDbExtensions.AddMongoDbAuditStore

    Registers `MongoAuditStore` as the audit storage provider in the service collection.

  • MySqlAuditExtensions.UseMySql

    Registers `MySqlAuditStore` as the audit storage provider in the service collection.

  • AuditingOpenTelemetryExtensions.AddOpenTelemetryInstrumentation

    Adds OpenTelemetry metrics and tracing instrumentation decorators for registered audit store and integrity verifier services.

Key Public Types & Contracts

  • EricksonLopez.Auditing.AesGcmAuditFieldEncryptor (class)

    Implements authenticated AES-256-GCM field-level encryption and GDPR Art. 17 crypto-shredding using an `IAuditCryptoKeyProvider`.

  • EricksonLopez.Auditing.AmbientAuditTimeProvider (class)

    Provides ambient or UTC timestamps with support for deterministic time-freezing scopes in testing and transactions.

  • EricksonLopez.Auditing.AuditAction (record)

    Represents an operation executed by an actor on a resource.

  • EricksonLopez.Auditing.AuditActor (record)

    Represents the authenticated identity that performed an audited action.

  • EricksonLopez.Auditing.AuditActorType (enum)

    Specifies the classification of the entity that performed an audited action.

  • EricksonLopez.Auditing.AuditChange (record)

    Represents a single field-level state change captured during an audited action.

  • EricksonLopez.Auditing.AuditConfiguration (class)

    Represents runtime configuration options for the auditing pipeline.

  • EricksonLopez.Auditing.AuditContext (record)

    Encapsulates technical execution context metadata for an audited action.

  • EricksonLopez.Auditing.AuditCursorToken (class)

    Provides methods for encoding and decoding composite pagination cursor tokens.

  • EricksonLopez.Auditing.AuditExecutionPlane (enum)

    Specifies the isolated security execution plane in which an audited operation occurred.

  • EricksonLopez.Auditing.AuditExecutionPlaneExtensions (class)

    Provides wire-format serialization and parsing helpers for `AuditExecutionPlane`.

  • EricksonLopez.Auditing.AuditFailureBehavior (enum)

    Specifies the failure handling policy when persisting an audit record fails.

14. Verified Performance Benchmarks#

All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).

Total rows: 2 · Measured: 2 · NA / Error: 0 · Suites: 1

Observed runtimes: .NET 10.0.11 X64 RyuJIT x86-64-v4

Observed CPUs: AMD Ryzen 7 9800X3D 4.70GHz, 1 CPU, 8 logical and 8 physical cores

SuiteMethodRuntimeMean (ns)Allocated (B)Status
HmacIntegrityBenchmarksComputeHash.NET 10.0.11 X64 RyuJIT x86-64-v4481.4152measured
HmacIntegrityBenchmarksVerifyHash.NET 10.0.11 X64 RyuJIT x86-64-v4679.2152measured

15. Release History & NuGet vs Repo Status#

Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.1.0.

VersionSourcePublished DateSummary
v2.0.0 ↗nuget2026-09-25Published EricksonLopez.Auditing 2.0.0 to NuGet.org.
v2.0.0 ↗github2026-09-25[2.0.0](https://github.com/ericksonlopezf/dotnet-auditing/compare/v1.0.0...v2.0.0) (2026-09-25) ⚠ BREAKING CHANGES * enterprise architecture overhaul, forensic integrity, outbox & analyzers ✨ Features * enterprise architecture overhaul, forensic integrity, outbox & analyzers ([a907447](https://github.com/ericksonlopezf/dotnet-auditing/commit/a90744729a9b6520e31b7427924f811c192ae057))
v1.0.0 ↗github2026-08-27Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Auditing.Abstractions` | `1.0.0` | | `EricksonLopez.Auditing` | `1.0.0` | | `EricksonLopez.Auditing.Dapper` | `1.0.0` | | `EricksonLopez.Auditing.EntityFrameworkCore` | `1.0.0` | | `EricksonLopez.Auditing.MongoDb` | `1.0.0` | | `EricksonLopez.Auditing.MySql` | `1.0.0` | | `EricksonLopez.Auditing.Open...
v1.0.0 ↗nuget2026-08-27Published EricksonLopez.Auditing 1.0.0 to NuGet.org.

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.

18. Source Repository, License & Contributing#

Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).

19. Troubleshooting, Pitfalls & Migration Guidance#

  • Core Auditing packages are IsAotCompatible=true; Dapper and MongoDB adapter packages declare IsAotCompatible=false.
  • Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.1.0.

20. Quality & Verification Evidence#

Strong-Name Signing (`EricksonLopez.snk`)
EricksonLopez.snk
`ImplicitUsings=disable`
disable
XML Documentation Extraction
Verified (16 namespaces, 130 types, 676 members)
MSBuild AOT / Trim Attributes
13 Full / 0 Partial / 2 Incompatible / 1 N/A
BenchmarkDotNet Artifacts
2 total (2 measured, 0 na_error)

Explicit Verification Boundaries & Limitations

  • All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
  • 4 unpublished

Search EricksonLopez.* Ecosystem

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