skip to content

Where Trust Changes

Boundaries follow a change of authentication, authorization, tenancy, code ownership or process, not a change of subnet. Interviewers watch for the perimeter-only model and its blind spots.

on this pageshow

questions

3

On a data-flow diagram, what does a trust boundary mark, and what decides where it is drawn?

level: juniorimportance: must knowfreq 78%

answer

  1. a claim, not a drawing convention
  2. who can vouch for whom
  3. principal, privilege, owner, context
  4. network hops are not the test
  5. the firewall-only diagram trusts the inside

basics

~20 s

A trust boundary marks a data flow where the two sides do not trust each other equally. Draw it wherever the principal, privilege, tenant, code owner or execution context changes - not wherever the network or a firewall changes.

solid answer

~50 s

A trust boundary is a claim on the diagram that the element on one side cannot vouch for the element on the other, so every flow crossing it is treated as attacker-influenced. It belongs wherever the *level of trust* changes: anonymous becomes authenticated, a user becomes an administrator, one tenant's request path reaches another's data, code someone else owns starts executing, or work moves to a different OS user, container or host privilege. The network is not the test. Two internal services owned by one team, running as the same identity, are one zone even though packets cross a switch; a plugin loaded into your own process is two zones though nothing leaves the machine. The classic failure is the perimeter-only diagram - one box labelled "our network" - because every threat from someone already inside then goes unenumerated.

go deeper

for a junior

Be ready to state in one sentence that a trust boundary marks where two sides trust each other differently, and to give two non-network examples such as a different OS user or someone else's code.

for a middle

Expect to derive boundaries out loud from a given design: point at each flow and say which of authentication, privilege, tenant, code owner or execution context changes there, and why a switch hop alone does not count.

for a senior

Show that you can find the boundaries a team has not drawn - the unauthenticated internal write, the vendor path, the outbound replication - and explain what the missing line cost the threat list rather than just naming it.

for a principal

Own the standard: what your organisation calls a boundary, how much granularity is worth the review cost, and how you stop diagrams degenerating into either one perimeter box or an arrow-by-arrow table nobody reads.

