Skip to content
Tech Interview Prep
Technical interview guide

Zero Trust Architecture

Verifying every request explicitly instead of trusting anything by network location.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: NIST SP 800-207; NIST SP 800-207A; NIST SP 1800-35 final (June 2025); CISA Zero Trust Maturity Model 2.0.

Interview Q&A

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

25 questions

Q&A-1

Explain zero trust architecture to an engineering team.

Answer

Zero trust means no access decision is made on the basis of network location: "it came from inside the VPN" is not authorization. Every request is authenticated and authorized against policy that weighs who's asking, from what device, for which resource, right now. The canonical reference is NIST SP 800-207 (2020); Google's BeyondCorp (published 2014–2018) is the best-known production implementation, and it's worth citing both in an interview.

The mechanism. Split the architecture into three logical roles:

  • Policy Administration Point (PAP): where policy is defined and distributed.
  • Policy Decision Point (PDP): evaluates each request against policy and current signals.
  • Policy Enforcement Point (PEP): the component in the request path (a proxy, sidecar, or gateway) that actually blocks or allows.

A request carries signals: user identity (OIDC token from the IdP), device posture (managed, disk-encrypted, patch level, attested via a device-management agent), and context (risk score, location, time). The PDP decides; the PEP enforces; the session is re-evaluated, not just checked once at the front door.

A concrete shape. Compare the two dominant deployment styles:

ApproachEnforcement lives inStrengthWeakness
Identity-centric (BeyondCorp-style: IAP, Cloudflare Access, Pomerium)A per-application proxy in front of each resourceFine-grained per-app policy, works for contractors, no network access at allEvery app needs an integration; non-HTTP protocols are awkward
Network micro-segmentation (Istio mTLS + AuthorizationPolicy, native firewall policies)The mesh or fabric between workloadsCovers east-west traffic, any protocolCoarser identity granularity; certificate lifecycle becomes a real operational load

Most real deployments end up hybrid: identity-centric for human access to applications, mTLS/service-mesh authorization for service-to-service.

Failure modes: the part that separates a real answer from a slogan.

  1. PDP outage. If the decision point is down, the PEP has to choose: fail closed (users locked out, revenue impact) or fail open (you've silently reverted to implicit trust). Decide per resource class and write it down. Detection: synthetic canary requests through each PEP that assert both allow and deny paths, alerting on a canary that unexpectedly succeeds.
  2. Signal staleness. A device posture check captured at 9:00 is worthless at 17:00 if the device was jailbroken at noon. Token lifetimes matter here: an access token with a 24-hour TTL is a 24-hour window in which revocation doesn't propagate. Short TTLs plus refresh-time re-evaluation bound the window; the cost is more load on the IdP and more latency on refresh.
  3. Latency of continuous verification. Every hop through a proxy adds RTTs. A user in Sydney hitting a PEP in us-east-1 pays the Sydney–Virginia round trip (~200 ms) on every request, not just login. This is the main reason BeyondCorp-style architectures colocate PEPs regionally and why some teams cache authorization decisions for tens of seconds, which reintroduces staleness. That tension is the honest trade-off.
  4. The PEP becomes the perimeter. Concentrate all enforcement in one gateway and you've rebuilt the castle with a different moat: it's now a single point of failure and a high-value target. Detection: capacity alerts on the PEP, plus chaos-testing its failure.

When not to do it. A two-person startup with one monolith behind a cloud LB doesn't need a PDP/PEP split: the marginal blast-radius reduction doesn't pay for the operational surface. Zero trust earns its cost when you have many resources, heterogeneous users (employees, contractors, partners), or a compliance driver (executive order 14028 pushed US federal agencies toward SP 800-207). Even then, sequence it: start with the highest-risk access paths (admin planes, production data), not a big-bang migration.

What it isn't. Not "trust nothing": it's "trust policy, not location." Not MFA on every packet. Not a breach guarantee: a compromised endpoint with a valid session still gets through; zero trust shrinks the blast radius and gives you evidence (every decision logged at the PDP), it doesn't eliminate compromise.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3

Design the policy decision, administration, and enforcement architecture.

Answer

Design the policy decision, administration, and enforcement architecture

First 60 seconds. I'll assume a multi-region SaaS platform, ~50 services, a mix of human users (SSO via OIDC) and service-to-service calls, and a compliance requirement that access decisions are auditable per request. The architecture I'd commit to is three separated planes: a policy decision point (PDP) that is the only component allowed to say yes, a policy administration point (PAP) where humans write and version policy, and policy enforcement points (PEPs) that are deliberately dumb. They authenticate, call the PDP, and obey. The judgement call that shapes everything else is where the PDP sits and how much authority the PEPs have when it's unreachable, so I'll spend most of the answer there.

Decision plane

Policy lives in a repo, authored in a language with real semantics: OPA's Rego, or Cedar if I want AWS-style schema typing. Every merge produces a signed, versioned bundle; OPA supports signed bundles natively (keys configured under the bundle plugin's signing block, with a keyid selecting the verification key), pulled on a configurable interval: I'd set 30 s as my starting point and tune it against the revocation requirements below. The PDP is deployed as a sidecar or local daemon so decisions are in-process, sub-millisecond, and don't add a network hop per request.

