Case Study 01

Designing a Zero-Trust Authentication Platform

Central SSO · headless token authority · custom RBAC · HMAC service mesh

JWT RS256/RS512 OIDC · PKCE Redis sessions HMAC-SHA256 RBAC

The problem

The estate had grown as a set of independently built portals, each with its own login and user store. A user needed a different credential for every application, administrators had no single place to grant or revoke access, and there was no consistent way for one service to trust a request from another. The goal was a single identity for every user and no implicit trust anywhere — between a browser and a service, or between two services.

Design constraints

Architecture

Responsibilities were deliberately split into two services. A user-facing SSO portal authenticates the person (password + TOTP, or federated Google within the organisation domain) but never mints tokens. A headless token authority owns the entire token lifecycle and is called service-to-service.

Token design

Custom RBAC — a role × office × application model

Off-the-shelf role systems assume flat, global roles. The organisation is a deep hierarchy (zone → circle → division → sub-division), and the same role means different things in different offices and applications. Authorization is therefore modelled as a triple — { role, office, application } — attached to a user. Offices form a self-referential tree; roles carry granular boolean permissions and a delegation graph describing which roles may grant which. Role changes and office re-parenting are transactional and fully audited (with time-expiring audit logs).

Zero-trust service mesh

No service trusts another because they share a cluster. Every internal call is signed with HMAC-SHA256 over a canonicalised payload and timestamp, verified with a constant-time comparison inside a 5-minute replay window, and attributed to a named caller. Downstream services verify access tokens locally (signature + Redis context check) rather than round-tripping to the auth service on every request — so the auth service is on the path only for refresh and issuance.

The security controls — signing, verification, rate limiting, headers, device identity — live in a shared library, so every current and future service inherits the same hardened defaults rather than re-implementing them.

Outcome

A user now signs in once and moves across ~20 applications with a single governed identity; administrators grant and revoke access from one place; and no request — from a browser or another service — is trusted without cryptographic proof. An OIDC provider (authorization-code + PKCE) extends the same identity to third-party tools such as the monitoring stack.

← Back to the journey · Next: Swarm → GKE →