hyperlane-plugin-webhook 22.14.1

A production inbound HTTP webhook verification plugin for the Hyperlane framework featuring zero-allocation precomputed-midstate pure-Rust HMAC-SHA256 (Hex, Base64, and Stripe-style timestamped schemes), per-route secret rotation, timestamp skew enforcement, 64-shard bounded TTL replay-nonce caching, and verified WebhookEvent Context injection.
Documentation

hyperlane-plugin-webhook

Inbound HTTP Webhook HMAC-SHA256 Verification & Replay-Defense Plugin

crates.io docs.rs Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

Opt-in request middleware (order -58) providing inbound HTTP webhook verification directly on Hyperlane Request::get_body(): zero-allocation precomputed-midstate pure-Rust FIPS 180-4 SHA-256 & RFC 4231 HMAC-SHA256 with constant-time signature checks (Hex, Base64, and Stripe-style t=...,v1=... timestamped schemes), per-route secret rotation, timestamp skew window enforcement, a 64-shard bounded TTL replay-nonce cache, and verified WebhookEvent metadata injected into Context attributes (ATTR_WEBHOOK_EVENT).

This crate is a member of the hyperlane unified Rust 2024 workspace. All plugin crates are opt-in and transparent (Status::Continue) when unconfigured.

Responsibilities & Module Layout

  • struct / enum / impl — HmacSha256Key, WebhookSecret, WebhookEndpoint, WebhookConfig, WebhookEvent, WebhookVerifier, WebhookPlugin, and WebhookHook (-58)
  • fn — Streaming FIPS 180-4 SHA-256, RFC 4231 HMAC-SHA256, constant-time byte equality, stack-allocated Hex/Base64 decoding, and Stripe signature header parsing

Installation

cargo add hyperlane-plugin-webhook

Verification

Run crate-scoped formatting, lint, and test gates from the workspace root:

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-webhook --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-webhook --all-features

Documentation & Governance

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.