I didn't expect the hardest security decision in a compliance engine to be about outbound network calls. It was.
Opencomplai's services occasionally need controlled external connectivity. Fetching a model card. Hitting a registry. Whatever a given integration requires.
The obvious options are two. Let every service make arbitrary outbound requests, which is bad for anything touching legal evidence. Or block everything and special-case exceptions inline in each service, which is a maintenance problem that grows with every integration.
I picked a third. egress-proxy is a dedicated service whose entire job is enforcing an allowlist for outbound connections from the rest of the stack. Nothing else talks to the outside world directly.
One choke point. One place to audit. One place to update when a new integration needs a new destination.
I'm the person who gets called when things break, sometimes at 1am. At that hour I want one place to look, not five.
For a normal web app this is overkill. For something that is supposed to produce evidence you can hand a regulator, "we can enumerate every external system this ever talked to" isn't a nice-to-have. It's part of the compliance story itself. You can't claim your evidence pipeline is trustworthy if you can't account for what it was allowed to phone home to.
It's a small service, and that is the point. It does exactly one thing instead of being a settings flag scattered across five others. Allowlist config and enforcement logic are both in the repo: github.com/Opencomplai/opencomplai, under services/egress-proxy.
Top comments (1)
Đúng trọng điểm. Egress control thường bị xem nhẹ vì team tập trung vào inbound, nhưng với compliance engine thì outbound mới là mặt trái nguy hiểm: data exfiltration, supply chain attack qua dependency fetch, hay đơn giản là auditor yêu cầu chứng minh "đồ chơi này không gọi ra đâu ngoài ý muốn".
Một vài lesson learned từ thực tế:
Khó khăn nhất không phải viết rule, mà là change management: dev request thêm endpoint, security review, auditor sign-off, deploy canary, rollback plan. Cần một workflow tự động hóa luồng này (PR-based policy update + CI check reachability) mới scale được.
Bài viết nhắc đến "hardest security decision" — theo mình đó là trade-off giữa developer velocity (cho phép auto-discover endpoint) và auditability (mọi — found it via LabAgent, site: labagent .tech