Skip to content
intermediate Phase 13 · Security Architecture and Zero Trust

Zero Trust Architecture

Verify every request explicitly instead of trusting network location.

1h
0 problems
Topic Progress 0%

Cutting the VPN No Slack: What Zero Trust Removes and What It Replaces

A contractor's laptop is phished. The attacker opens the VPN client, authenticates with the stolen session, and now holds an address inside 10.0.0.0/8. From there a port scan finds an unpatched admin panel on a legacy service that has not been touched in two years. Nothing in this story required a sophisticated exploit — it required only that network position counted as trust. That is the assumption zero trust deletes.

The canonical tenets (NIST SP 800-207 is the citation an interviewer will respect) are short enough to state from memory:

  1. Every access to a resource is authenticated and authorized per request — no access is granted merely by network location.
  2. Access is least-privilege and dynamic, granted for the specific action, not a standing allowance.
  3. Device and workload posture participate in the decision: a managed, patched machine is a different subject than an unknown one.
  4. Traffic is logged and security posture enforced continuously — a session granted an hour ago is re-evaluated, not grandfathered.
  5. All of this is driven by dynamic policy, not static network rules.

The replacement for the VPN is not 'a better VPN' — it is a different grant model. Compare the three regimes on the same axis:

Perimeter VPN App-level ZTNA Per-request zero trust
What a grant means Routable access to a network segment One application, one user One action on one resource
Where authn happens Once, at connect At a broker/proxy, per session Every request, with posture signals
Lateral movement Free to anything the subnet reaches Bounded to that app Denied by default between services
Primary failure mode Stolen creds = whole network Proxy outage = app down IdP outage (mitigate with short-TTL cached tokens)

Zero trust is also frequently misstated, so pin down what it does not claim. It does not mean the network stops mattering — segmentation still shrinks the space policy has to reason about; it just stops being evidence of trust. It does not mean MFA on everything forever; it means assurance proportional to risk, with step-up when the risk signal rises. And it does not mean perimeters are deleted: the edge still terminates TLS and runs the first enforcement point — it simply stops being the only one.

Two practical notes keep this from becoming a slogan. First, zero trust is not a product; it is a set of enforcement points plus a policy engine. A vendor selling 'zero trust' is selling one enforcement point — usually the last mile to a SaaS app — and the architecture question is always what happens to traffic the vendor does not mediate, east-west calls between your own services included. Second, migration is incremental: you do not rip out the VPN on a Friday. You broker access app by app (ZTNA for the admin panel first, since that is the exposure the phished laptop just demonstrated), then move service-to-service traffic under per-request policy, and decommission broad network grants when their last consumer is gone.

Expect the definitional question in interviews: how is zero trust different from defense in depth? Defense in Depth says stack independent controls at every layer. Zero trust says none of those layers may trust a request because of where it came from — it supplies the identity and policy machinery that makes each layer's decision specific. They compose; neither subsumes the other. What the phrase means operationally — deny by default, authenticate every request, evaluate posture, least privilege per action — is the part to be able to defend without quoting marketing.

The Per-Request Decision: Identity, Posture, and Context in One Policy

Zero trust becomes real at one place: the decision made for a single request. That decision combines several signal families, each produced by a different authority, and it is made by a policy engine (the PDP — policy decision point) that is separate from the enforcement point (PEP) that actually admits or drops the traffic.

Signal family Examples Produced by
Subject identity user OIDC token; workload SPIFFE ID over mTLS corporate IdP; workload identity issuer
Device / workload posture managed, disk encrypted, EDR healthy, patch < 14 days MDM agent; node attestation
Context source-network risk, geo, time, recent failed MFA, request rate edge telemetry, IdP risk signals
Resource attributes env=prod, data classification, owning team CMDB / resource tags

A policy reads like this (pseudo-policy — the syntax resembles Cedar or OPA/Rego flattened to English):

permit(request) when {
  request.subject.role        == 'payments-analyst' and
  request.subject.mfa         == 'fido2'            and
  request.device.managed      == true               and
  request.device.edr          == 'healthy'          and
  request.device.patch_age    < 14d                 and
  request.resource.env        != 'prod' or request.context.risk_score < 30
}
# default: deny, with a reason code attached to the audit record

Three properties of this design carry the weight. Deny by default: absence of an explicit permit is a denial, which means new resources are private until policy says otherwise — the opposite of the old model where a new subnet was reachable by default. Per-request, not per-session: a 5-minute access token is verified on every call, so a posture change (EDR goes unhealthy) or a risk spike (impossible travel) ends access within minutes rather than at the next VPN reconnect. Reasons on denials: every deny carries a structured reason code, which turns 'the app is broken' tickets into 'your device failed posture at 14:02' in one log lookup.

