skip to content

In defense in depth, what makes two controls count as two layers rather than one?

level: juniorimportance: must knowfreq 58%

answer

  1. count preconditions, not boxes
  2. what fact must each control accept?
  3. one fact clearing two checks
  4. shared condition collapses the pair
  5. independence is logical, not organisational

basics

~20 s

Two controls are two layers only if getting past them means satisfying two independent preconditions. If both are satisfied by the same fact, such as one approved job identity, whatever supplies that fact clears both at once.

solid answer

~50 s

Depth is not a count of boxes on a diagram; it is a count of independent preconditions. Every control lets an action through only when some fact about that action is true, so the useful question is: what fact does each one have to be satisfied about? A permitted-tool list is satisfied by 'the tool named here is on the list'. An egress rule is satisfied by 'the destination is on the list'. A pipeline gate is satisfied by 'this job started under an approved identity'. If two controls are satisfied by the *same* fact, then anyone who legitimately holds that fact clears both, and the second one costs nothing extra. Two layers exist only when clearing the first tells you nothing about whether you can clear the second. Different vendors, different network positions and different owning teams are not evidence of that.

go deeper

for a junior

Be ready to say that a layer is a precondition, not a box, and to state one control's precondition out loud. Knowing that two controls satisfied by the same fact are one layer is the whole ask at this level.

for a middle

Expect to be handed three or four controls and asked to write the fact each one accepts, then group them. Explain why supplier diversity and network position are not evidence of independence.

for a senior

Show that you review architectures this way by habit: name the shared fact, name who holds it for free, and propose the one control you would re-anchor on a different principal to make the count go up.

for a principal

Own the harder tradeoff: independence usually costs latency or a human in the path, so you must decide where in the estate a genuinely independent layer is worth its friction and where a correlated control is honestly good enough.

## The claim being tested "We have four layers here, so we are fine" is one of the most common sentences in an architecture review, and it is usually said about a diagram with four boxes in it. The question behind it is not how many controls exist but how many *independent things* an actor has to obtain. That number is often smaller than the box count, and occasionally it is one. ## Preconditions, not boxes Every control is a conditional: it permits an action when some fact about that action holds, and blocks it otherwise. Call that fact the control's **precondition**. - A permitted-tool list permits an action when the invoked tool appears on the list. - An egress restriction permits an action when the destination appears on the list. - An identity gate permits an action when the caller holds a particular approved identity. - A change review permits a change when someone entitled to approve it has approved it. Once each control is written this way, layering has a precise meaning. Two controls are two layers when their preconditions are **independent**: obtaining the first gives you no help at all in obtaining the second. They are one layer when a single fact satisfies both, because then the cost of the pair is just the cost of that fact. ## Why the distinction decides everything The whole appeal of depth is compounding. If an actor needs precondition A and precondition B, and neither can be derived from the other, the effort is roughly the effort of A plus the effort of B, and the chance of holding both is much lower than the chance of holding either. That is real and it is why layering is worth building. But compounding is a property of independence, not of quantity. Where two controls are conditioned on the same fact, the second contributes no new obstacle. In the worst version, the shared fact is something an insider or a contributor holds **legitimately and for free** — a standing right to start a build, an approved service identity, membership of a repository role. Their cost to obtain it is zero, so the cost of every control conditioned on it is also zero, however many of them there are. ## The proxies that do not work Three things get mistaken for independence, and all three are about implementation rather than logic: 1. **Different products or suppliers.** Two independently written checks can still both accept 'the job runs under the approved identity'. Diversity of supplier protects against a bug or an outage in one product; it does not add a precondition. 2. **Different positions in the stack.** A check in the network path and a check on the host feel independent because they are far apart, but if both consult the same permitted list, or both trust the same session, they are one condition expressed twice. 3. **Different owning teams.** Separate ownership limits the damage one person's mistake or one person's misuse can do, which is worth having. It does not change what each control actually verifies. ## What independence looks like when it is real Independence is created by anchoring a control on a precondition the other controls cannot inherit — most reliably, on a **different principal**. A step that requires an approval recorded out of band by a named human who is not, and cannot be, the running job is independent of every control conditioned on the job's identity: holding that identity does not produce the approval. That is the shape to look for, and it is why 'add another check' and 'add another layer' are not the same proposal. ## How to answer in an interview Say that you would list the controls, write beside each one the single fact it has to be satisfied about, and then group by fact. The number of distinct facts is the true layer count. If four controls collapse to one fact, say so plainly — and say which one you would re-anchor to make the count two.

  • Two of the controls run in different systems and are owned by different teams. Does that make them independent?
    No. Independence is a property of the precondition each control checks, not of where it runs or who operates it. Two teams can each build a check that accepts the same fact — that the job holds an approved identity — and one legitimate session then clears both. Separate ownership limits what a single operator's mistake or misuse can reach; it does not add a second thing an actor must obtain.
  • Give an example of two controls that genuinely are independent.
    A build job that must run under an approved service identity, plus a promotion step that requires an approval recorded by a named human who is not able to start that job. The first is satisfied by holding the identity; the second cannot be satisfied by holding it, because the approver is a different principal. Someone with the identity still lacks the second precondition, so the costs really do stack.
  • If a second control adds no independent precondition, is it worthless?
    Not necessarily, but it is not depth. It can still narrow what an actor is able to do, force a noisier or slower procedure, or catch a mistake rather than an adversary. What it cannot do is multiply the cost of getting through, so it must not be counted as a second layer when the architecture is judged or when someone asks how much a bypass would cost.

Two locks on one door are two layers only if they take different keys. Fitting a second lock keyed alike looks like depth on the drawing and opens with the same turn.

saying these in an interview costs you the question

  • Counts boxes on a diagram and calls the number depth
  • Treats different vendors or products as proof of independence
  • Assumes any additional control raises an adversary's cost
  • Confuses defence in depth with running the same check twice
  • Thinks separate owning teams make two controls independent

context