Skip to content

Gatekeeper

An audit-grade auth service where every access decision is explicit, logged and deny-by-default.

My role
Backend security engineer
When
2024
Status
Open source
Stack
Python, FastAPI, JWT (RS256)
Presenting the Gatekeeper security architecture

01

Where it started

Backends often bolt on authentication and validation as an afterthought, which leaves privilege-escalation paths and access decisions nobody can trace.

02

What I owned

Backend security engineer

03

How I built it

  • Signed tokens with RS256 key pairs and added a Redis revocation list, fixing stateless JWT's 'can't log you out' flaw.
  • Made every route declare its capability, so unannotated endpoints reject by default.
  • Validated every payload with strict Pydantic models, and emitted structured audit events for each auth decision.
[Incoming Request]
        │
        ▼
[TLS & Rate Limiter]
        │
        ▼
[Authentication Barrier]
  ├── Signature verification (RS256)
  ├── Expiry & revocation check (Redis)
  └── Tenant context extraction
        │
        ▼
[RBAC Gate (deny-by-default)]
        │
        ▼
[Structured Audit Logger]
        │
        ▼
[Protected Business Logic]
System architecture

Hardening: Constant-time comparison for secret hashes to remove timing attacks, with password hashing via Argon2id.

04

What changed

An auth service reviewers can audit end to end: no hidden trust, and every access path documented.

PythonFastAPIJWT (RS256)RedisPydanticArgon2id