Sentinel-gate
Sentinel-gate on Hacker News
Hi HN, I'm Andrea.
I run AI agents connected to databases, APIs, and filesystems. The problem: every agent gets full access to everything, with no enforcement layer between intent and execution.
SentinelGate is a firewall that sits between the agent and the system. Start the server, wrap any agent:
sentinel-gate start # MCP proxy only
sentinel-gate run -- python my_agent.py # full protection
It auto-detects the runtime (Claude Code, Gemini CLI, Python, Node.js) and injects interceptors. Every action is evaluated against CEL policy rules before execution. Denied actions never happen.
Three layers: MCP proxy, HTTP gateway, runtime hooks — one port, one Go binary, one Admin UI with audit trail.
Honest about limitations: runtime hooks are best-effort — a hostile agent can bypass them via FFI or raw sockets. The HTTP gateway adds network-level enforcement. Together they give you defense in depth, not an OS-level sandbox.
AGPL-3.0. Commercial licenses available.
What's missing?
Posted by
Sentinel-gate on Wednesday February 18, 2026 @09:12AM
from the show-hn dept.
Fair point, if it's a true point-to-point VPN between just the two boxes, there's not much "in between" to worry about. TLS on top is mostly defense in depth at that point. What I had in mind was the more common setup where your app and DB sit on a shared network (VPC, corporate LAN). The traffic between them is unencrypted, and you're trusting every piece of infrastructure in that path (switches, hypervisors, sidecar containers) to not be compromised.
Encrypted in transit yes, but only between the VPN endpoints. Anything already inside the network (compromised host, rogue container, bad route) sees your queries in cleartext.
TLS on the connection itself gives you end-to-end encryption between your app and Postgres, no matter what's going on in the network in between. Same reason people moved to HTTPS everywhere instead of just trusting the corporate firewall. And with connection pooling you pay the TLS handshake once and reuse it, so the overhead is basically nothing.
Exactly, and that's one more reason I went with a userspace proxy — no kernel deps, runs anywhere, way easier to debug.
True, but logging tells you what happened, a proxy lets you decide what's allowed to happen before it hits the database. Policy enforcement, tenant isolation, that kind of thing. They're complementary really.
Yeah, more and more. Zero-trust is pushing TLS everywhere, even inside VPNs — lateral movement is a real thing. And several compliance frameworks now expect encryption in transit regardless of network topology. With connection pooling the overhead is basically zero anyway.
The proxy vs packet capture debate is a bit of a non-debate in practice — the moment TLS is on (and it should always be on), packet capture sees nothing useful. eBPF is interesting for observability but it works at the network/syscall level — doing actual SQL-level inspection or blocking through eBPF would mean reassembling TCP streams and parsing the Postgres wire protocol in kernel space, which is not really practical.
I've been building a Postgres wire protocol proxy in Go and the latency concern is the thing people always bring up first, but it's the wrong thing to worry about. A proxy adds microseconds, your queries take milliseconds. Nobody will ever notice. The actual hard part — the thing that will eat weeks of your life — is implementing the wire protocol correctly. Everyone starts with simple query messages and thinks they're 80% done. Then you hit the extended query protocol (Parse/Bind/Execute), prepared statements, COPY, notifications, and you realize the simple path was maybe 20% of what Postgres actually does. Once you get through that though, monitoring becomes almost a side effect. You're already parsing every query, so you can filter them, enforce policies, do tenant-level isolation, rotate credentials — things that are fundamentally impossible with any passive approach.
You're right, the GRANT layer is closed by default in PostgreSQL and PostgREST respects that. But in practice with Supabase, the very first thing you do is `GRANT ALL ON table TO authenticated` (and often `anon`) because nothing works through the client SDK without it. Every tutorial does this, every LLM-generated scaffold does this. At that point the first two layers are effectively gone and RLS is what's left. That's what I meant — not that PostgreSQL lacks defense in depth, but that Supabase's typical workflow collapses it down to one layer pretty quickly.
Good to hear they're working on closed-by-default though. Kind of proves the point that the current model has been a problem in practice.
The prompt injection thing is especially nasty for agents because they process untrusted input (web pages, emails, documents) and can take real actions. With a chatbot, prompt injection makes it say something dumb. With an agent that acts as you, a malicious payload hidden in an email could make it forward your contacts, reply on your behalf, whatever. You can't fix this in the model alone — you need an enforcement layer outside the model that limits what it can actually do regardless of what it thinks it should do. I'd bet Apple is working on exactly this and it's why they're taking their time.
RLS on Postgres is fine — I use it in production for tenant isolation and it works great. The problem is that Supabase puts it as the only thing standing between the public internet and your data. PostgREST translates HTTP straight into SQL, so if you get a policy wrong (or forget one), game over. Behind a normal backend, a bad RLS policy is a defense-in-depth failure. In Supabase's model, it's a breach. That's a huge difference, and it gets worse when LLMs are writing the code because they'll happily scaffold a full app without ever thinking about access control.
Hi HN,
MCP gives agents access to tools — databases, file systems, APIs. The problem is there's no access control layer. An agent with a database tool can run any query. An agent with file access can read anything. The only safeguard right now is a user clicking "Allow" on a prompt they probably won't read.
Sentinel Gate is a proxy that sits between your MCP client and servers. Every tool call gets checked against RBAC policies before it reaches the server.
The key design decision: *deterministic rules, not AI*. Policies are written in CEL (Common Expression Language). If a rule says deny, it denies. No LLM in the security path, no prompt injection possible against the firewall itself. You get a full audit log of every tool call — what was requested, what was allowed, what was blocked.
Built in Go. Self-hosted. PostgreSQL for audit logs, Redis for sessions. AGPL-3.0.
It's early — we're looking for feedback from teams running MCP in production or planning to. What's missing? What would make this useful for your setup?
Posted by
Sentinel-gate on Tuesday February 03, 2026 @09:14AM
from the show-hn dept.