API Security and STRIDE Threat Modelling in Modern Architectures
APIs are a fundamental part of modern application architecture, enabling communication between systems, services, and users. However, they also represent one of the most exposed attack surfaces if not properly secured. A proactive approach to API security begins at the design stage using STRIDE.
12 Apr 2026
~8 min read
Saleem Yousaf
STRIDE Applied to API Security
STRIDE helps architects systematically assess threats across six key areas. By applying STRIDE during the design phase, organisations can identify vulnerabilities before implementation and ensure appropriate controls are in place before a single line of code is committed.
Spoofing: unauthorised access or impersonation of API callers
Tampering: unauthorised modification of request or response data
Repudiation: lack of traceability or accountability for API calls
Information Disclosure: exposure of sensitive data via API responses
Denial of Service: disruption of API availability through abuse
Elevation of Privilege: gaining higher access than intended via API
Effective API Security Controls
Authentication and Authorisation
Strong authentication and authorisation using OAuth 2.0 and JWT tokens ensures that only verified identities can call APIs and that each identity can only access the resources and operations it is entitled to. Scopes should be narrow and specific.
// STRIDE threat model applied to API security — six threat categories with mitigations and detection signals
Input Validation and Rate Limiting
All API inputs should be validated for type, length, format, and content before processing. Rate limiting prevents abuse patterns such as credential stuffing, brute force, and volumetric denial of service attacks. Apply limits per client identity, not just per IP address.
Encryption and Data Protection
Encryption of data in transit using TLS 1.2 or higher is non-negotiable. Sensitive data in responses should be masked or redacted where it is not needed by the caller. Internal APIs should not expose more data than the consuming service requires.
Monitoring and Logging
Monitoring and logging of API activity creates the observability layer that STRIDE threat models depend on. Log caller identity, request parameters, response codes, and timing. Forward to SIEM for correlation with other security events.
Security should not be treated as an add-on but as an integral part of system design. A structured, design-led approach ensures APIs remain secure, resilient, and aligned with enterprise security standards.