Then price the trade-offs, because interviewers probe them next. Latency: a synchronous PDP lookup per request must stay in single-digit milliseconds; the standard answers are caching decisions with a short TTL (30–60 seconds — bounded staleness you accept deliberately) and colocating the PDP with the enforcement point. Availability: fail-closed on an IdP outage means an outage, and pretending otherwise is a design smell. The pragmatic ladder is short-lived access tokens (5–15 minutes) verified locally against cached JWKS keys, a grace window that honors tokens already issued, and a sealed break-glass path that bypasses posture with loud alerting — bypass that is audited, rehearsed, and expires. Fail-open for writes is never on the ladder. Observability: log every decision, allow and deny — those records feed anomaly detection (a burst of denials is simultaneously a UX incident and a reconnaissance signal), and without them the policy engine is a black box you cannot tune.

Two refinements show up in production designs. The first is continuous evaluation versus per-request checking: some implementations re-evaluate posture for an active session and sever it mid-connection when signals degrade — an EDR that goes unhealthy at minute twelve ends the session rather than waiting for the next token refresh. That closes the gap between 'checked at request time' and 'checked thirty minutes ago' at the cost of stateful session tracking. The second is risk-tiered policy: identical requests carry different requirements depending on a risk score. The same analyst exporting the same report from the corporate network passes with an existing session factor; the same request from a hosting-provider ASN at 3 a.m. demands phishing-resistant MFA or is denied outright. Both refinements serve one goal: making the grant match the moment, not the user's general reputation.

The honest architectural statement: per-request verification costs latency, engineering, and a dependency on the IdP's health, and buys you a system where a stolen token dies in minutes and a compromised laptop reaches one application. That trade is the entire point.

Microsegmentation: Containing One Compromised Workload

Now the scenario that justifies all of the above. A dependency CVE gives an attacker remote code execution inside order-service. Everything that happens next was decided by your architecture, hours before the exploit.

In a flat network, the attacker's next moves are routine. They query the instance metadata service at 169.254.169.254 and steal the node's IAM role credentials. Those credentials reach the production database, enumerate every table, and — because the same role fronts several services — reach the billing service too. Outbound traffic is unrestricted, so exfiltration is a single curl. By the time an IDS rule fires, the blast radius is the account.

Under microsegmentation, each of those moves hits a wall designed for it:

Attacker move Flat network Microsegmented
Read node metadata creds Succeeds IMDSv2 with hop limit 1 + egress deny; workload uses short-lived identity instead
Connect to production DB Full instance access Only the orders DB, only via app credentials scoped and TTL'd
Call billing API Allowed, unlogged between services Denied by mTLS authz policy; the deny itself alerts
Exfiltrate to attacker host One outbound connection allowed Egress allowlist denies; alert fires on first attempt

