API Gateway

Auth, rate limit, transforms, observability. The `gateway` section of axhub.yaml.

Why a gateway?

No need to reimplement auth and rate limits in every service. Declarative config, enforced at the edge.

Auth

axhub.yaml
gateway:
  auth:
    - type: oauth2
      issuer: https://accounts.google.com
    - type: api_key
      header: X-API-Key

OAuth2, API Key, and mTLS supported.

Rate limit

axhub.yaml
gateway:
  rate_limit:
    default: 100/min
    per_key: 1000/min

Request/response transforms

Header add/strip, CORS, body transforms.

Observability

Every request is logged with a trace ID. Audit collection in /concepts/rbac#audit.