Security for Legal SaaS

Episode 4 · Module 1 · Foundations

Defence in Depth

18 May 2026 · 9:24 · Security for Legal SaaS

0:00 9:24

Medieval castle builders understood that a single wall eventually falls. In this episode, Alice and Dan translate the castle model into modern security architecture — six independent layers from network perimeter through audit logging. They examine the Okta breach to show why delegating an entire layer to one provider is a single point of failure, and walk through a SQL injection cascade that demonstrates the difference between architecture with depth and architecture without it.

Today’s Lesson

One Wall Is Never Enough

NIST defines defence in depth2 as “an information security strategy integrating people, technology, and operations capabilities to establish variable barriers across multiple layers.” The principle: no single control is trusted to hold.

The Castle Model

Castle Layer Modern Equivalent Function
Geographic positionNetwork architecture & segmentationSlows attackers, makes approach visible
Town wallsNetwork perimeter (firewall, WAF)Filters obvious threats
Moat & drawbridgeAuthentication layerControls who crosses into trusted space
Outer wallApplication-level controlsStops common application attacks
Inner wallAuthorization & access controlEnsures users see only their data
Keep (the vault)Encryption + audit loggingLast-resort protection after full compromise

The critical insight: each layer is designed assuming the layer in front has already fallen.4

Key principle: Each layer must function independently. If your authorisation check depends on authentication being correct, and authentication depends on the WAF blocking forged tokens, you have one layer pretending to be three. Microsoft’s Zero Trust framework6 formalises this as “verify explicitly” — every layer authenticates and authorises independently.

The Single-Provider Trap

In October 2023, attackers compromised Okta’s customer support system7 by stealing session tokens from uploaded HAR files. The breach cascaded to 134 customers8 including 1Password, BeyondTrust, and Cloudflare.

Single-Provider Risk Defence-in-Depth Mitigation
Auth provider breached → all tenants exposedIndependent authorization checks at data layer
WAF bypassed → application defencelessApplication-level input validation regardless of WAF
Cloud KMS compromised → all data readableApplication-layer encryption with separate keys
Logging service tampered → no audit trailLocal hash-chained copies + out-of-band verification

Case Study: SQL Injection Meets Plaintext Keys

CloudSEK documented a case10 where a single SQL injection exposed 45 databases, 240+ S3 buckets, and an entire AWS infrastructure because IAM credentials were stored as plaintext in the database. In the Accellion FTA breach (2021),11 attackers used SQL injection to retrieve encryption tokens, transforming a web vulnerability into full access to encrypted file transfers. Law firms were among the victims.12

Design test: Take any single component in your architecture and assume an attacker has full control of it. If that single compromise gives access to all client data, you lack depth. Re-architect until single-component compromise yields only partial access, detectable anomalies, and recoverable state.

Conclusion

Defence in depth is not about buying more security products. It is about architectural discipline: ensuring that the failure of any single layer does not cascade to total compromise. ISACA’s 2025 guidance13 emphasises that the medieval castle model has evolved but the principle endures: heterogeneous, independent layers, each designed to function when the layer above has fallen.

Sources & references

  1. Atmosera, “Defense in Depth: A Castle Analogy”
  2. NIST, “Defense-in-Depth — Glossary”
  3. Gondree & Peterson, “Using the Castle Metaphor,” ResearchGate, 2013
  4. OWASP Developer Guide, “Principles of Security”
  5. CISA, “Red Team Advisory,” AA24-193A, July 2024
  6. Microsoft, “What is Zero Trust?”
  7. BeyondTrust, “Okta Support Unit Breach Update,” 2023
  8. Cloudskope, “Okta Breach 2023” — 134 downstream customers affected
  9. Verizon, 2024 DBIR — stolen credentials in 38% of breaches
  10. CloudSEK, “How a Single SQL Injection Exposed 45 Databases”
  11. CISA, “Exploitation of Accellion FTA,” Advisory AA21-055A
  12. Google Cloud / Mandiant, “Accellion FTA Exploited for Data Theft”
  13. ISACA, “Beyond the Moat: Modern Defense-in-Depth Strategies,” 2025