Skip to content

Protect Upstreams

Gateway is the HTTP enforcement boundary for configured upstream resources.

A client sends an authorization bearer mandate, X-Caracal-Resource, and the intended HTTP request. Gateway resolves the configured zone/resource binding; callers do not select an arbitrary upstream.

sequenceDiagram
  participant Client
  participant Gateway
  participant STS
  participant Upstream
  Client->>Gateway: mandate + resource + HTTP request
  Gateway->>Gateway: verify token, replay, revocation, operation, path, binding
  Gateway->>STS: signed per-request exchange
  STS-->>Gateway: resource authority + private upstream directive
  Gateway->>Upstream: sanitized request + configured credential
  Upstream-->>Gateway: HTTP response or stream
  Gateway-->>Client: proxied response

Gateway does not contact the upstream when the bearer is missing, malformed, oversized, expiring, replayed, revoked, or signature-invalid; the resource header or binding is missing; an enforced operation/scope is absent; the path traverses; STS fails or its circuit is open; or host safety rejects the destination.

It rejects caller-supplied X-Caracal-Client-ID, strips hop-by-hop and caller authorization headers, and applies only the upstream credential returned through the trusted exchange.

ItemBehavior
PortLocal 8081
Liveness/readiness/health, /ready
Monitoring/metrics, /metrics.json
Request sizeMAX_REQUEST_BYTES, 10 MiB by default
HTTP streamingSupported, including SSE; revocation is rechecked between chunks
WebSocket upgradeNot supported; upgrade headers are stripped
Revocation reloadPOST /internal/revocations/reload, service/operator-internal only

Protect WebSocket services in process with a verification package or framework adapter.

Service environment variables are cataloged in Configure Service Environment.

Gateway depends synchronously on STS and needs Postgres/Redis-backed binding, key, replay, and revocation state. It buffers audit evidence in replay storage if Redis/Audit delivery is unavailable. In published modes, replay/JTI and authority uncertainty fail closed; JTI_FAIL_OPEN is forbidden.

Use Proxy Through Gateway for the client contract and Harden Production for network placement.

Ingest Audit Evidence.