A Context-Aware Zero Trust API Gateway with Observability
ZeroTrustGate is a production-style Zero Trust gateway that enforces per-request authentication, authorization, and context validation, while providing real-time security observability through Prometheus and Grafana.
The project demonstrates how Zero Trust principles work in practice, including token replay protection, context binding, and measurable security signals — all orchestrated with Docker Compose.
- No implicit trust after authentication
- Every request must present a valid JWT
- Role-based authorization at the gateway
- Explicit failure paths (401 / 403)
- JWTs are bound to User-Agent context
- Token replay attempts from different clients are blocked
- Designed to work correctly in containerized / proxy environments
- Prometheus metrics exposed via
/metrics - Accurate counters for:
- Total gateway requests
- Authentication failures
- Expired token rejections
- Grafana dashboards for real-time visibility
- Dockerfiles for all services
- Docker Compose orchestration
- Persistent volumes for Prometheus and Grafana
- One-command startup and shutdown
Browser / Client
|
v
+-------------------+
| Auth Service | (FastAPI)
| Issues JWTs |
+-------------------+
|
v
+-------------------+
| API Gateway | (Node.js / Fastify)
| - Auth Check |
| - Authorization |
| - Context Check |
+-------------------+
|
v
+-------------------+
| Protected APIs |
+-------------------+
Gateway Metrics → Prometheus → Grafana
| Layer | Technology |
|---|---|
| Auth Service | Python, FastAPI |
| API Gateway | Node.js, Fastify |
| Frontend | Next.js (minimal demo client) |
| Metrics | Prometheus |
| Dashboards | Grafana |
| Orchestration | Docker Compose |
zero-trust-gate/
├── auth-service/
├── gateway/
├── frontend/
├── prometheus/
├── docker-compose.yml
└── README.md
docker compose up --build✔ Feature complete
✔ Demo ready
✔ Dockerized
✔ Observable
✔ Interview-defensible
Koushik Panchadarla
- Built as a security-focused backend infrastructure project to demonstrate Zero Trust principles in real systems.