Cybersecurity & Threat Management

Chapter 5
Security Architecture and Secure Design

Advance Diploma in Cybersecurity
Cybersecurity & Threat Management   •   Advance Diploma

Security Architecture and Secure Design

Introduction

Security architecture is the disciplined design of people, processes, technologies, and controls so that a digital system can resist, contain, detect, and recover from threats. It is broader than installing security products. Architecture determines where trust is permitted, how identities are verified, how information flows, which failures are tolerated, and how security decisions remain understandable and auditable.

Modern systems are distributed across cloud platforms, mobile devices, application programming interfaces (APIs), operational technology, third-party services, and remote work environments. Traditional assumptions—such as treating the internal network as trusted—are therefore unsafe. A secure architecture must combine layered defence, explicit trust boundaries, segmentation, secure configuration, cryptography, resilience, and continuous verification.

Security-by-design means that security requirements are considered throughout the system life cycle rather than added after implementation. Privacy-by-design extends this approach to personal data: systems should minimise collection, restrict use, protect data throughout its life cycle, and provide accountable mechanisms for individual rights.

Learning Objectives

By the end of this chapter, a learner should be able to:

  • explain security architecture, defence in depth, trust boundaries, and attack surfaces;
  • design network and application segmentation using least privilege;
  • apply secure configuration and hardening principles;
  • select appropriate cryptographic protections and design key-management processes;
  • distinguish secure protocols from insecure or misused protocols;
  • design resilient systems using redundancy, recovery, and graceful degradation;
  • apply zero-trust principles to users, devices, workloads, and data;
  • integrate security-by-design and privacy-by-design into development and governance; and
  • evaluate architectural trade-offs in a realistic organisational scenario.

1. Foundations of Security Architecture

1.1 Architecture as a system of control

A security architecture translates business objectives and risk decisions into enforceable technical and organisational structures. It normally describes:

  1. Assets: information, services, devices, identities, facilities, and processes that require protection.
  2. Threats: actors, events, or conditions that may cause harm.
  3. Trust relationships: assumptions about who or what may perform an action.
  4. Security controls: preventive, detective, corrective, deterrent, and compensating measures.
  5. Security operations: monitoring, incident response, vulnerability management, and recovery.
  6. Governance: ownership, policies, assurance, risk acceptance, and compliance.

A useful architecture is risk-based. It does not attempt to eliminate every conceivable risk, which is usually impossible and economically irrational. Instead, it identifies high-impact attack paths and applies controls proportionate to the value and sensitivity of assets.

1.2 Core security objectives

Confidentiality restricts information to authorised parties. Integrity protects information and system behaviour from unauthorised alteration. Availability ensures that authorised users can access services when needed. These objectives are supplemented by authenticity, accountability, non-repudiation, safety, and privacy.

The objectives can conflict. Strong encryption may increase processing overhead; extensive logging may create privacy risks; highly available replication may increase the number of locations containing sensitive data. Architecture therefore requires explicit trade-off analysis rather than the assumption that more controls are always better.

1.3 Defence in depth

Defence in depth places multiple, partly independent controls between an adversary and a valuable asset. For example, an internet-facing application may be protected by secure coding, an API gateway, web application filtering, network segmentation, strong authentication, database access controls, encryption, monitoring, and tested backups.

Layering is valuable because controls fail. However, layers should not be merely duplicated. Ten controls that depend on the same identity provider or administrator account do not provide ten independent barriers. Architects should examine common-mode failure, control independence, operational complexity, and the possibility that one compromised component can disable several layers.

1.4 Attack surface and attack paths

The attack surface consists of exposed interfaces through which an attacker may influence a system. It includes ports, APIs, web forms, software dependencies, administrative consoles, credentials, physical interfaces, cloud permissions, supply-chain relationships, and human processes.

Attack-path analysis follows a plausible sequence from an initial foothold to a valuable objective. For example:

phishing message → stolen session token → cloud identity → excessive permission → sensitive database

The architecture should interrupt the path at several points. Useful questions include:

  • Is the initial interface necessary?
  • Can authentication resist phishing and replay?
  • Is the token short-lived and audience-restricted?
  • Is the identity allowed to reach the database?
  • Is the permission narrower than the business task?
  • Would monitoring detect the unusual sequence?

