Chapter 3

Designing Resilient, Secure Architectures

CompTIA SecurityX (CAS-005) Study GuideDomain 2.0 · Security Architecture · 27% of the exam

Domain 2.0 — Security Architecture · 27% of the exam

Chapter Objectives

3.1 Designing Resilient Systems (Objective 2.1)

Resilience means a system keeps serving its purpose when something fails, breaks, or is attacked. A resilient design assumes failure. Servers fail. Networks fail. Cloud regions fail. Attackers probe every exposed path. The architect's job is to place each control in the right position, spread load so no single component becomes a chokepoint, and design recovery before recovery is needed.

CertCrack.com runs a practice-exam platform for thousands of candidates. Exam week is its busiest week. If the platform fails then, candidates lose study time and the business loses trust. This section uses that platform, and the client systems

CertCrack advises on, to show how resilient design decisions are made in practice.

3.1.1 Placing Components Where They Can Do Their Job

Every security component only works where traffic, identity, or data actually passes through it. Place a control in the wrong position and it sees nothing. Place it in the right position and it becomes a natural enforcement point. Component placement is therefore the first resilient-design skill. The architect draws the traffic flows first. Only then are controls placed on those flows.

DEFINITION

Component placement. The deliberate positioning of security controls in an architecture so that each control sits on the traffic, identity, or data flow it is meant to protect. Correct placement makes enforcement automatic; poor placement leaves a control blind to the traffic it was bought to inspect.

The perimeter firewall sits at the boundary between trusted and untrusted networks. It filters traffic by address, port, and protocol. It works at Layers 3 and 4. It is the right control for blocking unwanted network paths. It cannot read the content of an encrypted web request. The next-generation firewall adds application awareness and user identity to that filtering. It is placed where application traffic crosses a trust boundary.

Internal segmentation firewalls sit between zones, not only at the edge. A database zone, a payment zone, and a user zone should not trust each other by default. An intrusion prevention system (IPS) sits inline, directly in the traffic path. Because it is inline, it can drop malicious traffic in real time, and that power carries risk. A faulty signature or a failed appliance can block good traffic or break the path.

Resilient designs use fail-open or fail-closed settings chosen per segment, plus bypass hardware on critical links.

DEFINITION

Intrusion prevention system (IPS) and intrusion detection system (IDS). An IPS sits inline in the traffic path and can block malicious traffic as it passes. An IDS sits out of band, receives a copy of traffic, and alerts without blocking. The choice between them is a placement decision: blocking power in

exchange for inline risk, or safe observation without enforcement.

An intrusion detection system (IDS) sits out of band. It receives a copy of traffic from a tap or a mirror port. It can alert on an attack without ever risking the live path. It cannot stop the attack by itself. Architects often pair the two: IPS on the

highest-risk inline paths, IDS for broad observation elsewhere. A VPN gateway sits at the edge where remote users and partner sites enter the network.

It terminates encrypted tunnels and hands authenticated traffic to internal controls. Placement matters after the tunnel ends. Traffic that leaves the VPN gateway must still pass firewalls, NAC checks, and segmentation rules. A tunnel that lands directly inside a trusted zone defeats the rest of the design.

EXAM TIP

When a scenario says VPN users "land directly on the internal LAN," treat that as the design flaw. The expected fix is almost always to terminate the tunnel in a controlled entry zone and enforce firewall, NAC, and segmentation

controls after decryption.

Network access control (NAC) sits at the point where a device or user joins the network. It checks identity, device health, and posture before granting access. It then assigns the device to the right segment, often using 802.1X and dynamic VLAN assignment. NAC belongs at wired ports, wireless controllers, and VPN entry points. Placed only at the perimeter, it misses the contractor laptop plugged into a meeting-room port.

DEFINITION

Network access control (NAC). A control that authenticates devices and users at the point of network entry and checks posture, such as patch level and endpoint protection, before granting access. NAC typically assigns an

approved segment or quarantine segment based on the result of those checks.

A web application firewall (WAF) sits in front of a web application, usually behind the load balancer or CDN. It inspects HTTP and HTTPS traffic at Layer 7. It blocks injection, cross-site scripting, and other application attacks that a network firewall cannot see. It only protects the applications behind it. A WAF placed at the network edge, away from the application flow, protects nothing useful.

Forward and reverse proxies sit in opposite directions. A forward proxy sits between internal users and the internet. It controls and logs outbound web access. A reverse proxy sits between the internet and internal servers. It presents the servers to the world, terminates connections, and can feed traffic to the WAF and load balancer. Confusing the two directions is a common design error.

DEFINITION

Forward proxy and reverse proxy. A forward proxy acts on behalf of internal clients making outbound requests, controlling and logging where users may go. A reverse proxy acts on behalf of servers receiving inbound requests, shielding the servers and presenting a single controlled entry point to external clients.

An API gateway sits in front of APIs. It is the single entry point for API calls. It enforces authentication, authorization, rate limiting, and request validation. Modern systems are built from APIs, so this placement is now central. If clients can reach API servers directly and bypass the gateway, every gateway control is optional for an attacker. Network rules must force all API traffic through the gateway.

DEFINITION

API gateway. A managed entry point placed in front of APIs that enforces authentication, authorization, rate limiting, throttling, and request validation for every API call. Its value depends on placement: all API traffic must be forced through it, with direct access to back-end services blocked.

Network taps and collectors copy traffic for analysis without sitting inline. A physical tap copies traffic from a link. A mirror or SPAN port copies traffic from a switch. Collectors gather those copies, plus flow records and logs, and forward them to analysis platforms. Taps are preferred on critical links because a SPAN port can drop packets under load. Placement follows the same rule: a tap only sees the link it is attached to.

A content delivery network (CDN) sits at the global edge, in front of everything else. It caches static content close to users. It absorbs large traffic volumes, including many denial-of-service floods. Many CDNs also offer WAF and rate-limiting features at the edge. The origin servers must accept traffic only from the CDN. Otherwise an attacker who finds the origin address bypasses the edge entirely.

A vulnerability scanner is placed to see what it must assess. An external, uncredentialed scan from outside the perimeter shows what an attacker sees; an internal, credentialed scan from a management segment, with read-only credentials on each host, shows what is actually installed and misconfigured. Scanners need scheduled windows — a full credentialed scan can load systems — and their results feed the same register as the firewall and IPS findings. A scanner that can only reach the DMZ cannot assess the database tier, so placement follows the same rule as every other component: put it where the traffic and the targets are.

Figure 13 — Traffic crosses perimeter and internal inspection layers before reaching the application and database tiers, with supporting controls placed on their actual enforcement paths.

Reading Figure 13. Follow the traffic from the top left. Users reach the CDN at the untrusted edge first, then cross the perimeter firewall, load balancer, WAF, and internal segmentation firewall before entering the inline IPS. The flow then turns left along the second row: the API gateway fronts the application tier, and the application tier alone talks to the database tier. The bottom row shows the supporting controls in their places: backup under the database, network taps under the application tier feeding monitoring, and NAC at the entry points to the protected segment. No public traffic reaches data without crossing every inspection layer.

CORE CONCEPT

Placement is enforcement. A control protects only the flows that pass through it. For every control in a design, ask three questions: What flow does it sit on? Can that flow bypass it? What happens to the flow if the control fails? A design that cannot answer all three questions for every control is not finished.

CertCrack's platform shows the pattern working together. User traffic reaches the CDN first. The CDN forwards traffic to the load balancer. The WAF inspects web requests. The API gateway controls exam-engine API calls. Firewalls segment the application tier from the database tier. An IPS guards the highest-risk inline paths. Taps feed copies of key links to collectors for the security team.

NAC controls staff and contractor devices joining the office and VPN. No single control does the whole job. Each one covers the flow it can actually see.

SCENARIO

CertCrack adds a new partner API. Partner systems will call the exam-results API over the internet. The first design lets partner systems connect directly to the API servers for "lower latency." The security architect objects. State the flaw, the correct placement, and the network rule needed to make the

placement real.

Discussion. The flaw is bypass: direct connections skip the API gateway, so authentication, authorization, rate limiting, and validation are not enforced. The correct placement puts the API gateway in front of the API servers as the only entry point. The network rule must block direct access to the API servers from partner addresses and allow inbound API traffic only from the gateway. Latency is handled by sizing and placing the gateway well, not by removing the control.

3.1.2 Load Balancing for Availability and Integrity

A single server is a single point of failure. Load balancing spreads traffic across several servers so the service survives the loss of any one of them. It also lets capacity grow by adding servers instead of replacing one large server.

DEFINITION

Load balancer. A component that distributes incoming traffic across a pool of servers, checks the health of each server, and stops sending traffic to servers that fail those checks. Load balancing provides both capacity and availability: the pool keeps serving when individual members fail.

