Problem
Relying on one perimeter control, such as a firewall or login check, turns any bypass into total breach. Attackers chain small weaknesses, and every control eventually has bugs or misconfigurations.
Also known as: layered-security, swiss-cheese-model
Layer independent security controls so that the failure of any single control does not lead to compromise.
Relying on one perimeter control, such as a firewall or login check, turns any bypass into total breach. Attackers chain small weaknesses, and every control eventually has bugs or misconfigurations.
Defense in depth assumes each control will fail someday and ensures another one stands behind it. It applies the same logic as safety engineering: multiple independent barriers, each with different failure modes.
Use threat modeling to pick layers deliberately: list the likely attack paths, then confirm at least two independent controls interrupt each one. Revisit the model after architecture changes, since new services, vendors and data stores often introduce paths that bypass existing layers.
Internet
| edge: DDoS protection, WAF, TLS
| gateway: authn, rate limits, schema validation
| service: authz per call, input validation, least-privilege role
| network: segmentation, deny-by-default egress, mTLS
| data: encryption, row-level tenant filters, backups
| detect: audit logs, anomaly alerts, runbooks
A request exploiting one layer, for example an injection that slips through validation, still meets a database account that cannot drop tables and egress rules that block exfiltration.
Medium to high
High — many controls to maintain
Medium
Layers share one dependency, such as a single identity provider, so one failure bypasses all
Controls misconfigured and never tested
Alert fatigue hides real signals