Security philosophies: defence in depth, least privilege, assume breach, risk not fear
Four ideas most security engineers share, where each came from, what it asks of a design, and the specific way each one goes wrong when it is used as a slogan instead of a check
An internal admin panel at a payments company is protected by three layers: it is only reachable over the corporate VPN, it requires single sign-on, and it allow-lists the VPN's egress IP address. An attacker installs malware on one employee's laptop while the employee is signed in to the VPN and SSO. How many of the three layers still stand between the attacker and the panel?
Every security engineer works from a handful of principles, whether or not they could recite them. They exist because you make security decisions far faster than you can threat-model: in a code review, in a five-minute question on chat, in a design review where you have twenty minutes for a system that took a quarter to build. Principles are the defaults you reach for when there is no time to reason from scratch.
This chapter covers the four you will hear most often, defence in depth, least privilege, assume breach, and risk not fear, plus the 1975 paper most of them descend from. Each gets a fair hearing: what it says, what it asks of a design, and the way it fails when people repeat it without applying it. The first chapter of this module covers why the role exists. This one covers how the people in it think.
Why security needs its own principles
Reliability engineering defends against failure. Disks die, deploys go wrong, a dependency slows down. Those failures are indifferent to you. Security defends against an adversary, and that changes the arithmetic. Google’s Building Secure and Reliable Systems puts the difference in one line in its first chapter: “Security risks, however, come from adversaries who are actively trying to exploit system vulnerabilities.”
An adversary does not hit your system at random. They look for the weakest point, they come back when you patch it, and they chain three small weaknesses into one large one. A control that works 99% of the time against random failure may work 0% of the time against someone who has found the 1%. That is why security principles lean towards defaults that hold under deliberate pressure: deny unless allowed, check every time, grant the minimum, plan for the day the control fails.
It is also why the principles conflict. Redundancy improves reliability and enlarges the attack surface. Fast emergency access helps incident response and is exactly what an attacker wants. Chapter 1 of the Google book spends several pages on these trade-offs. You will not resolve them with a principle. You resolve them with judgement about a specific system, and the principles tell you which questions to ask.
The oldest list: Saltzer and Schroeder
In 1975 Jerome Saltzer and Michael Schroeder published “The Protection of Information in Computer Systems” in the Proceedings of the IEEE. It was written about time-sharing operating systems. Its eight design principles still read like a modern design-review checklist, and the paper’s own caveat is the most useful sentence in it: the principles “do not represent absolute rules”, they “serve best as warnings”. A design that breaks one deserves a second look, not an automatic rejection.
| Principle | What it says | What it looks like today |
|---|---|---|
| Economy of mechanism | Keep the protection design small and simple enough to inspect | One authorisation library everyone uses, not one per service |
| Fail-safe defaults | Deny by default; grant access only under stated conditions | New storage buckets private; new endpoints authenticated unless marked public |
| Complete mediation | Check authority on every access, not once | No caching an authorisation decision past a role change; see TOCTOU for what happens between check and use |
| Open design | Security must not depend on the design being secret | Public algorithms, secret keys; see hashing, MACs and signatures |
| Separation of privilege | Require two independent conditions before granting access | A second person approves a production data export; MFA |
| Least privilege | Every program and user gets only the privileges the task needs | Scoped tokens, per-service roles, time-limited admin |
| Least common mechanism | Minimise mechanisms shared between users | Tenant isolation; no shared admin account |
| Psychological acceptability | The secure way must be the easy way, or people will route around it | Paved roads, sensible defaults, single sign-on |
The paper adds two principles from physical security, work factor (compare the cost of defeating a mechanism with the attacker’s resources) and compromise recording (reliably record that a compromise happened, even when you cannot prevent it). The authors note that compromise recording was rarely used in computer systems at the time. Read that as the first statement of assume breach, forty years before the phrase.
The four philosophies below are mostly these principles, renamed and scaled up to networks, clouds and companies.
Defence in depth
What it says. Do not rely on any single control. Put several between the attacker and what you are protecting, so that one failing is not a breach. Building Secure and Reliable Systems defines it as “the application of multiple, sometimes redundant, defense mechanisms.” The buffer overflow lesson shows the textbook case: stack canaries, address space layout randomisation and non-executable memory each stop some attacks, and an attacker who beats one still has to beat the others. The login hardening capstone is the same idea applied to a sign-in form.
Where it fails. In three specific ways, and you will see all three.
It becomes an excuse for weak layers. The application team skips parameterised queries because the web application firewall will catch injection. The firewall team tunes out noisy rules because the application validates input. Each layer is discounted because the others exist, and the total is weaker than one layer done properly. The SQL injection lesson is clear that the fix is in the query; a firewall rule is a second layer, not a substitute. The test is blunt: would you accept this layer if it were the only one? If not, it is not adding depth, it is adding comfort.
Layers are correlated. The Predict above is the common case. A VPN, an SSO session and an IP allow-list look like three layers and fail together when the laptop is compromised. Layers that share a credential, a device, a vendor, an administrator or a configuration system are one layer. Count independent failure modes, not boxes on the diagram.
Nobody watches the layers. A control can be broken for months and look identical to a working one. Phil Venables, in his essay on control reliability engineering, says “broken controls can often look identical to functioning ones until an incident reveals it not to be so”. Target’s detection tooling fired. The layer existed and the organisation around it did not. Every layer needs a way to tell you it has stopped working: a synthetic test, an alert on the alert pipeline, a metric of coverage.
There is also a cost argument. Each layer is a mechanism, which pulls against economy of mechanism. Ten overlapping tools that nobody understands are less secure than three that are well run. Depth is a property of independence and attention, not of tool count.
Least privilege
What it says. Every person, service and token gets the access its task needs and nothing more. When something is compromised, and assume breach says something will be, the damage is bounded by what that thing could do.
Why it is hard. Privilege accretes. A developer gets production read access for an incident and keeps it. A service gets a wildcard IAM policy because the precise one took too long to write. A support tool gains a “log in as customer” feature for one urgent case. Nobody removes access because removing it breaks things in ways nobody can predict, while leaving it breaks nothing today. The result is that actual privilege drifts well beyond needed privilege, and nobody knows by how much.
What it looks like done well. Scope by role, by resource and by time. Short-lived credentials instead of long-lived keys; the secrets rotation lesson covers why a key’s lifetime is part of its risk. Delegated, scoped tokens instead of shared passwords; see OAuth 2.0. Just-in-time (JIT) access for administrators: elevation on request, with a reason recorded and an expiry. A break-glass route for emergencies that is fast, logged and reviewed afterwards. And a periodic access review that removes what has not been used; identity, access and secrets covers how to run one that produces removals rather than signatures.
Where it fails. Applied without psychological acceptability, it produces the opposite of what it intends. If getting production access takes three days, engineers share an account that has it. If every role is minimal and every request needs a ticket, people ask for admin “to be safe” and the approver, who has no way to judge, says yes. Access reviews become rubber stamps when a manager is asked to confirm 400 entitlements in a spreadsheet.
Perfect least privilege is not attainable and chasing it everywhere wastes the effort you need for the places it matters. Spend it on the privileges that would end the company if abused: production customer data, money movement, the identity system itself, and the CI pipeline that can deploy to all of them.
Assume breach, and what zero trust adds
What it says. Design as though an attacker is already inside, because eventually one will be. The question in a design review moves from “can they get in?” to “once they are in, what can they reach, how soon will we know, and how do we recover?” That changes what you build: segmentation that limits lateral movement, logging good enough to reconstruct what happened, alerts that reach a person, backups an attacker cannot delete, and a rehearsed response.
The perimeter model it replaced trusted anything inside the corporate network. Google’s BeyondCorp work, described by Rory Ward and Betsy Beyer in ;login: in 2014, is the best-known public account of leaving it. Google moved its corporate applications onto the internet and made access depend on the user and the device rather than on which network the request came from. NIST SP 800-207, Zero Trust Architecture (2020), turns that into a general model and states the assumption plainly: zero trust security models “assume that an attacker is present in the environment” and grant no implicit trust based on network location.
Where it fails. Zero trust as marketing. Since 2020, many products have been sold as zero trust. NIST’s own document says zero trust “is not a single architecture but a set of guiding principles” and that moving to it is a journey that cannot be done by wholesale replacement of technology. If a vendor’s answer to “what changes about who can reach what?” is a licence, you are buying a product, not a principle. Detection without response. Assume breach means investing in detection, and detection with nobody to act on it is Target’s position. Fatalism. Assume breach is sometimes heard as “prevention is pointless”. It is not. It means prevention is necessary and not sufficient, and that you design for the day it fails.
Risk, not fear
What it says. Security exists to help the company take risks it understands, not to prevent it taking any. A security team that argues from fear, “if we ship this we will be breached”, gets ignored the first time nothing happens and routed around the second. A team that argues from risk names the threat, the likelihood, the impact, what would reduce it, what that costs, and who owns the decision.
The vocabulary is standard. For each risk you choose a treatment: avoid it (do not build the feature), reduce it (add controls), transfer it (insurance, a contract, a provider that carries it), or accept it. Acceptance is a legitimate outcome, but it belongs to someone with the authority to carry the consequence, usually the business owner, not the security engineer. Accepted risks go in a register with an owner and an expiry date, and they are reviewed. At Head level that register becomes the company’s account of its risk, which security risk and the board covers.
Phil Venables’s essay on risk appetite is a good corrective to how this goes wrong at the top. He argues that statements like “we have no appetite for security breaches” are counterproductive: they imply every risk can be fully mitigated, create an illusion of defence and hide the real risk. Useful appetite is expressed as measurable thresholds and limits that trigger a decision when crossed.
Where it fails. False precision. A risk score of 6.4 computed from two guesses multiplied together is a guess with a decimal point. Use qualitative bands unless you have data. “Risk-based” as a reason to accept everything. If every exception is accepted and none expires, the register is a list of things you have decided not to fix. Ignoring outrage. Venables, drawing on Peter Sandman’s formula “risk = hazard + outrage”, points out that how customers, regulators and the press react to a breach can matter as much as its technical impact. A leak of 2,000 records can be small in hazard and large in outrage. Fear is not always irrational; it is often an unpriced reputational risk.
How the four fit together
| Philosophy | The question it asks | The way it fails | The check you apply |
|---|---|---|---|
| Defence in depth | If this control fails, what stops the attacker next? | Weak, correlated or unwatched layers | Would each layer pass review on its own; do any two share a failure mode; how would you know it broke? |
| Least privilege | What is the most this identity could do if compromised? | Access accretes; friction drives sharing | Which high-value privileges are standing rather than time-limited, and when were they last used? |
| Assume breach | Once inside, what can they reach and how soon do we know? | Products bought instead of design changed; alerts nobody reads | Blast radius per component; time from compromise to a human seeing it |
| Risk not fear | Who decides, on what evidence, and until when? | False precision; permanent exceptions | Every accepted risk has an owner, a reason and an expiry |
They reinforce one another. Assume breach is the reason least privilege matters. Least privilege is what makes layers independent. Risk is how you decide which layers are worth paying for.
Day to day
At the foundations level, you will not set these principles. You will apply them dozens of times a week, and the skill is applying them fast and explaining them without a lecture.
Design reviews, weekly. Most security teams review new designs once a week or on request, in a thirty to sixty minute session with the engineers who wrote the doc. You bring the principles as questions: what is the default for a new resource, where is authority checked, what does this service’s role allow, what happens if this component is owned, how would we see it. The output is a short list of findings, each with a severity and a suggested fix, posted on the design doc.
Pull request and chat questions, daily. “Can this service have read access to the whole bucket?” “Do we need MFA on this internal tool?” These come in all day. Answer with a reason and an alternative: not “no”, but “scope it to this prefix, because if the service is compromised that is the difference between one customer and all of them”.
Exception requests, weekly or monthly. An engineer cannot meet a control by the deadline; a security engineer’s week covers the five parts of an exception that holds up. You write down the risk, the compensating controls, the owner who accepts it and the expiry. A monthly review walks the register and chases the ones that expired.
Access reviews, quarterly. You prepare the list of who holds high-value privileges, send it to the managers who must confirm or revoke, and follow up. Make the list short enough to read; a review nobody can read is theatre.
Control health, continuous. Someone checks that the layers still work: alerts tested with synthetic events, logging coverage measured, the break-glass account’s use reviewed. On a small team that someone is you, on a calendar reminder.
Incident reviews, as they happen. After every incident, security or not, ask which principle would have reduced the blast radius. Over a year these reviews tell you where your principles are slogans.
There is no security team, so the principles live in defaults or nowhere. Spend the effort where it compounds: single sign-on with MFA for everything, no shared admin credentials, production access for the few people who need it, new cloud resources private by default, and one place where logs go. Write a one-page principles sheet and use it in the founders’ architecture conversations. Assume breach here means backups an attacker cannot delete and a phone number to call. Risk decisions belong to the CEO; your job is to make them explicit rather than accidental.
The first security engineers arrive and the principles become a review practice. The work is turning them into paved roads, so least privilege is the default role template rather than a review comment, and into a short design-review checklist other engineers can run without you. This is when an exception register and a quarterly access review first appear, along with the first argument about whether a feature should wait for a control. Watch for defence in depth turning into tool shopping as budget arrives; every new tool needs someone who watches it.
The principles exist in a policy, and the problem is that policy and reality have drifted apart. Least privilege means thousands of identities, service accounts nobody owns and access reviews that managers approve in bulk. Defence in depth means dozens of tools bought by different teams over a decade, some of them unmonitored. Zero trust is a multi-year programme with a vendor in every slide. Your leverage is measurement: control health, standing privilege, time to detect. Risk acceptance runs through a formal committee, and the work is keeping exceptions honest and expiring.
Template
# Security principles sheet: <system name>
Author · Date · Reviewed with: <eng lead> · Design doc: <link>
## Architecture in five lines
Components: <services, stores, third parties>
Trust boundaries: <internet / internal / vendor / admin>
Crown jewels: <the data or action an attacker most wants>
## Principles applied
| Principle | Question for this system | Finding | Gap? | Action · owner · by |
|---|---|---|---|---|
| Fail-safe defaults | What happens to a request no rule matches? | | | |
| Complete mediation | Where is authority checked, and is it checked every time? | | | |
| Least privilege | What can each service role and human role do? | | | |
| Separation of privilege | Which actions need two people or two factors? | | | |
| Economy of mechanism | How many places implement authorisation? | | | |
| Psychological acceptability | Where will people route around the control? | | | |
## Layers (defence in depth)
| Threat | Layer 1 | Layer 2 | Layer 3 | Shared failure mode? | How we know it broke |
|---|---|---|---|---|---|
## Blast radius (assume breach)
| If this is compromised | It can reach | Time to detect | Recovery |
|---|---|---|---|
## High-value privileges
| Privilege | Who holds it | Standing or time-limited | Last reviewed |
|---|---|---|---|
## Risks accepted
| Risk | Why accepted | Owner | Expires |
|---|---|---|---| WORKED EXAMPLE
Grebe is a fictional consumer lending platform, 140 people, about 60,000 active loans of up to £15,000. The sheet covers the loan application and disbursement path.
Architecture. Web and mobile apps call an API gateway; an application service writes to Postgres; an underwriting service calls a credit bureau; applicants upload payslips to object storage; a disbursement service instructs a payments provider. Crown jewels: the disbursement instruction and 60,000 applicants’ bank and income data.
Principles applied. Fail-safe defaults: the gateway denies unknown routes, but the document bucket was created with a policy granting read to every service role. Gap, high; scope to the underwriting role, platform team, two weeks. Complete mediation: the application service checks that the loan belongs to the caller on read, not on the document-download endpoint. Gap, high, an insecure direct object reference; fix this sprint. Separation of privilege: disbursements over £10,000 need a second approver in the back office; below that, none.
Layers. Account takeover: rate limiting at the gateway, MFA on sign-in, payout only to the bank account verified at onboarding. The first two share a failure mode, a phished session, so the third is what carries the weight. Each has an alert; the payout-change alert had not fired in four months, and a synthetic test showed it was broken.
Blast radius. Underwriting service compromised: reaches bureau credentials and all documents (after the fix, only documents in active review). Detection today: about a day, from the bureau’s own anomaly report.
Risks accepted. Back-office staff hold standing read access to all applications; owner: head of operations; expires in Q3 when case-based access ships.
Now you
You are the first security engineer at Smew, a fictional SMS marketing API with 75 staff and about 1,800 business customers who send roughly 40 million messages a month through it. Each customer has one API key, created at sign-up, that can send messages, read every contact list and delete the account. Customers upload contact lists as CSV files; a new feature, due in five weeks, lets them sync contacts from their CRM through an inbound webhook. Support staff use an internal console that can send a message as any customer, which they use to debug delivery failures. Last month a customer’s key leaked in a public code repository and was used to send 90,000 spam messages before the carrier blocked the sender ID. The CTO wants a principles sheet for the messaging path, including the new webhook, before the feature ships. Produce it, and be explicit about which findings must be fixed before the webhook launches and which can be accepted, by whom, until when.
Self-check
You are the security engineer at Grebe, a 140-person lending platform. Product wants to launch instant top-up on Monday: an existing borrower can add up to £2,000 to their loan in the app, paid out within minutes, with no re-underwriting. A marketing campaign is booked. Your review finds that the app does not ask for step-up authentication before the top-up; a 30-day session cookie is enough. Account takeovers from credential stuffing hit 14 accounts last quarter. Step-up authentication is three weeks of work. What do you recommend?
- PAPER The Protection of Information in Computer Systems Jerome H. Saltzer and Michael D. Schroeder, 1975
The source of least privilege, fail-safe defaults and complete mediation. Read the design principles and the caveat that they are warnings, not rules; the rest is 1970s operating systems. Read: Section I, Basic principles of information protection: the eight design principles, then work factor and compromise recording.
- PAPER BeyondCorp: A New Approach to Enterprise Security Rory Ward and Betsy Beyer, 2014
The best-known public account of a company leaving the trusted internal network. Read it before any vendor tells you what zero trust means. Read: ;login: vol. 39, no. 6, December 2014, pp. 6–11; all of it, six pages.
- BOOK Building Secure and Reliable Systems, chapter 1: The Intersection of Security and Reliability Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield, 2020
Why an adversary changes the engineering, and where security and reliability pull in opposite directions. Defines defence in depth and least privilege in working terms. Read: Chapter 1, free online; read the sections on design trade-offs and on resilience.
- BOOK Building Secure and Reliable Systems, chapter 2: Understanding Adversaries Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield, 2020
Assume breach only helps if you know who you are assuming. This chapter gives you the attacker profiles to reason about, insiders included. Read: Chapter 2, free online; attacker motivations, profiles including insiders, and risk assessment considerations.
- DOC NIST SP 800-207: Zero Trust Architecture Scott Rose, Oliver Borchert, Stu Mitchell, Sean Connelly, 2020
The neutral definition of zero trust, its history from deperimeterisation to BeyondCorp, and the statement that it is principles, not a product. Read sections 1 and 2.
- POST Risk Appetite and Risk Tolerance: A Practical Approach Phil Venables, 2024
Why 'no appetite for breaches' hides risk, and how thresholds and limits turn appetite into decisions. The clearest short case for risk over fear from a practising CISO.
- POST Control Reliability Engineering (CRE): Applying SRE Principles to Cybersecurity Controls Phil Venables
The answer to unwatched layers: treat a broken control as an incident and measure control health the way SRE measures service health.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.