Layer 4 load balancing distributes traffic using addresses and ports. It is fast and simple. It does not read the content of requests. Layer 7 load balancing reads the application request. It can route by URL, header, or cookie. It can send exam traffic and reporting traffic to different pools. The exam expects you to choose the layer that matches the routing decision described. Health checks decide which servers receive traffic.

A shallow check asks whether the server responds. A deep check asks whether the application on the server actually works. Deep checks catch more real failures. Poorly tuned checks cause their own outages by removing healthy servers. Thresholds need care: remove a server after repeated failures, return it only after repeated successes.

Session persistence keeps a user's requests on the same server when the application stores session state locally. It is also called sticky sessions. Persistence helps legacy applications. It also creates uneven load and painful failures, because a failed server takes its sessions with it. The stronger design

stores session state outside the servers, in a shared store. Then any server can serve any request, and persistence is no longer needed.

DEFINITION

Persistence (sticky sessions). A load-balancer setting that sends all requests from one client to the same back-end server. Persistence supports

applications that store session state locally, but it reduces the resilience benefit of the pool. Storing session state in a shared external store removes the need for persistence.

The load balancer itself must be resilient. A single load balancer simply moves the single point of failure. Designs use pairs or clusters of load balancers. Global load balancing spreads traffic across sites or regions. Health checks then work at two levels: server health inside a site, and site health across the design. The CDN and the load balancer work as a pair. The CDN absorbs and caches at the edge.

The load balancer distributes what remains across healthy origins. Together they handle the exam-week surge that would crush a single server. They also blunt denial-of-service attacks by spreading volume across far more capacity than one site owns.

Figure 14 — The CDN serves users close by, and the load balancer spreads origin traffic across three zones.

Reading Figure 14. Start on the left with global users. Their first contact is the CDN edge cache, which serves static content close to each user and shields the origin from repeated requests. Dynamic requests pass to the load balancer in the middle. Follow its three arrows to the right: traffic is spread across Zone A, Zone B, and Zone C, three separate availability zones. If one zone fails, the load balancer stops sending it traffic and the surviving zones absorb the load. Health checks drive that decision, so failed instances are removed automatically rather than discovered by users.

EXAM TIP

If a scenario describes uneven load, failed sessions after a server outage, or an application that "must keep users on the same server," the issue is persistence and local session state. The BEST long-term answer is usually a shared session store so the pool can balance freely.

3.1.3 Designing for Availability and Integrity

Availability design starts with a number. The business states how much downtime it can accept. The architect turns that number into an architecture. Vague goals produce vague designs.

DEFINITION

Availability. The proportion of time a system is operational and usable, usually expressed as a percentage over a year. Availability is calculated as uptime divided by total time. Each additional "nine" in the target cuts allowed

downtime by a factor of ten.

Redundancy removes single points of failure. Duplicate the component. Duplicate the path. Duplicate the power, the link, and the site where the risk justifies it. Redundancy only counts if failover is automatic and tested. An untested standby is a hope, not a control. Integrity design protects data from unauthorized or accidental change. Checksums and hashes detect altered files and data.

Digital signatures prove who approved a release. Database constraints and transactions stop partial, corrupt writes. Versioning and immutable storage let good data be restored after bad data is written. Availability without integrity can mean a system that is always up and reliably wrong. The exam tests both together for this reason.

CORE CONCEPT

Design for availability and integrity together. Replication spreads data for availability, but it also spreads corruption quickly if integrity checks are missing. Pair every replication and failover mechanism with integrity controls: checksums, transaction controls, signed releases, and versioned or

immutable backups that let the team roll back to known-good data.

Interoperability. Interoperability is the ability of systems from different vendors and generations to work together through open standards, common protocols, and compatible interfaces. A resilient design depends on it: a failover that cannot move data between two vendors' systems, a monitoring tool that cannot read another system's logs, or a backup that cannot restore to a different platform are

all single-vendor traps. Architects specify standards-based integration — common APIs, standard log and data formats, and protocol compatibility — so components can be replaced without redesigning the whole architecture.

Recovery time objective (RTO) states how quickly service must be restored after a failure. Recovery point objective (RPO) states how much data loss, measured in time, is acceptable. These two numbers drive almost every resilience cost decision. A short RTO needs standby systems ready to take over. A short RPO needs frequent replication or backups. Both cost money, so the business, not the architect alone, sets them.

DEFINITION

Recovery time objective (RTO) and recovery point objective (RPO). RTO is the maximum acceptable time to restore service after a disruption. RPO is the maximum acceptable data loss after a disruption, expressed as a period of time. Together they size the backup, replication, and standby investment a design requires.

Worked Calculation — Availability and Annual Downtime

CertCrack's exam platform must stay available during exam week. The business is choosing between 99.9%, 99.95%, and 99.99% availability targets. One year = 365 days × 24 hours × 60 minutes = 525,600 minutes.

1. Step 1 — Write the formula: allowed downtime = (1 − availability) × 525,600 minutes.

2. Step 2 — For 99.9%: (1 − 0.999) × 525,600 = 0.001 × 525,600 = 525.6 minutes per year.

3. Step 3 — Convert 99.9%: 525.6 minutes ÷ 60 = 8.76 hours per year, about 8 hours 46 minutes.

4. Step 4 — For 99.95%: (1 − 0.9995) × 525,600 = 0.0005 × 525,600 = 262.8 minutes per year.

5. Step 5 — Convert 99.95%: 262.8 minutes ÷ 60 = 4.38 hours per year, about 4 hours 23 minutes.

6. Step 6 — For 99.99%: (1 − 0.9999) × 525,600 = 0.0001 × 525,600 = 52.56 minutes per year.

7. Step 7 — Convert 99.99%: 52.56 minutes is about 0.88 hours per year, under one hour in total.

8. Step 8 — Link to recovery objectives: if the business sets an RTO of 1 hour, a single 1-hour incident would exceed the entire annual 99.99% budget of 52.56 minutes, so 99.99% also requires automated failover, not manual recovery.

Result: 99.9% allows 525.6 minutes (8.76 hours) of downtime per year; 99.95% allows 262.8 minutes (4.38 hours); 99.99% allows only 52.56 minutes (about 0.88 hours). Each tightening step cuts allowed downtime sharply — by half from 99.9% to 99.95%, and by a factor of five from 99.95% to 99.99%; a full additional nine cuts it tenfold. The tighter targets are only credible with automated failover and an RTO well under one hour.

The calculation changes design conversations. "Four nines" sounds like a slogan until the team sees 52.56 minutes. One slow manual recovery breaks the target for the whole year. That is why availability targets, RTO, and RPO are agreed before components are chosen.

SCENARIO

A client signs a 99.99% availability commitment for its payment service. Its recovery plan is a manual rebuild procedure estimated at 3 hours, practiced once a year. Explain, using the downtime budget, why the commitment cannot be met, and name two design changes that would make it credible.

Discussion. At 99.99%, the full annual downtime budget is 52.56 minutes. One 3-hour manual recovery uses more than three times the annual budget in a single incident, so the commitment fails on the first serious outage. Credible changes include automated failover to a redundant standby so recovery takes minutes, and frequent tested recovery exercises with replication sized to a short RPO, so both the RTO and the data-loss target fit inside the budget.

3.1.4 Scaling, Persistence of Data, Recoverability, and Geography

Horizontal scaling adds more servers to a pool. Vertical scaling makes one server larger. Horizontal scaling fits resilient design better. It removes single points of failure as it adds capacity. Vertical scaling is simpler but ends at the largest available machine, and that machine is still one failure away from an outage.

DEFINITION

Horizontal and vertical scaling. Horizontal scaling adds more instances of a component so work is shared across a pool. Vertical scaling increases the resources of a single instance. Horizontal scaling supports resilience because the loss of one instance does not stop the service.

Auto-scaling adds and removes instances as demand changes. It handles the exam-week surge without paying for peak capacity all year. Auto-scaling needs stateless design to work well. State belongs in shared stores, not on individual servers. This is the same lesson as load-balancer persistence, applied to growth.

Data persistence in resilient design means data survives the loss of the component that wrote it.

Replication copies data to other instances or sites. Synchronous replication waits for the copy before confirming the write. It protects data strongly but adds latency. Asynchronous replication confirms first and copies after. It is faster but can lose recent writes in a failure. The choice is an RPO decision, not a preference. Recoverability is the proven ability to restore service and data. Backups are only one part of it.

The design also needs restore procedures, recovery priorities, and regular restore tests. Backup success messages prove nothing. A successful test restore proves recoverability. Keep backups isolated or immutable so ransomware cannot encrypt or delete them with the production data.

