Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 38 ยท Getting Started

Security Principles: CIA, Defense in Depth and Zero Trust

Learn the CIA triad, defense in depth, least privilege, separation of duties and zero trust, and how to apply each to cloud systems with a runnable example.

Tools and product names change every year, but a small set of principles stays the same. If you understand them, you can judge any new cloud service or security feature quickly. This lesson covers the CIA triad, a few design principles that follow from it, and the zero trust approach most modern cloud designs are built on.

The CIA triad

Almost every security goal is one of three:

  • Confidentiality. Only authorized parties can read the data. Controls: encryption, access control, private networking.
  • Integrity. Data and systems are not changed in unauthorized ways, and you can tell if they were. Controls: hashes and signatures, write permissions, versioning, immutable logs.
  • Availability. Systems and data are usable when needed. Controls: redundancy, backups, DDoS protection, capacity planning.

Real decisions trade these against each other. Replicating data to many regions helps availability but widens the places confidentiality can fail. When you evaluate a control, ask which of the three it protects and which it might weaken.

Design principles

Principles that guide design

Least privilege Only what is needed
Defense in depth Many layers
Separation of duties No single approver
Secure by default Safe unless changed

Each one limits how far a single failure can spread.

1 / 2
  • Least privilege. Grant the smallest set of permissions, for the shortest time. A backup job needs to read one database, not administer the account.
  • Defense in depth. Stack independent controls: if the firewall rule is wrong, authentication still blocks the request; if credentials leak, encryption and monitoring still limit damage.
  • Separation of duties. The person who writes a change should not be the only one who can approve and deploy it. In the cloud this applies to production access, key management and billing.
  • Secure by default and fail closed. New resources start private; when a check cannot run, access is denied rather than allowed.
  • Minimize attack surface. Remove unused services, ports, accounts and keys. What does not exist cannot be attacked.
  • Keep it simple. Complexity hides mistakes. A policy a colleague can read in one minute is more likely to be right.

Zero trust

The older model, often called "castle and moat", trusted anything inside the corporate network. In the cloud, workloads, employees and partners are all over the internet, so a network location says very little. Zero trust replaces it with three habits:

  1. Verify explicitly. Authenticate and authorize every request using identity, device health, location and the sensitivity of what is being asked for.
  2. Use least-privilege access. Short-lived, narrowly scoped permissions instead of standing broad ones.
  3. Assume breach. Segment the network, encrypt traffic everywhere, log everything and design so an intruder gets little.

Zero trust is not a product you buy. It is a way of designing access decisions, and the identity chapter of this course (Identity and Access Management Fundamentals) shows how cloud IAM implements it.

flowchart LR
    U["User or service"] --> P{"Policy decision<br/>identity + device + context"}
    P -->|"allow, scoped"| R["Resource"]
    P -->|"deny"| X["Blocked and logged"]

Every request passes through a policy decision, no matter where it comes from.

Runnable example: a tiny zero trust decision

The function below decides access from several signals instead of "is the request from inside the network". It is a teaching model of a policy engine.

Python Evaluate access requests with context

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice that bo is denied even though the request came from the corporate network, and ana is allowed from the internet. Location alone decided nothing.

Applying the principles to the cloud

Principle Cloud example
Least privilege A function role that can read only one queue
Defense in depth Private subnet plus security group plus encryption plus audit logs
Separation of duties Key administrators cannot use the keys to decrypt data
Fail closed New storage buckets block public access by default
Assume breach Separate accounts for production and development

Cost of security. Every control adds friction and cost. Apply stricter controls to more sensitive data and keep the rest simple. Risk-based thinking (what is the harm if this fails?) beats "lock everything down equally".

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which part of the CIA triad does a regular, tested backup mainly protect?

    Backups let you restore data and service after failure or attack, which supports availability and recovery of integrity.
  2. 2. What does defense in depth mean?

    Independent layers mean an attacker must defeat several controls, not one.
  3. 3. What is the core idea of zero trust?

    Zero trust removes implicit trust based on network location and verifies each request using identity and context.
  4. 4. Separation of duties is best illustrated by:

    Splitting critical steps between people prevents a single person or stolen account from acting alone.

Summary

  • Confidentiality, integrity and availability are the three goals; controls often trade one against another.
  • Least privilege, defense in depth, separation of duties, secure defaults and a small attack surface limit the damage of any single failure.
  • Zero trust verifies each request using identity and context, grants minimal scoped access and assumes breach.
  • Apply stricter controls where the harm of failure is higher.

Next: Setting Up a Safe Cloud Learning Lab