80 Built-in Plugins
Every capability built in, tested together, and executed in a deterministic priority pipeline — no plugin marketplace roulette, no version matrices.
Deterministic Pipeline
Plugins execute in priority order (lower runs first) through bands: early traffic control → authentication → authorization & admission → transformation → response → logging. Ordering is predictable and documented.
Protocol Aware
Each plugin declares which protocols it supports — HTTP, gRPC, WebSocket, TCP, UDP — and the gateway automatically skips plugins that don't apply to the current request's protocol.
Three Scopes
Global applies to all proxies, proxy to one, and proxy_group shares a single stateful instance (e.g. one rate-limit budget) across a set of proxies. Scoped plugins override global ones of the same name.
"stream": true requests to the matched provider and normalizes provider-native SSE (Anthropic, Gemini) to OpenAI chunk events — true end-to-end streaming, no buffering.mcp.* metadata for downstream policy.a2a.* metadata./specz sub-path with hardened fetch admission and egress screening./charges admin endpoint in Prometheus and JSON formats.transaction_log_schema plugin lets you rename, drop,
reorder, and derive fields in every log sink's output without forking the gateway. The canonical execution
order and per-protocol support matrix live in the
plugin execution order docs,
with detailed per-plugin configuration in
docs/plugins.md.
Common Plugin Stacks
Plugins compose — here are four stacks teams deploy most often.
🔐 Securing a Public API
Layered defense from cheap checks to deep inspection:
ip_restriction → bot_detection → cors →
jwks_auth → access_control → rate_limiting (Redis) →
waf → openapi_validator → security_headers →
prometheus_metrics + http_logging
🤖 Production AI Gateway
Cost, safety, and compliance for LLM traffic:
key_auth → ai_transcript_audit → ai_prompt_shield →
ai_semantic_firewall → ai_request_guard → ai_tool_governor →
ai_stream_router + ai_semantic_cache + ai_federation →
ai_token_metrics → ai_rate_limiter
🛡 Protecting Fragile Backends
Keep legacy or capacity-limited services healthy:
rate_limiting → adaptive_concurrency →
request_size_limiting → request_deduplication →
response_caching → compression → proxy_alerts
🔬 Zero-Risk Migration Testing
Validate a new backend against production traffic:
request_mirror (sampled shadow traffic to the new service) +
response_mock (stub unfinished endpoints) +
fault_injection (verify client resilience) +
load_testing (on-demand full-pipeline load) →
otel_tracing + transaction_debugger
Plugin Config Reference
Plugins are defined as plugin_configs entries and attached globally, per proxy, or per proxy group.
proxies:
- id: "orders-api"
listen_path: "/orders"
backend_scheme: http
backend_host: "orders-service"
backend_port: 3000
plugins:
- plugin_config_id: "team-key-auth"
- plugin_config_id: "team-rate-limit"
plugin_configs:
- id: "team-key-auth"
plugin_name: "key_auth"
scope: proxy
enabled: true
config:
key_names: ["X-API-Key"]
hide_credentials: true
plugin_configs:
- id: "team-rate-limit"
plugin_name: "rate_limiting"
scope: proxy_group # shared budget across the group
enabled: true
config:
limit_by: consumer # ip | consumer
requests_per_minute: 1000
sync_mode: redis # coordinate across DPs
redis_url: "redis://redis:6379"
redis_failure_policy: fail_closed
expose_headers: true
plugin_configs:
- id: "edge-waf"
plugin_name: "waf"
scope: global
enabled: true
config:
mode: monitor # monitor | enforce
paranoia_level: 2
decode_body: true
rule_overrides:
- rule: sqli_generic
action: enforce
plugin_configs:
- id: "pii-shield"
plugin_name: "ai_prompt_shield"
scope: proxy
enabled: true
config:
action: redact # reject | redact | warn
builtin_patterns:
- ssn
- credit_card
- api_key
custom_patterns:
- name: employee_id
regex: "EMP-\\d{6}"
plugin_configs:
- id: "chaos"
plugin_name: "fault_injection"
scope: proxy
enabled: true
config:
abort:
percentage: 2.0
http_status: 503
delay:
percentage: 10.0
duration_ms: 250
plugin_configs:
- id: "tracing"
plugin_name: "otel_tracing"
scope: global
enabled: true
config:
otlp_endpoint: "http://otel-collector:4318"
service_name: "ferrum-edge"
sample_rate: 0.25
Need a Custom Plugin?
Write custom plugins in Rust — drop them in custom_plugins/ and they're auto-discovered
at build time, with full lifecycle hooks and even their own database migrations.