00->1
Learning pathStep 14 of 62Threats, risk and controls ← All writeups

Security Design Principles, Explained

If you are reading this, you have probably seen phrases like least privilege, defence in depth or zero trust in courses, job descriptions and exam outlines, and you want to know what they actually mean and where they come from.

By the end you will be able to name the classic design principles, explain each in plain words, recognise it in a real system, and see how a single flaw usually means one of the principles was ignored. This writeup builds on The CIA Triad, Authentication vs Authorization and Risk and Security Controls.

How to use this guide: for each principle, think of one system you use (your phone, a website, your college network) and ask "does it follow this?" The principles are easier to remember when you attach them to something real.


1. What a design principle is

A control is a specific safeguard, such as a firewall or a password policy. A design principle is a rule of thumb for how to build a system so that safeguards are easier to get right and flaws are less likely to appear in the first place.

The oldest and most-cited list comes from Jerome Saltzer and Michael Schroeder's 1975 paper The Protection of Information in Computer Systems. They wrote that "no complete method applicable to the construction of large general-purpose systems exists yet" for building systems without security flaws, and that "in the absence of such methodical techniques, experience has provided some useful principles that can guide the design and contribute to an implementation without security flaws." Decades later the same ideas still appear in NIST publications, NCSC guidance, OWASP cheat sheets and certification outlines.

Principles do not replace testing or patching. They reduce how much there is to find and fix.


2. The eight classic principles

Saltzer and Schroeder list eight. The short statements below are quoted from the paper; the plain-words notes and examples are ours.

# Principle The paper's statement In plain words
1 Economy of mechanism "Keep the design as simple and small as possible." Less code and fewer features means fewer places for a flaw to hide, and a design small enough to review properly.
2 Fail-safe defaults "Base access decisions on permission rather than exclusion." Start from "no access" and grant what is needed, instead of starting from "access" and trying to list what to block.
3 Complete mediation "Every access to every object must be checked for authority." No back door, no shortcut path that skips the check.
4 Open design "The design should not be secret." Security must come from keys and passwords, not from hoping nobody learns how the system works.
5 Separation of privilege "Where feasible, a protection mechanism that requires two keys to unlock it is more robust and flexible than one that allows access to the presenter of only a single key." Important actions need more than one condition or person.
6 Least privilege "Every program and every user of the system should operate using the least set of privileges necessary to complete the job." Give only what the job needs, so mistakes and compromises stay small.
7 Least common mechanism "Minimize the amount of mechanism common to more than one user and depended on by all users." Shared parts are shared paths for leaks and shared points of failure.
8 Psychological acceptability "It is essential that the human interface be designed for ease of use, so that users routinely and automatically apply the protection mechanisms correctly." If the secure way is painful, people will work around it.

The paper adds two more ideas and says they "apply only imperfectly to computer systems": work factor (compare the cost of defeating a mechanism with the resources of a likely attacker) and compromise recording (reliably record that a compromise happened, so it can be noticed even if it could not be prevented).

Each principle in practice

Economy of mechanism. A small login service that does one thing is easier to check than a huge admin console with hundreds of options. When you find a bug in a feature nobody needs, the lesson is often "that feature should not have existed."

Fail-safe defaults. The paper explains why this is safer: "a design or implementation mistake in a mechanism that gives explicit permission tends to fail by refusing permission, a safe situation, since it will be quickly detected. On the other hand, a design or implementation mistake in a mechanism that explicitly excludes access tends to fail by allowing access, a failure which may go unnoticed in normal use." A firewall with a final "deny everything else" rule, and a new user account that can see nothing until access is granted, are both examples.

Complete mediation. Think of a website that checks your permission on the page that shows a button but not on the request the button sends. Anyone who sends the request directly gets through. The paper also warns that "proposals to gain performance by remembering the result of an authority check be examined skeptically", because if a person's rights are removed, the remembered result must be updated. A cached "this user is allowed" decision that outlives the user's permission is a mediation failure.

Open design. This is the opposite of "security through obscurity." Modern encryption is public, and what stays secret is the key. The paper's reason is practical: "it is simply not realistic to attempt to maintain secrecy for any system which receives wide distribution."

