Expand description
hyperlane-plugin-tenant
Multi-tenant resolution and isolation middleware for Hyperlane supporting
header, host-subdomain, and path-prefix tenant extraction, XxHash3_64
registry lookups, pluggable TenantResolver hooks, and prebuilt error
wire responses.
Structs§
- Tenant
Config - Configuration for
TenantPlugin. - Tenant
Context - Resolved tenant context attached to Hyperlane
ContextunderATTR_TENANT_CONTEXT. - Tenant
Hook - Opt-in request middleware resolving tenant identity and enforcing isolation.
- Tenant
Plugin - Compiled multi-tenant resolution engine backing
TenantHook. - Tenant
Record - Tenant metadata entry stored in the registry or returned by
TenantResolver.
Enums§
- Tenant
Resolution - Resolution outcome produced by
TenantPlugin::resolve. - Tenant
Source - Strategy used to extract a raw tenant identifier from an incoming request.
- Tenant
Status - Lifecycle status of a registered tenant.
Constants§
- ATTR_
TENANT_ CONTEXT - Context attribute key storing resolved [
TenantContext]. - DEFAULT_
MISSING_ TENANT_ BODY - Default JSON body emitted when no tenant identifier is supplied (
400). - DEFAULT_
SUSPENDED_ TENANT_ BODY - Default JSON body emitted when a tenant is suspended (
403). - DEFAULT_
TENANT_ ERROR_ CONTENT_ TYPE - Default
Content-Typefor tenant error responses. - DEFAULT_
TENANT_ HEADER - Default header inspected for tenant identification (
x-tenant-id). - DEFAULT_
UNKNOWN_ TENANT_ BODY - Default JSON body emitted when a tenant identifier is unknown (
404). - MAX_
TENANT_ ID_ LEN - Maximum accepted byte length of a tenant identifier (
64).
Traits§
- Tenant
Resolver - Custom tenant directory resolver for dynamic database or cache lookups.
Functions§
- is_
valid_ tenant_ id - Validates that a tenant identifier is non-empty,
<= MAX_TENANT_ID_LEN, and[a-zA-Z0-9_-].