veza/veza-backend-api/internal/services/hyperswitch
senke 6773f66dd3 fix(webhooks): bump MaxWebhookPayloadBytes 64KB → 256KB — v1.0.7 pre-rc1 (task #44)
Closes task #44 ahead of v1.0.7-rc1 tag. Dispute-class webhooks
(axis-1 P1.6, v1.0.8 scope) may carry metadata beyond the typical
1-5 KB event size — a 64KB cap created a non-zero risk of silent
drops that exactly the wrong class of event to lose. 256KB gives
10x headroom above the inflated-dispute ceiling while staying
tightly bounded against log-spam DoS: sustained ceiling at the
rate-limit floor is ~25MB/s, cleaned daily.

Rationale documented in the comment above the const so future
readers see the reasoning before the number. The rate limit
remains the primary DoS defense; this cap is defense in depth.

No live Hyperswitch docs verification (no internet access in this
session) — decision based on typical PSP webhook shapes + user's
explicit flag that losing a legit dispute = weekend lost. Task
#44 closed with that caveat noted; a proper docs review can
re-tune if observed traffic shows the 256KB ceiling is also too
aggressive (unlikely).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 04:05:16 +02:00
..
client.go feat(workers): hyperswitch reconciliation sweep for stuck pending states — v1.0.7 item C 2026-04-18 03:08:15 +02:00
client_test.go fix(hyperswitch): idempotency-key on create-payment and create-refund — v1.0.7 item D 2026-04-18 02:30:02 +02:00
provider.go feat(workers): hyperswitch reconciliation sweep for stuck pending states — v1.0.7 item C 2026-04-18 03:08:15 +02:00
webhook.go chore: consolidate pending changes (Hyperswitch, PostCard, dashboard, stream server, etc.) 2026-02-14 21:45:15 +01:00
webhook_log.go fix(webhooks): bump MaxWebhookPayloadBytes 64KB → 256KB — v1.0.7 pre-rc1 (task #44) 2026-04-18 04:05:16 +02:00
webhook_log_test.go feat(webhooks): persist raw hyperswitch payloads to audit log — v1.0.7 item E 2026-04-18 02:44:58 +02:00
webhook_test.go chore: consolidate pending changes (Hyperswitch, PostCard, dashboard, stream server, etc.) 2026-02-14 21:45:15 +01:00