EXAM TIP

"Backups complete successfully every night" is never proof of recoverability in an exam scenario. The answer that demonstrates recoverability is a tested restore. If an option offers restore testing, it usually beats an option that only adds more backup copies.

Geographic considerations shape where systems and data are placed. Distance adds latency, so users should be served from nearby regions. Distance also protects against regional failure, so copies should not all sit in one region.

Data-residency law may require data to stay in a country or region. Privacy law can forbid the cheapest or fastest placement.

The architect balances latency, regional resilience, cost, and legal residency together. A design that is fast and resilient but stores regulated data in the wrong country is still a failed design. Active-active and active-passive designs express the geographic choice. In an active-active design, two or more sites serve traffic at the same time. Capacity is used fully, and the loss of one site shifts load to the others.

Data must be consistent across sites, which is the hard part. In an active-passive design, one site serves traffic and another waits. The passive site is simpler to keep consistent. It is also idle cost until the day it is needed, and its readiness must be proven by failover tests. Neither pattern is automatically better. The RTO decides how warm the standby must be. The RPO decides how current its data must be.

A pilot-light design keeps only core data replicating and builds the rest on demand. It is cheap and slow. A multi-site active design is fast and expensive. The exam gives you the recovery objectives in the stem for a reason: they, not fashion, select the pattern. Geography also affects integrity. Replication across

long distances can lag, conflict, or arrive out of order. Designs state which site wins a conflict.

They state how consistency is checked after a failover. They rehearse the return journey as well, because failing back to a repaired site is a second migration, with its own risks. A failover that has only ever been run in one direction is half a plan.

Figure 15 — Each control is measured against a threshold, and the results are reviewed on one dashboard.

Reading Figure 15. Read left to right. Every control on the left needs a metric that proves whether it works. The metric is compared with a threshold, the agreed target for good performance. Results feed the dashboard panel underneath. Each row names one measure, shows its current value and draws a bar against the target. MFA coverage and tested backups sit close to target. Patch performance sits lower, so it stands out for action. Leaders review the same view each month and fund fixes where bars fall short.

Figure 15 belongs with the end of this section on purpose. Resilient design is not finished when components are placed. It is finished when the team can measure whether the design works. Availability, failover time, restore success, and error rates become metrics with thresholds. Section 3.3 returns to control-effectiveness metrics in full. For now, note the habit: every resilience claim in a design should name the metric that would prove it false.

3.2 Security in the Systems Life Cycle (Objective 2.2)

Security added at the end of a project is expensive, rushed, and shallow. Security built into the life cycle is cheaper and stronger. Objective 2.2 covers the whole journey: defining security requirements early, assuring software while it is built, gating the pipeline that delivers it, trusting the supply chain behind it, and

planning for the day the system reaches end of life. CertCrack builds its exam platform this way.

Its clients increasingly ask how it does so before they sign. Life-cycle security is therefore both an engineering practice and a sales asset.

3.2.1 Defining Security Requirements First

Security requirements definition happens at the start of the systems life cycle, alongside functional requirements. The team states what the system must protect, from whom, and to what standard. Requirements come from law, contracts, risk assessment, and threat modeling, and they must be testable. "The system shall encrypt candidate data at rest" can be tested. "The system shall be secure" cannot.

Functional and non-functional requirements. Functional requirements state

what the system must do; non-functional requirements state how well it must do it — how fast, how reliably, and how securely. Security requirements are usually non-functional: they constrain behavior rather than adding features, and they must be written as testably as any functional requirement. Every security requirement also carries a security/usability trade-off: a control users cannot tolerate will be bypassed, so the requirement must balance protection against the friction it adds — authentication strong enough to stop attackers but light enough that users do not defeat it with shared passwords and workarounds.

DEFINITION

Security requirements definition. The early life-cycle activity that states, in testable form, what a system must protect and how strongly, based on law, contracts, risk, and threat modeling. Good security requirements are specific enough to design against and to test before release.

Requirements are traced through the life cycle. Each requirement maps to a design decision. Each design decision maps to a test. This traceability proves coverage at audit time. It also stops quiet scope cuts. A requirement with no test is a requirement that will silently disappear under deadline pressure. Requirements also record assumptions and exclusions.

A requirement set that silently assumes trusted internal traffic will produce a design with no internal controls. Writing the assumption down lets reviewers challenge it. Exclusions matter too: stating that a legacy interface is out of scope, and why, prevents both false confidence and surprise findings at audit. Finally, requirements are prioritized.

When deadlines press, the team cuts from the bottom of an agreed list, not from whichever control is least visible. That single habit protects more security controls

than any tool purchase. Early security work also includes architecture review and threat modeling. The team draws data flows and trust boundaries. It asks where an attacker would strike first. Fixing a design flaw on paper costs hours.

Fixing the same flaw after release costs a redesign, a migration, and sometimes a breach notice.

Figure 16 — Every development phase carries its own security activity, and operations feedback restarts the cycle.

Reading Figure 16. Follow the top row from left to right through the six phases: requirements, design, code, test, deploy, and operate. Under each phase sits the security activity that belongs to it, joined by a downward arrow. Security requirements are set first, threat modeling shapes the design, SAST and review check the code, DAST and penetration testing check the running system, hardening and signing protect deployment, and monitoring and patching protect operations. The arrow underneath runs from Operate back to Requirements, because production findings become requirements for the next release.

EXAM TIP

The exam rewards "shift left": security requirements, threat modeling, and architecture review in the earliest stages beat any answer that adds testing only at the end. If one option moves a security activity earlier without losing coverage, it is usually the BEST answer.

3.2.2 Software Assurance: Testing the Code at Every Layer

Software assurance is the set of activities that build confidence that software does what it should and nothing it should not. No single technique finds every flaw. The exam expects you to know what each technique sees, when it runs, and what it misses.

DEFINITION

Software assurance. The planned set of analysis, testing, and review activities applied across the life cycle to gain confidence that software is free of

vulnerabilities and functions as intended. Assurance combines static, dynamic, interactive, runtime, and composition techniques because each finds a different class of flaw.

Static application security testing (SAST) analyzes source code without running it. It runs early, often inside the developer's environment or pipeline. It finds coding flaws such as injection patterns and unsafe functions. It can produce false positives because it does not see real runtime behavior. Dynamic application security testing (DAST) tests the running application from outside. It sends crafted requests and watches responses.

It finds flaws that only appear at runtime, such as misconfiguration and authentication failures. It cannot point to the line of code that caused the flaw. Interactive application security testing (IAST) instruments the running application from inside. It watches code execute during tests. It combines the reach of dynamic testing with the precision of static analysis.

It needs the application to be exercised, so test coverage limits what it finds. Runtime application self-protection (RASP) sits inside the running application in production. It detects and can block attacks as they happen. RASP is a production control, not a pre-release test. That timing difference is a favorite exam distinction.

DEFINITION

SAST, DAST, IAST, and RASP. SAST analyzes code without running it, early in development. DAST tests a running application from outside. IAST

instruments a running application from inside during testing. RASP protects a running application in production by detecting and blocking attacks at

runtime. The four differ mainly by when they run and where they sit.

Software composition analysis (SCA) examines the third-party libraries and components inside an application. Most modern applications are mostly other people's code. SCA matches those components against known vulnerability data. It answers a different question from SAST: not "is our code safe?" but "is the code we borrowed safe?" A software bill of materials (SBoM) is the inventory that makes SCA and incident response possible.

It lists every component and version in a product. When a new library vulnerability is announced, the SBoM answers "are we affected?" in minutes

instead of weeks. Buyers and regulators increasingly require an SBoM from suppliers.

An SBoM only works across companies because it is written in a shared, machine-readable format. The two formats in wide use are SPDX, maintained by the Linux Foundation, and CycloneDX, an OWASP standard; both record components, versions, licenses, and hashes in a file that tools on either side of a supply contract can read. Generation is automated, not manual: a tool such as Syft scans a build artifact or container image and emits the SBoM in either format on every build, so the inventory exists before an incident demands it instead of being reconstructed by hand during one.

DEFINITION

Software bill of materials (SBoM) and software composition analysis (SCA). An SBoM is a machine-readable inventory of every component and version in a software product. SCA uses that inventory, and direct scanning, to find known vulnerabilities and license risks in third-party components.

Formal methods use mathematical proof to show that code or a design meets its specification. They give the strongest assurance available. They are also the most expensive and specialized. They fit small, critical components: cryptographic code, safety controls, access-control engines. The exam tests whether you can reserve formal methods for where their cost is justified.

