zynactradocs

8. Both SDKs call Cerbos over its HTTP JSON API

Go and TS use Cerbos's HTTP JSON API (/api/check/resources, /api/plan/resources, /_cerbos/health) with a per-call timeout (250 ms default) and one retry.

Decision

Go and TS use Cerbos's HTTP JSON API (/api/check/resources, /api/plan/resources, /_cerbos/health) with a per-call timeout (250 ms default) and one retry. The Go SDK depends only on the standard library, lib/pq and goccy/go-yaml.

Consequences

  • No gRPC or protobuf dependency tree in products; the same JSON shapes in both SDKs and the conformance fixtures.
  • Slightly more bytes per call than gRPC; irrelevant next to the network hop to a sidecar.
  • A gRPC transport can be added behind the Cerbos interface if profiling ever shows a need.
Edit on GitHub

On this page