81 Built-in Plugins
Every plugin ships in the default build, is tested together, and runs in a deterministic priority pipeline — no plugin marketplace roulette, no version matrices, no extra build flags.
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. A proxy or proxy-group instance replaces the global instance of the same name, several scoped instances of one plugin can coexist, and per-instance triggers can condition execution.
"stream": true Chat Completions requests and streams them end to end: OpenAI-compatible and Azure OpenAI pass through, while Anthropic and Gemini requests are translated and their streams normalized to OpenAI chunk events. Provider credentials are re-asserted over the final header map.mcp.* metadata for downstream policy.a2a.* metadata./specz sub-path with hardened fetch admission and egress screening./metrics endpoint in Prometheus exposition format, with bounded series and render caching./charges admin endpoint in Prometheus and JSON formats.schema_ref. Sensitive-key redaction always applies.serverless_function's AWS default credential chain use the
secrets-aws feature, which published binaries and images include. 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. Combine the first two snippets into one gateway document, then merge in the fragments you need: attach proxy-scoped IDs to orders-api.plugins, and global instances apply automatically. Every example validates with ferrum-edge validate on v0.9.21.
version: "1"
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
proxy_id: orders-api
enabled: true
config:
key_location: "header: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 | spiffe_identity | service
limits:
- scope: default
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 # enforce | monitor | disabled
paranoia_level: 2
default_rule_action: monitor
rule_modes:
FE-SQLI-002: enforce
plugin_configs:
- id: "pii-shield"
plugin_name: "ai_prompt_shield"
scope: proxy
proxy_id: orders-api
enabled: true
config:
action: redact # reject | redact | warn
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
proxy_id: orders-api
enabled: true
config:
abort:
percentage: 2.0
status_code: 503
delay:
percentage: 10.0
duration_ms: 250
plugin_configs:
- id: "tracing"
plugin_name: "otel_tracing"
scope: global
enabled: true
config:
endpoint: "https://otel-collector:4318/v1/traces"
service_name: "ferrum-edge"
root_sampling: ratio
root_sampling_ratio: 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.