Modern Authentication
Click any control badge to view its details. Download SVG
Key Control Areas
Identity Provider and Directory Services
Token Architecture and Cryptographic Security
OAuth 2.0 Flows and Authorisation
Session Management and Token Lifecycle
Federation and Multi-Domain Trust
Audit, Compliance, and Monitoring
Migration from Legacy Authentication
When to Use
This pattern applies to any organisation that authenticates users to applications -- effectively universal. It is particularly relevant when: multiple applications maintain separate user databases and password stores (authentication sprawl), the organisation is adopting cloud services and needs SSO across on-premises and cloud, regulatory requirements mandate strong authentication and comprehensive audit trails, the organisation needs to provide authenticated access to external parties (customers, partners, contractors), mobile and API-first architectures require token-based authentication, or the organisation is moving to zero trust and needs identity as the primary security boundary.
When NOT to Use
Organisations with a single monolithic application and no integration requirements may find the overhead of deploying an IdP and implementing OIDC disproportionate -- though even here, modern authentication provides future-proofing. Environments where all applications are air-gapped and users are authenticated purely through physical access controls have different authentication requirements. Industrial control systems and embedded devices that cannot support HTTP-based authentication flows require specialised protocols (see SP-023).
Typical Challenges
Legacy applications that only support LDAP bind or NTLM authentication cannot directly consume OIDC tokens and require authentication proxies or gateway translation layers, adding latency and complexity. Migrating from per-application password databases to centralised IdP requires coordinated password resets and user communication. JWT token size grows with claims and can exceed HTTP header limits in complex authorisation scenarios, requiring claims filtering or reference tokens. Refresh token security is frequently misunderstood: storing refresh tokens in browser localStorage is a common vulnerability that enables persistent account takeover through XSS. Session management across multiple single-page applications sharing an IdP creates complex logout propagation challenges. Service-to-service authentication with client credentials generates long-lived tokens that, if leaked, provide persistent access -- short token lifetimes and certificate-bound tokens mitigate this but add operational complexity. Multi-cloud environments may require multiple IdP instances or complex federation topologies. Developers frequently implement OAuth 2.0 incorrectly: skipping state parameter validation (CSRF), using the implicit flow for SPAs, or failing to validate token signatures.
Threat Resistance
Modern Authentication addresses the majority of credential-based attack vectors. Password spraying and credential stuffing are mitigated by centralised authentication with rate limiting, account lockout, and breach-list checking (IA-05, AC-07). Phishing attacks that steal passwords are neutralised when MFA is enforced (IA-02), and fully eliminated when phishing-resistant methods like FIDO2 are used (see SP-033). Token theft is mitigated by short token lifetimes, token binding, refresh token rotation, and secure storage practices (SC-23, AC-12). Session hijacking is addressed through token signature validation, audience restriction, and TLS for all token-bearing requests (SC-08, SC-23). Cross-site request forgery is prevented by OAuth 2.0 state parameter and PKCE (AC-03). Man-in-the-middle attacks on authentication flows are prevented by TLS and token signature validation (SC-08, SC-12). Privilege escalation through token manipulation is prevented by cryptographic signatures that make token tampering detectable (SC-13). Replay attacks are prevented by nonce validation, token expiry, and one-time-use constraints (SC-23). Identity impersonation is mitigated by identity proofing and MFA (IA-12, IA-02).
Assumptions
The organisation has or will deploy an OIDC-compliant Identity Provider (Azure AD, Okta, Auth0, Keycloak, or similar). Applications can be modified or configured to support OIDC/OAuth 2.0 authentication (either natively or through reverse proxy/gateway). Network connectivity exists between applications and the IdP with acceptable latency for authentication flows. A directory service (Active Directory, LDAP, or cloud directory) exists as the authoritative user store. The organisation has defined authentication strength requirements per application or data classification. PKI or KMS capability exists for managing token signing keys.
Developing Areas
- Passkey adoption is displacing passwords faster than enterprise infrastructure can adapt. Consumer platforms report passkey registration rates of 30-40% among eligible users, but enterprise IdPs lag behind with single-digit adoption due to legacy application compatibility and policy inertia around password-based fallback paths.
- Identity federation attacks -- particularly token theft and session hijacking via adversary-in-the-middle proxies like Evilginx -- are evolving faster than defensive controls. Token binding (DPoP) and continuous access evaluation are emerging as countermeasures, but fewer than 15% of enterprise IdP deployments have implemented either, leaving a persistent gap between phishing-resistant authentication and phishable session tokens.
- Session management in single-page applications and mobile apps remains architecturally unsettled. The deprecation of third-party cookies, divergent browser storage policies, and the tension between user experience (long sessions) and security (short token lifetimes) mean that best practices shift with every major browser release. Backend-for-frontend (BFF) patterns are gaining traction but add deployment complexity.
- Decentralised identity and verifiable credentials (W3C DID, ISO 18013-5 mDL) promise to eliminate centralised IdP dependency, but the ecosystem is fragmented across competing wallet implementations, trust registries, and credential schemas. Enterprise adoption remains experimental, with fewer than 2% of organisations piloting verifiable credentials for workforce authentication.
- Continuous authentication -- adjusting trust levels based on real-time signals like device posture, location, and behavioural biometrics -- is conceptually compelling but practically immature. Most implementations are limited to step-up MFA triggers rather than true continuous risk scoring, and the privacy implications of persistent behavioural monitoring are unresolved in most regulatory frameworks.
Related Patterns
Patterns that operate within or alongside this one. Click any to view.