2. Trust Boundaries and Segmentation

2.1 Trust boundaries

A trust boundary is a point at which data, commands, or identities move between different assumptions about trust. Examples include a browser-to-server boundary, an internet-to-API boundary, a corporate-to-cloud boundary, a user-to-privileged-service boundary, and an IT-to-operational-technology boundary.

At each boundary, the design should specify:

  • what crosses the boundary;
  • how the sender and receiver are authenticated;
  • how data is validated and encoded;
  • which actions are authorised;
  • whether confidentiality and integrity are protected in transit;
  • what is logged; and
  • how failure is handled.

A common design error is to validate input at the user interface but trust it again inside the service. Every component crossing a trust boundary must perform appropriate validation because attackers can bypass client-side controls.

2.2 Network and logical segmentation

Segmentation separates systems according to sensitivity, function, exposure, or operational risk. Typical zones include:

  • public or untrusted networks;
  • an edge or demilitarised zone containing externally reachable services;
  • application services;
  • data services;
  • management infrastructure;
  • user endpoints; and
  • restricted operational or safety-critical environments.

Segmentation may be physical, virtual, logical, identity-based, or application-enforced. Firewalls and virtual networks are useful, but segmentation is incomplete if a common administrator account, unrestricted management plane, or flat identity directory connects every zone.

A well-designed policy uses explicit allow rules, narrow source and destination definitions, constrained ports and methods, authenticated administration, and default denial. Rules should have owners, business justifications, expiry or review dates, and logging requirements.

2.3 Microsegmentation and service identity

Microsegmentation applies policy to individual workloads, services, or identities rather than relying only on large network zones. A payment service might be permitted to call a specific account service over one authenticated API method but denied access to unrelated workloads. This reduces lateral movement after compromise.

Microsegmentation introduces challenges: policy discovery, changing cloud addresses, service dependencies, troubleshooting, and policy proliferation. It should therefore be introduced through documented application flows and automated testing rather than through unreviewed rule accumulation.

Layered zero trust architecture with segmented zones Users anddevices Identity andpolicy decisionMFA • device • risk Policyenforcement Application zone Data zone Continuous assurancelogs • threat detection • vulnerability managementbackup • incident response • access review
Layered zero trust architecture with segmented zones
Figure: Layered zero trust architecture with segmented zones

Figure: A segmented, zero-trust architecture in which access decisions and assurance activities surround protected services.

3. Secure Configuration and Hardening

Secure configuration establishes a known, documented, and monitored baseline. It includes removing unnecessary services, disabling default accounts, enforcing strong authentication, limiting administrative interfaces, applying patches, configuring secure logging, and protecting secrets.

A practical baseline should identify:

  • operating system, firmware, container, database, and cloud settings;
  • approved software and version ranges;
  • permitted network connections;
  • administrative roles and emergency access;
  • encryption and certificate requirements;
  • time synchronisation and log-retention settings; and
  • the method and frequency of compliance verification.

Configuration must be managed as code where feasible. Version-controlled templates improve repeatability and permit review. Automated drift detection compares deployed settings with the approved baseline. Exceptions should be documented with a risk owner, compensating controls, expiry date, and review decision.

Hardening alone is not sufficient. A perfectly hardened server may still be compromised through a vulnerable application, stolen credential, malicious update, or authorised insider. Secure configuration must therefore operate within defence in depth.

4. Cryptography and Key Management

4.1 Cryptographic purposes

Cryptography can provide:

  • Confidentiality, usually through encryption;
  • Integrity, through authenticated encryption or message authentication codes;
  • Authenticity, through digital signatures, certificates, and authenticated protocols; and
  • Non-repudiation evidence, where a signature process, key custody, identity binding, and audit trail support a defensible attribution.

Encryption does not automatically provide integrity. For ordinary application traffic, authenticated encryption is generally preferred because it protects confidentiality and detects unauthorised modification. Hash functions are designed for fixed-length digests and integrity-related constructions; a plain hash is not a secret and does not authenticate an attacker-controlled message.

Symmetric cryptography uses a shared secret and is efficient for bulk data. Public-key cryptography uses a key pair and supports key agreement or signatures, but is computationally more expensive and depends on correct identity binding. Most secure protocols use both: public-key mechanisms establish or protect a session key, while symmetric cryptography protects the data stream.

