Chapters

7 Defense in Depth

security
threats
iot

7.1 In 60 Seconds

Plan for the Second Barrier

Picture a building sensor whose password is stolen. If that one secret opens every device, command, and stored record, the system has no second chance. A safer design expects one barrier to fail and limits what the next step can reach.

An application programming interface is a defined way for software parts to request work or data; it is often shortened to API. A gateway is the device that joins one network to another. Draw the path from a person or device to the action it may cause. At each boundary, state what checks identity, limits permission, protects the message, records the action, and stops unusual behavior.

Now remove or bypass one control. Use a stolen account, an old device, a copied request, and a failed service. Check whether another independent control blocks the action or reduces the harm. Record who sees the failure and how recovery begins.

More controls can add cost and new mistakes, so layers must have distinct jobs. The deeper sections compare prevention, detection, response, and recovery and show how to avoid several barriers that all fail for the same reason.

Defense in depth starts with one plain question: if this control fails, what still limits, detects, or repairs the damage? A firewall, certificate, encrypted channel, log, or rollback image is useful only when it protects a different part of the path and leaves a record a reviewer can check.

Start simple. Pick one IoT action, such as changing a room-controller threshold through a gateway, and walk the path. Boundary filtering may narrow who reaches the API, identity proves the operator or device, authorization decides whether the command is allowed, monitoring records misuse, and recovery restores a known state. The point is not to own more controls; it is to make one failed control survivable.

7.2 Key Ideas

  • Layer: an independent control function placed on a real path, not just a product feature.
  • Failure assumption: the review deliberately asks what happens after one layer is bypassed, misconfigured, or compromised.
  • Control mix: preventive, detective, corrective, and recovery controls do different jobs and need each other.
  • Evidence: firewall rules, role tests, signed command traces, logs, alerts, and rollback records prove the layers work.
  • Independence: controls share little depth when one credential, key, admin account, or zone can disable them all.

7.3 Make One Failure Survivable

Defense in depth means an IoT system does not rely on a single perfect control. A perimeter rule, identity check, encrypted channel, application check, log, and recovery process each protect a different part of the attack path. If one layer fails, the next layer should still limit what an attacker can reach, change, observe, or hide.

The model is not a pile of random tools. A useful layered design maps controls to assets, traffic paths, identities, software behavior, and response work. Each layer should have a clear purpose and enough evidence to show it works independently of the others.

For example, a smart-building gateway may allow MQTT telemetry from room sensors, reject peer-to-peer sensor traffic, require device certificates, protect operator sign-in with MFA, store command history, and keep a rollback image for gateway firmware. Those controls overlap, but they do not all answer the same question. Segmentation limits where traffic can go, identity proves which device or operator is acting, authorization decides whether the command is allowed, logs expose misuse, and rollback restores a known state after a bad change. A reviewer should be able to point to each layer and explain what remains true if the layer before it fails.

If you only need the intuition, this layer is enough: defense in depth changes the question from "Which one control blocks the attacker?" to "What still limits the attacker after one control fails?"

An IoT deployment connects constrained devices, gateways, local networks, cloud services, maintenance accounts, update channels, and data stores. One control rarely covers all of those paths. A firewall does not prove device identity. Device identity does not prove a command is allowed. Encryption protects confidentiality, but it does not show whether a command is safe. Inspect Figure to place those distinct jobs along one protected path.

Inspect the layered defense figure below from boundary filtering toward the protected asset. Each labelled layer must add a different limit, detection signal, or recovery capability after the previous control is assumed to fail.

Seven-layer IoT defense stack showing boundary filtering, segmentation, identity, authorization, data protection, monitoring evidence, and recovery around protected assets.
Layer placement: seven independent layers show what still limits, detects, or repairs damage after one control fails.

In the stack shown by Figure, boundary filtering narrows entry, segmentation limits lateral movement, identity and authorization constrain actors and actions, and data protection safeguards the exchange. Monitoring makes misuse visible; recovery restores a known state. Each later layer answers what remains true if the preceding layer fails.

7.3.1 What Each Layer Does

Layers protect different parts

Boundary filtering, segmentation, identity, data protection, and monitoring each answer a different question along the path.

Plan for compromise

Assume one control fails and ask what still limits, detects, or recovers from the attacker's next step.

