Centralized repository to store, version, and manage reusable gateway policies for the WSO2 API Platform.
This repository contains the source code and documentation for all gateway policies published to the API Platform Policy Hub. Policies are versioned independently and can be included in custom gateway builds via the ap CLI tool.
For the full policy catalog with descriptions and links, see docs/README.md.
The WSO2 API Platform is a complete API management and gateway system for managing, securing, and routing traffic to backend services. It supports REST APIs, AI/LLM APIs, and MCP (Model Context Protocol) servers.
| Component | Purpose |
|---|---|
| Gateway Controller | Control plane that manages API configurations and dynamically configures the router |
| Gateway Runtime | Data plane (Envoy Proxy) that routes HTTP/HTTPS traffic and processes requests through policies |
| Policy Builder | Build-time tooling for compiling custom policy implementations into gateway images |
ap CLI |
Command-line interface for managing gateways, APIs, MCP proxies, and custom builds |
A policy is a pluggable unit of behavior that runs in the gateway request or response pipeline. Policies can be applied at the API level (all operations) or at individual operation level, and can run on requests, responses, or both.
Policies handle cross-cutting concerns such as authentication, rate limiting, header manipulation, payload transformation, content moderation, and LLM-specific controls (prompt decoration, semantic caching, token limits, guardrails). Multiple policies can be chained together on the same API or operation.
Each policy in this repository is versioned independently. When a new version is published, older versions remain available so existing deployments are not affected.
The ap CLI lets you build a custom gateway image that includes any combination of hub policies (from this repository) and local policies (your own implementations).
See Customizing Gateway Policies in the API Platform documentation for full instructions.
See docs/README.md for the full list of available policies organized by category, with descriptions and links to the latest documentation for each.