SECURITY.md: Sentin8 Platform — Security Model & Post-Quantum Architecture
This document is canonical and identical across every repository of the Sentin8 tree. It describes the security posture of the platform, not of any single service: every service — platform or vertical — inherits this model by construction, not by configuration.
Audience: security engineers, auditors, compliance officers, architects, and anyone evaluating what Sentin8 guarantees. For per-service architecture read that service's
README.md; for wire-level detail read itsDESIGN.md.
1. Executive Summary — The Security Model in One Page
Sentin8 is a post-quantum, zero-static-secret, live-authorization platform. It was designed for regulated, multi-tenant, multi-vertical operation (finance, hospitality, health) where the threat model includes nation-state harvest-now-decrypt-later collection, insider privilege escalation, and credential theft — not just opportunistic web attacks.
The model rests on five pillars:
- Post-quantum cryptography, exclusively. Every TLS connection in the platform — client→ingress, proxy→service, service→service, service→data — negotiates X25519MLKEM768 key exchange with ML-DSA-65 certificate signatures, anchored by an SLH-DSA-SHA2-128s (hash-based) root CA. The default TLS mode is exclusive: no classical fallback exists. Recorded traffic is quantum-resistant today; there is nothing to "migrate later".
- One identity plane. Sentin8:Auth is the only token issuer, the only JWKS authority, and the only authentication authority in the platform. No service mints its own sessions, tokens, or credentials — so there is no second issuer to compromise and no fragmented trust to reconcile.
- Live authorization — Shield. Authorization is decided per request by one embedded policy engine (Shield) that unifies RBAC, ABAC, and ReBAC. Roles are never embedded in tokens: they are resolved live from the identity plane on every request. A demoted administrator loses access on the next request — not at token expiry, not at midnight.
- Mandatory tenant isolation in the database itself. Every tenant table
carries
ENABLE+FORCE ROW LEVEL SECURITY; no role on the cluster carriesBYPASSRLS— not the event relays, not the schedulers, not anyone. Services connect as OAuth-authenticated per-service roles scoped to their own database and schema. Isolation is not an application convention; it is enforced by PostgreSQL on every row read. - Certificate-only workload identity — zero static secrets. A workload's
only identity is its Acme-issued client certificate (
CN=m2m-{workload}) presented in the TLS handshake. There are no client secrets, no static API keys, no password files anywhere in the service-to-service plane. A stolen configuration file grants nothing; a stolen database dump decrypts nothing.
Wrapped around the pillars is a fail-closed discipline: an unresolvable
hostname is a 421, not a guess; an unparsable policy set at boot is a
refused startup, not a warning; a role-resolution outage is a deny, not an
allow; an unauditable action is an action that never happened.
2. Security Architecture at a Glance
Every request into the platform walks the same eight-step pipeline. The steps are mandatory and ordered; no handler may skip one:
The properties this buys:
- The proxy never sees application plaintext. It is an L4 SNI router; TLS terminates inside the owning service, in-process.
- Context headers cannot be spoofed. The TLS layer strips every
client-supplied
X-Sentin8-*header before injecting its own authoritative values; an unresolvableHostis rejected with421 Misdirected Request. - The decision is never stale. Steps 5–6 consult live identity state and live policy data on every request.
- The database is the last wall, not the only one. Every handler also
carries explicit
WHERE env_id = $Nclauses — RLS is the backstop, defense-in-depth is primary.