← All problems
Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Problem 042 · Security and data protection

Design Single Sign-On

Medium 55 min

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
  1. If apps verify a signed token locally, how do they find out it was revoked?
  2. The corporate directory is slow and rate limited. How often does it really need to be called?
  3. Which secret, if stolen, would let an attacker sign in as anyone?

Ready to build?

Open the canvas, place your components and explain your decisions. Your draft saves automatically.

Sign in to start

Failure scenarios

  • An executive's laptop is stolenAn executive reports that their unlocked laptop was taken from a café 10 minutes ago. It holds an active SSO session and open sessions in email, the finance app and the code repository.

Run them from the workspace once your design is in place.