EricksonLopez.Auditing
dotnet-auditing · Observability & Compliance
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
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<PackageReference Include="EricksonLopez.Auditing" Version="2.0.0" /><PackageVersion Include="EricksonLopez.Auditing" Version="2.0.0" />4. Verified Ecosystem Metrics#
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 ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.AuditingPrimary | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 273 | Core 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.Abstractions | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 629 | Foundation contracts and primitives for audit trails in .NET 8+. Zero external runtime dependencies. AOT-compatible. |
| EricksonLopez.Auditing.PostgreSql | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 294 | PostgreSQL + Dapper adapter for EricksonLopez.Auditing. Includes append-only store, RLS tenant isolation, keyset pagination, monthly partitioning, and HMAC chain integrity. AOT-compatible. |
| EricksonLopez.Auditing.MySql | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 282 | MySQL and MariaDB adapter for EricksonLopez.Auditing. Uses MySqlConnector for high-performance, async-first, AOT-compatible append-only audit persistence. |
| EricksonLopez.Auditing.Oracle | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 277 | Oracle Database adapter for EricksonLopez.Auditing. Supports Oracle 19c, 21c, and 23ai with Dapper and Oracle.ManagedDataAccess.Core. AOT-compatible. |
| EricksonLopez.Auditing.EntityFrameworkCore | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 273 | Entity Framework Core storage provider for EricksonLopez.Auditing. Enables reliable, append-only, tenant-isolated audit persistence via EF Core. |
| EricksonLopez.Auditing.MongoDb | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 273 | MongoDB storage adapter for EricksonLopez.Auditing. Enables highly scalable, document-oriented, append-only audit persistence. |
| EricksonLopez.Auditing.OpenTelemetry | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 273 | OpenTelemetry distributed tracing, metrics, and semantic conventions for EricksonLopez.Auditing. |
| EricksonLopez.Auditing.Sqlite | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 272 | SQLite adapter for EricksonLopez.Auditing. Ideal for edge computing, desktop applications, local testing, and offline-first scenarios. AOT-compatible. |
| EricksonLopez.Auditing.SqlServer | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 269 | Microsoft 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.Testing | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 268 | Test helpers for EricksonLopez.Auditing: in-memory audit store, assertion helpers, and store verification utilities. Do NOT reference in production code. |
| EricksonLopez.Auditing.Dapper | Published | v2.0.0 / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 256 | Generic database-agnostic Dapper adapter for EricksonLopez.Auditing. Provides high-performance audit trail persistence over any ADO.NET IDbConnection using Dapper. |
| EricksonLopez.Auditing.AzureKeyVault | Unpublished | — / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 0 | Azure Key Vault cryptographic integrity provider for EricksonLopez.Auditing. Enables dynamic HMAC audit key rotation and secure per-tenant key management. |
| EricksonLopez.Auditing.Outbox | Unpublished | — / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 0 | Transactional outbox storage decorator for EricksonLopez.Auditing. Ensures atomic audit persistence alongside business domain events. AOT-compatible. |
| EricksonLopez.Auditing.Serilog | Unpublished | — / v3.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 0 | Serilog IDestructuringPolicy adapter for EricksonLopez.Auditing automatically redacting [AuditSensitive], [SensitiveData], [NotLogged], and [Pii] properties during structured log destructuring. |
| EricksonLopez.Auditing.AnalyzersAnalyzer / Generator | Unpublished | — / v3.1.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 0 | Roslyn 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.
Rendering diagram…
flowchart LR lib_auditing["EricksonLopez.Auditing (L2)"]
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 ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.Auditing | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Abstractions | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.PostgreSql | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.MySql | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Oracle | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.EntityFrameworkCore | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.MongoDb | false | false | Incompatible | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.OpenTelemetry | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Sqlite | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.SqlServer | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Testing | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Dapper | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.AzureKeyVault | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Outbox | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Serilog | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Auditing.Analyzers | null | false | NotApplicable | netstandard2.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)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
AuditRecordBuilder.AddChangeAdds a property modification change.
AuditRecordBuilder.AddRedactedChangeAdds a redacted property change.
AuditingServiceCollectionExtensions.AddAuditingAdds 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.UseDapperRegisters `DapperAuditStore` as the audit storage provider in the service collection.
AuditingEfCoreExtensions.AddEntityFrameworkCoreAuditStoreRegisters `EfCoreAuditStore` as the audit storage provider in the service collection.
AuditingMongoDbExtensions.AddMongoDbAuditStoreRegisters `MongoAuditStore` as the audit storage provider in the service collection.
MySqlAuditExtensions.UseMySqlRegisters `MySqlAuditStore` as the audit storage provider in the service collection.
AuditingOpenTelemetryExtensions.AddOpenTelemetryInstrumentationAdds 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).
| Suite | Method | Runtime | Mean (ns) | Allocated (B) | Status |
|---|---|---|---|---|---|
| HmacIntegrityBenchmarks | ComputeHash | .NET 10.0.11 X64 RyuJIT x86-64-v4 | 481.4 | 152 | measured |
| HmacIntegrityBenchmarks | VerifyHash | .NET 10.0.11 X64 RyuJIT x86-64-v4 | 679.2 | 152 | measured |
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.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v2.0.0 ↗ | nuget | 2026-09-25 | Published EricksonLopez.Auditing 2.0.0 to NuGet.org. |
| v2.0.0 ↗ | github | 2026-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 ↗ | github | 2026-08-27 | Ecosystem 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 ↗ | nuget | 2026-08-27 | Published EricksonLopez.Auditing 1.0.0 to NuGet.org. |
16. Complementary & Related Libraries#
Libraries in the same tier, architectural layer, or directly paired via dependency edges.
17. Documentation, API Reference & Portal Links#
Conceptual Documentation (Starlight) →
Extracted XML API Reference →
16 namespaces · 130 types · 676 members
Ecosystem Dependency Map →
Learning Center & Handbook →
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