A decision is a function of: authenticated identity (from a verified JWT. Issuer, audience, sub), credential strength (was the session MFA'd? how long ago?), resource attributes (data classification, owner), and context (device posture, geo-velocity). The critical design rule: the PEP never accepts attributes from the caller. The token is verified locally with cached JWKS; anything the caller could assert about itself is either in the signed token or fetched server-side.

Administration plane

The PAP is the git repo plus CI: policy changes go through review, tests run against a corpus of known request/decision pairs, and a bad policy fails the build rather than reaching production. This is the single biggest quality lever: policy is code, so it gets code review and regression tests. Admin roles are split so no one person can both write policy and grant themselves credentials (the classic control-plane compromise scenario). Emergency access is a separate break-glass role with mandatory post-hoc review, not a policy exception.

Enforcement plane and the trade-off

Here's the real trade-off: centralized PDP with dumb PEPs gives one place to reason about policy and perfect consistency, but adds a network round-trip per request and creates an availability-coupled failure domain. Local PDP copies (sidecars) give ~0.1 ms decisions and survive PDP outages, but decisions can be stale. I choose local copies with signed bundles, and accept bounded staleness: a revoked user may retain access for up to the bundle pull interval plus push-notification latency. For high-risk actions (credential changes, data export), the PEP makes a synchronous call to a central service that checks revocation in real time, so the staleness window only applies to ordinary traffic.

Fail-closed vs fail-open is decided per enforcement point, not globally: the API gateway fails closed (deny and return 403 with a decision ID), because a gateway letting unauthenticated traffic through is a breach. A sidecar in the payment path fails closed too. But a dashboard PEP failing closed during a PDP outage means nobody can see the incident: that one fails open with an alert. The criterion is blast radius of a wrong allow versus cost of a wrong deny.

Failure modes, concretely

  • Stale revocation: employee terminated at 14:00, bundle pulls at 30 s intervals, but a mesh sidecar cached a bundle 25 s ago. Up to roughly a minute of residual access. Detected by comparing IdP audit logs (token issuance stops at 14:00) against PEP logs (requests still allowed after). Mitigated by push-based bundle updates and the synchronous check for sensitive actions.
  • Decision-log divergence: two PEPs disagree on the same request because they run different bundle versions. Detected by a canary that replays a fixed request set against every PEP and diffs the decisions; any divergence pages before users notice.
  • Key rotation breaking bundle verification: OPA rejects all bundles, every PEP freezes on its last-known-good policy, which is actually the safe behavior, but you must monitor bundle-age metrics and alert when age exceeds, say, 10 minutes.

What I'd monitor

Decision latency at the PEP (p99 under 1 ms in-process), bundle age per node, deny-rate anomalies (a spike means either an attack or a broken policy: both urgent), and the PEP/PDP version skew. Every decision logs decision ID, policy bundle hash, inputs, and result, so an audit question: "why did user X access record Y at 14:32?". Is answerable by replaying that exact input against that exact bundle hash.

What I'd cut for time: if the interviewer wants depth in one area, the decision plane's input-integrity rules and the staleness/revocation trade-off are where staff-level judgement shows; the enforcement-point inventory is commodity knowledge.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-5

Design workload identity and service-to-service authorization across multiple clouds.

Answer

Let me pin down assumptions first: workloads run on multiple clouds plus possibly on-prem, they're mostly Kubernetes and VM-based, and they need to call each other without long-lived cloud credentials sitting in config. The core design is one federated identity plane built on OIDC, with each cloud trusting the others' workload-identity issuers, and authorization done on service identity plus resource attributes: never on source IP, which an attacker in the same network segment can trivially forge.

Identity issuance. Each platform already has a way to give a workload a verifiable identity without storing a secret:

PlatformMechanismWhat the workload presents
GKEWorkload Identity FederationPod's Kubernetes service account → Google SA → OAuth token
AWS (EKS)EKS Service Account IAM Roles (IRSA)Signed service account token → STS AssumeRoleWithWebIdentity
AWS (VMs/on-prem)IAM Roles AnywhereX.509 cert from a registered trust anchor → STS credentials
AzureWorkload Identity FederationKubernetes SA token → Entra OIDC → AAD token
Cross-platformSPIFFE/SPIREX.509 SVID, typically 1-hour TTL

The mechanism that makes cross-cloud federation work: cloud A's control plane is registered as an OIDC issuer in cloud B's IAM, with a trust policy pinned to specific sub claims (the service account identity). When a workload in A needs B's API, it exchanges its native credential for B's short-lived token via AssumeRoleWithWebIdentity or the equivalent. No secret ever crosses the boundary: only issuer public keys and trust policy.

Why short-lived credentials work: the blast radius of a leaked credential is bounded by its TTL. A SPIFFE SVID at the default 1-hour TTL means an attacker who exfiltrates it has at most an hour of usefulness, and SPIRE rotates it automatically before expiry. That's also why attestation matters: SPIRE's workload attestors verify how the workload is running. On Kubernetes, the kubelet-signed service account token and pod UID; on EC2, the instance identity document. Before issuing the SVID, so identity is bound to something the platform can prove, not something the workload asserts.

Authorization. Default-deny, evaluated on: service identity of the caller, the action, the destination resource, and tenant/data class. Enforce at the layer that matches your trust model:

  • Service mesh (Envoy sidecar, Istio AuthorizationPolicy): best when you want L7 policy (HTTP method, path) without touching app code; costs a sidecar per pod and a per-hop latency add that's typically in the low single-digit milliseconds in my experience, though you should measure it on your own workloads rather than take a number from me.
  • Gateway only: simplest, but any workload that bypasses the gateway is unauthenticated; only fits when the network path is genuinely constrained. Pair it with explicit egress policy so a compromised workload can't simply dial out past the gateway.
  • In-service (SDK, e.g. OPA/Cedar library): needed when authorization depends on application state ("can this user read this row"), because no proxy can see that. Object-level authorization stays in the app no matter what.

A concrete policy trace: service checkout calls payments. Envoy checks the client's SPIFFE ID (spiffe://acme.org/ns/prod/sa/checkout), matches it against an AuthorizationPolicy allowing POST /v1/charge for that identity, and forwards the request with the SVID attached. payments independently validates the SVID chain against SPIRE's bundle and does its own tenant check on the payload. If checkout is compromised and tries GET /v1/records, the proxy denies and Envoy logs rbac access denied: spiffe://acme.org/ns/prod/sa/checkout: the caller's identity and the denied path, no secrets in the log line.

Operational bindings. Deployment and policy changes go through CI/CD with its own workload identity: the pipeline assumes a narrowly scoped role, and humans don't hold credentials at all. Policy-as-code (OPA/Cedar in the repo) means every authorization change is reviewed like code. Plan for regional outage: SPIRE servers are stateless enough to run multi-region with a replicated datastore, and OIDC issuer JWKS should be cached with a fallback window longer than your token TTL so a control-plane outage in one cloud doesn't invalidate in-flight tokens everywhere.

Failure modes and what they cost you.

  • Issuer compromise is the catastrophic one: whoever controls the OIDC issuer or SPIRE trust domain can mint any identity. Mitigate with HSM-backed signing keys, restricted admin roles, and short key rotation windows; detect via issuance-rate anomalies.
  • Stale trust policy: a federation trust pinned to a broad sub (e.g. system:serviceaccount:*) lets any workload in the cluster assume the role. Audit trust policies like you audit IAM roles: this is the cross-cloud equivalent of a wildcard role.
  • Replay: short TTLs plus audience restriction (aud claim) bound this; a token minted for cloud B's API is rejected by cloud C.
  • Revocation gap: with 1-hour tokens you can't revoke mid-flight, so the answer is revoking the identity (delete the service account binding) and letting tokens age out. Acceptable only if TTLs are short enough to tolerate.

What I'd test: cross-tenant access attempts, replayed tokens across environments, a spoofed SPIFFE ID, and, most importantly, that the default-deny actually denies when the policy is deleted, because an allow-only policy engine that fails open is worse than no policy engine.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-7

Incorporate device posture into access decisions.

Answer

Device posture means the access policy doesn't just ask who you are but what state the thing you're connecting from is in, and the mechanism that makes it trustworthy is attestation: signals collected by an agent the device can't easily forge, reported to a source the policy engine trusts, with a timestamp so the engine knows how stale the evidence is. I'd start there, because the hard part isn't listing signals: it's making them hard to spoof and fresh enough to act on.

Concretely, the signals I'd wire up, and how each is attested:

  • Managed enrollment: the device appears in Intune or Jamf with a compliance record the MDM computes, not one the user asserts.
  • Hardware-backed identity: the device certificate or key lives in a TPM or Secure Enclave, so the private key can't be copied to another machine. This is the same primitive WebAuthn uses for phishing-resistant auth.
  • Patch and OS support state: OS build and last patch date from the MDM inventory, checked against a support cutoff.
  • Disk encryption, secure boot, EDR health: reported by the MDM/EDR agent; for EDR, the policy should check the agent is actually reporting, not just installed.
  • Compromise indicators: the EDR's verdict for that device: clean, suspicious, or quarantined.

The policy engine: say, Entra Conditional Access with device filters and Intune compliance, or a ZTNA product like Banyan or Cloudflare Access with device posture checks: evaluates these at session establishment and, depending on the product, periodically during the session. Two numbers matter more than the signal list: the freshness window (I'd require posture evidence no older than 15–30 minutes for sensitive resources, which means the agent reports on a schedule, not only at login) and the failure default. A device with no posture data is unknown, not healthy, and unknown gets the constrained tier, not the allow tier.

Then the decision. Posture shouldn't be a binary gate; I'd tier it against resource consequence:

| Posture | Internal wiki, email | Production data, admin consoles | | --- | --- | | Compliant, attested | Allow | Allow, maybe step-up auth for admin actions | | Unknown / stale evidence | Allow with warning, flag for remediation | Browser-isolated session or masked data | | Non-compliant but not compromised | Block with remediation link | Block with remediation link | | EDR-flagged compromised | Deny and revoke active sessions | Deny and revoke active sessions |

The key design point: posture is one input alongside identity, auth strength, action, and behavioral risk. A healthy device does not earn universal trust, and a personal phone can still reach email through an isolated browser. That's how you avoid the two classic failure modes: false denies that push users to shadow IT, and a compliance flag that becomes an implicit bypass for everything else.

Failure modes I'd plan for and how I'd detect them:

  • Stale or missing signals masquerading as healthy. Detect by monitoring the age distribution of posture evidence at decision time; a spike in decisions made on evidence older than the freshness window means the agent pipeline is degrading.
  • Posture-provider outage. If Intune or the EDR goes down, every device becomes unknown. Pre-decide the degraded mode: I'd fail toward browser isolation for high-consequence resources rather than hard deny, so a provider outage doesn't stop the company, and test this by deliberately cutting the provider in a game day.
  • Compromised-but-compliant. A stolen managed device with valid certificates passes every check. That's why EDR verdicts and behavioral signals (impossible travel, unusual data volume) must be able to override a green compliance flag, and why you test with a real compromised device, not just a policy simulation.
  • Revocation lag. Posture checked only at login means a device that gets quarantined mid-session keeps its access. Pick a product that re-evaluates continuously or set session lifetimes short enough (e.g., 1-hour tokens for sensitive apps) that a posture change takes effect within that bound.

On personally owned devices and privacy: collect the minimum (compliance booleans and OS/patch level, not browsing history or app inventories) publish what's collected, and give users a self-service remediation path so a failed check doesn't become a help-desk ticket. Exceptions exist, but they're time-boxed (say, 7 days with a named approver) and they expire, they don't get renewed silently.

If I were asked what to build first: hardware-backed device identity plus EDR verdict feeding a tiered policy, with the freshness window and the unknown-device default as the two decisions you lock down on day one.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13

Implement continuous access evaluation and session revocation.

Answer

The 90-second answer

You can't revoke a bearer token you've already handed out. So you bound how long a revoked session stays usable, and you add a check where it matters. Two levers, and you use both.

Short access-token lifetime is your worst-case revocation delay when nothing else fires. Microsoft Entra ID's default access token lifetime is 1 hour; AWS STS AssumeRole defaults to 1 hour and caps at 12. Dropping to 5 minutes bounds staleness at 5 minutes, but costs 12x the token-endpoint traffic: 1M active users refreshing hourly is ~278 req/s, at 5 minutes it's ~3,333 req/s.

A revocation check at a chokepoint gives you near-immediate enforcement. A gateway or sidecar looks the subject up in a revocation set before forwarding: roughly 0.3 ms p50 for a Redis GET against a 20 ms request (illustrative), cheap enough per request, expensive enough that you don't want it in every service.

Then you propagate events. The OpenID Shared Signals Framework and CAEP define this: the IdP emits a signed Security Event Token (RFC 8417) (session-revoked, credential-change, token-claims-change, device-compliance-change) and pushes it to relying parties over HTTPS (RFC 8935) with retries and acks. The RP writes the subject into its revocation set with a TTL equal to the max token lifetime, so the set self-cleans.

Trace: account disabled at T+0

  • T+0: admin disables the account in the IdP.
  • T+0.1s: IdP emits a SET, subject = issuer+sub, event = session-revoked.
  • T+0.3s: transmitter pushes to each RP; RP acks. Backoff retries on failure.
  • T+0.5s: RP writes sub to Redis with TTL 3600s.
  • T+1.2s: the revoked session's next request hits the gateway, sees the set, returns 401 with WWW-Authenticate: Bearer error="invalid_token" (RFC 6750). For CAE-style step-up instead of a hard revoke, the error is insufficient_claims with a claims challenge, and the client re-authenticates once.
  • If the account is disabled, re-auth fails and the session dies.

About a second from disable to enforcement, versus up to an hour with token expiry alone.

Mechanisms compared

mechanismworst-case revocation delaycost
1 h access token, no check1 hnone
5 min access token5 min12x token endpoint load
revocation set at gateway~1 s, propagation-bound1 lookup/request, stateful
sender-constrained token (DPoP RFC 9449 / mTLS RFC 8705)doesn't revoke; stops replay of a stolen tokenkey and nonce handling per client
server-side session store~0stateful, shared store

Failure modes and how you see them

  • Lost event: receiver down, push fails. Watch transmitter retry-queue depth and p99 ack lag; alert above 30 s. Cost: the session stays valid until token expiry, up to 1 h.
  • Out-of-order: a stale session-established lands after session-revoked. Carry a monotonic sequence or iat per subject and drop anything older than the last applied.
  • Partition: IdP region isolated from the RP. Heartbeat between transmitter and receiver; on partition, fail closed for high-risk resources and let short token lifetimes cover the rest.
  • Token replay: a stolen bearer token used from another host. Detect via DPoP nonce mismatch or mTLS thumbprint mismatch. The fix is sender-constrained tokens, not a longer revocation list.
  • Rollback: Redis failover loses the set. Watch set-size drops and cache-miss spikes; persist to a durable store and rebuild from the IdP on restart.

When not to build this

If your access tokens are already 5 minutes and a revoked session can only read one dashboard, the token lifetime is your revocation bound and a CAEP pipeline is over-engineering. If you run a monolith with server-side sessions, deleting the session row is already immediate revocation: you don't need SSF. The deciding question: how much damage can a revoked session do in the time it takes your slowest lever to fire? If that's acceptable, stop. If not, shorten the token first, then add the check.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-4

Create a zero trust access policy for a sensitive production database.

Answer

Let me state assumptions first: a relational production database holding customer PII, cloud-hosted, accessed by both services and a handful of human operators. Zero trust here means the database itself trusts nothing upstream: every request is authenticated and authorized at the point of access, with short-lived proof, not a network boundary or a long-lived password.

The core policy, in the order I'd build it:

  1. Identity. Services authenticate with workload identity: SPIFFE/SPIRE SVIDs or the cloud equivalent (AWS IAM roles for service accounts, GCP workload identity federation). Humans authenticate through the IdP with phishing-resistant MFA: FIDO2/WebAuthn, not OTP, because OTPs phish. The database never holds local accounts for routine access.
  2. Authorization. A policy engine (Cedar, OPA, or native IAM with conditions) evaluates subject, action, resource, and context. The critical mechanism: the decision is computed per request from attributes, not baked into a role that persists. So "read orders table, tenant 42, from build abc123, during change window CHG-77" is a decision; "DBA" is not.
  3. Issuance. On approval, the subject gets a short-lived credential scoped to exactly that decision: a Vault dynamic Postgres role with a 15-minute TTL, or a cloud STS token with a session policy. The mechanism that makes this zero trust rather than just good hygiene: the credential is incapable of more than the approved action. If it's exfiltrated, the blast radius is one action for 15 minutes, and revocation is TTL expiry, not a human finding the account.
  4. In-database enforcement. The token gets you to the door; row-level security and column masking still apply. A break-glass reader sees masked PANs unless a second approval unmasks: the database enforces this, so a compromised policy engine alone can't read the data.
  5. Continuous evaluation. Re-check posture on each session refresh: device compliance, ticket still open, no active incident freezing changes. If the change window closes, the next token request fails: the mechanism is that nothing outlives its justification.

A concrete policy sketch (Cedar-style, illustrative):

CEDAR
permit(
  principal in Role::named("oncall-dba"),
  action   == Action::named("sql:execute"),
  resource == Database::named("prod-orders")
) when {
  principal.ticket != "" &&
  principal.device.trusted &&
  context.change_window_active &&
  context.query_class in ["select", "explain"]
};

Trade-offs and when not to do all of this.

AlternativeWhen it winsCost
Network perimeter + VPNTiny team, low change rateOne compromised laptop reaches the DB; no per-request decisions
Long-lived DB roles + audit logsLegacy apps that can't fetch tokensBlast radius is the role; revocation is manual
Full zero trust as aboveRegulated PII, many operators, frequent incidentsReal engineering cost: token plumbing, policy engine ops, break-glass drills

The main argument against is operational: if token issuance fails during an incident, you've turned an outage into an outage-plus-no-access. That's why break-glass must be a monitored path: a separate credential that works when the policy engine is down, but pages security the moment it's used, and is tested quarterly. If break-glass is unmonitored, people will use it for convenience and you're back to a shared admin account.

Failure modes I'd name: token vending service down (mitigate with cached short-term credentials and the monitored break-glass path); policy drift where the engine approves too much (mitigate with policy-as-code in CI and deny-by-default); audit gaps (log the decision and its inputs (ticket, policy version, device posture) but never query payloads, or the logs become the breach).

The one-sentence version: every request proves who it is with something unforgable and short-lived, gets exactly the action it justified, and the database, not the network, is the last line of enforcement.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6

Use microsegmentation without recreating small trusted perimeters.

Answer

Start by naming the failure mode you're avoiding: the classic mistake is taking a flat network, carving it into VLANs or security groups, and calling each carve-out a small trusted zone. Once an attacker lands inside one, they're trusted again: that's just perimeter defense repeated at a smaller scale. Microsegmentation done well replaces 'where you are' with 'who you are and what you're allowed to do,' so a compromised workload inside a segment still can't reach its neighbors without presenting a workload identity that authorizes that specific action.

Mechanistically, that means two layers. Layer one is reachability: default-deny east-west, with allow rules expressed in terms of workload identity and labels rather than CIDRs. Kubernetes NetworkPolicies with pod selectors, Cilium's identity-based policies, or VMware NSX security groups. Layer two is authorization at the resource: even if the network path is open, the service demands mTLS with a workload identity. SPIFFE/SPIRE issuing SVIDs, or a service mesh like Istio doing mTLS plus authorization policies, and checks the action, not just the connection. The network layer answers 'can packets flow'; the identity layer answers 'should this specific workload call this API.' You need both, because a network-only policy fails when an attacker pivots to an allowed host, and identity-only fails if the identity provider itself is compromised.

A concrete way to explain the difference: with subnet-based rules, an allow entry of 10.2.0.0/24 → payments-db:5432 grants every pod on that subnet database reachability forever, including the one compromised last night. With identity-based policy in Cilium, the same rule reads k8s:app=checkout AND k8s:io.kubernetes.pod.namespace=prod → k8s:app=payments-db, tcp/5432: a compromised pod that doesn't match the labels gets denied even though it sits on the same subnet. The label, not the address, is the credential boundary.

Rollout is where most programs die, so say how you'd de-risk it: discover actual flows first (Cilium Hubble, VPC flow logs, or an NDR tool), write policy in observe/audit mode, run it for a full business cycle, month-end jobs and backups are the flows that break, then enforce per-segment with canaries, verifying denies actually deny. Version policies in git with owner and purpose so an exception has an expiry date and a named human attached.

Trade-offs worth stating unprompted: identity-based enforcement adds a moving part. The identity issuer and the policy controller become critical infrastructure, so you must segment and monitor them too, or you've built a new soft underbelly. Policy sprawl is real; without a pruning process, stale allow rules accumulate and your default-deny quietly becomes default-allow-by-exception. And microsegmentation is the wrong tool when the blast radius is already small: a two-service deployment with a hard egress boundary gets most of the benefit from a single segmentation layer, and the operational cost of a mesh plus an identity plane isn't justified. Group by application and data sensitivity, not by the org chart.

Close with how you'd test it: red-team exercise where one workload is deliberately compromised, and measure whether lateral movement to a sibling in the same segment is blocked by identity, not just by a firewall rule an attacker with the right subnet position could satisfy. If the answer is 'the subnet let it through,' you've rebuilt the perimeter, smaller.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-23

Resolve conflicting authorization policies across enforcement layers.

Answer

What I'd say first

A conflict is two enforcement points returning different decisions for the same (subject, resource, action, context). You don't resolve it by picking a winner at request time: you decide, per invariant, which layer is authoritative, then compose the rest with one fixed rule. My default: any explicit deny wins, obligations from every allow are unioned, and a grant requires at least one allow and zero denies. First-match is the wrong default because it makes the answer depend on evaluation order, which is exactly what drifts between layers.

Assumptions I'd state: more than one PEP (gateway, mesh, app, DB), each with its own policy language and bundle version; no single global PDP; a per-layer latency budget of a few milliseconds.

Ownership

LayerOwnsExample engine
Identitywho the subject is, group membershipIdP (Okta/Entra)
Deviceposture: managed, disk encrypted, patch levelMDM
Gatewaycoarse route/tenant admissionEnvoy ext_authz → OPA
Meshservice-to-service identitySPIFFE/SPIRE + mTLS authz
Applicationresource-level and field-level rulesCedar / OPA
Databaserow/column visibilityPostgres RLS
Data protectionmasking, tokenizationcolumn policies

Each invariant has exactly one owner. If two layers both claim "can read PII", that's the bug.

Composition

REGO
package authz.compose

# input.decisions: [{layer, effect, obligations, policy_version}]
default result := {"effect": "deny", "reason": "no_grant"}

result := {"effect": "deny", "reason": sprintf("explicit_deny:%s", [d.layer])} if {
    some d in input.decisions
    d.effect == "deny"
}

result := {"effect": "allow", "obligations": obs} if {
    not any_deny
    some d in input.decisions
    d.effect == "allow"
    obs := [o | some d in input.decisions; d.effect == "allow"; some o in d.obligations]
}

any_deny if { some d in input.decisions; d.effect == "deny" }

Trace it: decisions = [gateway allow [], app deny [], db allow [mask:pii]]. any_deny is true, so the allow body fails and the deny rule fires with reason explicit_deny:application. Obligations are dropped because the outcome is deny: masking is irrelevant when you can't read. That's the point of deny-overrides: obligations only travel with a grant.

Worked trace

Request: user:alice (role analyst, tenant acme), dataset:acme/finance-q3 (tag pii=restricted), action read, context managed laptop + MFA + corp network.

  • Identity: allow
  • Device: allow, obligation require_managed
  • Gateway: allow
  • Mesh: allow
  • Application (Cedar): deny. Principal not in finance group
  • Database: allow, obligation mask:pii

Composed: deny, explicit_deny:application. Gateway and app disagree, so log a divergence with both policy_versions. If the request were legitimate, the fix is a narrow exception, a time-boxed grant scoped to dataset:acme/finance-q3 for group:finance, not a change to the composition rule.

Failure modes

  • Shadowing: an upstream allow masks a downstream deny because composition was first-match. Detect with static analysis (opa check, Cedar's validator, SMT tools like Zelkova) plus a fixture per (tenant, role, device, env).
  • Obligation loss: masking dropped when a later layer re-allows. Detect by asserting obligations appear in the decision trace.
  • Version skew: PEPs on different bundle versions. Stamp policy_version in every decision; alert on divergence rate.
  • Degraded signal: posture service down. Default to the bounded safe outcome for that resource, never fail-open.

Rollout

Preview the diff of real decisions before shipping, get resource-owner sign-off, canary, watch divergence. Break-glass paths are explicit, time-boxed and audited: never a silent widening.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17

Operate policy as code safely at enterprise scale.

Answer

What I'd say first (≈90 seconds)

Assume a few hundred services on Kubernetes plus a cloud control plane, and auditors who want evidence. My answer: one versioned policy source of truth, compiled to every enforcement point, and no policy change reaches production without a preview of what it would have decided against real traffic.

Author in one language: Rego on OPA 1.x, or Cedar when the decisions are pure authorization: against a typed input contract (subject, resource, action, context), deny-by-default. Ship as a signed OPA bundle, verify the signature at load, enforce at the admission webhook (Gatekeeper or Kyverno) and at the API gateway. The wiki page and the ticket are generated from the repo, not the other way round.

The part that makes it safe is shadow mode: run the new bundle with enforcementAction: dryrun (Gatekeeper) or validationFailureAction: Audit (Kyverno) alongside the live one, log both decisions, diff them, then flip to deny.

Why it works

A policy engine splits decision from enforcement: OPA is the PDP, the webhook or gateway is the PEP. That split is what lets you evaluate a policy without deploying it. OPA decision logs record the input and result per request: that is your regression corpus, and it is why "what would this rule have denied last week" is answerable with data instead of a guess.

Deny-by-default is not stylistic. An allow-list fails loud (missing rule → deny); a deny-list fails silent (missing rule → allow).

Trade-offs

Rego vs Cedar: Rego is general-purpose and can derive facts from external data, but it is a logic language reviewers cannot skim. Cedar is non-Turing-complete, forbid-wins, deny-by-default: easier to review and reason about, but it cannot compute. Pure "who can do what" → Cedar. Derived facts → Rego.

Central PDP vs sidecar: central is one place to update but adds a network hop and a single point of failure; sidecars with bundles are fast and survive a control-plane outage, but update on a poll (OPA's default bundle polling is 60 s minimum, 120 s maximum), so a rollback is not instant.

NeedPickWhy
Pure authz, reviewable by non-engineersCedarforbid-wins, non-Turing-complete
Derive facts from external dataRego / OPAgeneral-purpose, bundles + decision logs
Kubernetes-native, YAML-only teamKyvernono new language, Audit/Enforce modes

Failure modes and detection

  • Stale bundle: a sidecar keeps enforcing a rolled-back policy. Export the bundle revision as a metric; alert on revision skew across pods.
  • Deny-everything rule: caught in shadow mode as a deny-rate spike before enforcement; guardrail on deny rate, auto-pause the rollout.
  • Latency: the webhook is a new hop on every admission. Measure the webhook's own p99, not the pod's; a policy that evaluates in-memory is fine, one that makes an external HTTP call per request is not.

Worked check

Rego (OPA 1.x, Rego v1 syntax):

REGO
package authz

default allow := false

allow if {
    input.action == "read"
    input.subject.tenant == input.resource.tenant
    "reader" in input.subject.roles
}

Trace: input {"action":"read","subject":{"tenant":"acme","roles":["reader"]},"resource":{"tenant":"acme"}}. Condition 1 true, condition 2 true (acme == acme), condition 3 true → allow = true. Change subject.tenant to "globex": condition 2 false, the rule body fails, default applies → allow = false. The default is what makes the second case deny rather than undefined.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16

Test zero trust policies and enforcement before rollout.

Answer

Core answer (say this first). Zero trust testing has three layers, and the one that catches the most production incidents is the one teams skip: proving that no request path reaches a resource without passing a policy enforcement point (PEP). A correct policy behind a bypassable sidecar protects nothing. So: unit-test the policy, contract-test every PEP including the bypass, then roll out behind shadow mode and a canary.

Assumptions: OPA/Rego behind Envoy's ext_authz filter in a service mesh, SPIFFE SVIDs for workload identity, JWTs for user context. Swap in Cedar or Istio AuthorizationPolicy and the layers are unchanged.

1. Policy unit tests. Table-driven fixtures run with opa test. Each row is a decision input plus expected allow/deny. The rows that earn their keep are boundaries: expired exp, wrong aud/iss, a token whose act claim carries a delegation chain the policy doesn't expect (confused deputy), subject and resource in different tenants, and a role that holds an action in one environment only.

REGO
package authz_test

test_cross_tenant_denied if {
    not data.authz.allow with input as {
        "subject": {"tenant": "acme", "role": "reader"},
        "resource": {"tenant": "globex"},
        "action": "read",
        "credentials": {"exp_ns": 4102444800000000000},
    } with data.roles as {"reader": {"actions": ["read"]}}
}

Run opa test . -v. Rego's in keyword needs OPA 0.34+.

2. Enforcement integration. Every PEP gets the same contract test: sidecar, API gateway, batch job, admin CLI, DB proxy. Then the bypass test: call the backend directly from a pod with no sidecar and confirm the network policy refuses it. Check failure_mode_allow on the Envoy ext_authz filter; it defaults to false, so a PDP outage fails closed. Confirm that's intended, because fail-closed on the authz path turns a PDP blip into a full outage.

3. Rollout. Shadow mode and canary answer different questions. Shadow replays real traffic through the new policy without enforcing, so you see the true distribution of decisions, but it can't test enforcement, and replaying production inputs has privacy cost. Canary actually enforces, but only on a slice. Shadow first to find semantic drift, canary second to prove enforcement. Neither replaces the other.

Worked example (hypothetical figures). Mesh at 1,200 rps peak, PDP p99 3 ms. 4,000 fixtures, 380 of them deny cases. First run failed 41; 33 were cross-tenant rows where the policy compared input.subject.tenant to input.resource.tenant, but the resource fixture omitted tenant. An undefined comparison makes the rule body fail, so allow is false and the deny test passes: for the wrong reason. A deny that passes for the wrong reason is a latent allow. Fix the fixture, not the policy.

Failure modes to test explicitly. Bundle distribution delay: OPA serves the old revision until the new one lands, so measure rollback propagation against your SLO. Stale decision caches. And assert the audit record, not just the grant: an allow with no decision log is untestable in an incident.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11

Choose fail-open, fail-closed, and cached behavior for policy outages.

Answer

I would not pick one global mode. I'd pick per action class, because a wrong allow and a wrong deny have different costs. My default: fail closed for writes and trust changes; fail open for low-risk reads; cached last-known-good for safety-critical reads/control paths with a short TTL and revocation-aware cache.

Action classOutage behaviorConcrete setting
Admin write, IAM/trust change, data exportfail closedKubernetes admission webhook failurePolicy: Fail; Envoy ext_authz failure_mode_allow: false
Safety-critical read/control, e.g. on-call restart, break-glasscached last-known-good allow, TTL 30s, bound to mTLS identity and policy versionOPA decision cache with 30s TTL; if revocation SLO is 5s, TTL must be <=5s or push revocations
Public/low-risk readfail openno policy call on hot path; local allowlist

Why cached grant vs cached denial? A cached denial is safe but turns a policy outage into an availability outage. A cached grant preserves availability but extends the life of a permission that may have been revoked. So cache only positive decisions, only for actions where unauthorized access is bounded and reversible, and make TTL the maximum stale window. If your revocation SLO is 5 seconds, a 30-second TTL violates it; either shorten TTL or push revocations to the cache. Versioning matters because two policy replicas on different bundle versions can disagree: one allows, one denies. Pin a monotonic bundle version and reject decisions from stale replicas. If OPA bundle polling is configured at 60s, polling alone cannot meet a 5s revocation SLO.

Hypothetical trace: request DELETE /prod/db. Gateway calls ext_authz. Policy service times out after 50ms. Fail-closed: 503, no delete. Fail-open: 200, delete proceeds. Cached: cache has allow from 12s ago, TTL 30s, identity matches, policy version v42; allow proceeds, but audit marks degraded=true. If revocation was issued at t=5s, this request is stale for 25s.

Failure modes and detection: watch ext_authz error rate, admission webhook rejection count, OPA bundle age, cache age p99. Fail-closed shows 503s at the gateway; fail-open shows 200s but audit logs missing policy decision IDs. Real break: a terminated employee's cached grant survives TTL; a cached denial blocks a break-glass restart. Recovery: after restoration, reconcile sessions, re-evaluate cached grants, audit all degraded decisions, and revoke anything issued under outage mode. Never turn outage into anonymous or administrator access.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12

Secure the zero trust policy and identity control plane itself.

Answer

Assumptions: an enterprise with a central policy decision point (OPA, Cedar/Verified Permissions, or a managed policy service), an IdP for human identity, a workload identity issuer (SPIRE), and enforcement points (PEPs) at gateways and sidecars. The plane is the thing that grants or denies access.

Core answer

The control plane is not an ordinary service. Its compromise is a universal grant; its outage is a universal deny. So secure it on three axes: who can change it, what it trusts, and how you recover it.

  • Who can change it. Every admin action runs under a phishing-resistant, hardware-backed identity (FIDO2/WebAuthn), scoped just-in-time, never standing. High-risk changes (adding a trust root, editing global policy, disabling a control) require two-person approval.
  • What it trusts. Policy and config are signed artifacts in git, verified at the consumer, not pushed as trusted blobs. Keys live in an HSM (FIPS 140-3 Level 3) or a cloud KMS with the same boundary.
  • How you recover it. An independent break-glass path that does not depend on the plane, plus tested offline restore.

Why the plane differs

A normal control plane's failure degrades one service. Here the PDP's decision is the access decision, and a compromised issuer mints identities every PEP accepts. That is why "verify at consumers" matters: if a PEP trusts a bundle because it arrived over mTLS, compromising the distribution channel equals compromising every PEP. Signing the bundle and pinning the verification key at the PEP moves the trust boundary to the key.

Trade-offs

The full stack (HSM, dual control, multi-region, signed bundles) is expensive and slows change. A lighter approach is defensible: a managed IdP with hardware keys, policy in git with signed commits, single region with tested restore. The deciding criterion is how many distinct trust roots you have and whether one policy change can grant broad access. If changes are narrow and per-resource, single approval on a managed service is fine. If one change can grant tenant-wide access, dual control and an HSM are not optional.

Failure modes and detection

FailureDetectContain
Compromised issuerIssuance-rate anomaly, unknown issuer IDRevoke trust bundle, rotate CA
Malicious policyPolicy diff review, decision-log samplingRoll back to last known-good signed bundle
Key lossSigning failureRestore from offline escrow
PEP bypassNetwork policy, missing mTLSDeny non-mTLS traffic
Rollback attackBundle version regressionMonotonic version + bundle expiry
PDP DoSLatency/error SLO breachState fail-closed vs fail-open explicitly

Worked trace: policy change to PEP

  1. Engineer opens a PR against the policy repo; CI runs opa test and conftest; commit signed with cosign.
  2. Two approvers sign off; merge produces bundle v42.
  3. CI signs the bundle with a KMS-held key and publishes it to the bundle server.
  4. PEP polls the bundle API every 30s, verifies the JWT signature against its pinned public key, and rejects any version ≤ current (rollback guard).
  5. PEP loads the new policy; decision logs stream to an immutable store.

Step 4 is the load-bearing one: the PEP, not the server, decides what is trustworthy.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-22

Respond to a compromised zero trust policy engine or identity issuer.

Answer

Assume the policy engine or issuer is compromised: the attacker can mint tokens, alter policy, or sign assertions. I would treat it as untrusted and move to a known-good recovery path. First 60-120 seconds: declare major incident, freeze all policy and key changes, and answer three questions: which trust roots are affected, what is the blast radius, and can we keep critical access without trusting the compromised component. I would not try to clean it in place.

Mechanism. Pinned trust beats live policy distribution because live distribution is the channel the attacker controls. If the policy engine can push new policy to PEPs, the attacker can push allow-all. A pinned, offline-signed policy bundle with a monotonic version and a threshold of signatures means a PEP only accepts a bundle signed by keys it already trusts and only if the version is higher than the last accepted. For an issuer, PEPs should validate JWTs against a pinned JWKS or pinned root CA, not fetch keys from the compromised issuer on every request. If they must fetch, cache with a short TTL and pin the expected kid set.

Concrete example. OIDC access token TTL 10 min, refresh token 8 h, PEP JWKS cache 5 min. A revoked signing key can still validate tokens for up to 15 min worst case. To cut that, push a deny-list of kid values over a separate authenticated channel, or drop cache TTL to 60 s during the incident. Example kid: prod-2024-11. A PEP verifies a recovery bundle by checking signature against the pinned root, version greater than last accepted, not expired, and quorum signatures if threshold. If any check fails, it stays on last known-good policy or fails closed for high-risk actions.

Containment. Use emergency authority protected by separate credentials, e.g., break-glass account with hardware key and two approvers. Stop policy distribution by disabling the compromised engine's signing key at the PEPs, not by asking the engine to stop. Isolate control components, revoke admin sessions, rotate bootstrap tokens. Constrain high-risk resource actions: deny writes, admin plane, and token issuance; keep read-only mission access if pinned policy allows.

Trade-offs. Full lockdown vs constrained access. Criteria: blast radius, criticality, time to restore. If the issuer can mint admin tokens, lock down all admin planes. If only one tenant is affected, lock down that tenant, not the fleet. When wrong: locking down everything when one tenant is affected causes an outage; not locking down when admin plane is affected lets the attacker persist.

Failure modes. Split-brain: some PEPs accept malicious policy, others pinned old. Detect by comparing policy version hashes across fleet; cost is inconsistent decisions. Stale cache: revoked tokens still valid. Detect with a synthetic revoked token every minute; cost is attacker access up to TTL. Emergency authority abuse: detect by alert on break-glass use outside incident; cost is insider risk. Recovery path compromised: detect by signature verification failures; cost is re-recovery.

Testing and recovery. Negative authorization tests exercise the deny path: expired token, token signed by revoked kid, wrong audience, policy version rollback, subject not in group, request after revocation. Assert 401/403 and no side effect. Canary 1% of traffic to recovered PEPs, watch deny rate and latency. Rebuild from verified artifacts, rotate all keys, reconcile grants and resource actions during the window by replaying independent audit logs; any action without a matching policy decision is suspect. Restore in stages with heightened monitoring.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-8

Design zero trust access for unmanaged personal devices.

Answer

Start by separating what you can trust on an unmanaged device from what you can't. You can strongly authenticate the user: phishing-resistant MFA via WebAuthn/FIDO2 security keys or platform authenticators, plus SSO through OIDC with short-lived access tokens (10–15 minutes) and refresh tokens bound to the session, never persisted to disk. You cannot trust the endpoint: no MDM, no verified OS patch level, no guarantee against keyloggers or screen capture. So the design principle is: the device is a dumb viewport, and all policy enforcement happens server-side.

Tier the access by data sensitivity.

TierExampleControl
LowIntranet portal, read-only dashboardsHardened browser session: remote browser isolation (e.g., Cloudflare Browser Isolation, Island), watermarking, copy/paste and download blocked, session capped at 8–12 hours
MediumInternal wikis, ticketing with PIIAbove plus step-up authentication (re-enter credentials or security-key touch within the last 5 minutes), data masking on render
HighProduction admin, source repos, financial systemsNo local browser at all: managed VDI (Amazon WorkSpaces, Windows 365) or app streaming (AppStream 2.0), per-session approval, no clipboard/file redirection

Enforcement points, in order of the request path:

  1. Identity provider (Okta, Entra ID): issues tokens scoped to a single app, with aud restrictions and conditional access evaluating user risk, location, and authentication strength.
  2. Policy broker / ZTNA (Cloudflare Access, Zscaler Private Access): the device gets network reachability to only the brokered app. No VPN, no flat network access. Broker sessions re-evaluate posture every 5–15 minutes; a dropped heartbeat kills the tunnel.
  3. Application: object-level authorization on every request. The broker authenticates; the app authorizes. Never let network position substitute for app-level checks.

What stays off the device: no long-lived tokens (refresh tokens held in an HttpOnly, Secure, SameSite=Strict cookie at most; nothing in localStorage), no data at rest, no credentials cached. If the browser session dies, nothing sensitive remains.

Failure modes to name in the interview:

  • Token theft / session hijacking: mitigate with token binding (DPoP or mTLS-bound tokens) and short lifetimes; detect via impossible-travel and concurrent-session analysis in the IdP logs.
  • Screen capture / shoulder-surfing: isolation blocks file exfiltration but not a phone photographing the screen. Watermark with user ID and timestamp so leaks are traceable: this is detection, not prevention. Say so.
  • Rooted device with a keylogger: nothing on-device is trustworthy; that's why the security key does the cryptographic assertion (FIDO2's challenge-response defeats replay) and why high-tier access never touches the local browser.
  • Broker outage: it's a full access outage by design. Have a break-glass path: a separate, tightly-logged approval workflow, not a fallback VPN.
  • Lost device: nothing to wipe, because nothing was stored. Revoke the user's sessions centrally; kill within one token lifetime (≤15 min).

Privacy: any device signal you do collect (jailbreak detection, browser fingerprint) needs disclosed consent and legal review, especially under GDPR. One reason to collect as little as possible and enforce server-side.

Exceptions: any bypass (e.g., contractor with a locked-down corporate laptop getting Tier 2 access) is scoped to specific resources, expires in days not months, and appears in a quarterly access review.

Close with the trade-off: this architecture accepts that you can't verify the endpoint, and it concentrates cost and operational load on the broker and VDI fleet. Remote browser isolation and VDI add a rendering hop per interaction, so budget for the added latency and the infrastructure to serve it, and measure it in your own environment rather than assuming a vendor's number. You're containing the blast radius of a compromised device to a single short-lived, non-exportable session.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-9

Migrate a legacy application that supports only shared passwords and network allowlists.

Answer

What I'd say in the first two minutes

The first thing I need to know is whether the app can change at all. If it can't this quarter, and it only understands one shared username/password plus an IP allowlist, I stop trying to fix the app and change what sits in front of it.

Assumption I'd state out loud: the app stays reachable on its existing protocol, we can put a proxy on the network path, and we can edit the allowlist. If any of those is false, the plan changes and the honest answer is a network-level compensating control plus a dated retirement commitment.

Given that, the move is an identity-aware proxy. Employees authenticate to the proxy with OIDC and MFA plus a device check; the proxy becomes the only source address the app's allowlist accepts; the proxy holds the shared credential and injects it into the backend session. The shared password stops being something people know and becomes a service credential one process uses. Concrete options: Teleport Application Access, Cloudflare Access, Google IAP, AWS Verified Access (its policies are written in Cedar), or Pomerium. If the app speaks RDP or SSH rather than HTTP, a privileged access broker such as CyberArk, Delinea or Okta Privileged Access does the same job with session recording. Vault or the cloud secret manager stores the credential so rotation is a runbook, not a mailing.

Why that works

Attribution lives in the join, not in the app. The app still writes shared_user on every line. The proxy logs the OIDC subject, the device certificate, a session ID, start and end time, route, and a recording. Join proxy session records to app log lines on timestamp and source connection, and each app action inside a session lands on a named person. Before, one principal covered everyone; after, one principal per session.

employee --OIDC+MFA--> IdP
   |
   v
identity proxy   egress 203.0.113.10
   |  injects shared cred
   v
legacy app   allowlist: 203.0.113.10/32

That /32 replaces something like 10.0.0.0/8 in the allowlist. A /8 holds about 16.7 million addresses; a /32 holds one. If 240 people were reaching the app from a corporate /16, all 240 now arrive from that single address, each with their own subject.

Failure modes and what they look like

Bypass is the one that kills the design. The app usually has a second listener, a direct database port, or a stale VPN route. Detect it by denying app-subnet egress except to the proxy and alerting on any other source in flow logs. Then run an unenrolled host against every port, because the firewall rule and the reality often differ.

Session theft: bind the session to the device's client certificate, keep the proxy session short, and force re-authentication on admin routes. Detect it when one session shows up with two different device certificates.

Proxy outage stops all work. That beats the status quo but still needs a break-glass path: a credential sealed in the secret store, two-person approval to open it, and a page on use.

Rotation breaking live sessions: because the proxy, not a human, holds the credential, rotate it in the secret store and let the proxy pick up the new value on its next backend connection. Existing sessions stay pinned to the old one until they end.

What this cannot fix

The proxy gives coarse role-to-route authorization; it cannot create object-level authorization the app never had. An authenticated employee can still read another customer's record if the app allows it. Record that as accepted residual risk, put dual control or read-only mode in front of the highest-impact routes, record those sessions, and attach a funded rewrite or retirement date. Test: unenrolled host blocked, direct app port blocked, shared credential gone from people and docs, a user disabled in the IdP loses access on the next request, two concurrent sessions for one user are visible, and break-glass is exercised.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10

Design partner and supplier access under zero trust principles.

Answer

Assumptions. The partner already runs an IdP (Okta, Entra ID, Google Workspace). You run Entra ID as your IdP and AWS for workloads. Resources are internal APIs plus multi-tenant SaaS. A contract with named contacts and a termination clause exists.

The answer. Don't create standing accounts for partner staff in your directory. Federate their identity, but terminate the trust at your own STS and re-issue your own short-lived credential scoped to the action. Three layers, in order:

  1. Governance → machine-readable entitlements. The contract's scope becomes a versioned policy file: which partner org, which roles, which resources, which actions, which data classes, expiry date. That file is the source of truth; IdP config is generated from it, not hand-edited.
  2. Authentication → validate, then re-issue. Accept OIDC/SAML only from the registered issuer. Validate iss against cached OIDC discovery metadata, aud against your client ID, signature against JWKS, exp/nbf, and nonce. Then issue your token with your app roles. Never accept the partner's role or group strings as entitlements.
  3. Authorization → per request, at the resource. The token carries identity, not permission. The resource asks a policy engine, Cedar (AWS Verified Permissions) or OPA, with subject, action, resource, and context (tenant, purpose, device posture).

Trace: partner support engineer reads a ticket.

stepwhat happensconcrete value
1Partner authenticates to their IdPOIDC ID token, aud = your app client ID
2Your STS validatesiss in registered list, JWKS signature, exp within the 60–90 min default
3STS issues your tokenapp role partner-support, 60–90 min lifetime
4Resource calls policy engineCedar evaluates below
5AWS accessAssumeRoleWithWebIdentity, 1 h session default
CEDAR
permit(
  principal in Group::"partner-support",
  action == Action::"readTicket",
  resource
) when {
  resource.tenant == principal.tenant &&
  context.purpose == "support" &&
  context.device.compliant
};

Supplier workloads get the same treatment without a human: SPIFFE/SPIRE issues an SVID (1 h TTL default) that your STS maps to a role, or the supplier's OIDC issuer federates through AssumeRoleWithWebIdentity. No long-lived API keys in a config file.

Trade-offs. Federation is right when the partner has a real IdP and you want lifecycle to follow their joiner/mover/leaver. Managed guest accounts (Entra ID B2B) are right when the partner is small or has no IdP: you own the credential, but you also own offboarding. Isolated delivery (brokered VDI or a jump host with no data egress) is right when the partner must see data but must not hold it; it costs latency and usability, so reserve it for the highest data classes. Federation is wrong when the partner cannot meet your assurance bar: fall back to isolated delivery rather than weakening MFA.

Failure modes.

  • Partner IdP compromise. Signatures still validate; the attacker mints valid tokens. Your independent kill switch is disabling the inbound federation trust in your IdP, which invalidates all sessions regardless of partner state. Entra ID continuous access evaluation propagates revocation in near real time; IP-change events take up to ~15 minutes.
  • Claim manipulation. Partner adds a group named like your admin role. Map by explicit allowlist of issuer+claim values, never by name matching.
  • Terminated partner user. Partner stops issuing, but an already-issued refresh token can live up to 90 days by default. Cap refresh lifetime and rely on CAE, not on the partner's word.
  • Cross-tenant. Take tenant from your directory record, not from a token claim; authorize at the resource.

Test: claim tampering, terminated user holding a live refresh token, cross-tenant read, stolen session, and contract termination. Does the trust actually disappear?

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-14

Apply zero trust principles to data access and exfiltration risk.

Answer

Core answer (first 90 seconds)

Zero trust for data means the network and the session stop being authorization inputs. Every read of a record is a policy decision made at access time against identity, purpose and tenant, and it denies by default. Assume the caller is hostile and the perimeter is already crossed.

Assumptions I'd state up front: a multi-tenant store, human analysts plus service workloads, at least one bulk export path (API, warehouse, object storage), and a regulatory driver (GDPR/PCI) that makes bulk export the thing you are actually defending.

Three layers, each enforced independently: identity (who, with what purpose), policy (may this principal do this action on this object), and egress (where may the bytes go). Any one layer alone is bypassable.

Mechanism

LayerMechanismWhat it stopsCost
IdentityShort-lived workload identity: SPIFFE SVID, or an OIDC token exchanged per request (RFC 8693). AWS STS AssumeRole defaults to 3600 s, max 43200 s; pick minutes, not hours.Long-lived credential replayToken-exchange plumbing
PolicyDefault-deny at the data layer, not the API. Postgres RLS USING (tenant_id = current_setting('app.tenant_id')::uuid); Snowflake row access + masking policies; BigQuery row access policies + policy tags.IDOR and cross-tenant reads when the app forgets a WHEREPolicy bugs are global; needs tenant_id indexed
EgressDestination allowlist (S3 bucket policy with aws:SourceVpce), per-principal volume caps, DLP scan on exportApproved-channel exfiltrationLatency on export path

Trace: analyst exports a report

  1. Gateway validates the OIDC token: aud=reports-api, exp under 15 min, sub maps to a principal. Mismatch → reject.
  2. Policy engine (OPA/Rego or Cedar) evaluates (principal, action=export, resource, purpose). No matching allow → deny.
  3. DB session sets app.tenant_id; RLS filters rows. The salary column is masked unless purpose=payroll.
  4. Response bytes are counted against a 100 MB/hour per-principal cap; the destination must be an allowlisted bucket.

Why caps alone fail: a 2 TB table at 100 MB/hour takes 20,000 hours to exfiltrate, so a cap is a speed bump, not a control. The real control is per-object volume anomaly: alert when a principal's daily distinct-row count exceeds, say, 3× their 30-day p95. That catches the slow drip.

Trade-offs

RLS vs. per-tenant schemas vs. masked materialized views. RLS: one copy, no drift, but a policy bug is global and unindexed predicates degrade plans. Per-tenant schemas: strong isolation, N migrations, cross-tenant analytics impossible. Masked views: cheap reads, staleness and storage cost. Decide on tenant count, whether cross-tenant analytics is required, latency budget, and blast-radius tolerance.

Failure modes and detection

  • Confused deputy: a shared service account reads any tenant. Detect via access logs where one principal touches more than one tenant in a window. Fix with per-request scoped tokens carrying a tenant claim.
  • IDOR: authorize on the resolved object's tenant, never the path parameter.
  • Backup/export bypass: snapshots and pg_dump ignore RLS. Encrypt with a KMS key whose policy excludes analyst roles, and test the restore path.
  • Detection: CloudTrail S3 data events (billed separately), VPC flow logs, GuardDuty S3 protection, Snowflake ACCESS_HISTORY for query-level lineage.

Measure: unauthorized-path denial rate (red-team attempts blocked ÷ attempts) and blast radius (max distinct objects one compromised principal can reach).

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-18

Design and govern emergency break-glass access.

Answer

Break-glass access is a last-resort mechanism to regain control when normal IAM is unavailable or compromised. Assume a cloud environment where the primary IdP (e.g., Azure AD, Okta) could be down or breached, and we need to recover administrative access to critical systems. The core design: a small number of individually attributable, hardware-protected credentials stored offline, with a quorum-based unsealing process, time-bound activation, and out-of-band alerting. Governance: rotate after use, review logs, and test quarterly.

Three credible approaches:

ApproachMechanismTrade-offsWhen to use
Hardware key (e.g., YubiKey)Each break-glass admin holds a hardware key; credentials are encrypted to that key and stored in a safe.Simple, strong phishing resistance. But if the key is lost, recovery is hard; requires physical access.Small teams, low operational complexity.
Sealed quorum (e.g., Shamir's Secret Sharing)Split the break-glass secret into N shares; require M to reconstruct (e.g., 3-of-5). Shares stored in separate safes.No single point of failure; requires collusion for misuse. But slower to activate; share management overhead.High-security environments, insider threat concerns.
Managed PAM (e.g., Azure PIM, CyberArk)Just-in-time role activation with approval, MFA, and time-bound sessions.Auditable, automated rotation. But depends on the PAM system being available; if IdP is down, PIM may be inaccessible.Organizations already using PAM; need for audit trails.

Deciding criteria: threat model (insider vs external), recovery time objective (RTO), and operational complexity. For example, if the IdP is the compromised system, a PAM that relies on that IdP is useless; you need an out-of-band mechanism like sealed quorum.

Failure modes:

  • Shared password in a vault accessible via the same IdP: if IdP is breached, attacker gets break-glass. Detect by monitoring vault access from unusual IPs.
  • Break-glass account not monitored: attacker uses it silently. Detect by alerting on any use of the break-glass account via CloudTrail or Azure AD audit logs.
  • Quorum shares held by same team: collusion risk. Detect by requiring shares from different departments and auditing share access.
  • No rotation after use: credentials remain valid. Detect by checking last rotation date; enforce rotation within 24 hours.

Worked example (AWS break-glass):

  1. IdP outage. Two authorized engineers retrieve sealed envelopes from separate safes.
  2. They combine shares (3-of-5) to reconstruct the break-glass IAM user password.
  3. They log into AWS console with that user and MFA hardware key.
  4. They create a temporary admin user, restore IdP.
  5. They trigger an alert to security team via out-of-band channel (e.g., PagerDuty).
  6. After recovery, they delete the temporary user, rotate break-glass credentials, and reseal shares.
  7. Security team reviews CloudTrail logs for all actions.

Governance: set a 1-hour maximum activation window; require 2-person approval when available; log all actions to an independent SIEM; rotate credentials after each use; test quarterly with a game day that includes revocation and recovery. Measure: time to activate, time to terminate, number of stale break-glass accounts.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-15

Design visibility and analytics for a zero trust architecture.

Answer

Assumptions I'd state up front: ~20k authorization decisions/sec across a service mesh plus a handful of SaaS apps; a PDP/PEP split in the NIST SP 800-207 sense (policy engine + policy administrator behind a policy enforcement point); 30 days hot retention for incident reconstruction, 400 days cold; the security team owns the telemetry store, not the platform team that runs the PDP.

The 90-second answer. One correlation ID, propagated end to end. Use the W3C Trace Context traceparent header (16-byte trace-id, 8-byte span-id) so the ID the client sends is the same one in the PEP access log, the PDP decision log, and the resource's own audit event. Every decision emits a structured event: subject and delegation chain, resource and action, assurance level plus each signal's source and age, the policy bundle revision, the decision with its obligations and reason, the credential/session ID, and the PEP's actual outcome. Decision and outcome are separate fields because they diverge: the PDP says allow and the PEP still fails closed on a timeout.

Why the bundle revision travels with the decision: a decision is only reproducible against the exact policy it was made under. OPA's decision log carries a bundles map of name→revision for precisely this reason. Without it, a spike in denies is indistinguishable from a policy push, and you cannot replay the decision during an incident.

Alternatives, and when to pick them.

ApproachCostPick when
Full-fidelity decision log per request~2.6 TB/day at 20k rps (arithmetic below)Regulated actions, break-glass, anything you must reconstruct
Sampled logs (1–10%) plus full logs for deny and privilege-change~1/10 the storageHigh-volume read paths with low blast radius
Aggregated metrics only (counters, histograms)Cheap, Prometheus-scaleDashboards and SLOs: never for incident reconstruction

Deciding criterion: can you reconstruct one disputed access from the store alone? If not, you are sampling the wrong thing. Sample allows on read-only paths; never sample denies, privilege grants, or admin actions.

Arithmetic. 20,000 decisions/s × ~1.5 KB JSON = 30 MB/s = 2.59 TB/day; 30 days hot ≈ 78 TB. That number is what forces the table above: full fidelity everywhere is not affordable at this rate.

Failure modes and how you detect them. Stale signals: a device posture check that has not refreshed in 24h still reads "compliant." Alert on signal age, not signal value. Cache age: a PDP decision cache with a 5-minute TTL means a revocation takes up to 5 minutes to propagate. Measure revocation propagation as a p99, not a boolean. Bypass: a service reachable without traversing a PEP shows up as decisions with no matching resource-side audit event; join the two streams and alert on the gap. Normalize both streams to one schema (OCSF is the common choice) or the join never works.

What would change my answer: if the mesh already emits full Envoy access logs carrying trace context, build on those instead of adding a second decision-log pipeline; if the PDP emits no revision, fix that before building dashboards, because every analytic downstream depends on it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-20

Define meaningful zero trust architecture metrics.

Answer

The 60-second answer

The trap here is that "zero trust metrics" usually collapses into a list of nouns. A metric is only meaningful if it changes a decision. So I'd define meaningful as three properties: it names the control and the specific failure it detects, it has a denominator and a threshold that triggers an action, and it's paired with a counter-metric so it can't be gamed by weakening the policy.

One assumption I'd state up front: you already have a PDP/PEP split. A policy decision point (OPA, Entra ID Conditional Access, BeyondCorp's access proxy) and enforcement points in front of the resources. Without that, you're measuring intent, not architecture. NIST SP 800-207 (Aug 2020) gives the tenets but no metric catalog; CISA's maturity model gives pillars, not thresholds. You pick the thresholds yourself, and you have to defend them.

The metrics that survive

MetricFailure it detectsThreshold that triggers actionCounter-metric
Phishing-resistant credential share (FIDO2/WebAuthn)Session/token replay after credential phishing<95% of human identities → block legacy authHelpdesk unlock volume
Standing admin principals in cloud IAMBlast radius from one compromised principal>20 standing admins → convert to JITJIT approval latency
Reachable (src, dst, port) tuples per segmentPolicy drift widening east-west reachAny increase not on the change ticket → roll backDenied-connection count
p95 revocation latency (disable → last accepted token)Stale authorization after offboarding>5 min → shorten token TTL or add introspectionPDP p99 latency
PDP-bypassed request countFail-open during a PDP outage>0 outside declared break-glassPDP availability
False-deny rate on legitimate attemptsFriction mistaken for security>1% → tune policyStep-up rate per 1k sessions

Why each one detects what it claims

Revocation latency is the clearest example. With OIDC access tokens at a 1-hour TTL, the worst-case stale window is 60 minutes: a disabled identity keeps working for up to an hour. To hit a 5-minute target you either drop the TTL to 5 minutes, which multiplies token issuance and introspection traffic roughly 12x, or you keep the 1-hour TTL and add introspection or revocation push at the PEP. That's the trade-off, and the metric is what forces you to pick a side.

Reachability is the other one I'd insist on. Don't diff policy text: two rules can compose into a path neither author intended. Run a canary in each segment that attempts the tuple set nightly; the metric is the count of tuples that actually succeed. That catches drift that a text diff misses.

Fail-open is a decision, not a default. If the PDP is down and the PEP fails open, zero trust is off and nothing tells you. So "requests that bypassed the PDP" is a first-class metric with a target of zero outside declared break-glass.

Failure modes

Gaming is the first: driving step-up rate down by widening the policy. That's exactly why step-up is paired with false-deny and reachability: you can't move one without moving the others.

Inventory drift is the second. A workload deployed without a SPIFFE identity or IdP registration is invisible to policy. Detect it by diffing cloud resource inventory against workload registrations daily; the metric is unregistered-resource count, target zero.

Break-glass becoming standing privilege is the third. Measure activations and review age. If a break-glass account is used monthly, it isn't break-glass.

Finally, retire metrics. If one hasn't changed a decision in two quarters, it's decoration. Pick five to seven, give each an owner and the decision it drives, and drop the rest.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-19

Use CISA's maturity model without turning it into checkbox compliance.

Answer

What I'd say in the first two minutes

Assume CISA's Zero Trust Maturity Model v2.0: four stages (Traditional, Initial, Advanced, Optimal) across five pillars (Identity, Devices, Networks, Applications & Workloads, Data), with three cross-cutting capabilities (Visibility & Analytics, Automation & Orchestration, Governance). Treat it as a diagnostic, not a scorecard. Use it to find where a pillar's claimed stage is contradicted by evidence, then spend on the contradiction.

Concretely: score each pillar function against evidence pulled from a system of record, not a self-assessment. Rank the gaps by the risk they carry. Write each remediation as a capability delta with a test that can fail.

Why evidence beats labels

A maturity label is an assertion about a control's coverage and enforcement. Self-assessment measures intent; telemetry measures enforcement. The two diverge exactly where it matters: on the paths an attacker uses. So the baseline step is a set of queries, not a workshop.

Worked example (figures illustrative):

Pillar functionClaimedEvidence queryActual
Identity / authenticationAdvancedIdP: share of interactive logins using phishing-resistant MFA92% of workforce, 0% of 340 service accounts
Identity / privileged pathAdvancedShare of admin sessions from managed, compliant devices89%
Networks / segmentationOptimalEast-west flows crossing a policy enforcement point41%
Data / accessAdvancedSensitive stores with attribute-based access decisions logged3 of 19

The composite "Advanced" is true for the workforce and false for the machine-identity path. That one row is the roadmap.

Failure modes and how to catch them

  1. A pillar scored Optimal while a flat network persists. Detection: reconcile the scorecard against an actual flow map. If Networks reads Optimal but a week of flow data shows most east-west traffic crossing VLANs with no enforcement point, the score is fiction. Owner: network security. Cadence: quarterly flow review.

  2. A composite score hides the weak pillar. Averaging five pillars lets four Advanced rows carry one Traditional row. Detection: never average. Report per pillar function, and mark any function with missing evidence as "unmeasured", not "Initial".

  3. The maturity label drives a purchase. Detection: read the roadmap. If a line item names a product instead of a capability delta plus a test that can fail, it is checkbox compliance with a PO number.

  4. Gaps accepted silently. Detection: every residual gap gets an owner, an expiry date and a compensating control. A gap with no expiry is a decision nobody made.

What would change the answer

A regulator or contract that fixes the order: PCI DSS 4.0's future-dated requirements took effect 31 March 2025, so encrypted transmission over open networks moves up regardless of maturity stage. A breach or red-team finding on a path you scored Advanced. Or a mission change that makes a pillar irrelevant: retire the workload and its Data stage stops mattering.

Report progress as evidence levels per function plus the business outcome, not a single number.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-21

Threat-model a zero trust architecture.

Answer

Assumptions: cloud-native multi-tenant SaaS, ~2,000 staff, Kubernetes workloads, OIDC IdP, SPIFFE/SPIRE for service identity, EDR on managed laptops. If your environment is single-tenant with no lateral path, say so: the trade-off section below changes the answer.

Core answer

Zero trust replaces "inside the perimeter is trusted" with per-request authorization: every request is authenticated, authorized against policy using fresh context, and logged. NIST SP 800-207 names the moving parts: policy decision point (PDP), policy enforcement point (PEP), policy information point (PIP), and three deployment variants: device agent/gateway, enclave gateway, resource portal. The threat model is therefore not "how do attackers get in" but "what happens when any single component (identity, device, signal, policy, or the decision plane itself) is wrong or compromised."

Boundaries and flows: subject → IdP (OIDC); workload → SPIRE (X.509 SVID, spiffe://td/ns/sa); device → MDM/EDR; context → PIP; policy → PDP; enforcement → PEP (sidecar, gateway, or portal). Each arrow is a trust boundary you must be able to break independently.

Threats, mechanism, detection

  • Session/token theft. Adversary-in-the-middle phishing proxies the IdP login and steals the session cookie; MFA is already satisfied. Detect: same session from two ASNs within minutes, impossible travel, token-binding mismatch. Mitigate: sender-constrained tokens (DPoP or mTLS-bound), 5–15 min access-token TTL, refresh rotation.
  • Stale posture poisons decisions. PIP caches the EDR verdict for 15 min; a device compromised at T+1 still passes until T+15. Detect: alert on decisions whose signal age exceeds the policy TTL. Mitigate: bound signal age in policy, fail closed on stale.
  • PEP bypass. A workload talks directly to the datastore, skipping the sidecar. This is the classic shadow path. Detect: network policy denies east-west except via PEP; audit connections lacking a PEP decision ID.
  • Confused deputy. A PEP with a broad service account acts for a caller who passes a resource ID it doesn't own. Detect: cross-tenant access attempts in decision logs.
  • Policy rollback. Bundles are signed, but an attacker replays v3 after v4 revoked a rule. Detect: monotonic version counter; reject version < current.
  • Decision-plane DoS. PDP down forces a fail-open (no authz) or fail-closed (outage) choice.

Worked trace: stolen cookie replay

teventdecision
0:00AitM proxy relays login; IdP issues session S, 15 min token—
0:02Attacker replays S from ASN 64500; user's baseline is 3320PEP: signature valid, exp valid, posture fresh (4 min) → allow
0:03PIP enrichment: ASN change vs 30-day baseline → risk 0.82 (threshold 0.70)PDP: step-up, require WebAuthn
0:03Attacker has no hardware keydeny, revoke S

Detection signal: decision log entry risk_score=0.82 action=step_up outcome=deny.

Trade-offs and when not to bother

Centralized PDP gives consistency but is a single point; distributed PDPs survive outages but drift. Fail-open keeps availability and silently drops authorization; fail-closed preserves security and turns a PDP bug into a site-wide outage. Pick per resource class, not globally. Zero trust is not worth it for a single-tenant internal tool with no lateral movement path: the cost (PDP HA, signal pipelines, authz on-call) exceeds the risk. And it never proves benign intent: a legitimate insider with valid credentials still passes every check. It bounds blast radius; it does not detect malice.

Validate with negative tests (replay a revoked token, replay an old bundle, connect around the PEP) and record residual risk per boundary.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-2

Design a zero trust migration program for a hybrid enterprise.

Answer

Zero trust isn't a product you buy; it's the removal of implicit trust from every access decision. For a hybrid estate, the honest framing is: today, most of our access control is network location, VPN plus flat internal subnets, and the program replaces that with per-request decisions based on identity, device posture, and the resource being touched. I'd run it as a migration, not a big-bang redesign, because the failure mode of ambitious zero trust programs is that enforcement breaks a critical flow nobody documented and the program loses its political capital in week three.

Phase 1: inventory and a decision point. Build an authoritative map of identities (human via IdP, workload via SPIFFE/SVID or cloud instance identity), devices, applications, and east-west flows. The practical tool is flow logs: VPC flow logs, NetFlow from the core switches, plus eBPF-based agents like Cilium Hubble on the k8s side, because nobody knows their flows, and the ones you don't know are the ones that break. Tag each flow with an owner and a business criticality. Expect this to take months, and expect the flow map to be larger than the CMDB claims: that gap is itself a finding, and I'd quantify it in the first status report rather than guess at a number.

Phase 2: foundations. Consolidate identity into one IdP (Okta, Entra ID, whatever you have) and federate everything to it via OIDC/SAML; kill LDAP binds to apps one by one. Get device posture (managed, encrypted, patched within N days, EDR present) flowing from MDM into the policy engine. Pick a policy engine that evaluates identity + device + resource + context per request: OPA/Rego sidecars for service-to-service, or an identity-aware proxy such as Cloudflare Access or Google Cloud's Identity-Aware Proxy for human access to internal apps. The key design decision is where enforcement lives, and that's the main trade-off:

Enforcement pointWins whenCost
Network/appliance proxy in front of appsApp can't be modified; fast to deployApp still sees coarse identity; the proxy becomes a trusted subnet de facto; adds a network hop on every request
App-level authz (OAuth scopes, SPIFFE mTLS between services)You own the code; need fine-grained, durable guaranteesEngineering cost per app; slow to roll across hundreds
IAP + service mesh for new services, brokered path for legacyHybrid realityTwo systems to operate

I'd take the third. A proxy alone in front of a legacy app is cosmetic zero trust: the app still trusts the network behind the proxy.

Phase 3: pilot with shadow mode. Pick one bounded, high-value flow. Say, contractor access to an internal wiki, or one service-to-service pair. Run the policy engine in shadow/log-only mode for 2–4 weeks and compare its decisions to what actually happened. The number that matters is the shadow-mode disagreement rate: if the engine would have denied 5% of requests that succeeded, you've found either a policy bug or undocumented behavior, and you fix it before enforcement. Then enforce for a canary group, with a documented rollback (flip the policy to permissive, keep logging) that on-call can execute in minutes, not via a change review.

Concrete failure modes to test and watch for:

  • Break-glass and degraded mode: if the IdP or policy engine is down, does the whole estate lock out? You need cached decisions or a pre-provisioned break-glass identity, and you need to have tested it: otherwise your zero trust control plane is a single point of failure with a worse blast radius than the VPN it replaced. Detection: synthetic canary requests every minute from each region.
  • Revocation latency: an employee is terminated. How long until the denial propagates? If tokens have 1-hour lifetimes and you rely on expiry, that's a 60-minute window. Fix with short-lived tokens (5–15 min) plus a revocation check or token introspection on the critical path, and measure the actual p99 denial time.
  • Tenant isolation: if the estate hosts multiple business units or customers, test cross-tenant paths explicitly. A principal from tenant A with valid credentials must not reach tenant B's resources even when both are "allowed" by the same policy engine. Detection: continuous cross-tenant probes that assert denial, run as part of the canary suite, not a one-time pen test.
  • Legacy protocols: SMB, mainframe, vendor appliances that can't speak OIDC. Don't exempt them silently: route them through a brokered path (an IAP in front, or a privileged-access gateway with session recording) and record the exception with an expiry date and a named owner.
  • Latency budget: per-request evaluation adds a check on every call. As a worked example with hypothetical numbers: if the policy decision point adds 20 ms and a user page load fans out to 8 services, that's 160 ms of new p99, so set a latency budget per flow before enforcement, co-locate decision points, or cache decisions with short TTLs.

Phase 4: expand and prove it. Migrate flow by flow, reusing the pattern. The evidence the program works is measurable: reduced reachable surface (nmap from a compromised endpoint should show a fraction of what it did), fewer standing credentials, and, the real test, incident outcomes: a phished credential or a compromised laptop should yield a contained blast radius because lateral movement is denied by default. Retire the VPN and flat network paths as you go; a zero trust program that leaves the old trusted path in place hasn't finished, it's just added cost.

Governance throughout: every exception has an owner and expiry, privacy review on the telemetry (device posture data is employee surveillance if you're careless), and the control plane itself gets the zero trust treatment. It's now your most critical system.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-24

Your VPN concentrator is up for renewal. Walk me through replacing it with per-application zero trust access for a hybrid workforce: what the VPN was actually granting, how you migrate, and how you prove you didn't just rebuild a flat network.

Answer

Start by refusing to treat "the VPN" as one thing. A concentrator grants three separable things, and each needs a different replacement.

What the VPN actually grantedImplicit assumptionZTNA replacement
Reachability to 10.20.0.0/16On-network = authorizedPer-app connector publishes one FQDN; no route to the subnet
Source IP as the subjectIP is a stable identitySubject from the IdP (OIDC/SAML), posture from MDM/EDR
8-hour tunnel, MFA once at connectSession is trusted until expiryShort-lived tokens, continuous evaluation, re-auth on posture change
One tunnel to everythingBlast radius = the whole estatePer-request decision at the application's PEP

Then inventory. Pull the concentrator's session and flow logs for 30 days and rank destinations by distinct users. In most estates 20-30% of published routes carry no traffic in the window; those get deleted, not migrated. The rest split into three buckets.

HTTP(S) applications go behind an identity-aware proxy: the browser hits an app FQDN, the proxy authenticates the subject, checks posture, and forwards. No client software, no route.

Non-HTTP TCP (SSH, RDP, Postgres, Kafka) needs a client-based ZTNA agent with per-session brokering and a protocol-aware connector. The agent never gets a route; it gets a session to one host:port that the policy engine authorized.

Applications that cannot be brokered are the real work. IP-literal thick clients, broadcast/multicast discovery, SIP/RTP, TN3270, printers, OT gear, and anything that allowlists client IPs. A TCP tunnel does not make a broadcast-dependent app work. Options: keep a small VPN pool scoped to exactly those subnets with no default route and microsegmentation around it; front the app with a protocol-aware gateway; or re-platform. Say which apps land in the residual set and who owns retiring them.

Sequencing: run both in parallel, never big-bang. Phase 0 inventory and flow analysis. Phase 1 pilot one app group with a volunteer cohort, measure. Phase 2 move apps in waves by group, VPN stays for the residual. Phase 3 shrink the concentrator to the residual pool, then decommission. Keep a break-glass path that is not the VPN.

Proving you did not rebuild a flat network. The failure mode is a connector sitting in the core with unrestricted east-west reachability: you relocated the trusted zone instead of removing it. Checks:

  • From an enrolled device, try to reach an app outside your policy set. It must fail.
  • Compromise simulation: take one enrolled device, enumerate what it can reach. The count should equal the apps that subject is entitled to, not the subnet.
  • Count policies that are any-to-any or "all employees". That number should trend to zero.
  • Standing grants versus just-in-time elevation.
  • Connector egress: if the connector host has routes to the whole datacenter, it is a bridge, not an enforcement point.

Failure modes to name: stale posture signals failing open; DNS-based steering bypassed by IP-literal clients; split-tunnel agents leaking traffic; long-running sessions (builds, DB migrations) broken by mid-session re-auth, which needs a grace or extension path; and the connector becoming the new concentrator-sized choke point.

Sizing arithmetic, labelled as an example: 4,000 remote users on a 2 Gbps concentrator with 5,000 concurrent tunnels. If 60% of bytes are SaaS, that traffic never needed the VPN. The connectors carry the remaining 40%, split per app group, so you size several small connectors rather than one large one.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-25

Lead an end-to-end zero trust architecture review.

Answer

First 90 seconds: define the bar and the deliverable. Say it out loud before you open a dashboard. Zero trust means no request is trusted because of where it came from: every request presents a verifiable identity, gets authorized by policy the resource owner owns, and leaves a record. The review produces three things: the highest-risk flows, the paths that reach a protected resource with no policy decision in them, and a dated remediation plan with owners. The claim you defend at the end is bounded (less implicit trust, smaller blast radius) never "certified zero trust", never "breach-proof".

Pick eight flows by blast radius, then trace each in both directions. Backward from the resource: owner, action, data class, tenant boundary. Forward: application authorization, policy decision, identity issuance, audit record. NIST SP 800-207 splits the middle into Policy Engine, Policy Administrator and PEP; check that separation exists in the deployed config, not just the slide.

Trace one: a laptop calls payments-api. Entra ID issues an OIDC access token with aud=payments-api and a 15-minute lifetime, after a device-compliance check. The mesh sidecar terminates mTLS against a client certificate whose SPIFFE ID is spiffe://corp/ns/edge/sa/gateway. The app's OPA sidecar (Rego) allows GET /v1/refunds/{id} only when the token's tenant claim equals the refund row's tenant_id. The call lands in an append-only audit store keyed by the token's jti. Run the same trace for a CI job deploying to prod, and for the admin console.

Hunt the bypasses. Name the paths, then check each one: VPN reach into a legacy app bound to LDAP, jump hosts with long-lived SSH keys, backup and DR replication, partner SFTP, the CI/CD deploy identity, DNS. Every path either crosses a PEP, or you write down why it doesn't and who accepted that. CISA's Zero Trust Maturity Model v2.0 (five pillars, four stages) is a decent grading sheet, but it grades the program; it doesn't certify the architecture.

Decide the trade-offs instead of listing them.

decisionstrict optionpragmatic optionwhat decides it
PEP coverage of legacy pathsNo traffic to a protected resource without a PEP: migrate or block90-day exception with compensating control. Allow-list, full DB audit, named ownerDoes the path touch regulated data? If not, a time-boxed exception beats a migration that stalls the program
Token bindingmTLS-bound tokens (RFC 8705)DPoP (RFC 9449)Can every hop terminate client certificates? CDNs usually can't, and DPoP travels with the client
Revocation latencyShort TTLs: 5-15 minute access tokens, rotated refresh tokensContinuous evaluation. Entra ID CAE pushes disable and password-change events in minutes, but re-checks network location roughly hourlyHow long a stolen credential stays useful. AWS STS AssumeRole defaults to a 1-hour session; that hour is your exposure
Workload identityX.509 SVIDs from SPIRE, rotating on a TTL of hours (Istio's default workload certificate is 24 h)Cloud IAM roles and projected service-account tokensMulti-cloud or on-prem fleet? SVIDs travel; cloud IAM doesn't

Exercise it, and predict the observable before you run it. Replay a stolen access token from an unmanaged device: expect deny plus a DENY event carrying the token's jti. Fail the issuer and record whether admin paths and read-only user reads both fail closed: decide that on purpose, not by accident. Break glass: hardware key, one-hour session, pages the on-call when used. Widen a Rego rule on a test branch; opa test and review should block it before deploy.

Do the arithmetic on blast radius. Hypothetical numbers, real shape: one shared bastion key opens 4,000 hosts for twelve months; a just-in-time certificate for one host for 30 minutes shrinks that to 0.02 host-days. About 1.46 million down to 0.02. A service account that can read all 40 buckets of an account loses 92% of its reach when you narrow it to 3.

Write it up so the gaps expire. Each gap gets a consequence, an owner, a deadline, a compensating control and an expiry date. Verify with negative tests in CI, requests that must be denied, and a canary that alerts when a bypass path starts carrying traffic again.

Curated: · Written: · Reviewed:

Difficulty: Hard