4.2 Data states

Protection should address data:

  • in transit, using an authenticated secure channel;
  • at rest, using storage or database encryption with access control; and
  • in use, where exposure may occur in application memory, logs, analytics, or privileged processes.

Encryption at rest is valuable but does not protect data from an authorised application process or an attacker who has obtained the decryption key. Access control, application isolation, tokenisation, data minimisation, and monitoring remain necessary.

4.3 Key-management life cycle

Key management is often more difficult than selecting an algorithm. A complete life cycle includes generation, registration, distribution, storage, use, rotation, backup, recovery, revocation, archival, and destruction.

Keys should be generated by approved cryptographic libraries or hardware security modules where appropriate. They should not be hard-coded in source code, embedded in container images, placed in ordinary configuration files, or shared through informal messages. Access to keys should be separated from access to encrypted data when the threat model justifies it.

Key rotation must have a reason and a safe procedure. Rotation may be triggered by time, cryptoperiod, suspected exposure, personnel change, algorithm migration, or a change in classification. Systems need overlap mechanisms so that existing data can be decrypted during controlled re-encryption. Loss of keys can cause permanent loss of data, so recovery must be tested while ensuring that backup copies are protected.

A certificate authority and public-key infrastructure bind public keys to identities. Certificate validation must include chain verification, validity periods, intended use, hostname or subject verification, and revocation or status mechanisms as required by the environment.

5. Secure Protocols and Interfaces

Secure protocols provide defined protections, negotiation rules, error handling, and identity verification. Examples include current versions of TLS for application transport, SSH for secure administration, IPsec for selected network-layer use cases, and mutually authenticated service protocols for machine-to-machine communication.

Protocol security depends on configuration and context. TLS does not make an application secure if the application authorises the wrong user. SSH is weakened by shared accounts or uncontrolled private keys. A VPN may authenticate a device but still expose excessive internal access. Secure design therefore asks what is authenticated, what is authorised, what is protected, and what is logged.

Unsafe practices include transmitting passwords over cleartext protocols, disabling certificate validation to solve a deployment problem, accepting arbitrary redirects, using weak legacy protocol versions, exposing administrative interfaces directly to the internet, and placing sensitive values in URLs or logs.

APIs require authentication, authorisation at the object and function level, input validation, rate limiting, replay protection where relevant, secure error messages, schema enforcement, and version governance. Secrets and personal data should not appear in debugging output. Service-to-service calls should use explicit identities and narrowly scoped credentials rather than a universal shared secret.

6. Resilience, Recovery, and Secure Failure

Resilience is the ability to continue essential operations, limit damage, and restore trustworthy service after disruption. It includes availability engineering but is broader than uptime.

Architectural resilience may use redundancy, geographic distribution, capacity margins, graceful degradation, queueing, health checks, isolation, immutable backups, and rehearsed recovery procedures. Redundancy must not create correlated failure: two instances in the same failed zone do not provide meaningful geographic resilience.

Recovery objectives should be defined with business owners. The recovery time objective (RTO) is the maximum acceptable time to restore a service after disruption. The recovery point objective (RPO) is the maximum acceptable period of data loss measured backward from the disruption. These are business requirements, not merely infrastructure settings.

Backups should be protected against ransomware and administrator compromise through access separation, immutability or offline copies, encryption, integrity verification, and restoration tests. A backup that has never been restored is an assumption, not evidence of recoverability.

Secure failure means that a component fails without creating a more dangerous state. Examples include denying access when authorisation cannot be verified, limiting transaction value during dependency failure, isolating a compromised service, and avoiding the disclosure of diagnostic data. In some safety-critical systems, availability may take priority over immediate confidentiality; such decisions must be explicitly analysed and governed.

7. Zero-Trust Architecture

Zero trust is an architectural approach that rejects implicit trust based on network location. It does not mean trusting nothing or eliminating all perimeter controls. It means that every access request is evaluated using available evidence and least-privilege policy, with continuing observation.

Important principles include:

  • verify explicitly using identity, device state, resource, action, context, and risk;
  • use least-privilege and just-in-time access;
  • assume breach and limit blast radius;
  • segment resources and protect the control plane;
  • monitor continuously and respond to changing conditions; and
  • automate policy enforcement where practical.

