AZ-400: Designing and Implementing Microsoft DevOps Solutions

Implement Security and Validate Code Bases for Compliance

Comprehending Threat Modeling

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

Note

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
flowchart LR
  A[User Browser] --> B[Web Server]
  B --> C[Application Server]
  C --> D[(Database)]
  C --> E[External API]

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

Note

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

Warning

Security is not a one-off task. Continuously revisit your threat model as your architecture evolves.


Watch Video

Watch video content

Previous
Key Validation Points and Continuous Security Validation