Coding standards and linting. Coding standards state the rules code must follow — naming, structure, approved libraries, banned functions — and linting enforces them automatically on every commit. A linter catches unsafe patterns early, before SAST or review: hard-coded secrets, dangerous functions, unvalidated input handling. Standards without automated enforcement drift; linting makes the standard a gate rather than a suggestion.

Vulnerability analysis. Vulnerability analysis is the work of deciding whether a finding is a real vulnerability in context: a scanner reports candidates, and analysis confirms exploitability, checks reachability, weighs compensating controls, and assigns severity. The Semgrep triage below is vulnerability analysis in miniature — the same finding can be a blocking true positive, a dismissible false positive, or an accepted fact depending on context.

Table 2 — Software assurance techniques compared

TechniqueRuns whenSeesMain limit
SASTDuring coding and buildSource code flawsFalse positives; no runtime view
DASTAgainst a running test systemRuntime behavior from outsideCannot locate the faulty code line
IASTDuring testing, instrumentedCode execution during testsLimited by test coverage
RASPIn productionLive attacks at runtimeProtects; it is not a pre-release test
SCABuild and continuouslyThird-party component riskDoes not assess first-party code logic
Coding standards and lintingDuring coding, on every commitStyle, unsafe-pattern, and rule violations in source codeFinds rule violations, not design flaws
Vulnerability analysisContinuously, on findingsWhether a finding is a real, exploitable vulnerability in contextA finding is not yet a vulnerability
Formal methodsDesign and critical-code stageProof against a specificationHigh cost; fits small critical parts

SCENARIO

A critical library used by CertCrack's exam platform is found to have a severe vulnerability. The incident lead asks a simple question: "Are we affected, and where?" The team cannot answer for two days because nobody knows which services use the library. Name the two assurance artifacts that would have answered the question in minutes, and explain what each contributes.

Discussion. The SBoM contributes the inventory: every component and version in each service, searchable in minutes. SCA contributes the risk matching: it continuously compares that inventory against vulnerability data and would already have flagged the affected services. Together they turn a two-day manual hunt into a lookup, which is exactly why buyers now require an SBoM and why SCA runs continuously, not only at release.

Worked example — triaging scanner findings at the gate. The pipeline's

SAST scan returns four findings on one pull request:

The flagged code sits inside the view function get_results(request) in engine/results.py, so a reader reconstructing this code reproduces all four findings.

$ semgrep --config auto --json | jq '.results[] | {rule: .check_id, severity:
  .extra.severity, location: (.path + ":" + (.start.line | tostring)), code:
  .extra.lines}'
{
  "rule": "python.django.security.injection.sql.sql-injection-using-db-cursor-execute.sq
  l-injection-db-cursor-execute",
  "severity": "WARNING",
  "location": "engine/results.py:212",
  "code": "result_id = request.GET['id']"
}
{
  "rule": "python.django.security.injection.tainted-sql-string.tainted-sql-string",
  "severity": "ERROR",
  "location": "engine/results.py:213",
  "code": "query = \"SELECT * FROM results WHERE id = \" + result_id"
}
{
  "rule": "python.sqlalchemy.security.sqlalchemy-execute-raw-query.sqlalchemy-execute-ra
  w-query",
  "severity": "ERROR",
  "location": "engine/results.py:215",
  "code": "cursor.execute(query)"
}
{
  "rule": "generic.secrets.security.detected-private-key.detected-private-key",
  "severity": "ERROR",
  "location": "fixtures/sample_key.pem:1",
  "code": "-----BEGIN RSA PRIVATE KEY----- (published test fixture, generated 2019)"
}

Reading the triage. The first three findings are one true positive, not three: three rules flag the same injection — the Django rule points at the tainted value, the tainted-string rule points at the concatenated query, and the SQLAlchemy rule points at the raw execute — and all three clear when the query is parameterized, so the merge is blocked until that one fix lands. The fourth is a false positive to dismiss with the reason recorded: the key is a published test fixture that protects nothing real, and the dismissal note, not silence, is what an auditor wants to find. The MD5 deduplication key at engine/legacy_import.py:44 produces no finding at all: the md5-used-as-password rule fires only when a hash flows into password handling, so a deduplication use is silent by design, and the decision to accept it with a comment comes from review, not from the scanner. Triage is the skill the gate of Figure 17 assumes — the scanner finds candidates, and the engineer decides which of them are vulnerabilities.

3.2.3 CI/CD, Branch Protection, and Testing Activities

Modern software ships through a pipeline. Continuous integration and continuous delivery (CI/CD) automates build, test, and deployment. Whoever controls the

pipeline controls what reaches production. The pipeline is therefore a security boundary, not just a convenience.

DEFINITION

CI/CD pipeline. The automated path that takes code from commit through build, testing, approval, and deployment to production. Because the pipeline can place arbitrary code into production, its gates, identities, and approvals are security controls in their own right.

Security gates are checks that can stop the pipeline. A typical order is deliberate.

A gate that never blocks is decoration. Critical findings must fail the build until fixed or formally accepted as risk.

Figure 17 — Each pipeline stage must pass its security gate before work can move to the next stage.

Reading Figure 17. Start at the top with a signed commit. Each stage runs, then meets a gate diamond. The gate checks the result of that stage. A pass lets the work move down to the next stage. A fail stops the pipeline at once. Static testing scans code first. Software composition analysis checks libraries and builds the software bill of materials. The build is signed so later stages can verify it. Dynamic testing probes the running app. Only a verified build reaches deploy.

Branch protection guards the code before the pipeline even runs. Protected branches require pull requests and peer review. They block direct pushes and force-pushes to the main branch. They require status checks to pass before merging. Signed commits prove who authored a change. Without branch protection, one compromised developer account can insert code that the pipeline then faithfully builds and ships.

CORE CONCEPT

Protect the path, not only the product. Branch protection controls who can get code into the pipeline. Pipeline gates control what the pipeline may build and ship. Artifact signing controls what production may run. An attacker who defeats any one of the three can bypass the other two, so all three are

required together.

Testing activities run across the life cycle, not only in the pipeline. Unit tests check small pieces of code. Integration tests check components working together. Security testing includes fuzzing, which feeds malformed input to find crashes and flaws. Penetration testing exercises the finished system as an attacker would. Regression testing proves old flaws stay fixed after new changes. Canary deployments release a change to a small subset of users first and watch it before wider rollout, so a bad release affects few people. Automated test and retest runs the test suite on every change and re-runs the tests for each fix, so a repair is proven rather than assumed.

User acceptance testing confirms the system meets business needs. The exam often asks which test fits a stated goal, so match the activity to the goal, not to habit. Environments must be separated. Development, test, staging, and production are different worlds. Production data does not belong in test systems without masking. Test systems must not have production access. A flaw in a weak test environment should never become a path into production.

EXAM TIP

If a scenario mentions a compromised developer account pushing code straight to production, the missing controls are branch protection and required review, not more scanning. Scanning examines code that arrives; branch protection controls whose code may arrive at all.

3.2.4 Supply-Chain and Hardware Assurance, and End of Life

Few organizations write all their software or build all their hardware. Supply-chain assurance extends security requirements to suppliers, components, and services, and it starts before purchase. Assess the supplier's security practices. Require an SBoM for software. Verify artifacts by signature and hash, not by trust in a download site. Pin dependency versions so a silent upstream change cannot enter the build.

Monitor suppliers continuously, because a supplier's breach becomes your incident.

DEFINITION

Supply-chain assurance. The set of controls that manage risk from suppliers, components, and services across their life cycle: assessment before selection, contractual security requirements, artifact verification by signature and hash, SBoM review, and continuous monitoring. It treats a supplier's compromise as a realistic path into your own systems.

Hardware assurance applies the same thinking to physical devices. Buy through authorized channels to reduce counterfeit risk. Verify firmware integrity at boot and before updates. Use hardware roots of trust where the risk justifies them. Inspect high-risk deliveries for tampering. Record serial numbers and provenance in the asset inventory. A compromised device placed deep inside a network undermines every control placed around it.

Certification and validation. Certification and validation is the formal process that confirms a system or component meets its security requirements before it is trusted: independent testing against the requirements, review of the assurance evidence, and a recorded decision. Some components arrive with their own certifications — a cryptographic module validated to FIPS 140-3, a product evaluated under Common Criteria — and assurance checks that the certification is current and covers the version actually bought. A system that skips this step ships on the vendor's word alone.

End-of-life (EOL) considerations close the life cycle. Every system reaches a point where the vendor stops patches and support. After that point, new vulnerabilities are permanent vulnerabilities. Life-cycle planning names the EOL date at purchase, not at crisis. Budgets and migration plans are built around that date. Decommissioning includes data sanitization, certificate revocation, account removal, and asset-record closure.

An EOL system that must stay is a legacy problem, and Section 3.3 treats it as one.

