hyperlane-plugin-tenant 23.3.2

A zero-allocation multi-tenant resolution and isolation plugin for the Hyperlane framework supporting X-Tenant-Id header, Host subdomain, and path-prefix extraction, XxHash3_64 tenant registry, pluggable TenantResolver, and prebuilt 400/403/404 wire responses.
Documentation

hyperlane-plugin-tenant

Zero-Allocation Multi-Tenant Resolution & Isolation Plugin

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-tenant resolves and validates tenant identity across headers, subdomains, and path prefixes for multi-tenant hyperlane services (hook order -98). It is opt-in and transparent (Status::Continue) when unconfigured.

Installation

cargo add hyperlane-plugin-tenant

Usage

use hyperlane_plugin_tenant::{TenantConfig, TenantPlugin};

fn setup_tenant() {
    TenantPlugin::init(TenantConfig::default());
}

Verification

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

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.