## What a trust boundary actually claims On a data-flow diagram (DFD) you draw external entities, processes, data stores and the flows between them. A **trust boundary** is a line cutting across one or more of those flows, and it is not decoration: it is an assertion that *the element on one side cannot vouch for the element on the other*. Everything you do afterwards hangs off that assertion. Threat enumeration is driven by crossings - at each crossing you ask what a party on the far side could send, forge, replay, read, corrupt or withhold - and the controls you list (authentication of the caller, authorization decisions, input validation, output encoding, rate limits, logging that survives the far side) are the things you place *at* the crossing. A boundary in the wrong place therefore does not just make an ugly picture; it silently deletes a set of threats from the review, or invents a set that never existed. ## The rule: trust, not topology Draw a boundary wherever the **level of trust changes**. In real designs that happens for a small number of recurring reasons: - **Authentication changes.** An anonymous caller becomes an identified one, or an unauthenticated protocol carries a flow that the receiving side then acts on. - **Authorization or privilege changes.** A normal user's request reaches an administrative function; a service that runs unprivileged calls one that runs with elevated rights; a request ends up executing against a datastore account that can read far more than the caller may see. - **Tenancy changes.** A request path from one customer can reach another customer's data or compute. - **Code ownership changes.** Code written by a party you do not control begins executing - another team's plugin, a vendor's library, a callback you accepted. - **Execution context changes.** Work moves to a different OS user, a different container, a different machine, or into a child process that can be constrained differently from its parent. A useful sixth trigger, really a consequence of the first five: **input arrives from a party you cannot constrain**. Anything downstream of that input is handling attacker-influenced data until something validates it. ## Why "the network changed" is the wrong test The network test fails in both directions. *Hops that are not boundaries.* Two internal services owned by one team, deployed together, running as the same service identity, holding the same secrets, are one trust zone even though their traffic crosses a switch. Compromise either and you have the other. Drawing a boundary between them produces a threat table nobody will act on and dilutes the boundaries that matter. *Boundaries with no hop.* A plugin from another team loaded into your process, a child process started under a different OS user, two accounts on one host, an administrative console and a normal console served by the same binary - all are real trust changes with no packet crossing anything. ## The perimeter-only diagram, worked Take a factory manufacturing-execution system on a flat plant network, where the only boundary anyone drew is the corporate firewall at the edge. The adversary that matters is someone already on the plant LAN - a contractor's laptop, a vendor's remote-support session, a compromised operator workstation - and the asset at stake is the safety and continuity of the physical process, not a database of customer records. Deriving the real boundaries from trust changes rather than from wiring gives you several the perimeter model hid: operator workstations authenticate to the MES, so that flow crosses an authentication change; engineering workstations write setpoints to controllers that accept the write unauthenticated, so the controller trusts anything on the wire and the boundary sits right at its input; the historian replicates plant data up to corporate reporting, so a flow crosses an ownership and privilege change in the outbound direction; a vendor's support path enters as a party the plant does not control. None of that is visible while a single line around "the plant" declares everyone inside to be us. (Deciding how to *segment* that network afterwards is a different discipline; the modeling job here is only to make the trust changes that already exist appear on the diagram.) ## Don't over-draw either Boundaries cost analysis. If you draw one at every arrow, every crossing demands a table and the genuine ones stop standing out. The discipline is the same in both directions: for each boundary you drew, name the two parties and say in one sentence what the trust difference is and what enforces it. If you cannot, erase it. ## Checking your work A quick self-review that catches most placement errors: for any two elements you put in the *same* zone, ask whether compromising one gives the attacker the other. If yes, one zone is right. If no - different principal, different owner, different privilege - you are missing a boundary. Then walk each boundary and ask what the far side is allowed to assume; whatever it assumes without checking is your next threat.

  • Two internal services run as the same identity, are owned by one team and take no external input. Is the network hop between them a trust boundary?
    Normally no. Nothing about principal, ownership or privilege changes across it, and compromising one hands you the other, so they are one zone. You may still note the channel if you need to reason about traffic in transit, but drawing a full boundary there produces threats nobody will act on and dilutes the crossings that carry a real trust difference.
  • Does a trust boundary always sit between two machines?
    No. It sits wherever trust changes, which is often inside one machine: two processes running as different OS users, a parent and a sandboxed child, another team's plugin executing inside your process, or an administrative path and a user path served by the same binary. Machine edges are just the most visible case, not the defining one.
  • What breaks in the model if you draw too many boundaries?
    Cost and attention. Each crossing implies enumeration and controls, so a diagram where every arrow is a boundary produces a table so large it gets skimmed, and the two or three crossings that genuinely separate an attacker from an asset lose their prominence. Keep a boundary only where you can name the trust difference and what enforces it.

A trust boundary is a passport check, not a fence. It goes wherever you stop taking someone's word for who they are, which is rarely the same place as the property line.

saying these in an interview costs you the question

  • Says a trust boundary is wherever traffic crosses a firewall
  • Treats everything inside the corporate or cloud network as trusted
  • Claims boundaries can only exist between machines
  • Assumes one authentication at the edge removes all inner boundaries
  • Draws a boundary at every arrow without naming the trust difference
  • Places boundaries by data sensitivity rather than by who is trusted

context

open as a page

In a single-page trading app whose trader-vs-supervisor route guard ships in downloaded JavaScript, where does the trust boundary actually belong?

level: middleimportance: should knowfreq 58%

basics

~20 s

The boundary belongs at the server API, not inside the browser. Everything you ship - route guards, hidden buttons, role flags - runs on a machine the user controls, so both roles sit in one untrusted zone.

open as a page

Your pricing engine loads another team's plugin into its own process - where does the trust boundary go, and can one exist inside a process?

level: seniorimportance: nice to knowfreq 32%

basics

~20 s

Trust changes at the code-ownership seam: foreign code inside your process shares your address space, secrets and privileges. A boundary belongs there, but nothing enforces it in-process - so mark it unenforced, or move the plugin into a separately privileged process.

open as a page