A zero-trust implementation commonly contains policy decision components, policy enforcement points, identity and access management, device or workload information, telemetry, and protected resources. It must also address service accounts, APIs, workloads, contractors, and non-human identities.

Zero trust has limitations. Device signals can be inaccurate, policy engines can become critical single points of failure, excessive prompts can encourage unsafe workarounds, and extensive monitoring can threaten privacy. Good design uses risk-based authentication, resilient policy services, emergency procedures, clear ownership, and data minimisation.

8. Security-by-Design and Privacy-by-Design

Security-by-design integrates threat modelling, abuse-case analysis, secure requirements, architecture review, secure coding, testing, deployment controls, and operational feedback. Security acceptance criteria should be measurable—for example, privileged actions require phishing-resistant authentication, all external inputs are validated, and secrets are retrieved from an approved vault.

Threat modelling methods such as STRIDE can help identify spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege. The method is not a substitute for expert judgement; it is a structured way to expose assumptions and prioritise mitigations.

Privacy-by-design principles include:

  • proactive prevention rather than remedial response;
  • privacy as a default setting;
  • privacy embedded in architecture;
  • full functionality without unnecessary data collection;
  • end-to-end protection across the data life cycle; and
  • transparency, accountability, and respect for user interests.

A privacy impact assessment should examine purpose, legal basis where applicable, categories of personal data, data flows, recipients, retention, individual rights, risks, and mitigations. Technical measures include minimisation, pseudonymisation, access separation, aggregation, retention automation, consent and preference management, and deletion workflows.

Security and privacy are related but not identical. Detailed security logs may contain personal data. A fraud-detection model may need behavioural information but should not retain it indefinitely. Governance must define lawful purpose, access, retention, transparency, and independent review.

9. Governance and Professional Practice

Architecture decisions should be recorded in decision logs that state the context, options considered, chosen design, rejected alternatives, risks, assumptions, and review date. Useful artefacts include data-flow diagrams, trust-boundary diagrams, asset inventories, threat models, control mappings, configuration baselines, recovery plans, and access matrices.

Responsibilities should be assigned using a clear accountability model. Developers own secure implementation; operations teams own secure deployment and monitoring; security specialists provide assurance and threat expertise; data owners define sensitivity and access; senior leadership accepts residual risk.

Regulatory obligations vary by jurisdiction and sector. Architects should map controls to applicable privacy, critical-infrastructure, payment, health, education, and contractual requirements without treating compliance as proof of security. Independent testing, penetration testing, code review, vulnerability management, and incident exercises provide assurance, but each has scope limitations.

Artificial intelligence introduces architectural concerns including prompt injection, sensitive-data disclosure, insecure model interfaces, supply-chain risk, model theft, and unreliable output. AI systems should use input and output controls, identity-aware tool access, data segregation, logging with privacy safeguards, human approval for high-impact actions, and testing against adversarial misuse. AI should not be granted broad privileges merely because it can produce plausible instructions.

Applied Case: Illustrative Regional Health Platform

Background

A fictional regional health organisation operates clinics, a patient portal, laboratory systems, and a cloud analytics platform. Originally, all clinics connected through a flat private network. Staff accounts were shared in some departments, laboratory interfaces used inconsistent encryption, and backups were accessible from production administrator accounts.

Problem

A compromised receptionist workstation could reach laboratory servers and administrative databases. The organisation also collected more patient information than was needed for appointment scheduling. An external assessment found weak access reviews, incomplete logging, and untested restoration procedures.

Analysis

The main attack paths were phishing to endpoint compromise, lateral movement across the flat network, exploitation of excessive privileges, and ransomware affecting both production and backups. Trust boundaries were undocumented. Personal data flowed to analytics without a clear retention schedule. Availability requirements were high for emergency clinical services, while confidentiality requirements were high for patient records.

Approach and solution

The architecture team first classified assets and mapped data flows. It then:

  1. separated public portal, application, clinical, laboratory, analytics, and management zones;
  2. introduced individual identities, multifactor authentication, privileged access management, and periodic access reviews;
  3. required authenticated encrypted connections for portal and service traffic;
  4. restricted service identities to specific APIs and database operations;
  5. placed backups in a separately administered, immutable repository and tested restoration;
  6. created secure configuration baselines for endpoints and servers;
  7. minimised analytics data, pseudonymised identifiers, and automated retention controls;
  8. centralised security telemetry while limiting access to sensitive logs; and
  9. rehearsed ransomware, identity-provider failure, and clinical-service degradation scenarios.