Independence, not count

Several controls that share one assumption are not depth; failure of that assumption removes them all.

7.3.2 Claims That Need Another Layer

  • A firewall alone is not an architecture: once an allowed path is used, other controls must still limit the attacker.
  • "We have monitoring" is incomplete without a response action that follows detection.
  • "We use encryption" is incomplete without key handling and a way to detect misuse.

7.3.3 Overview Knowledge Check

If you can state why one layer is not enough, you can stop here. Continue to Practitioner to place controls and check evidence.

7.4 Place Controls and Check Evidence

Defense in depth needs different control functions, not just different locations. A design made only of preventive controls can fail silently; a design made only of detective controls may discover harm after it is underway.

Start with one action path and follow it all the way to the asset. For a remote temperature-threshold change, the path might be operator laptop, identity provider, management API, cloud command service, gateway, and room controller. A practical review asks where the request crosses a trust boundary, what proves the operator and device identities, which role allows the threshold change, how the command is integrity-protected, what event proves it happened, and how the gateway returns to the previous threshold if the change is wrong.

Then check whether the layers fail independently. If the same maintenance account can change firewall rules, approve commands, disable logs, and delete rollback images, the design has many controls but little depth. A better record separates responsibilities: network rules are approved through change management, command authorization lives in the application, logs are written to a protected service, and recovery artifacts are stored outside the gateway's administrative zone. Evidence should match those boundaries, not just show that a control exists somewhere in the product.

Write the review as a small table for the action path: layer, control, owner, proof, and failure behavior. For the threshold-change path, proof can be a firewall rule export, an identity-provider role assignment, an API denied-command test, a signed command trace, a log entry in the SIEM, and a rollback drill record. That format makes weak depth visible quickly because blank proof or a repeated owner shows where the design depends on one hidden assumption.

7.4.1 Mix the Control Jobs

Inspect Figure by job rather than product. Preventive controls reduce the chance of misuse, detective controls expose a path that was taken, and corrective controls contain damage and restore service; the evidence column must prove each function independently.

Inspect the control-jobs figure below from prevention to detection and correction. Compare the evidence attached to each column so that a configuration export is not mistaken for proof that alerts fire or rollback succeeds.
Preventive, detective, and corrective control functions listed side by side as complementary security layers that must fail independently, each proven with configuration, log, access test, or rollback evidence.
Preventive, detective, and corrective controls are complementary functions, not alternatives.

The control-jobs diagram in Figure has three complementary columns. A firewall configuration or access test can prove prevention, a protected log and alert can prove detection, and a quarantine or rollback record can prove correction. Reusing one administrator, store, or credential across all three would weaken that depth.

Preventive

Segmentation, authentication, authorization, secure configuration, input validation, and encrypted communication.

Detective

Logs, alerts, anomaly checks, integrity checks, and review of unusual administrative actions.

Corrective

Key rotation, account disablement, quarantine, rollback to a known-good state, patching, and incident review.

7.4.2 Trace One Command Path

  1. Asset. Name the data, command, device function, or service being protected.
  2. Entry path. Describe how a request, packet, update, or user action reaches the asset.
  3. Trust boundary. Identify where traffic or authority crosses from one zone to another.
  4. Control placement. List the control operating at each boundary or layer.
  5. Failure behavior. State what remains true when one control fails.
  6. Evidence. Record the configuration, log, packet trace, access test, or recovery record that proves the layer works.

Use Figure to extend that trace across the user, device, gateway, connection, platform, cloud, and application elements. The six security principles become review questions at each boundary, not a single badge applied to the whole solution.

Inspect the command-path figure below across the user, devices, gateway, connection, platform, cloud, and applications. At each hop, ask which principle applies, which evidence proves it, and which later control still acts after one failure.
Six principles of IoT cyber security laid across the solution elements of user, devices, gateway, connection, platform, cloud, and applications, starting with securing the device hardware.
The review workflow traces a claim from asset and path to layers, evidence, decision, and retest.

Following the workflow in Figure from device hardware toward applications reveals where identity, communication protection, software integrity, data protection, operational monitoring, and recovery evidence belong. The resulting record names the asset, path, control, proof, decision, and retest trigger for one command rather than claiming that every component is simply “secure.”

