Skip to content

Search EricksonLopez.* Ecosystem

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

EricksonLopez.Webhooks Overview

EricksonLopez.Webhooks (1.0.0 on NuGet, L3, 432 downloads) provides outbound HTTP webhook delivery hardened by EricksonLopez.Security.Network SSRF filters, Polly-backed Retry-After resilience, constant-time HMAC-SHA256 verification, and Redis-backed replay/dead-letter persistence.

  • SSRF-protected outbound delivery: AddWebhooks() binds SafeSocketsHttpHandlerFactory (EnableSsrfProtection = true by default) to prevent webhook targets from probing internal networks or cloud metadata endpoints.
  • Constant-time inbound verification & anti-replay: AddWebhookReceiver() + UseWebhookReceiver() / RequireWebhookSignature() validates HMAC-SHA256 signatures, timestamp tolerance windows, and delivery ID uniqueness (InMemoryWebhookReplayDetector or RedisWebhookReplayDetector).
  • 429/503 Retry-After resilience & DLQ: Outbound requests honor Retry-After delta/date headers (capped at 5 minutes) and route exhausted payloads to IWebhookDeadLetterSink (NoOpWebhookDeadLetterSink or RedisWebhookDeadLetterSink).
flowchart LR
Out["IWebhookSender"] --> Sign["WebhookSigner (HMAC-SHA256)"]
Sign --> SSRF["SafeSocketsHttpHandlerFactory + Retry-After"]
SSRF --> DLQ["IWebhookDeadLetterSink (on exhaustion)"]
InReq["Incoming POST"] --> Val["IWebhookValidator + IWebhookReplayDetector"]
Outbound SSRF-Hardened Delivery and Inbound Signature VerificationIWebhookSender signs payloads and delivers via SafeSocketsHttpHandlerFactory with Retry-After resilience, while inbound ASP.NET Core middleware validates signatures and checks IWebhookReplayDetector.
View accessible text summary and structure

IWebhookSender signs payloads and delivers via SafeSocketsHttpHandlerFactory with Retry-After resilience, while inbound ASP.NET Core middleware validates signatures and checks IWebhookReplayDetector.

flowchart LR
Out["IWebhookSender"] --> Sign["WebhookSigner (HMAC-SHA256)"]
Sign --> SSRF["SafeSocketsHttpHandlerFactory + Retry-After"]
SSRF --> DLQ["IWebhookDeadLetterSink (on exhaustion)"]
InReq["Incoming POST"] --> Val["IWebhookValidator + IWebhookReplayDetector"]

3 of 4 packages are published at 1.0.0 on NuGet (net8.0;net9.0;net10.0; localVersion: 2.1.0 on disk), while EricksonLopez.Webhooks.PaymentGateways remains unpublished (2.1.0 local only). Overall AOT status is Full (4 / 4 IsAotCompatible=true, EnableTrimAnalyzer=true):

Package NuGet (1.0.0) AOT Status Role
EricksonLopez.Webhooks Published (168 dl) Full AddWebhooks, IWebhookSender, WebhookSigner, WebhookSecret, WebhookSenderOptions
EricksonLopez.Webhooks.AspNetCore Published (133 dl) Full AddWebhookReceiver, AddInMemoryReplayDetector, UseWebhookReceiver, RequireWebhookSignature
EricksonLopez.Webhooks.Redis Published (131 dl) Full AddRedisWebhookReplayDetector, AddRedisWebhookDeadLetterSink
EricksonLopez.Webhooks.PaymentGateways Unpublished Full Local 2.1.0 only (AddPaymentGatewayWebhookSchemes())

Measured directly from benchmarks.json (5 / 5 measured rows extracted from root BenchmarkDotNet.Artifacts, running BenchmarkDotNet v0.14.0, .NET 10.0.11 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI under Job=Dry / ColdStart (IterationCount=1, WarmupCount=1) — no NativeAOT reports):

  • WebhookSignerBenchmarks.ComputeSignature_SmallPayload: 281,300 ns (281.3 μs) / 0 B
  • WebhookSignerBenchmarks.ComputeSignature_MediumPayload: 290,100 ns (290.1 μs) / 0 B
  • WebhookSignerBenchmarks.VerifySignature_ConstantTime: 754,700 ns (754.7 μs) / 0 B
  • DeadLetterSinkBenchmarks.DeadLetterSink_EnqueueAsync: 2,862,000 ns (2.862 ms) / 0 B
  • WebhookSenderBenchmarks.WebhookSender_SendAsync_Success: 171,800,000 ns (171.8 ms) / 15,749 B (15.38 KB)

(A separate DefaultJob steady-state run inside benchmarks/EricksonLopez.Webhooks.Benchmarks/ reports 288.3 ns for ComputeSignature_SmallPayload, 1,406.8 ns for MediumPayload, and 479.7 ns / 360 B for VerifySignature_ConstantTime.)