Plugins
Modular components to intercept and modify API traffic in API7 Gateway.
A plugin is a modular component that intercepts and modifies the request and response flow through the gateway. API7 Gateway includes over 100 plugins for authentication, traffic control, observability, security, and AI capabilities.
Plugin execution
The gateway executes plugins in order of priority. A plugin with a higher priority number runs before a plugin with a lower priority number. Authentication therefore completes before traffic control or proxying.
Plugin scopes
You can apply plugins at different levels of the configuration hierarchy:
- Route level: Applied to a specific route. Only affects traffic matching that route.
- Service level: Applied to a service. Affects all routes within that service.
- Consumer level: Applied to a specific consumer. Affects all traffic identified as belonging to that consumer.
- Global rule: Applied to an entire gateway group. Affects all routes managed by that group.
Plugin categories
API7 Gateway categorizes plugins by their primary function. The following table provides examples of commonly used enterprise plugins:
| Category | Examples |
|---|---|
| Authentication | key-auth, jwt-auth, basic-auth, hmac-auth, openid-connect, ldap-auth, multi-auth |
| Traffic Control | limit-count, limit-req, limit-conn, limit-count-advanced, api-breaker, traffic-split |
| Transformation | proxy-rewrite, response-rewrite, body-transformer, grpc-transcode |
| Observability | prometheus, opentelemetry, http-logger, kafka-logger, loki-logger, splunk-hec-logging |
| Security | cors, ip-restriction, ua-restriction, consumer-restriction, csrf, data-mask, opa, chaitin-waf |
| AI Traffic | ai-proxy, ai-proxy-multi, ai-rate-limiting, ai-rag, ai-prompt-template, ai-prompt-guard |
| Serverless | aws-lambda, azure-functions, serverless-pre-function, serverless-post-function |
Plugin metadata
Some plugins require shared configuration across all instances of that plugin type, which is held in plugin metadata. For example, define a shared Kafka broker address in the kafka-logger metadata, and every instance of the plugin then uses it.
Related
Tasks that use this concept
- Configure Rate Limiting — protect your services from traffic spikes.
- Develop Custom Lua Plugins — extend the gateway with your own logic.
- Conditionally Disable Global Plugins
- Plugin Development Best Practices
Related concepts
- Services and Routes — learn how plugins attach to services and routes.