Hrithik.Security.AuditLogging
1.0.0
dotnet add package Hrithik.Security.AuditLogging --version 1.0.0
NuGet\Install-Package Hrithik.Security.AuditLogging -Version 1.0.0
<PackageReference Include="Hrithik.Security.AuditLogging" Version="1.0.0" />
<PackageVersion Include="Hrithik.Security.AuditLogging" Version="1.0.0" />
<PackageReference Include="Hrithik.Security.AuditLogging" />
paket add Hrithik.Security.AuditLogging --version 1.0.0
#r "nuget: Hrithik.Security.AuditLogging, 1.0.0"
#:package Hrithik.Security.AuditLogging@1.0.0
#addin nuget:?package=Hrithik.Security.AuditLogging&version=1.0.0
#tool nuget:?package=Hrithik.Security.AuditLogging&version=1.0.0
π Hrithik.Security.AuditLogging
Compliance-grade, tamper-evident audit logging for .NET applications
Hrithik.Security.AuditLogging provides a secure, append-only audit logging framework designed for financial, fintech, and enterprise systems where audit trails must be immutable, verifiable, and trustworthy.
β¨ Key Features
β Append-only audit logs
π Cryptographic hash chaining (tamper-evident)
π§± Storage-agnostic design
π§© Pluggable audit stores
π΅οΈ Correlation-ID aware
π¦ Banking & compliance friendly
This library is not general application logging. It is designed for security events, financial actions, and regulatory audits.
π¦ Installation dotnet add package Hrithik.Security.AuditLogging
π― When Should You Use This?
Use Hrithik.Security.AuditLogging to record:
Authentication & authorization events
Security violations (signature failure, replay attack)
Financial operations (payments, settlements)
Administrative actions
Sensitive data access
Typical industries:
Fintech
Banking
Trading systems
Regulated SaaS platforms
π§ Core Concepts πΉ AuditEvent (What Happened)
Represents a high-level security or compliance event.
var auditEvent = new AuditEvent( EventType: "SECURITY", Action: "SIGNATURE_FAILED", Actor: "client-123", Resource: "/payments", Success: false, Timestamp: DateTime.UtcNow, CorrelationId: Guid.NewGuid().ToString() );
πΉ Audit Log Integrity (How Itβs Protected)
Each audit entry is cryptographically linked to the previous entry:
Hash(n) = SHA256(Hash(n-1) + Payload + Timestamp)
β Any modification breaks the chain β Tampering becomes detectable β Meets audit-trail integrity requirements
βοΈ Getting Started 1οΈβ£ Register Services using Hrithik.Security.AuditLogging;
services.AddAuditLogging();
This registers:
IAuditLogger
Default in-memory audit store (for development/testing)
2οΈβ£ Log an Audit Event var auditLogger = serviceProvider.GetRequiredService<IAuditLogger>();
await auditLogger.LogAsync(new AuditEvent( EventType: "AUTH", Action: "LOGIN_SUCCESS", Actor: "user-42", Resource: "/login", Success: true, Timestamp: DateTime.UtcNow ));
π§© Architecture Overview Application β IAuditLogger β Hash-Chained AuditLogEntry β IAuditStore (Pluggable)
ποΈ Storage Providers
The library ships with:
InMemoryAuditStore (default)
Planned / user-implemented stores:
SQL Server
MongoDB
Azure Blob Storage
Elasticsearch
Production systems should implement their own durable store.
π Security Guarantees Guarantee Description Immutability Logs are append-only Integrity Hash chaining prevents tampering Traceability Correlation-ID support Isolation Audit logging is decoupled from app logging β οΈ Important Notes
Do not store raw PII in audit metadata
Mask or tokenize sensitive fields
Use UTC timestamps only
Persist audit logs in write-once or restricted storage
π Versioning & Stability
Semantic versioning
Stable public abstractions
Breaking changes only in major versions
π License
MIT License
π€ Author
Hrithik Kalra .NET | API Security | Fintech Systems
π§ Email: hrithikkalra11@gmail.com
If you find this package useful, consider supporting its development:
- β Buy Me a Coffee: https://www.buymeacoffee.com/alkylhalid9
- β€οΈ GitHub Sponsors: https://github.com/sponsors/hrithikalra
Support is entirely optional and helps sustain ongoing development and maintenance.
π Related Packages
This package is part of the Hrithik.Security ecosystem:
Hrithik.Security.ApiKeyManagement
API key generation, storage, and scope-based authorizationHrithik.Security.RequestSigning
HMAC-based request signing for tamper-proof APIsHrithik.Security.ReplayProtection
Short-window replay attack preventionHrithik.Security.RateLimiting
Flexible, API-keyβaware rate limiting for ASP.NET Core APIsHrithik.Security.Idempotency Idempotency-keyβbased protection for safe retries in financial APIs
Hrithik.Security.Jose JWT and JWS utilities for secure token handling and message signing
Together, they form a complete API security framework.
These packages are independent and can be used together or individually.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 126 | 2/4/2026 |