Outcome

The new design reduced lateral movement opportunities and made privileged activity attributable to individuals. Recovery testing demonstrated that critical services could be restored within their approved objectives. Data minimisation reduced exposure in analytics, although the organisation had to invest in identity integration, staff training, policy maintenance, and support for legacy laboratory equipment.

Learning points

The case illustrates that segmentation without identity control is incomplete, encryption without key governance is fragile, and privacy cannot be achieved by a single consent screen. Architecture must address technology, operating procedures, people, and recovery together.

Challenges and Limitations

Secure architectures face persistent constraints. Legacy systems may not support modern protocols. Segmentation can disrupt undocumented dependencies. Strong authentication may be difficult for clinical, industrial, or emergency workflows. Centralised identity and logging create valuable control points but also attractive targets. Cloud abstractions can obscure ownership and shared-responsibility boundaries. Excessive control complexity produces alert fatigue, exceptions, and insecure workarounds.

Architects should therefore prioritise high-value attack paths, use compensating controls for unavoidable limitations, test assumptions, measure operational performance, and revisit decisions as threats and technologies change. A design is secure only while its controls remain correctly configured, monitored, funded, and used.

Best-Practice Design Checklist

  • Identify assets, data owners, business impact, and trust boundaries.
  • Model threats and document high-risk attack paths.
  • Apply least privilege to users, services, devices, and administrators.
  • Segment networks and workloads according to exposure and sensitivity.
  • Establish version-controlled secure configuration baselines.
  • Use authenticated secure protocols and validate certificates correctly.
  • Protect keys through their full life cycle; never embed secrets in code.
  • Separate production, management, and backup control planes.
  • Design for logging, detection, response, recovery, and graceful failure.
  • Minimise personal data and automate retention and deletion.
  • Test restoration, access revocation, failover, and incident procedures.
  • Record architectural decisions, exceptions, ownership, and review dates.
  • Treat compliance as a baseline, not as proof that risk is eliminated.

Chapter Summary

Security architecture organises controls around assets, threats, trust boundaries, and business requirements. Defence in depth combines independent preventive, detective, corrective, and recovery measures. Segmentation and microsegmentation restrict lateral movement, while secure configuration establishes repeatable and monitored baselines.

Cryptography protects confidentiality, integrity, and authenticity only when algorithms, protocols, certificates, and keys are correctly managed. Resilience requires redundancy without common-mode failure, protected and tested backups, defined recovery objectives, and secure failure behaviour. Zero-trust architecture replaces implicit network trust with explicit, contextual, least-privilege decisions and continuous assurance.

Security-by-design and privacy-by-design integrate threat modelling, secure development, data minimisation, transparency, accountability, and life-cycle governance. Effective architecture is therefore both technical and organisational: it depends on ownership, evidence, testing, human factors, and continuous adaptation.

Key Terms

Attack surface: The set of interfaces and conditions through which a system may be attacked.

Attack path: A sequence of actions connecting an initial compromise to an objective.

Authenticated encryption: Encryption that also detects unauthorised modification or forgery.

Availability: The property that authorised users can access systems and information when required.

Defence in depth: The use of multiple, partly independent security controls.

Key management: The generation, protection, distribution, use, rotation, recovery, revocation, and destruction of cryptographic keys.

Least privilege: Granting only the access necessary for an authorised task.

Microsegmentation: Fine-grained isolation of workloads, services, or identities.

Privacy-by-design: Integrating privacy protection into system architecture and life-cycle processes.

Recovery point objective (RPO): The maximum acceptable period of data loss following disruption.

Recovery time objective (RTO): The maximum acceptable time to restore a service.

Resilience: The ability to withstand disruption, contain damage, and recover trustworthy operations.

Secure configuration baseline: An approved, documented set of system settings and software requirements.

Security-by-design: Integrating security requirements and controls throughout the system life cycle.

Segmentation: Separation of systems or flows to limit access and reduce attack spread.

