Skip to main content
Threat modeling is an essential practice for the AZ-400 exam and for securing real‐world systems. By identifying vulnerabilities early in the development lifecycle, you reduce risk, improve resilience, and deliver more trustworthy applications. In this guide, we’ll break down threat modeling into four core phases:
  1. Define Security Goals
  2. Create an Architectural Diagram
  3. Identify Potential Threats
  4. Design and Implement Countermeasures

1. Define Security Goals

Before you begin, clarify what you’re protecting and why. Strong objectives ensure your team focuses on the assets and risks that matter most. Common security goals:
  • Confidentiality: Protect user data from unauthorized disclosure
  • Integrity: Ensure transactions and records remain unaltered
  • Availability: Keep services operational under heavy load
  • Compliance: Meet regulatory requirements such as GDPR or HIPAA
Document your security goals clearly and align them with business requirements. This will guide every subsequent decision.

2. Create an Architectural Diagram

A visual representation of your system highlights data flows, trust boundaries, and critical interfaces. Include:
  • Front-end clients (web, mobile)
  • Back-end services and APIs
  • Databases or storage systems
  • External dependencies (third-party services, cloud resources)
  • Network boundaries, firewalls, and trust zones
This diagram makes it easier to spot exposed components and entry points for attackers.

3. Identify Potential Threats

With your architecture in hand, enumerate every possible risk. A structured approach—such as STRIDE—helps cover all categories:
STRIDE CategoryThreat Description
SpoofingPretending to be another user or system component
TamperingUnauthorized modification of data or code
RepudiationDenial of performed actions
Information DisclosureExposure of sensitive data
Denial of ServiceResource exhaustion or service interruptions
Elevation of PrivilegeGaining higher access than intended
Use a spreadsheet or a threat-modeling tool to track each threat, its likelihood, and impact.

4. Design and Implement Countermeasures

For every identified threat, define controls to prevent, detect, or mitigate its impact. Below is an example mapping:
Countermeasure TypeExamples
EncryptionTLS for in-transit, AES-256 at rest
Access ControlRBAC, MFA, OAuth 2.0
Input ValidationWhitelist validation, parameterized queries
Network ProtectionFirewalls, API gateways, WAFs
Rate Limiting & ThrottlingAPI throttling, circuit breakers
Monitoring & LoggingSIEM integration, anomaly detection
Implementation Tips:
  • Integrate controls early in CI/CD pipelines
  • Automate security testing (SAST, DAST)
  • Conduct regular red team exercises and audits
Security is not a one-off task. Continuously revisit your threat model as your architecture evolves.