CISSP-112 · Lesson 1 of 12 · 29 min

Secure design principles I: threat modeling, least privilege and defense in depth

Domain 3 of the CISSP, Security Architecture and Engineering, is where security stops being a set of policies and becomes a property of the systems an organization builds and buys. In the exam outline that has applied since April 2024 it carries about 13 percent of the weight, and it is famously broad: design principles, formal security models, hardware security features, vulnerabilities in every kind of system from a smart thermostat to a supercomputer, cryptography from the mathematics of key spaces to the management of certificates, and the physical design of buildings and server rooms. This course works through all nine sub-domains in twelve lessons. Always check the current exam outline on the ISC2 website before you book your exam.

This first lesson and the next cover sub-domain 3.1, research, implement and manage engineering processes using secure design principles. These principles are not rules for one product; they are habits of thought that a security architect brings to every design review. They also explain why many controls covered later exist at all. When you understand that least privilege, separation of duties and defense in depth are the reasons behind a control, you can answer scenario questions about controls you have never seen before.

Security is designed in, not bolted on

The cheapest moment to fix a security flaw is before it is built. A design change on a whiteboard costs minutes; the same change after a product has shipped can mean patches, recalls, breach notifications and lost customers. Studies of software defects have long shown that the cost of fixing a flaw grows sharply the later it is found, and security flaws follow the same pattern. That is why secure development life cycles place threat modeling and security requirements at the start of a project, and why the CISSP treats architecture as a management responsibility as much as a technical one. A manager who signs off a design without security review has accepted risk on the organization's behalf, whether or not they realized it.

Security by design also means designing for the whole life of the system: how it will be patched, how keys will be rotated, how logs will be collected, how it will be decommissioned and how its data will be destroyed. A system that is secure on the day it goes live but cannot be updated safely is not secure. The principles in this lesson apply at every one of those stages.

Threat modeling

Threat modeling is a structured way of asking four questions about a system: what are we building, what can go wrong, what are we going to do about it, and did we do a good job? It produces a picture of the system, usually a data flow diagram that shows processes, data stores, external entities and the flows between them, with trust boundaries drawn wherever data crosses from one level of trust to another. Most attacks happen at or across those boundaries, so they are where the analysis concentrates.

Several methods help teams find threats systematically. STRIDE, developed at Microsoft, gives six categories to check for each element: spoofing identity, tampering with data, repudiation, information disclosure, denial of service and elevation of privilege. Each maps to a property that a control should protect: authentication, integrity, nonrepudiation, confidentiality, availability and authorization. PASTA, the Process for Attack Simulation and Threat Analysis, is a seven-stage, risk-centered method that starts from business objectives and ends with residual risk. Attack trees break an attacker's goal into the alternative ways of reaching it, which makes it easy to see where one control would block many paths. Older scoring schemes such as DREAD rated threats on damage, reproducibility, exploitability, affected users and discoverability, but they are now seen as subjective, and many teams use CVSS or their own risk matrix instead. MITRE ATT&CK, a knowledge base of real attacker techniques, is useful for checking that a model reflects how attacks actually unfold.

Threat models are living documents. They should be updated when the design changes, when a new type of attacker appears or when an incident reveals a path nobody had considered. A model that was produced once for an audit and never revisited gives false comfort.

A data flow diagram. A browser user on the left sends requests across a dashed trust boundary to a web application, which reads and writes a database inside a second dashed boundary. An administrator connects through a separate boundary. Each boundary crossing is marked with the STRIDE categories most likely there: spoofing and tampering at the internet edge, information disclosure and tampering at the database, and elevation of privilege on the administration path.
A simple data flow diagram with trust boundaries. STRIDE is applied wherever data crosses a boundary.

Least privilege and need to know

The principle of least privilege says that every user, process and system should have only the access it needs to do its job, for only as long as it needs it. It limits the damage a mistake, a malicious insider or a compromised account can do. In practice it shows up as role-based access, separate administrator accounts, service accounts with narrowly scoped permissions, just-in-time elevation that grants administrator rights for an hour and then removes them, and software that drops privileges after starting. Need to know is a closely related idea from the world of classified information: even a person cleared to Secret does not see every Secret document, only those their duties require.

Privilege tends to grow over time. People change roles and keep their old access; temporary permissions become permanent; projects end but their accounts remain. This privilege creep is why periodic access reviews, covered in the identity domain, are a design concern too: a system that makes it easy to see and revoke access supports least privilege far better than one where permissions are scattered across many places.