DEFINITION

End of life (EOL). The point at which a vendor stops providing patches, updates, and support for a product. After EOL, newly discovered vulnerabilities will not be fixed by the vendor, so continued use requires replacement, isolation, compensating controls, and formal risk acceptance.

SCENARIO

CertCrack plans to buy a new proctoring appliance for a client. The cheapest supplier is an unauthorized reseller offering units at half price, with no provenance records. The vendor's own EOL notice shows this model loses support in 14 months. Give the assurance-based recommendation and the two facts that decide it.

Discussion. Recommend buying a supported model through an authorized channel. The deciding facts are provenance and support life: unauthorized supply with no provenance records creates counterfeit and tampering risk that cannot be verified away, and a 14-month support horizon means the purchase becomes an unpatchable EOL system almost immediately. The apparent saving buys both a hardware-assurance risk and a near-term replacement cost.

3.3 Controls in Secure Architecture Design (Objective 2.3)

Objective 2.1 placed the components. Objective 2.2 secured the life cycle that builds the system. Objective 2.3 asks the broader design question: how do controls work together so the whole architecture resists attack, detects what it cannot stop, protects data wherever it sits, and proves that its controls still work?

This section covers attack-surface management, hardening, defense-in-depth, legacy and hybrid estates, detection enablers, data security design, and control-effectiveness metrics.

3.3.1 Attack-Surface Management, Hardening, and Defense-in-Depth

The attack surface is everything an attacker can reach and try to exploit. Open ports. Web pages and APIs. User accounts. Forgotten test servers. Third-party connections. Attack-surface management finds that surface continuously, because it changes every time a team deploys, acquires, or forgets something.

DEFINITION

Attack surface and attack-surface management. The attack surface is the sum of all points an attacker can reach and attempt to exploit, including ports, services, applications, APIs, accounts, and external connections. Attack-surface management is the continuous discovery, assessment, and reduction of that surface.

Attack-surface reduction removes what does not need to exist. Close unused ports. Remove unused services and software. Delete stale accounts. Take

forgotten internet-facing systems offline. Every removal is permanent protection that needs no patching and raises no alerts. Reduction beats monitoring: a service that does not exist cannot be exploited and does not need to be watched. Hardening secures what must remain.

Apply secure configuration baselines and benchmarks. Disable default accounts and change default credentials. Turn off insecure protocols. Apply least functionality and least privilege. Patch on a risk-based schedule. Hardening is measured against the baseline, and drift from the baseline is detected and corrected.

Vulnerability management. Vulnerability management is the continuous cycle that turns discovered weaknesses into closed ones: identify vulnerabilities through scanning, assessment, and threat intelligence; prioritize them by severity, exploitability, and exposure; remediate by patching, configuration, or compensating control; and verify the fix with a re-scan. Patching is one step inside it, not the whole of it — a vulnerability that cannot be patched still needs a compensating control, a risk acceptance, and a retest date. The cycle never ends, because new vulnerabilities arrive faster than any single remediation round.

DEFINITION

Hardening. The process of configuring a system to a secure baseline by removing unnecessary software and services, disabling defaults and insecure protocols, applying least privilege, and keeping the system patched.

Hardening reduces the exploitable surface of systems that must remain in service.

Defense-in-depth layers independent controls so one failure does not mean compromise. A WAF may miss an attack. The application may still validate input. The database account may still lack rights to other data. Segmentation may still stop lateral movement. Logging may still catch the attempt. Layers must be genuinely independent. Three controls that all depend on one identity provider or one management plane are one failure, repeated three times.

Figure 18 — Independent layers of control surround the data, so one failed layer does not expose it.

Reading Figure 18. Read this diagram from the outside in. The outer ring holds policies, standards and training. They set the rules for every inner ring. Next comes physical and network protection, which guards buildings, cables and traffic. Inside that sit host and endpoint controls on servers and laptops. The next ring protects each application with patching, testing and access checks. At the center sits the data itself. An external attacker must defeat each ring in turn; insider and credential attacks can start inside the outer rings, which is why the inner rings still matter. Five rings are shown here; defense-in-depth sets no fixed number of layers.

Worked example — a perimeter rule set. Component placement becomes

real in the firewall's rule set. The table below is the working rule set for the gateway protecting CertCrack's server segment — the same office, guest, and server addresses used throughout this book. It is read exactly as an ACL is read: top down, first match wins, with a final deny that catches everything unlisted; Section 5.3.7 treats ACL logic in full.

Table 3 — Perimeter firewall rule set for the server segment

#SourceDestinationServiceAction
1InternetWeb server 172.16.8.20TCP 443Allow
2Office LAN 10.10.4.0/24Server segment 172.16.8.0/24TCP 443, TCP 22Allow
3Guest Wi-Fi 10.10.9.0/24Server segment 172.16.8.0/24AnyDeny and log
4Server segment 172.16.8.0/24InternetTCP 443, UDP 53 (DNS)Allow — updates and name resolution
5Monitoring host 10.10.20.15All internal segmentsICMP, UDP 161Allow
6AnyAnyAnyDeny and log

Two choices in this small set repay study. The guest deny works because no allow rule matches guest source addresses — the only rules a guest packet can ever match are the deny at #3 and the final deny at #6 — and the explicit deny-and-log at #3, rather than relying on the final deny alone, makes guest probes visible in logs. Note that rule 1's 'Internet' source must exclude the guest Wi-Fi range: if 'Internet' were implemented as any-source, rule 1 would allow guest traffic to the web server on port 443 before rule 3 is ever reached. And the final line makes the implicit default explicit and logged, so the rule set's failures become visible in the monitoring of Chapter 7 instead of staying silent. A rule set is a design document that executes.

Worked example — what the WAF saw, and what the application never

did. Minutes after that rule set went live, the web application firewall — ModSecurity, the open-source WAF engine whose audit-log format appears below — logged this blocked request:

--a1b2c3d4-B-- GET /results?id=1042'%20OR%20'1'='1 HTTP/1.1 Host: certcrack.com

User-Agent: Mozilla/5.0 (compatible; scanbot/1.0)

--a1b2c3d4-F-- HTTP/1.1 403 Forbidden

--a1b2c3d4-H-- Message: Warning. detected SQLi using libinjection. [id "942100"] [msg "SQL Injection Attack Detected via libinjection"] [data "Matched Data: s&sos found within ARGS:id: 1042' OR '1'='1"]

