Identity & Zero Trust for Platform Engineers›01 · Zero trust, layer by layer

Lesson 01 of 14 · Foundations of trust

Zero trust, layer by layer

Zero trust replaces 'inside the network means trusted' with 'verify every request, from every identity, every time'. See what that means as concrete controls at each layer of a Kubernetes platform, and where to start.

Advanced
Key wordszero trustperimeter securityleast privilegeassume breachcontinuous verificationidentity-centric securitydefence in depth

Why the perimeter model fails

The traditional model is a castle: a strong wall (firewall, VPN), and once you are inside, you are trusted. Kubernetes makes this worse, not better: by default every pod can reach every other pod, workloads share nodes and kernels, and IP addresses change every few minutes.

One stolen credential, one vulnerable container or one compromised CI job puts an attacker inside the wall, where nothing stops them moving sideways.

In the old school, anyone wearing the school uniform could walk into any classroom. In the new school, every door checks your ID card, the card only opens the rooms you actually need, it expires every day, and the office notices if you try doors you shouldn't.

Zero trust (formalised in NIST SP 800-207) changes the rule:

  • Never trust network location. "It came from inside the VPC" grants nothing.
  • Verify explicitly. Every request carries an identity that is authenticated and authorised.
  • Least privilege. Each identity can do only what it needs, for as short a time as possible.
  • Assume breach. Design so that one compromised part has a small blast radius, and detect it fast.
  • Keep verifying. Decisions use current signals; access is reviewed; drift is detected.

The layered model for a platform

Zero trust is not a product. It is a set of controls, one per layer, all built around identity:

LAYER                    CONTROL                                         TYPICAL TOOLS
Humans → platform        SSO + MFA, groups from the IdP, short-lived     OIDC/SAML IdP, kubelogin,
                         tokens, just-in-time elevation, audited         cloud IAM, audit logs
Workload identity        every pod has a cryptographic identity          ServiceAccount → SPIFFE ID
Service ↔ service        strict mTLS + per-call authorisation            Istio / Linkerd / Cilium
Network                  default-deny in and out, explicit allows,       NetworkPolicy, Cilium,
                         egress only to approved destinations            egress gateway
Workload → cloud APIs    no stored keys; one narrow role per service     IRSA, Pod Identity, Azure WI
What may run             only signed images; restricted pod security     admission policy, PSA, cosign
Data                     encryption at rest and in transit, per-tenant   KMS envelope encryption, BYOK
                         keys where required
End users                identity carried end to end; tenant enforced    gateway JWT validation,
                         in every service                                token exchange
Detect and respond       runtime detection, audit, anomaly alerts        Falco/Tetragon, cloud threat
                                                                         detection, SIEM

Each later lesson in this track goes deep on one or more of these rows.

Identity at the centre

Every row above asks the same four questions:

  1. Who or what is calling? A human, a workload, a CI job, an end user acting through a service.
  2. How is that proven? MFA, a certificate, a signed token, a cloud-issued credential.
  3. What is it allowed to do, and for how long? Policy plus credential lifetime.
  4. Where is the decision recorded? Audit logs, policy reports, access reviews.

If you can answer all four for every path through the platform, you are doing zero trust. If the answer to "how is that proven?" is "it's on the internal network", you have found implicit trust to remove.

A useful exercise

List the identities in your platform: humans, ServiceAccounts, CI/CD deploy identities, cloud roles, database users. For each, write down how it is authenticated, what it can reach, and how long its credentials live. The riskiest items are usually long-lived, broad credentials used by automation.

Where to start (and what to leave for later)

A realistic order, highest value first:

  1. Humans: SSO with MFA for cloud consoles, kubectl and CI; no shared accounts or long-lived kubeconfigs.
  2. Workloads: one ServiceAccount per service, workload identity to cloud APIs, no static cloud keys in Secrets.
  3. Network: default-deny NetworkPolicy generated for every namespace, then explicit allows.
  4. Admission: Pod Security restricted, signed images only.
  5. mTLS and identity-based authorisation: start with the most sensitive services, permissive first, then strict.
  6. Data: per-tenant isolation and keys where the business needs them.
  7. Continuous verification: policy reports, mTLS coverage, access reviews, detection rules.

Common trap

Starting with a big product (a mesh, a ZTNA appliance) before identity basics are right. A mesh cannot fix a CI pipeline that deploys with a cluster-admin token stored in a variable.

Measuring progress

Zero trust is a direction, not a finish line. Track it with numbers:

  • % of human access through SSO + MFA (target 100%), number of long-lived credentials (target zero).
  • % of namespaces with default-deny policies; % of service traffic under strict mTLS.
  • % of workloads using workload identity instead of static keys.
  • % of images signed and verified at admission.
  • Time to revoke access when someone leaves; mean time to detect a test intrusion.

Try it

On any test cluster, run the cheat-sheet commands. Count namespaces without NetworkPolicies, namespaces without a Pod Security level, and ClusterRoleBindings to cluster-admin. That list is your zero-trust backlog.

Recap

  • Zero trust: no trust from network location; every request authenticated and authorised by identity, least privilege, assume breach, keep verifying.
  • It is a set of layered controls: humans, workloads, service-to-service, network, cloud access, admission, data, end users, detection.
  • Start with identity for humans and workloads, then remove implicit network trust where risk is highest, and measure coverage.

This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.