A company with 40,000 employees uses 80 internal and third-party web apps, each with its own login today. Design a single sign-on service: employees sign in once with a password and a second factor, then open any app without signing in again. Apps connect over OIDC or SAML, and the company's existing corporate directory remains the identity provider for passwords. At 9 a.m. on Monday the apps check sessions and exchange tokens about 2,000 times per second. When someone leaves or a laptop is stolen, security must be able to cut off all of their sessions within a minute.
Functional requirements
Sign in once with password and MFA, then access any connected app without re-entering credentials
Support OIDC and SAML for connecting apps
Revoke all sessions for a user, or a single device, immediately
Enforce policies such as stronger MFA for admin apps or unmanaged devices
Log every sign-in and token issue for security review
Non-functional requirements
Signing in to a new app with an existing session completes in under 1.5 seconds
Revocation takes effect across all apps within 60 seconds
99.99% availability, since an SSO outage locks everyone out of every app
Credentials and signing keys are never exposed to apps
Constraints and scale
40,000 employees and 80 connected apps
2,000 session checks and token exchanges per second at the Monday-morning peak
Access tokens live for 10 minutes; SSO sessions last up to 12 hours
You will practise
Understand OIDC and SAML flows, and the difference between an SSO session and an app's tokens
Trade off short-lived self-contained tokens against central session checks for revocation
Keep an external identity provider and MFA out of the hot path with caching
Show 3 hints
If apps verify a signed token locally, how do they find out it was revoked?
The corporate directory is slow and rate limited. How often does it really need to be called?
Which secret, if stolen, would let an attacker sign in as anyone?