Message: Warning. Operator GE matched 5 at TX:ANOMALY_SCORE. [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"]

Action: Intercepted (Phase 2) Access denied with code 403 (phase 2)

Reading the entry. Separate the three views. The request section (B) is what the attacker sent: a classic tautology probe carried in the id parameter. The response section (F) is a 403 generated by the WAF itself — proof the request never reached the application, so no application log will ever show it. The message section (H) names the ModSecurity rules that fired: 942100 detected the SQL injection using libinjection and added 5 to the anomaly score, and 949110 found the score at the blocking threshold and denied the request — which is what makes the block defensible when a user appeals it. When the application team reports "no attack in our logs," both sides are telling the truth about different layers — the defense-in-depth point of this section, visible inside a single log entry.

CORE CONCEPT

Reduce first, harden second, layer third, monitor always. Remove every exposed service that has no business need. Harden everything that remains to a baseline. Layer independent controls so a single bypass is not a breach. Then monitor the result, because reduction and hardening decay as systems change.

EXAM TIP

When several options all "add a control," look for the option that removes exposure instead. Closing an unused internet-facing service is attack-surface reduction, and the exam consistently ranks removing an unneeded path above monitoring that path more closely.

3.3.2 Legacy Components and Hybrid Infrastructures

Real estates contain systems that cannot be patched, upgraded, or replaced on demand. Legacy components include EOL operating systems, obsolete applications, and devices whose vendors no longer exist. Pretending they are normal systems is the design error. They need a different treatment.

DEFINITION

Legacy component. A system or component that is unsupported, end of life, or unable to meet current security requirements but must remain in service for business reasons. Legacy components are managed with isolation, compensating controls, restricted access, enhanced monitoring, and a funded replacement plan.

The legacy treatment pattern is consistent.

Virtual patching is a common compensating control. The IPS or WAF blocks exploitation of a known flaw that the legacy system itself cannot fix, and it buys time. It does not make the system supported, and the exit plan still matters.

SCENARIO

A CertCrack client runs a billing application on an operating system that reached end of life two years ago. The vendor of the application has closed. The business needs the system for 18 more months during a migration. Design the treatment: name the segment design, two compensating controls, and the governance artifact that must exist.

Discussion. Place the system in an isolated segment reachable only from the few systems and administrators the billing process needs, ideally through a jump host. Compensating controls include virtual patching at an IPS or WAF in front of the segment and enhanced logging and monitoring of all traffic to and from it. The governance artifact is a formal risk acceptance naming the risk owner, the compensating controls, and the 18-month migration and decommission date, reviewed on a set schedule.

Hybrid infrastructures combine on-premises systems with one or more cloud services. Most large estates are hybrid, whether by plan or by accumulation. The design challenge is consistency. Identity should be governed once and used everywhere. Policy should be expressed once and enforced in both worlds. Logging from cloud and premises must land in one place for analysis.

Network connections between the worlds are high-value targets and need encryption, segmentation, and monitoring. Each side also keeps its own strengths: premises for data that must stay local, cloud for scale and resilience. Chapter 4 designs hybrid cloud and Zero Trust in depth. Here the rule is simple: a hybrid design with two different security standards has, in practice, the weaker one.

Third-party integrations. Third-party integrations connect external services — payment processors, analytics, AI providers, partner APIs — directly into the architecture, and each connection extends the attack surface. Integration design onboards each one deliberately: authenticate the connection, scope its

permissions to the data and actions it needs, validate everything it sends, encrypt the traffic, and monitor the connection for abuse. An integration added casually, with broad credentials and no monitoring, is a trusted path an attacker can borrow.

EXAM TIP

For any legacy-system scenario, the complete answer pattern is isolate, compensate, restrict, monitor, and plan the exit with risk acceptance. An option that only patches, only monitors, or only accepts the risk is partial. Choose the option that combines segmentation with compensating controls.

3.3.3 Detection and Threat-Hunting Enablers

Prevention fails eventually. Secure architecture therefore designs detection in from the start. Detection is not a product purchase at the end. It is a set of placement and data decisions made while the architecture is drawn. Centralized logging collects logs from systems, applications, network devices, and cloud services into one platform. Analysts can then correlate events across the estate.

A login on a VPN, a privilege change, and a large download may each look harmless alone. Together, in one timeline, they describe an incident. Logs must be time-synchronized, protected from tampering, and retained long enough for investigations. Sending logs off the device that produced them matters: an attacker who owns a server should not be able to erase its history.

DEFINITION

Centralized logging. The collection of logs from across the estate into a central, protected platform where they can be correlated, searched, and retained for investigation. Centralization enables cross-system detection and protects evidence, because logs survive the compromise of the device that produced them.

Sensor placement decides what the detection system can see. Sensors belong at trust boundaries, on high-value segments, and where taps copy critical links. Encrypted traffic limits network sensors, so endpoint sensors fill the gap. A sensor strategy that only watches the perimeter misses lateral movement inside. Placement follows the same rule as Section 3.1: a sensor detects only what passes where it sits.

Figure 19 — Agents and taps forward every log source to one SIEM, with an immutable archive beside it.

Reading Figure 19. Follow the logs from left to right. Endpoints, network devices and cloud apps all create records of what happened. Agents and network taps collect those records and forward them safely. Analysis is centralized in the SIEM; edge agents forward (and may pre-filter) rather than replacing central correlation. Every feed lands in the SIEM, in the middle right of the picture. The SIEM correlates events across sources and raises alerts for the SOC team below it. A separate archive keeps an immutable copy of every log, so investigators can trust the history later.

Continuous monitoring turns collected data into constant watchfulness. It includes log analysis, vulnerability scanning, configuration-drift detection, and behavior baselines. Baselines matter because many attacks use valid accounts and normal tools. Only a change from normal behavior reveals them. Alerting converts detections into human action. Alerts need severity, context, and an owner.

Too many low-quality alerts create alert fatigue, and real incidents drown in noise. Good architecture tunes alert quality as carefully as alert coverage.

CORE CONCEPT

Design detection like prevention: by placement and coverage. Map the attack paths the architecture must resist. Place sensors and log sources on those paths. Centralize and protect the data. Tune alerts so each one is worth acting on. If an attack path has no sensor, no log source, and no alert, the architecture is blind there by design.

Sensor types complement each other. Network sensors see traffic between systems. Host sensors see processes, files, and logins on one system. Endpoint detection tools add behavior analysis on workstations and servers. Identity sensors see authentication patterns across every system at once. Cloud sensors

see control-plane actions that never cross a network wire, such as a storage bucket being made public.

A mature design states, for each major attack path, which sensor type watches it. Gaps are then visible on paper before an attacker finds them in practice. Time synchronization is a small design decision with large effects. Every log source must share a trusted time source. Without it, events from different systems cannot be ordered reliably. Correlation rules misfire. Timelines collapse in investigations and in court.

Architects therefore treat the time service as security infrastructure, protect it, and monitor drift like any other control. These enablers also serve threat hunting. Hunting is the proactive search for attackers who evaded automated detection. Hunters need rich, centralized, historical data. They need endpoint telemetry, network records, and identity logs in one searchable place.

An architecture that keeps logs for seven days and scatters them across tools cannot support hunting. Retention and centralization decisions made by the architect decide what hunters can do a year later. Chapter 8 covers hunting technique; this chapter's job is to build the ground it stands on.

EXAM TIP

Questions about "enabling threat hunting" are answered with data decisions: centralized logging, broad sensor placement, endpoint telemetry,

synchronized time, and long enough retention. An answer that buys a hunting tool without fixing the data underneath it is the trap.

3.3.4 Data Security Design: Classification, Labeling, and DLP

Controls protect systems. Data security design protects the information itself, wherever it travels. It starts by knowing what the data is worth. Data classification assigns data to levels such as Public, Internal, Confidential, and Restricted. Classification is based on the harm disclosure or loss would cause.

Each level carries handling rules: where data may be stored, how it must be encrypted, who may access it, and how it is disposed of. Classification that exists only in a policy document changes nothing. It must attach to the data.

DEFINITION

Data classification and labeling. Classification assigns data to a sensitivity level based on the harm its disclosure, alteration, or loss would cause. Labeling attaches that level to the data as a visible mark and

machine-readable metadata, so people and tools can apply the handling rules for that level automatically.

Labeling makes classification usable. A label travels with the file or record. People see it and know the rules. Tools read it and enforce the rules. Encryption tools, access controls, and DLP can all act on labels. Consistent labeling across premises and cloud is a core hybrid-design task.

Tagging strategies. Tags are machine-readable metadata attached to data and resources — owner, project, sensitivity, retention class, region — that tools use to drive handling automatically. A tagging strategy defines which tags are mandatory, who may set them, and what each tag value triggers: a tag of 'Restricted' routes a file to encryption and DLP rules, a tag of 'EU-only' blocks replication outside the region, a tag of 'Confidential' feeds attribute-based access control. Labels tell people the sensitivity; tags tell systems what to do with it. A tagging strategy keeps the tag set small, consistent, and enforced at creation, because tags applied inconsistently cannot be trusted by automation.

Data loss prevention (DLP) enforces data rules at the points where data moves or rests.

DLP for data in transit inspects email, web uploads, and network transfers. It can block, quarantine, encrypt, or allow with a warning when Restricted data heads somewhere it should not. DLP for data at rest scans storage, finds misplaced sensitive data, and can move, encrypt, or flag it. Endpoint DLP watches copying to removable media and local applications. DLP works by content inspection and by label.

Label-based DLP is more reliable, which is why classification and labeling come first in the design.

Figure 20 — The label applied at classification decides how DLP monitors, allows, blocks or quarantines data.

Reading Figure 20. Work left to right along the top row. First the organization finds and classifies its data. Next each file or record gets a label that shows its sensitivity. The chips under the flow name the four levels, from Public up to Restricted. DLP sensors then monitor labeled data in motion, in use and at rest. The policy box shows the rule: the label decides the action. Low-risk movement is allowed and logged. Restricted data leaving is blocked, quarantined and raised as an alert.

DEFINITION

Data loss prevention (DLP). A set of controls that identify sensitive data by content or label and enforce handling policy as data is used, moved, or stored. DLP can monitor, warn, block, quarantine, or encrypt, and it operates on data in transit, data at rest, and data in use on endpoints.

Data security design also covers the supporting controls. Encryption protects data at rest and in transit when DLP allows movement. Tokenization and masking let systems work with substitutes instead of real values. Access control limits data to the roles that need it. Retention and disposal rules stop data being kept forever "just in case." Data kept past its need is pure risk: it can be breached but no longer earns its keep.

SCENARIO

CertCrack staff regularly email candidate result files to partner centers. Twice, files containing full candidate records were sent to personal email accounts. Management proposes "reminding staff of the policy." Design the stronger control set: name the classification and labeling step, the DLP action for data in transit, and the at-rest check that supports it.

Discussion. Classify candidate result files as Restricted and label them at creation, so tools can act on them without guessing. Deploy DLP for data in transit on email that blocks or quarantines Restricted-labeled files addressed to personal or external domains, with an alert to the security team. Support it with DLP discovery at rest that scans shared storage for unlabeled candidate data so it can be classified, labeled, and moved to approved locations. A policy reminder alone fails because it relies on the same human behavior that already failed twice.

3.3.5 Assessing Control Effectiveness and Metrics

A control that is installed is not necessarily a control that works. Control-effectiveness assessment tests whether controls achieve their purpose in practice. Methods include control testing, configuration review, vulnerability scanning, penetration testing, log review, and exercises. The strongest

assessments test the control the way an attacker would challenge it. A firewall rule set that has never been tested against its intended policy is an assumption.

DEFINITION

Control-effectiveness assessment. The evaluation of whether a control actually achieves its intended security outcome in operation, using evidence such as tests, scans, log data, exercises, and metrics. It differs from checking that a control exists: an installed control can still be misconfigured, bypassed, or ignored.

Metrics make effectiveness visible over time. Good security metrics are few, clear, and tied to decisions.

Each metric needs a threshold. Crossing the threshold triggers a named action by a named owner. A dashboard nobody acts on is reporting, not management.

EXAM TIP

Distinguish activity metrics from effectiveness metrics. "Scans run: 400" is activity. "Critical vulnerabilities open longer than 30 days: 12 and falling" is effectiveness. Exam questions about proving a control works favor outcome metrics with thresholds and trends.

Metrics close the loop of this whole chapter. Resilient design set availability targets and recovery objectives. Life-cycle security set gates and assurance checks. Architecture controls set coverage and detection goals. Metrics report whether any of it is true today. Where a metric misses its threshold, the design changes. That feedback loop — design, measure, correct — is what makes an architecture a living control system instead of a one-time drawing.

EXAM TRAP

The wrong-layer trap. Architecture options fail by layer more often than by technology. A network firewall cannot inspect an encrypted application payload, a WAF cannot repair a routing fault, and DAST cannot run against code that has not been built yet. Match the control to the layer where the stem's fault lives, then check the numbers: availability options love to quote the downtime of 99.9% as a monthly figure. It is 8.76 hours per year, and the option that says otherwise has failed arithmetic, not design.

Chapter Exercises

SCENARIO

CertCrack is redesigning its platform after a difficult exam week. The old design had one web server, one database server, a firewall at the edge, and backups that had never been test-restored. Traffic tripled, the web server failed, and recovery took nine hours. Present a redesign covering component placement, load balancing, availability targets, and recoverability, and state the metric that proves each improvement.

Discussion. Placement: CDN at the edge, WAF in front of the web tier, API gateway in front of the exam-engine APIs, firewalls segmenting web, application, and database tiers, taps feeding collectors for detection. Load balancing: a resilient load-balancer pair distributing traffic across a pool of web and application servers with deep health checks and a shared session store instead of sticky sessions. Availability: set an explicit target such as 99.95%, which allows 262.8 minutes per year, and design automated failover to fit inside it. Recoverability: replicated data sized to the RPO plus scheduled test restores. Metrics: measured availability against target, failover test success rate, restore test success rate against RTO and RPO, and percentage of tiers with no single point of failure.

SCENARIO

A client is about to release a new customer portal. The project skipped security requirements, has no SBoM, allows direct pushes to the main branch, and plans to "add security testing after launch." The portal will process

payment data. As the security architect, list the life-cycle corrections you require before release, in life-cycle order, and name the risk of shipping without each one.

Discussion. In life-cycle order: (1) Define testable security requirements and threat-model the portal; without them there is no standard to build or test against, and payment-data obligations stay unmet. (2) Add software assurance

during build: SAST on first-party code and SCA with an SBoM for components; without them, known library flaws ship invisibly. (3) Enforce branch protection with peer review and signed commits; without it, one compromised account can insert code directly. (4) Gate the CI/CD pipeline with secret scanning, build signing, and DAST/IAST against the test build; without gates, failing code reaches production automatically. (5) Delay launch until critical findings are fixed or formally risk-accepted; "test after launch" means testing happens in production,

against real payment data, after exposure.

Chapter Summary

Resilient design begins with placement: every control protects only the flow it sits on, so firewalls, IPS and IDS, VPN gateways, NAC, WAFs, proxies, API gateways, taps and collectors, and CDNs are positioned on drawn traffic flows, with bypass paths closed by network rules. Load balancing spreads traffic across healthy pools, and the strongest designs remove sticky-session dependence by storing session state in a shared store. Availability is a number before it is an architecture: 99.9% allows 525.6 minutes of downtime per year, 99.95% allows 262.8 minutes, and 99.99% allows only 52.56 minutes, so RTO and RPO must be set by the business and met by automated failover, replication, and tested restores. Security in the systems life cycle starts with testable security requirements and threat modeling, continues through software assurance — SAST for code, DAST for running behavior, IAST for instrumented testing, RASP for production protection, SCA and the SBoM for components, and formal methods for small critical parts — and is enforced by branch protection and CI/CD gates that can actually stop a release. Supply-chain and hardware assurance extend the same discipline to suppliers and devices, and end-of-life dates are planned from purchase to decommissioning. In the finished architecture, attack-surface management removes what is not needed, hardening secures what remains, and defense-in-depth layers independent controls so one bypass is not a breach. Legacy components are isolated, compensated, restricted, monitored, and given a funded exit. Hybrid estates are held to one identity, policy, and logging standard. Detection is designed in through centralized, protected logging, sensors placed on real attack paths, continuous monitoring, and tuned alerting that also gives threat hunters the data they need. Data security design classifies and labels data so DLP can enforce policy on data in transit, at rest, and in use. Finally, control-effectiveness assessment and outcome metrics with thresholds prove whether any of it works — and drive the next design correction when it does not.

Key Terms

End-of-Chapter Test — Chapter 3

Q1. A security architect is designing the entry path for a new public web application that is suffering injection attacks. The network firewall passes the traffic because it uses valid ports and protocols. Which placement BEST addresses the attacks?

A) A WAF placed in front of the web application to inspect HTTP requests at Layer 7

