ZTGIT

Reverse proxy, WAF and API gateway: who sits in front of your app

ZTGIT team

Between the internet and your application there is usually more than one piece. They get confused because they all “sit in front,” but they do different jobs. Understanding who does what avoids both the security gap and the pointless duplication.

Reverse proxy — the front door

A reverse proxy is what receives the connection coming from outside and forwards it to the right application inside. It is the door: a single public point, behind which many services can exist. What it typically does:

  • terminates TLS (the padlock), centralizing certificates in one place;
  • routes by domain or path — api.example.com goes to one service, app.example.com to another;
  • balances load across several instances;
  • hides the internal topology from the outside.

The reverse proxy does not, by default, understand whether a request is an attack. It delivers it. That is where the other two pieces come in.

WAF — the web content filter

A WAF (Web Application Firewall) inspects the content of HTTP requests for attack patterns: SQL injection, cross-site scripting (XSS), directory traversal attempts, exploitation of known flaws. While a network firewall looks at ports and IPs, the WAF looks at what goes inside the web request.

It is a layer of defense, not a cure: a WAF reduces noise and blocks the generic attack, but does not replace fixing the flaw in the application. Think of it as the detector at the door, not the lock on the safe.

API gateway — the front of the APIs

An API gateway specializes in APIs. Besides routing, it handles:

  • authentication and authorization by key, token or identity;
  • rate limiting, so one client cannot bring the service down;
  • versioning and routing per route;
  • metering of each call.

Where the reverse proxy thinks in “sites,” the API gateway thinks in “endpoints” and in “who may call what, how many times.”

How they stack

It is not “pick one.” At a well-built edge, they stack: the reverse proxy receives and terminates TLS; the WAF inspects the content; the API gateway handles API routes. And above it all, the zero trust principle: even reaching the edge does not grant access — each resource still decides by identity.

Piece Question it answers
Reverse proxy “which service does this connection go to?”
WAF “does this request look like an attack?”
API gateway “who is calling this API, and may they?”

In ZTGIT

ZTGIT-EdgeProxy is the edge reverse proxy; ZTGIT-WAF inspects web traffic; ZTGIT-APIGateway governs the APIs; and ZTGIT-AccessControl enforces the access policy. All run from images built from source, pinned by digest and signed — because the layer all traffic crosses must be trustworthy.

Catalogue status: ZTGIT-WAF is still in preparation; each component page shows its current state.

From the blog