EricksonLopez.Webhooks
dotnet-webhooks · Integrations & Protocols
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
2. Value Proposition & Problem Solved#
Production-ready webhook engine for .NET 8/9/10: resilient outbound delivery with Polly v8 & socket-level SSRF mitigation, Redis distributed DLQ & anti-replay defense, and ASP.NET Core inbound verification middleware with Native AOT & OpenTelemetry.
Outbound and inbound webhook delivery exposes systems to SSRF/DNS-rebinding attacks, replay vulnerabilities, timing side-channels, and leaked HMAC secrets.
3. Quick Install#
Primary package: EricksonLopez.Webhooks
dotnet add package EricksonLopez.Webhooks --version 1.0.0<PackageReference Include="EricksonLopez.Webhooks" Version="1.0.0" /><PackageVersion Include="EricksonLopez.Webhooks" Version="1.0.0" />4. Verified Ecosystem Metrics#
Snapshot retrieved UTC: 2026-12-01
5. When to Use & When Not to Use#
When to use
- You send or receive signed webhooks and need socket-level SSRF defense, constant-time HMAC verification, anti-replay stores, and Redis DLQ.
When NOT to use
- You are communicating purely between internal services over an AMQP/Kafka broker—use EricksonLopez.Messaging.
6. Core Capabilities & Design Invariants#
Socket-Level SSRF & Timing Defense
SafeSocketsHttpHandler validates resolved IPs on ConnectCallback; WebhookSigner uses CryptographicOperations.FixedTimeEquals.
Anti-Replay, DLQ & Payment Schemes
TimestampedWebhookVerifier, WebhookSecret redaction, Redis replay/DLQ stores, and ASP.NET Core receiver middleware.
7. Included NuGet Packages & Adapters#
| Package ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.WebhooksPrimary | Published | v1.0.0 / v2.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 168 | Enterprise-grade webhook delivery engine for .NET. Features HMAC-SHA256 request signing, anti-replay timestamps, exponential backoff with jitter, dead-letter queue (DLQ) support, and Native AOT compatibility. |
| EricksonLopez.Webhooks.AspNetCore | Published | v1.0.0 / v2.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 133 | ASP.NET Core integration for receiving and cryptographically verifying inbound webhooks. Protects against replay attacks, enforces HMAC-SHA256 signature verification, and integrates with Minimal APIs and Controllers. |
| EricksonLopez.Webhooks.Redis | Published | v1.0.0 / v2.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 131 | Redis-backed distributed replay detector and persistent dead-letter queue (DLQ) provider for EricksonLopez.Webhooks. |
| EricksonLopez.Webhooks.PaymentGateways | Unpublished | — / v2.1.0 | net8.0, net9.0, net10.0 | AOT: Full | 0 | Cryptographic inbound webhook signature verification schemes for Stripe, CardNet, Azul, PayPal, Binance Pay, and Meta WhatsApp with anti-replay protection and Native AOT compatibility. |
8. Quick Start Code Example#
Grounded in verified public APIs from EricksonLopez.Webhooks. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.
using System;
using EricksonLopez.Webhooks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddWebhooks(options =>
{
options.Timeout = TimeSpan.FromSeconds(10);
options.MaxPayloadSizeBytes = 10 * 1024 * 1024;
options.EnableSsrfProtection = true;
options.Protocol = WebhookSenderProtocol.EricksonLopez;
});9. Architecture & Dependency Flow#
Rendering diagram…
flowchart LR lib_webhooks["EricksonLopez.Webhooks (L3)"] lib_result["EricksonLopez.Result (L0)"] lib_webhooks --> lib_result lib_security["EricksonLopez.Security (L3)"] lib_webhooks --> lib_security
View accessible text summary and structure
2 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
| Direction | Library | Tier | Relationship Kinds |
|---|---|---|---|
| Upstream | EricksonLopez.Result | L0 | Compile-Time, NuGet Package |
| Upstream | EricksonLopez.Security | L3 | Compile-Time, NuGet Package |
flowchart LR
lib_webhooks["EricksonLopez.Webhooks (L3)"]
lib_result["EricksonLopez.Result (L0)"]
lib_webhooks --> lib_result
lib_security["EricksonLopez.Security (L3)"]
lib_webhooks --> lib_security10. Target Frameworks & Native AOT / Trimming Matrix#
MSBuild `.csproj` inspection across 4 packages: 4 Full, 0 Partial, 0 Incompatible, 0 NotApplicable (analyzers/generators).
| Package ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.Webhooks | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Webhooks.AspNetCore | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Webhooks.Redis | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Webhooks.PaymentGateways | true | true | Full | net8.0, net9.0, net10.0 |
11. Upstream Dependencies & Downstream Dependents#
Upstream Dependencies (2)
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 (6)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
WebhookServiceCollectionExtensions.AddWebhooksRegisters the `IWebhookSender` and supporting infrastructure into the dependency injection container.
WebhookAspNetCoreExtensions.AddInMemoryReplayDetectorRegisters the `InMemoryWebhookReplayDetector` to protect against replay attacks in single-node environments.
WebhookAspNetCoreExtensions.AddWebhookReceiverRegisters the `IWebhookValidator` and receiver options into the service collection.
WebhookAspNetCoreExtensions.UseWebhookReceiverAdds the `WebhookReceiverMiddleware` to the application request pipeline.
WebhookReceiverOptions.AddSecretAdds an active secret key to `SecretKeys` to support cryptographic key rotation.
PaymentGatewayWebhookServiceCollectionExtensions.AddPaymentGatewayWebhookSchemesRegisters `ITimestampedWebhookVerifier` and built-in `IWebhookSignatureScheme` implementations (`StripeWebhookSignatureScheme`, `CardNetWebhookSignatureScheme`, `AzulWebhookSignatureScheme`, `PayPalWebhookSignatureScheme`, `BinancePayWebhookSignatureScheme`, and `MetaWhatsAppWebhookSignatureScheme`).
RedisWebhookServiceCollectionExtensions.AddRedisWebhookDeadLetterSinkRegisters a distributed, Redis-backed dead-letter queue sink into the service collection.
RedisWebhookServiceCollectionExtensions.AddRedisWebhookReplayDetectorRegisters a distributed, Redis-backed webhook replay detector into the service collection.
Key Public Types & Contracts
EricksonLopez.Webhooks.ITimestampedWebhookVerifier (interface)Defines a cryptographic verifier for inbound webhooks that binds the delivery timestamp directly into the HMAC-SHA256 signature input (`"{timestamp}.{rawPayload}"`), compares digests in constant time, enforces a drift window, and optionally records nonces in a replay store.
EricksonLopez.Webhooks.IWebhookDeadLetterSink (interface)Defines a storage contract for failed, unrecoverable webhook deliveries that have exceeded retry limits.
EricksonLopez.Webhooks.IWebhookReplayDetector (interface)Defines a contract for detecting and preventing replay attacks by tracking processed webhook message identifiers.
EricksonLopez.Webhooks.IWebhookSender (interface)Defines outbound webhook delivery capabilities with cryptographic signing and automated retry management.
EricksonLopez.Webhooks.InMemoryWebhookDeadLetterSink (class)Represents an in-memory thread-safe bounded dead-letter sink for development and testing environments.
EricksonLopez.Webhooks.InMemoryWebhookReplayDetector (class)Represents an in-memory replay attack detector for single-node webhook processing.
EricksonLopez.Webhooks.NoOpWebhookDeadLetterSink (class)Represents a dead-letter sink that silently discards failed messages without persistence.
EricksonLopez.Webhooks.TimestampedWebhookVerifier (class)Verifies inbound webhook payloads using timestamp-bound HMAC-SHA256 (`"{timestamp}.{rawPayload}"`), `CryptographicOperations.FixedTimeEquals`, configurable clock-skew tolerance, and optional `IWebhookReplayDetector` deduplication.
EricksonLopez.Webhooks.WebhookDeliveryResult (record)Represents the outcome and diagnostic telemetry of a webhook transmission attempt.
EricksonLopez.Webhooks.WebhookDiagnostics (class)Provides diagnostic sources, telemetry meters, and activity sources for distributed tracing and observability.
EricksonLopez.Webhooks.WebhookErrors (class)Provides factory methods for constructing strongly-typed domain errors for webhook operations.
EricksonLopez.Webhooks.WebhookHeaders (class)Defines standard HTTP header constants used in enterprise webhook transmission and signature verification.
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 |
|---|---|---|---|---|---|
| WebhookSignerBenchmarks | ComputeSignature_SmallPayload | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 281,300 | 0 | measured |
| WebhookSignerBenchmarks | ComputeSignature_MediumPayload | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 290,100 | 0 | measured |
| WebhookSignerBenchmarks | VerifySignature_ConstantTime | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 754,700 | 0 | measured |
| DeadLetterSinkBenchmarks | DeadLetterSink_EnqueueAsync | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 2,862,000 | 0 | measured |
| WebhookSenderBenchmarks | WebhookSender_SendAsync_Success | .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 171,800,000 | 15,749 | measured |
15. Release History & NuGet vs Repo Status#
Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.1.0.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v1.0.0 ↗ | github | 2026-09-24 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Webhooks` | `1.0.0` | | `EricksonLopez.Webhooks.AspNetCore` | `1.0.0` | | `EricksonLopez.Webhooks.Redis` | `1.0.0` | --- For detailed changes, see [CHANGELOG.md](https://github.com/ericksonlopezf/dotnet-webhooks/blob/v1.0.0/CHANGELOG.md). |
| v1.0.0 ↗ | nuget | 2026-09-24 | Published EricksonLopez.Webhooks 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 →
5 namespaces · 44 types · 180 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#
- Keep EnableSsrfProtection=true in production outbound configurations to block loopback, link-local, and RFC 1918 targets.
- Version lag detected: NuGet.org latest published version is v1.0.0, while local repository HEAD is at v2.1.0.
20. Quality & Verification Evidence#
- Strong-Name Signing (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- XML Documentation Extraction
- Verified (5 namespaces, 44 types, 180 members)
- MSBuild AOT / Trim Attributes
- 4 Full / 0 Partial / 0 Incompatible / 0 N/A
- BenchmarkDotNet Artifacts
- 5 total (5 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).
- 1 unpublished