<div align="center">
# hyperlane-plugin-webhook
**Inbound HTTP Webhook HMAC-SHA256 Verification & Replay-Defense Plugin**
[](https://crates.io/crates/hyperlane-plugin-webhook)
[](https://docs.rs/hyperlane-plugin-webhook)
[](https://www.rust-lang.org)
[](../../LICENSE)
[Workspace Overview](../../README.md) · [Plugin Catalog](../README.md) · [API Docs](https://docs.rs/hyperlane-plugin-webhook/latest/)
</div>
---
## 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`](../../README.md) 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
```sh
cargo add hyperlane-plugin-webhook
```
## Verification
Run crate-scoped formatting, lint, and test gates from the workspace root:
```sh
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
- Project standards and release workflows live in [`../../.agents/skills/hyperlane/SKILL.md`](../../.agents/skills/hyperlane/SKILL.md).
## License
This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.
## Contact
For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).