Separation of privilege. A bank safe-deposit box needs the customer's key and the bank's key. In computing, think of requiring a password and a second factor, or requiring one person to write a change and another to approve it. The paper puts the benefit clearly: "no single accident, deception, or breach of trust is sufficient to compromise the protected information."

Least privilege. A web application should connect to its database with an account that can read and write the tables it uses, not an account that can drop the whole database. A service that only needs to read one folder should not run as the administrator. NIST's glossary defines it as the principle that "a security architecture is designed so that each entity is granted the minimum system resources and authorizations that the entity needs to perform its function."

Least common mechanism. If every user depends on one shared component, a flaw in it affects everyone. The paper's example is to implement a new function as a library the user can substitute or avoid, rather than as a shared supervisor procedure.

Psychological acceptability. Passwords that must be changed weekly, with six rules, lead people to write them on sticky notes. A one-tap passkey is both easier and safer. Good security design asks "will a tired person use this correctly at 5 p.m. on a Friday?"


3. Separation of duties (not the same as separation of privilege)

These two names are easy to confuse.

  • Separation of privilege (Saltzer and Schroeder) is about mechanism design: a protection that needs two keys or two conditions.
  • Separation of duties is an organisational control: no single person should be able to complete a sensitive process alone. NIST's glossary (from SP 800-192) says it "refers to the principle that no user should be given enough privileges to misuse the system on their own. For example, the person authorizing a paycheck should not also be the one who can prepare them."

The same glossary entry describes the two-person rule, where the second person to carry out an operation must be a different authorised user from the first. NIST SP 800-160 Volume 1 names a related engineering principle, distributed privilege: "Multiple authorized entities act in a coordinated manner before an operation on the system is allowed to occur."

Everyday examples: one developer writes code and another approves the pull request before it merges (see Git and GitHub); one person requests a payment and another approves it; the person who administers the backups is not the only person who can delete the logs.


4. Defence in depth

Defence in depth means using several layers of different safeguards so that a failure in one does not mean total failure. NIST's glossary (from SP 800-53 Rev. 5) describes it as "an information security strategy that integrates people, technology, and operations capabilities to establish variable barriers across multiple layers and missions of the organization." NIST SP 800-160 Volume 1 states the engineering principle as: "Loss is prevented or minimized by employing multiple coordinated mechanisms."

A typical web service layers:

Layer Example safeguards
People Security training, clear reporting routes
Network Firewalls, segmentation
Host Patching, hardening, endpoint protection
Application Input validation, authentication, authorisation checks
Data Encryption, backups, access controls
Monitoring Logging, alerts, incident response

Two warnings. Layers should be different in kind: three firewalls from the same vendor with the same flaw are one layer, not three. And layers are not a licence to skip the basics: a layered design with a weak password on every one is still weak.


5. Zero trust

For many years networks were built like a castle: a hard outside wall, and a trusted inside. Zero trust drops the idea that being "inside" earns trust. NIST SP 800-207 defines it as "a collection of concepts and ideas designed to minimize uncertainty in enforcing accurate, least privilege per-request access decisions in information systems and services in the face of a network viewed as compromised."

Several of its seven tenets map straight onto the classic principles:

NIST SP 800-207 tenet (summarised) Classic principle it echoes
"All communication is secured regardless of network location. Network location alone does not imply trust." Do not rely on one outer layer
"Access to individual enterprise resources is granted on a per-session basis" and "with the least privileges needed to complete the task" Least privilege, complete mediation
"Access to resources is determined by dynamic policy" Check every request against current facts
"The enterprise monitors and measures the integrity and security posture of all owned and associated assets. No asset is inherently trusted." Compromise recording, defence in depth

Zero trust is a way of designing, not a product you can buy in one box. NIST itself says "not all tenets may be fully implemented in their purest form for a given strategy."


6. NIST's longer list

NIST SP 800-160 Volume 1 Revision 1 (Engineering Trustworthy Secure Systems, November 2022) collects a larger set of "principles for trustworthy secure design" in its Appendix E. Several are the classic ideas under modern names. A selection, with NIST's wording:

