Redwood Enterprise Systems decomposed into forty microservices, all mandated to use OAuth 2.0. Teams tested that authentication worked—but never tested against the OAuth specification. A security audit found expired tokens being accepted and audience claims being ignored across multiple services.
What happened
Redwood Enterprise Systems spent three years breaking a monolithic platform into microservices. The architecture team mandated OAuth 2.0 for all services. Teams confidently reported their implementations were compliant. Functional tests verified that users could log in and reach protected APIs. Everyone assumed security was solved.
Eighteen months later, a third-party security audit tested against the OAuth 2.0 and OpenID Connect conformance suites—not just basic login flows. The findings were alarming.
Several services accepted expired tokens. Others ignored audience claims, meaning a token issued for one application could be used to access another. Some services checked scopes strictly; others granted broad access whenever any valid token was presented. Each team had assumed their OAuth library handled the edge cases.
No actual breach had occurred—but the potential impact was severe. Emergency remediation required inventorying every API, standardizing token validation logic, and delaying multiple product launches while security teams coordinated fixes.
The company estimated the remediation cost was significantly greater than implementing proper conformance testing from the start.
Root cause
Teams tested functionality—not conformance. Every team verified that OAuth worked, but nobody verified that OAuth was implemented according to the specification, especially around token expiration, audience validation, and scope enforcement edge cases.
The fix
A centralized OAuth conformance test suite was integrated into the CI/CD pipeline. Any authentication-related change required passing the full conformance suite before deployment. Security architecture reviews were updated to require conformance evidence, not just functional test results.
Lesson learned
Security standards cannot be validated through integration tests alone. Conformance testing verifies that implementations follow the specification’s rules, particularly around edge cases and error handling that normal usage never exercises.