Design Cross-Domain Single Sign-On
Design secure single sign-on for two acquired first-party products that remain on separate domains.
Problem statement
For this exercise, assume two first-party web products remain on separate registrable domains after an acquisition. Each product currently has its own application session.
A verified person who signs in to either product should be able to visit the other product and establish its local session without entering credentials again, while each product continues to enforce its own authorization rules.
Browsers must not share one product's cookie with the other domain, and the design must not depend on third-party cookies.
Assume a shared identity service can be introduced and both products can adopt a standards-based redirect flow. Existing accounts may need safe linking to one global subject.
The system must prevent account takeover through incorrect linking, bind redirects to the initiating browser, rotate signing keys safely, revoke future session renewal after a global logout, and preserve auditable login and linking events.
Native mobile login, third-party customer federation, delegated access to external tools, password-reset UX, and product-specific permission design are outside scope.
What to build
- A verified person can authenticate through either product and establish a secure local application session on that product.
- A person with a valid shared identity session can visit the other product and establish its local session through a browser-safe redirect without re-entering credentials.
- The platform can safely link eligible existing product accounts to one immutable global subject without using an unverified email match as proof.
- A person can sign out locally or globally, and operators can audit authentication, linking, token, and revocation events.
At scale
- For this exercise, assume 20 million global identities, 30 million linked product accounts, and peaks of 3,000 interactive sign-in or cross-domain session-establishment flows per second.
- For this exercise, target two seconds p95 from arrival at the second product to its local authenticated session when the shared identity session is healthy.
- For this exercise, target 99.99 percent monthly availability for sign-in and token issuance, with signing-key rotation that does not reject valid in-flight flows.
- For this exercise, a global logout prevents new product sessions and renewal within five minutes; already-issued short-lived product sessions may remain valid only for their declared residual lifetime.