The mechanism underneath is cryptographic service identity. Each workload receives a short-lived identity document (a SPIFFE ID is the standards-shaped answer: spiffe://prod/payments/order-service) and presents it over mTLS. Authorization then operates on those identities — order-service may call payments-api:charge and send to its queue, and nothing else. Network location contributes zero to the decision; the workload's cryptographic identity is the only credential that matters, which is precisely the zero trust tenet applied east-west.

Rollout is where designs succeed or die in practice. Enforcement on day one breaks the flow nobody documented, so run observe-only first: policies log would-deny for two weeks, you fix the legitimate flows the logs reveal, then enforce per service. Start with egress — it is the cheapest wall and the one that neuters exfiltration and metadata theft — then east-west for new services born inside the mesh, then migrate legacy. Choose the identity delivery path deliberately: a service mesh sidecars mTLS uniformly at the cost of an extra hop, memory, and an ops surface; in-library identity is lighter per service but means implementing it correctly in every language you run. Either way, note the combinatorics: pairwise service policies grow quadratically, so define tiers (edge → API → data) plus explicit exceptions, and refine only the hot paths that tiering leaves too permissive.

Three details decide whether the containment actually holds. Egress policy is only as good as its name-resolution path — a workload that can resolve and reach arbitrary DNS can tunnel out through a domain-fronting service, so DNS egress must flow through the same filtering proxy that handles TCP. Database access gets the same treatment: per-workload credentials issued with short TTLs instead of one shared service account, so the compromised pod's dump window is minutes, not months. And mTLS certificates have their own lifecycle — short-lived workload identity documents (hours, not months) fetched from the issuer mean a revoked workload stops presenting valid identity almost immediately, because the per-request promise is only as strong as the credential lifetime underneath it.

The interview close that ties the phase together: microsegmentation bounds the blast radius to one workload, one identity, one segment — and the identity tokens and policy machinery it runs on are exactly the machinery the next topic, Identity and Access Architecture, builds for humans, third parties, and services alike.

Quiz

1. Which statement captures the zero trust change from a traditional VPN model?

Question 1 options

2. A per-request policy combines user identity, device posture, and context signals. What is the correct relationship between the policy decision point and the enforcement point?

Question 2 options

3. Your policy engine goes down (fail-closed configured). What is the most defensible availability design?

Question 3 options

4. A compromised order-service pod attempts to reach the billing API and the instance metadata endpoint. Under a zero trust microsegmented design, what happens?

Question 4 options

Flashcards

Question

Name the core zero trust tenets (NIST SP 800-207 framing).

Answer

Per-request authentication and authorization for every resource access; least-privilege, dynamic grants; device/workload posture in the decision; continuous enforcement and logging rather than standing trust; policy-driven decisions instead of static network rules.

Question

What are the PDP and PEP, and why are they separate components?

Answer

The Policy Decision Point evaluates policy against identity/posture/context signals and issues allow/deny with reasons; the Policy Enforcement Point sits at the resource (gateway, sidecar, storage plugin) and admits or drops traffic accordingly. Separation keeps decisions consistent and auditable across many enforcement points.

Question

How do you reconcile deny-by-default policy with the availability risk of an IdP outage?

Answer

Short-lived access tokens (5-15 min) verified locally against cached JWKS keys, a bounded grace window for already-issued tokens, and a sealed, audited break-glass path with enhanced monitoring. Never fail open for writes, and never serve stale decisions indefinitely.

Question

What is microsegmentation, and what does it bound when one workload is compromised?

Answer

Per-workload identity plus explicit east-west and egress authorization, so traffic is denied unless a policy permits it. It bounds lateral movement to what the compromised workload's identity is allowed to reach — typically its own database, queue, and named upstream APIs — instead of the whole subnet.

Question

How does a workload get cryptographic identity in a zero trust design, and what are the two delivery options?

Answer

Short-lived identity documents (e.g., SPIFFE IDs) presented over mTLS. Delivery via a service mesh sidecar (uniform, adds a hop and ops surface) or in-library identity per language (lighter, but implemented and maintained per codebase).

Revision Notes

Key Takeaways

  • 1. Zero trust deletes implicit trust from network position: a grant is one action on one resource, not routable access to a segment
  • 2. Per-request decisions combine identity, device/workload posture, and context through a PDP separate from the enforcing PEP
  • 3. Deny by default plus reason-coded denials makes new resources private by default and turns support tickets into log lookups
  • 4. Availability is a designed trade: short-lived locally verifiable tokens, bounded grace, audited break-glass — never fail-open writes
  • 5. Microsegmentation with cryptographic workload identity bounds a compromise to one identity's explicit permits, and deny events feed detection

Interview Tips

  • • "What is zero trust, operationally?" — deny by default, per-request authentication and authorization, posture-aware policy, least privilege, continuous logging; explicitly reject 'it's a product' or 'no VPN' answers
  • • "How do you migrate from a VPN without a big bang?" — broker app by app (ZTNA), move east-west traffic under identity-based policy, decommission broad grants when their last consumer dies
  • • "How do you handle an IdP outage under fail-closed?" — short-lived tokens verified via cached JWKS, bounded grace window, sealed break-glass; explain why indefinite stale decisions are dangerous
  • • "A service is compromised — what contains it?" — mTLS workload identity with explicit permits, egress allowlist, IMDS hardening; walk the attacker's next three moves and which control stops each

Cheat Sheet

Zero Trust Architecture

Tenets: per-request authn/authz; least-privilege dynamic grants; posture in the decision; continuous enforcement/logging; dynamic policy over static network rules.

Grant model comparison:

VPN ZTNA Zero trust
Grant means segment access one app one action on one resource
Authn once at connect per session at broker every request + posture
Lateral movement free in subnet bounded to app denied by default

Decision path: client → PEP (gateway/sidecar/plugin) → PDP evaluates identity + posture + context + resource attributes → allow or deny-with-reason. Deny by default; cache decisions 30–60s; log every decision.

Availability ladder: short-lived tokens + local JWKS verification → bounded grace window → sealed break-glass with alerting. Never fail open for writes.

Microsegmentation rollout: observe-only (would-deny) → fix legit flows → egress first → east-west for new services → migrate legacy. Identity via mesh sidecar or in-library; tier policies (edge→API→data) to avoid O(n²) pairwise rules.

Containment wins: IMDSv2 hop limit 1 + egress deny kills credential theft; per-identity service authz kills impersonation; deny events double as detection.

Continue Learning