NIST principle Statement
Reduced complexity "The system design is as simple as practicable."
Protective defaults "The default configuration of the system provides maximum protection effectiveness."
Mediated access "All access to and operations on system elements are mediated."
Least privilege "Each system element is allocated privileges that are necessary to accomplish its specified functions but no more."
Least functionality "Each system element has the capability to accomplish its required functions but no more."
Least sharing "System resources are shared among system elements only when necessary and among as few elements as possible."
Domain separation "Domains with distinctly different protection needs are physically or logically separated."
Protective failure "A failure of a system element neither results in an unacceptable loss nor invokes another loss scenario."
Redundancy "The system design delivers the required capability by replication of system functions or elements."
Minimal trusted elements "A system has as few trusted system elements as practicable."

NIST SP 800-53 Revision 5 control SA-8 then makes this a requirement: organisations must "apply the following systems security and privacy engineering principles in the specification, design, development, implementation, and modification of the system and system components." Its enhancements name individual principles such as clear abstractions, which "states that a system has simple, well-defined interfaces and functions that provide a consistent and intuitive view of the data and how the data is managed."


7. Guidance from governments and OWASP

NCSC (UK). The National Cyber Security Centre's Cyber security design principles are grouped into five stages "loosely aligned with stages at which an attack can be mitigated": establish the context before designing a system, make compromise difficult, make disruption difficult, make compromise detection easier, and reduce the impact of compromise. The guidance is aimed at "people who design systems."

CISA (US): Secure by Design. CISA says that products designed this way "prioritize the security of customers as a core business requirement, rather than merely treating it as a technical feature." It adds that "out-of-the-box, products should be secure with additional security features such as multi-factor authentication (MFA), logging, and single sign-on (SSO) available at no extra cost." This is fail-safe defaults and psychological acceptability applied to product makers.

OWASP Secure Product Design cheat sheet. It begins with "establish secure defaults, minimize the attack surface area, and fail securely to those well-defined and understood defaults," and lists four principles: least privilege and separation of duties, defence in depth, zero trust, and security in the open.


8. Using the principles to review a design

When you meet any system, even a small one, ask:

  1. Simple? Is anything here that does not need to be?
  2. Default deny? What happens when nothing is configured? What happens when it fails?
  3. Every path checked? Can I reach the data a different way that skips the check?
  4. Secret only in keys? Does safety depend on nobody finding out how it works?
  5. Two conditions? Can one person or one stolen credential do the most dangerous thing?
  6. Minimum rights? What could this account or program do that it does not need to?
  7. Shared parts? If this shared component breaks, who is hurt?
  8. Usable? Would a busy person do the secure thing without being told?
  9. Layers? If one layer fails, what is next?
  10. Detection? Would anyone notice if it were abused?

A worked example: a company's internal dashboard lets any logged-in employee open /admin/export. The menu hides the link from non-admins. That fails complete mediation (the server does not check), probably least privilege (every employee reaches admin functions) and defence in depth (one missing check was the only layer). The fix is a server-side authorisation check on the export route, a role limited to those who need it, and logging of exports.


9. Common mistakes

Mistake The better view
"Hiding the admin URL is enough" Obscurity is not a control; check authority on every request
"More security tools means more security" Complexity can add flaws; prefer fewer, well-understood mechanisms
"Least privilege only applies to people" It applies to programs, services, API keys and containers too
"Zero trust means trust nobody and block everything" It means verify each request using current evidence and grant only what is needed
"Separation of privilege and separation of duties are the same" One is mechanism design, the other is organisational control
"Principles guarantee security" They reduce flaws; you still test, patch and monitor

Closing

Security design principles are the habits behind secure systems. Keep it simple, deny by default, check every access, assume attackers know how it works, require more than one condition for the dangerous things, grant the minimum, limit what is shared, make the secure way the easy way, use layers, and plan to notice and recover.

Keep these points:

  • Fail-safe defaults and least privilege limit the damage of every other mistake.
  • Complete mediation means no unchecked path to the data.
  • Defence in depth needs layers that fail differently.
  • Zero trust removes trust based only on network location.
  • When you find a vulnerability, ask which principle it broke; the answer usually points to the fix.

If you can look at any login page, API or office process and say which of these principles it follows and which it ignores, you have understood this writeup.