Threat Modeling and Trust Boundaries

Threat modeling asks what can go wrong, who could cause it, what assets are valuable, and which controls reduce risk. Identify assets such as credentials, personal data, payment records, signing keys, and administrative operations. Map trust boundaries between browser, API, worker, database, and third-party systems.

Use a structured method such as STRIDE to consider spoofing, tampering, repudiation, information disclosure, denial of service, and elevation of privilege. Prioritize threats by likelihood, impact, and exposure rather than treating every hypothetical risk equally.

Assume input can be malicious and internal networks are not automatically trustworthy. Validate data at boundaries, authenticate service identities, authorize every sensitive action, and log security-relevant events without recording secrets or unnecessary personal data.

Key Takeaways
  • Identify assets, actors, trust boundaries, and abuse cases.
  • Security is a system property, not a single middleware package.
  • Prioritize mitigations by risk and verify them with tests.
Knowledge Check

Which statement correctly distinguishes authentication from authorization?