B) A second network firewall placed beside the first to add filtering capacity

C) An IDS placed on a mirror port to alert on the attack traffic

D) A forward proxy placed between internal users and the internet

Q2. A company promises a client 99.99% annual availability for an ordering service. Using a year of 525,600 minutes, what is the MAXIMUM total downtime the company can allow in the year?

A) 525.6 minutes

B) 262.8 minutes

C) 5,256 minutes

D) 52.56 minutes

Q3. An application behind a load balancer stores session data on each server. Whenever a server is removed for maintenance, its users are logged out, and load across the pool is uneven. Which change is the BEST long-term fix?

A) Enable stronger sticky sessions so users stay on one server longer

B) Move session state to a shared external store so any server can serve any request

C) Replace the load balancer with a larger single appliance

D) Reduce the frequency of server health checks

Q4. A development team wants to find known vulnerabilities in the open-source libraries included in its product before release, and to be able to answer quickly whether a newly announced library flaw affects the product. Which combination BEST meets both needs?

A) DAST for the libraries and manual code review for new announcements

B) RASP in production and penetration testing after each announcement

C) SCA to scan the components, supported by an SBoM inventory of every component and version

D) Formal methods applied to each library before it is adopted

Q5. After a developer's account is compromised, an attacker pushes malicious code directly to the main branch, and the pipeline builds and deploys it automatically. Which control would MOST directly have prevented the malicious code from entering the pipeline?

A) DAST against the staging environment

B) Branch protection requiring pull requests, peer review, and passing status checks

C) A WAF in front of the production application

D) SCA scanning of third-party libraries

Q6. A hospital must keep a medical system running for two more years even though its operating system is end of life and cannot be patched. Which design is the BEST treatment?

A) Leave the system on the general network and scan it more often

B) Accept the risk in writing and make no design changes

C) Isolate the system in its own segment, add virtual patching and enhanced monitoring, restrict access, and record a funded replacement plan with risk acceptance

D) Hide the system by removing its DNS records while leaving network access unchanged

Q7. A SOC reports that it cannot investigate incidents that involve both cloud and on-premises systems because logs are stored separately, use unsynchronized clocks, and are deleted after seven days. Which design change MOST improves detection and threat hunting?

A) Centralize logs from both environments into one protected platform with synchronized time and retention long enough for investigations

B) Buy additional perimeter firewalls for both environments

C) Increase the severity of all existing alerts

D) Add a second IDS to the on-premises perimeter

Q8. Staff keep sending files containing customer financial records to personal email accounts. The files are already classified as Restricted and carry machine-readable labels. Which control BEST stops the loss while allowing normal business email?

