EricksonLopez.Webhooks

dotnet-webhooks · Integrations & Protocols

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L3 Persistence & IntegrationsStableMaintenance: ActiveAOT: FullMIT LicenseConfidence: HIGH
InfrastructurePresentationnet8.0net9.0net10.0

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
Also published in this family:
EricksonLopez.Webhooks.AspNetCoreEricksonLopez.Webhooks.Redis

4. Verified Ecosystem Metrics#

v1.0.0
NuGet Published Version
v2.1.0
Repo HEAD Version
432
NuGet Downloads
4
Packable Packages
180
Public API Members
5
Benchmark Rows (RyuJIT)

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 IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.WebhooksPrimaryPublishedv1.0.0 / v2.1.0net8.0, net9.0, net10.0AOT: Full168Enterprise-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.AspNetCorePublishedv1.0.0 / v2.1.0net8.0, net9.0, net10.0AOT: Full133ASP.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.RedisPublishedv1.0.0 / v2.1.0net8.0, net9.0, net10.0AOT: Full131Redis-backed distributed replay detector and persistent dead-letter queue (DLQ) provider for EricksonLopez.Webhooks.
EricksonLopez.Webhooks.PaymentGatewaysUnpublished— / v2.1.0net8.0, net9.0, net10.0AOT: Full0Cryptographic 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#

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
EricksonLopez.Webhooks Dependency Topology2 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

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

DirectionLibraryTierRelationship Kinds
UpstreamEricksonLopez.ResultL0Compile-Time, NuGet Package
UpstreamEricksonLopez.SecurityL3Compile-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_security

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 4 packages: 4 Full, 0 Partial, 0 Incompatible, 0 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.WebhookstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Webhooks.AspNetCoretruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Webhooks.RedistruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Webhooks.PaymentGatewaystruetrueFullnet8.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)

Microsoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HttpMicrosoft.Extensions.Http.ResilienceMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.OptionsStackExchange.Redis

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • WebhookServiceCollectionExtensions.AddWebhooks

    Registers the `IWebhookSender` and supporting infrastructure into the dependency injection container.

  • WebhookAspNetCoreExtensions.AddInMemoryReplayDetector

    Registers the `InMemoryWebhookReplayDetector` to protect against replay attacks in single-node environments.

  • WebhookAspNetCoreExtensions.AddWebhookReceiver

    Registers the `IWebhookValidator` and receiver options into the service collection.

  • WebhookAspNetCoreExtensions.UseWebhookReceiver

    Adds the `WebhookReceiverMiddleware` to the application request pipeline.

  • WebhookReceiverOptions.AddSecret

    Adds an active secret key to `SecretKeys` to support cryptographic key rotation.

  • PaymentGatewayWebhookServiceCollectionExtensions.AddPaymentGatewayWebhookSchemes

    Registers `ITimestampedWebhookVerifier` and built-in `IWebhookSignatureScheme` implementations (`StripeWebhookSignatureScheme`, `CardNetWebhookSignatureScheme`, `AzulWebhookSignatureScheme`, `PayPalWebhookSignatureScheme`, `BinancePayWebhookSignatureScheme`, and `MetaWhatsAppWebhookSignatureScheme`).

  • RedisWebhookServiceCollectionExtensions.AddRedisWebhookDeadLetterSink

    Registers a distributed, Redis-backed dead-letter queue sink into the service collection.

  • RedisWebhookServiceCollectionExtensions.AddRedisWebhookReplayDetector

    Registers 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).

Total rows: 5 · Measured: 5 · NA / Error: 0 · Suites: 3

Observed runtimes: .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI

Observed CPUs: Unknown processor

SuiteMethodRuntimeMean (ns)Allocated (B)Status
WebhookSignerBenchmarksComputeSignature_SmallPayload.NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI281,3000measured
WebhookSignerBenchmarksComputeSignature_MediumPayload.NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI290,1000measured
WebhookSignerBenchmarksVerifySignature_ConstantTime.NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI754,7000measured
DeadLetterSinkBenchmarksDeadLetterSink_EnqueueAsync.NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI2,862,0000measured
WebhookSenderBenchmarksWebhookSender_SendAsync_Success.NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI171,800,00015,749measured

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.

VersionSourcePublished DateSummary
v1.0.0 ↗github2026-09-24Ecosystem 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 ↗nuget2026-09-24Published EricksonLopez.Webhooks 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#

  • 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

Search EricksonLopez.* Ecosystem

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