Trust boundary: A point where data or control crosses between different security assumptions.

Zero trust: An approach that requires explicit, contextual verification rather than implicit trust based on location.

Pseudonymisation: Processing data so that direct identification requires separately protected additional information.

Review Questions

Short Answer Questions

  1. What is a trust boundary, and why must it be identified during architecture design?
  2. Distinguish encryption, integrity protection, and authentication.
  3. What is the purpose of a secure configuration baseline?
  4. Define RTO and RPO.
  5. State two principles of zero-trust architecture.

Long Answer Questions

  1. Explain how defence in depth and segmentation work together to reduce attack paths.
  2. Describe the cryptographic key-management life cycle and the risks of poor key governance.
  3. Compare network-perimeter security with zero-trust architecture.
  4. Explain how security-by-design and privacy-by-design should influence software development.
  5. Discuss the architectural requirements for resilient backup and recovery.

Analytical / Application Questions

  1. A company places its web server, application server, database, and backup repository on one network using one administrator account. Analyse the trust boundaries and propose a safer architecture.
  2. A mobile health application needs analytics data, but its developers request complete patient records indefinitely. Design a privacy-by-design alternative and identify the security controls required.
  3. During an identity-provider outage, a critical service must remain available without accepting unauthenticated internet users. Propose a secure-failure and recovery design, including risks and compensating controls.

Multiple Choice Questions with Answers

Question 1

Which statement best describes a trust boundary?

A. A point where data or control crosses between different security assumptions

B. A physical wall surrounding a data centre

C. A list of approved software versions

D. A backup copy stored offline

Correct Answer: A. A point where data or control crosses between different security assumptions

Question 2

What is the primary security benefit of segmentation?

A. It guarantees that no system can be compromised

B. It limits access and reduces lateral movement after compromise

C. It removes the need for identity management

D. It automatically encrypts all stored data

Correct Answer: B. It limits access and reduces lateral movement after compromise

Question 3

Which practice is most appropriate for protecting application secrets?

A. Embedding them in source code

B. Storing them in a public configuration repository

C. Retrieving them from an approved secrets-management system

D. Sharing one secret through email

Correct Answer: C. Retrieving them from an approved secrets-management system

Question 4

What does authenticated encryption provide in addition to confidentiality?

A. Detection of unauthorised modification or forgery

B. Automatic legal compliance

C. Unlimited key lifetime

D. Removal of all access-control requirements

Correct Answer: A. Detection of unauthorised modification or forgery

Question 5

Which statement correctly describes RPO?

A. The maximum time required to restore a service

B. The maximum acceptable period of data loss

C. The number of redundant servers required

D. The time required to rotate an encryption key

Correct Answer: B. The maximum acceptable period of data loss

Question 6

Which principle is central to zero-trust architecture?

A. Trust every internal network address

B. Permit access based only on a user’s location

C. Verify access explicitly and apply least privilege

D. Disable monitoring after authentication

Correct Answer: C. Verify access explicitly and apply least privilege

Question 7

Why should backup repositories be separately administered from production systems?

A. To increase the number of shared administrator accounts

B. To reduce the chance that production compromise destroys backups

C. To prevent restoration testing

D. To eliminate the need for encryption

Correct Answer: B. To reduce the chance that production compromise destroys backups

Question 8

Which is an example of privacy-by-design?

A. Collecting all available data in case it becomes useful

B. Keeping personal data indefinitely

C. Minimising collection and enforcing retention limits

D. Publishing detailed user activity logs

Correct Answer: C. Minimising collection and enforcing retention limits

Question 9

Why is a plain hash insufficient to authenticate an attacker-controlled message?

A. A hash cannot produce a fixed-length output

B. A plain hash is not secret and can be recomputed by an attacker

C. Hashes can only be used for availability

D. A hash always encrypts the original message

Correct Answer: B. A plain hash is not secret and can be recomputed by an attacker

Question 10

Which action best supports secure configuration management?

A. Allowing undocumented exceptions permanently

B. Using version-controlled baselines and detecting configuration drift

C. Changing settings manually without records

D. Disabling logs to improve performance

Correct Answer: B. Using version-controlled baselines and detecting configuration drift

Cybersecurity & Threat Management
Chapter 5 of 14