Defense in depth

Defense in depth, sometimes called layered defense, means relying on several independent controls so that the failure of one does not expose the asset. A database of customer records might be protected by a firewall, network segmentation, hardened servers, strong authentication, application access controls, encryption at rest, monitoring and backups. An attacker who gets past the firewall still faces authentication; one who steals credentials still meets segmentation and monitoring. The layers should be diverse, mixing preventive, detective and corrective controls and administrative, technical and physical ones, because identical layers tend to fail together. Two firewalls from the same vendor running the same rules add less than a firewall plus endpoint protection plus logging.

Defense in depth is not an excuse to pile on controls without thought. Each layer has costs, including complexity, which can itself introduce flaws. The architect's job is to choose layers that cover different failure modes at a reasonable cost.

Concentric rings around a central data icon. From outside in the rings are labeled policies and training, physical security, perimeter, network segmentation, host hardening, application controls and data encryption. An arrow from outside shows an attack stopped at the fourth ring.
Defense in depth surrounds the asset with independent layers, so one failure does not expose the data.

Secure defaults and failing securely

Secure defaults means that a system should be safe in its out-of-the-box configuration. Default passwords, open administrative ports, sample applications and verbose error messages have been the root cause of countless breaches because many installers never change them. Good design ships with strong settings and makes weakening them a deliberate, logged choice. Regulators increasingly expect this: legislation on connected devices in several countries now bans universal default passwords, and secure-by-design guidance from national cyber agencies asks manufacturers to take responsibility for safe defaults rather than leave them to customers.

Fail securely, also called fail safe or fail closed in an access control context, means that when a component fails it should deny access rather than grant it. A firewall that crashes should block traffic; an authentication service that cannot reach its directory should refuse logins, not accept them. There is an important exception where human life is involved. A door controlled by a card reader on an emergency exit route must unlock if the power fails, because people must be able to escape a fire. This is called fail safe in the life-safety sense, and the CISSP expects you to know that the safety of people always comes first. Architects therefore separate the questions of what happens to data and what happens to people when something fails.

Separation of duties and keeping it simple

Separation of duties divides a sensitive task among two or more people so that no single person can complete it alone. The person who creates a vendor in the payment system should not be the person who approves payments to that vendor; the developer who writes code should not be the one who deploys it to production unreviewed. Dual control and two-person integrity are stronger forms in which two people must act together, for example to open a vault or to use a root signing key. Job rotation and mandatory vacations support the same aim by making it harder to hide fraud over long periods. Separation of duties is costly in small organizations, so compensating controls such as independent review of logs are sometimes used instead.

Keep it simple, or economy of mechanism, recognizes that complexity is the enemy of security. Every additional feature, interface and configuration option is something that can be misunderstood or misconfigured. Simple designs are easier to review, test and operate. Related principles include minimizing the attack surface by removing unneeded services and code, complete mediation, which means checking every access to every object rather than relying on a check made earlier, and open design, the idea that a system should remain secure even if its design is public, so that security rests on keys and secrets rather than on obscurity.

Classic secure design principles and how they appear in practice
PrincipleCore ideaTypical implementation
Least privilegeOnly the access needed, only when neededRole-based access, just-in-time elevation, scoped service accounts
Defense in depthSeveral independent layersSegmentation plus hardening plus encryption plus monitoring
Secure defaultsSafe out of the boxNo default passwords, unneeded services off
Fail securelyFailure denies accessFirewall fails closed; exit doors fail open for life safety
Separation of dutiesNo one person completes a sensitive taskMaker and checker, dual control of keys
Keep it simpleComplexity breeds flawsMinimal features, small attack surface
Complete mediationCheck every accessAuthorization on each request, not just at login
Open designSecurity does not depend on secrecy of designPublished algorithms, secret keys

Worked problem

Applying STRIDE to a login flow

A web application lets customers log in with a password and then view their invoices. Apply STRIDE to the login request crossing the internet trust boundary and name one control for each category.

Show solution
  1. Spoofing: an attacker uses stolen credentials. Control: multifactor authentication and breached-password checks.
  2. Tampering: requests are altered in transit. Control: TLS 1.2 or 1.3 with HSTS.
  3. Repudiation: a customer denies changing their banking details. Control: tamper-evident audit logs tied to authenticated sessions.
  4. Information disclosure: error messages reveal whether an account exists. Control: generic error messages and rate limiting.
  5. Denial of service: login floods lock out users. Control: rate limiting, CAPTCHA after failures and upstream DDoS protection.
  6. Elevation of privilege: a customer reaches another customer's invoices by changing an ID in the URL. Control: server-side authorization check on every object request.