A) A policy reminder email sent to all staff each quarter

B) DLP on outbound email that blocks or quarantines Restricted-labeled files addressed to personal or external domains

C) Full-disk encryption on staff laptops

D) A network firewall rule blocking all outbound email traffic

Q9. An architect reviews a design in which three different security tools all depend on the same single identity provider and the same management server. The design claims defense-in-depth. What is the MOST accurate assessment?

A) The claim is sound because three tools are present

B) The claim is sound if the tools come from different vendors

C) The claim is weak because defense-in-depth requires exactly five layers

D) The claim is weak because the layers are not independent; one failure can disable all three

Q10. A supplier offers a critical software component at a very low price but cannot provide an SBoM, cannot sign its artifacts, and has no documented security assessment. What is the BEST course of action?

A) Buy the component because the pipeline's SAST will find any problem

B) Buy the component and scan it once with an antivirus tool

C) Treat the missing assurance as supply-chain risk: require assessment, an SBoM, and signed, verifiable artifacts, or choose an assured supplier

D) Buy the component but run it only on test systems that share production data

Q11. A business sets an RTO of 30 minutes and an RPO of 5 minutes for a trading system. The current design restores from nightly backups using a manual procedure that takes four hours. Which statement is MOST accurate?

A) The design meets the RTO but not the RPO

B) The design meets the RPO but not the RTO

C) The design meets neither objective; it needs near-continuous replication for the RPO and automated failover or a ready standby for the RTO

D) The design meets both objectives because backups exist

Q12. An internet-facing test server was forgotten after a project ended. It runs unpatched software and is discovered during an external scan, after attackers have already probed it. Which practice would MOST directly have prevented this exposure?

A) Attack-surface management with continuous discovery and removal of unneeded internet-facing systems

B) More frequent password changes for administrator accounts

C) A larger SIEM license to store more logs

D) Stronger encryption for data at rest on production servers

Q13. A security manager wants to prove to executives that the patching control actually works, rather than simply showing that patching tools are installed. Which metric is the BEST evidence?

A) The number of patching tools licensed across the estate

B) The number of scans run each month

C) The percentage of the security budget spent on patching products

D) Mean time to patch critical vulnerabilities, tracked against a threshold over time

Q14. A team is choosing a testing method for a small cryptographic module whose correctness is critical and whose failure would undermine the whole product. Cost is a secondary concern for this module only. Which method gives the STRONGEST assurance?

A) DAST against the module's test interface

B) Formal methods that mathematically prove the module meets its specification

C) A one-time penetration test of the finished product

D) RASP deployed with the module in production

Answer Key — Chapter 3

1. A — A WAF in front of the web application is right because injection attacks travel inside valid HTTP requests, and only a Layer 7 control placed on the application flow can inspect and block them. A second network firewall is wrong because it repeats Layer 3–4 filtering that already passes this traffic. An IDS on a mirror port is wrong because it only alerts on a copy of traffic and cannot block the attacks reaching the application. A forward proxy is wrong because it controls outbound user traffic, the opposite direction from inbound application attacks.

2. D — 52.56 minutes is right: (1 − 0.9999) × 525,600 = 0.0001 × 525,600 = 52.56 minutes per year. 525.6 minutes is wrong because that is the budget for 99.9%, not 99.99%. 262.8 minutes is wrong because that is the budget for 99.95%. 5,256 minutes is wrong because it applies a 1% outage rate, which corresponds to 99% availability, far below the promised level.

3. B — Moving session state to a shared external store is right because it removes the root cause: any server can then serve any request, load balances evenly, and removing a server no longer logs out its users. Stronger sticky sessions are wrong because they deepen the dependence on individual servers and worsen uneven load. A larger single load balancer is wrong because the problem is application state, not load-balancer capacity, and a single appliance adds a single point of failure. Reducing health-check frequency is wrong because it hides failures instead of fixing session behavior and risks sending traffic to failed servers.

4. C — SCA supported by an SBoM is right because SCA matches the product's third-party components against known vulnerability data, and the SBoM inventory lets the team answer "are we affected?" immediately when a new flaw is announced. DAST with manual review is wrong because DAST tests running behavior and does not inventory library versions. RASP with penetration testing is wrong because both act late — in production or after the fact — rather than identifying component risk before release. Formal methods are wrong because proving properties of each adopted library is impractical and does not track newly announced vulnerabilities.

5. B — Branch protection is right because requiring pull requests, peer review, and passing status checks, while blocking direct pushes, stops a single compromised account from placing code into the pipeline at all. DAST in staging is wrong because it examines code after it has already entered and been built by the pipeline. A WAF is wrong because it filters application traffic in production and has no role in controlling code submission. SCA is wrong because it assesses third-party libraries, not the provenance or review of first-party commits.

6. C — Isolation with compensating controls is right because an unpatchable system must be protected around, not on: segmentation limits reach, virtual patching blocks exploitation of known flaws, enhanced monitoring watches the segment, restricted access reduces exposure, and the funded replacement plan with risk acceptance governs the remaining risk. Leaving it on the general network with more scanning is wrong because scanning observes risk without reducing reachability. Written risk acceptance alone is wrong because acceptance without compensating controls leaves the exposure unchanged. Removing DNS records is wrong because it is obscurity, not control; the network paths and the flaws remain.

7. A — Centralized logging with synchronized time and adequate retention is right because correlation across cloud and premises, a trustworthy shared timeline, and historical data are exactly what detection and threat hunting require. Additional perimeter firewalls are wrong because they add prevention at the edge without fixing the visibility problem. Raising all alert severities is wrong because it increases noise and alert fatigue without adding data. A second perimeter IDS is wrong because it adds one more local sensor while logs remain split, unsynchronized, and deleted too quickly.

8. B — DLP on outbound email is right because the files already carry Restricted labels, so the DLP can reliably block or quarantine them when addressed to personal or external domains while letting normal email flow. A policy reminder is wrong because it relies on the same human behavior that is already failing. Full-disk encryption is wrong because it protects data at rest on a lost laptop, not data being emailed out. Blocking all outbound email is wrong because it stops the loss by stopping the business function, which the scenario does not require.

9. D — The claim is weak because the layers are not independent: defense-in-depth requires that the failure of one layer leaves the others working, and a shared identity provider and management server create a single failure that can disable all three tools. The presence of three tools is wrong as a justification because counting tools ignores shared dependencies. Different vendors are wrong as a justification because vendor variety does not remove a shared dependency in the design. The claim about exactly five layers is wrong because defense-in-depth sets no fixed number of layers.

10. C — Requiring assessment, an SBoM, and signed verifiable artifacts — or choosing an assured supplier — is right because supply-chain assurance manages exactly this risk: unverifiable components from an unassessed supplier. Buying because SAST will check it is wrong because SAST analyzes code logic and does not establish provenance, component inventory, or artifact integrity. A one-time antivirus scan is wrong because it checks for known malware only and provides no ongoing assurance. Running the component on test systems that share production data is wrong because it still exposes production data to an unverified component.

11. C — The design meets neither objective: nightly backups can lose up to a day of data against a 5-minute RPO, and a four-hour manual restore misses a 30-minute RTO, so the fix needs near-continuous replication for the RPO and automated failover or a ready standby for the RTO. Meeting the RTO is wrong because four hours plainly exceeds 30 minutes. Meeting the RPO is wrong because nightly backup intervals plainly exceed 5 minutes of data loss. The claim that backups existing means both objectives are met is wrong because objectives are measured by restore time and data-loss window, not by the existence of backup copies.

12. A — Attack-surface management is right because continuous discovery finds forgotten internet-facing assets, and removing the unneeded server eliminates the exposure entirely. More frequent password changes are wrong because they do nothing about an unneeded, unpatched system being reachable from the internet. A larger SIEM license is wrong because storing more logs does not reduce the exposed surface. Stronger encryption at rest is wrong because it protects stored data on production servers and does not address the forgotten system's reachability or patch state.

13. D — Mean time to patch critical vulnerabilities against a threshold is right because it measures the outcome the control exists to produce — how fast real risk is removed — and its trend proves whether the control works. Counting licensed tools is wrong because it measures purchasing, not patching results. Counting scans is wrong because it measures activity, not remediation. Budget percentage is wrong because spending more does not show that vulnerabilities are closed any faster.

14. B — Formal methods are right because mathematically proving that a small, critical module meets its specification gives the strongest assurance available, and the scenario states the module is small, critical, and not cost-constrained. DAST is wrong because external dynamic testing samples behavior and cannot prove correctness of cryptographic logic. A one-time penetration test is wrong because it samples the finished product at one moment and gives weaker, narrower assurance for this module. RASP is wrong because it is a production runtime protection control, not a method for proving a module correct before release.