Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
1 / 5
0

Introducing Zopa: a 60 KB authorization engine for proxy-wasm, written in Zig

DEV Community·kt·23 days ago
#yKc4rRUC
Reading 0:00
15s threshold

There are plenty of times you want to delegate "let this request through, or block it" to a wasm filter inside Envoy. API gateways, service mesh boundaries, L7 checkpoints. The default move is to use OPA's wasm build. The trouble is OPA-as-wasm is heavy. The Go runtime, the Rego parser, and the evaluator are all in there. You only want to return allow/deny at the edge, but you ship something many times the size of the evaluator. Cedar and Casbin don't ship official wasm builds (as of May 2026). The slot for "drop-in proxy-wasm authorization filter" is empty. zopa is what I built to fill that slot. A Zig wasm32-freestanding binary, ~60 KB at release. No GC; memory turns over on a per-request arena. It runs on any host that implements proxy-wasm 0.2.1 (Envoy / wasmtime / wamr / v8). Big picture Zopa assumes you separate where you write policy from where you evaluate it . Policy authors write rules in Rego (OPA's policy language; a declarative DSL in the Datalog family).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More