7.4.3 Example Review: Gateway Configuration

A gateway accepts remote configuration commands for downstream sensors. A weak review says "the gateway is behind a firewall, so the command path is protected." A defense-in-depth review is narrower and testable.

Layer
Control
Evidence
If This Layer Fails
Boundary
Filtering limits where management traffic originates.
Firewall rule set and allowed-origin record.
Later controls must still check identity and authorization.
Identity and authorization
Account authentication, role checks, command authorization.
Role policy plus denied-command logs.
Logging and recovery limit and reverse misuse.
Data protection
Transport protection for credentials and command contents.
Protocol and key-handling configuration.
Authorization still gates the action; monitoring still detects it.
Detect and recover
Command logs, anomaly alerts, rollback, key rotation.
Sample alert and tested rollback record.
Manual response contains and restores the path.

7.4.4 Practitioner Knowledge Check

If you can place controls and tie each to evidence, you can stop here. Continue to Under the Hood for independence checks and how methods relate.

7.5 Independence and the Method Cross-Walk

The deeper layer covers the test that decides whether layers are genuinely independent and how the different security methods relate so that defense in depth is deliberate rather than a pile of unrelated tools.

7.5.1 Check What Shares One Assumption

Layers are weak when they depend on the same unprotected assumption. Common examples:

  • A firewall rule and an application check both trusting the same unauthenticated source address.
  • Device authentication and data encryption both depending on keys stored without protection.
  • Monitoring that can be disabled by the same account it is meant to observe.
  • Recovery that depends on backups stored in the same administrative zone as the compromised system.

The independence test is simple: pick one layer, assume it fails, and confirm another layer still limits access, detects misuse, or restores a trusted state.

7.5.2 Do Not Let One Method Replace Another

Each security method answers a different review question. Understanding those relationships helps reviewers use defense in depth deliberately. One method can support another, but it should not be used as a substitute without evidence.

Method
Question It Answers
Supports
Cannot Replace
Threat modelling
Which asset, boundary, and failure mode must each control address?
Defines the control questions for every other method.
The evidence that a chosen control is active.
Identity and access
Who or what can act, and which actions are permitted?
Authorization decisions on each path.
End-to-end message authentication by itself.
Hardening and segmentation
What exposure can be removed or contained?
Reduced attack surface and limited lateral movement.
Authorization of an allowed action.
Updates and monitoring
Is the accepted state current, and is misuse seen?
Keeping software current and detecting bypass.
Containment without a response action.

A strong identity check does not prove messages are authenticated end-to-end; an encrypted channel does not prove commands are authorized; monitoring without a response action leaves damage uncontained.

7.5.3 Mistakes That Collapse the Layers

  1. Treating a firewall as the whole architecture. It is one boundary control among many.
  2. Counting controls that share one credential, key, or admin path. Shared dependence is not depth.
  3. Listing encryption without identity, authorization, key handling, or monitoring. Encryption answers only one question.
  4. Treating logs as useful without review or response. Detection needs a follow-up action.
  5. Forgetting corrective controls. Rollback, isolation, and credential reset complete the model.

7.5.4 Deep Check: Method Substitution

At this depth, defense in depth is about independence and deliberate method choice: layers that fail separately, control functions that cover prevention, detection, and correction, and methods that support but do not silently replace one another.

7.6 Summary

  • Defense in depth reduces dependence on any single security control.
  • IoT layers commonly include boundary filtering, segmentation, identity, authorization, data protection, application checks, monitoring, and recovery.
  • Preventive, detective, and corrective controls serve different roles and should be reviewed together.
  • Independence matters: a useful design still limits, detects, or recovers after one control fails.
  • The method cross-walk keeps layering deliberate; one method should not silently substitute for another.

7.7 Key Takeaway

Defense in depth works when preventive, detective, corrective, and recovery controls overlap independently around the device, network, application, identity, and update paths, each backed by evidence rather than a diagram.

7.8 See Also

IoT Security Network Segmentation

Expand the segmentation layer that limits lateral movement after a boundary is crossed.

Threat Modelling and Mitigation

Identify the attack paths that layered controls must interrupt.

IoT Security Intrusion Detection

Turn the detective layer into observable security operations with a response action.