Answer: Each STRIDE category maps to a property and at least one control. The last finding, an insecure direct object reference, is a failure of complete mediation and is one of the most common real-world flaws.

Worked problem

Counting layers

An attacker phishes an employee's password. List the layers that could still stop the attacker from copying the customer database, and say which type each is.

Show solution
  1. Multifactor authentication: preventive, technical.
  2. Conditional access that blocks logins from unmanaged devices: preventive, technical.
  3. Network segmentation that keeps user laptops away from database servers: preventive, technical.
  4. Database permissions limited by role: preventive, technical.
  5. Data loss prevention and egress monitoring: detective, technical.
  6. Security awareness that leads staff to report the phish quickly: administrative, detective.

Answer: Six independent layers remain after the password is lost. Defense in depth means the phishing success becomes an incident to contain rather than a breach.

Thinking like a manager

Exam questions in this area usually describe a design decision and ask what should happen first or which principle is being applied. When a question asks what to do before building something, the answer is often to perform threat modeling or define security requirements. When a question describes one person able to complete a sensitive process alone, the issue is separation of duties. When it describes a door that locks people in during a power failure, life safety overrides security. And when several answers would each improve security, prefer the one that addresses the root cause in the design rather than adding a compensating control later.

Common mistakes

  • MistakeTreating threat modeling as a one-time document for auditors.

    InsteadUpdate the model whenever the design, threats or incidents change.

  • MistakeMaking every exit door fail closed because it is more secure.

    InsteadLife safety comes first; exit routes fail safe so people can escape.

  • MistakeStacking identical controls and calling it defense in depth.

    InsteadLayers should be diverse so they do not fail for the same reason.

  • MistakeGranting broad access to save time and planning to tighten it later.

    InsteadStart from least privilege; privilege creep is harder to undo than to prevent.

  • MistakeRelying on a secret design to keep a system safe.

    InsteadFollow open design: security should rest on protected keys, not obscurity.

Summary and key terms

  • Domain 3 carries about 13 percent of the CISSP exam and starts with secure design principles.
  • Fixing security flaws at design time is far cheaper than after deployment.
  • Threat modeling asks what can go wrong, often using data flow diagrams, trust boundaries and STRIDE.
  • Least privilege and need to know limit what any user or process can reach.
  • Defense in depth uses diverse, independent layers so one failure does not expose the asset.
  • Systems should ship with secure defaults and fail securely, except where life safety requires doors to open.
  • Separation of duties, simplicity, complete mediation and open design reduce fraud and flaws.
Threat modeling
A structured analysis of what can go wrong in a system and how to address it.
Trust boundary
A point where data or control passes between components of different trust levels.
STRIDE
Spoofing, tampering, repudiation, information disclosure, denial of service and elevation of privilege.
PASTA
A seven-stage, risk-centered threat modeling method.
Least privilege
Granting only the minimum access needed for the minimum time.
Defense in depth
Using several independent layers of controls.
Fail securely
Designing failures so that access is denied rather than granted.
Separation of duties
Dividing a sensitive task so no single person can complete it.
Complete mediation
Checking authorization on every access to every object.
Open design
Security that does not depend on keeping the design secret.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What are the four questions of threat modeling?

    Show answer

    What are we building, what can go wrong, what will we do about it, and did we do a good job?

  2. Which STRIDE category maps to nonrepudiation?

    Show answer

    Repudiation.

  3. Where in a data flow diagram should analysis concentrate?

    Show answer

    At trust boundaries, where data crosses between trust levels.

  4. Give an example of just-in-time privilege.

    Show answer

    Granting administrator rights for one hour for a change, then removing them automatically.

  5. Why should layers in defense in depth be diverse?

    Show answer

    So that a single weakness or vendor flaw does not defeat them all at once.

  6. What should a firewall do when it crashes?

    Show answer

    Fail closed and block traffic.

  7. What should an emergency exit door do when power fails?

    Show answer

    Unlock, because life safety comes first.

  8. Give an example of separation of duties in payments.

    Show answer

    The person who sets up a vendor cannot also approve payments to it.

  9. What is complete mediation?

    Show answer

    Checking authorization on every access rather than only once.

  10. Why is DREAD less used today?

    Show answer

    Its ratings are subjective; many teams use CVSS or a risk matrix instead.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz