Problem Statement: MFA Manager as the Identity Control Plane
Frames the MFA Manager as a dedicated, highly available authentication control plane sitting between the identity provider and every second-factor decision.
Problem statement
Design a Multi-Factor Authentication (MFA) Manager: a platform service that lets users enroll in second factors (TOTP authenticator apps, push-based approvals, hardware security keys), verifies those factors on every login, provides backup and recovery paths when a factor is lost, and enforces step-up authentication for sensitive actions. The service merges cleanly into existing login flows operated by one or many identity providers (IdPs), and it stores the partial secrets each factor requires — TOTP seeds, WebAuthn public keys, backup-code hashes — with vault-grade protection.
Microsoft's identity team has publicly stated that MFA alone can stop around 99.9% of automated account-compromise attacks, and the Verizon Data Breach Investigations Report consistently finds stolen credentials involved in roughly a quarter of all breaches. Those two facts explain why the MFA Manager is not a nice-to-have widget: it is a choke point in the authentication path. When it is slow, every login is slow. When it is down, users are locked out at scale. When it is compromised, the attacker inherits the keys to every account. All three failure classes — availability, latency, and confidentiality — must be designed for simultaneously, and they pull in opposite directions.
What makes this different from a generic CRUD service
Three properties dominate the architecture. First, secrets that must be usable but never readable: a TOTP seed must be decrypted to verify a code, yet no human or service outside the verification path may ever see it. This forces envelope encryption, HSM-backed master keys, and a deliberately narrow decryption surface. Second, verification sits on the synchronous login path: a 2-second hiccup is felt by every user logging in, so the hot path needs regional locality, cached read paths, and a hard p99 budget. Third, the system is adversarial by definition: every endpoint is probed for replay, enumeration, race conditions, and social-engineering bypass. A normal service defends against bugs; this service defends against intelligent opponents.
The four planes
- Factor lifecycle plane: enrollment, activation, suspension, revocation, rotation, and per-user factor inventory. The source of truth for "which factors does this user have and what is their state."
- Challenge plane: the hot path. Create a challenge bound to a login session, deliver it through the chosen channel, verify the response, and return a signed decision — all inside a few hundred milliseconds.
- Policy and risk plane: which users must enroll in which factors, when to demand step-up, how risk signals raise the assurance level, and how recovery is gated.
- Trust plane: key management (HSM/KMS), device attestation for authenticator apps, audit evidence, compliance mapping, and incident forensics.
A strong answer keeps these planes separate. The challenge plane must degrade without corrupting factor records. Policy changes must not require redeploying the verification path. And the trust plane must survive the compromise of any single application tier. The brief's four functional requirements — enrollment, verification, backup/recovery, and step-up — map one-to-one onto planes one through three, while its four non-functional requirements — reliability, secret security, low friction, and scale — are the constraints that shape every decision below.
Key Highlights
- •The MFA Manager is a choke point on the synchronous login path: its availability, latency, and confidentiality failures are all user-visible at once.
- •Microsoft publicly attributes roughly 99.9% of automated account-compromise prevention to MFA; stolen credentials appear in about a quarter of breaches per Verizon DBIR.
- •TOTP seeds must be usable for verification yet never readable outside the verification path — envelope encryption plus HSM-backed master keys.
- •Four planes: factor lifecycle, challenge verification, policy and risk, and trust (keys, audit, compliance).
- •The design must defend against intelligent adversaries, not just bugs: replay, enumeration, fatigue attacks, and social-engineering bypass are first-class requirements.
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "I will separate factor ownership, challenge verification, policy, and trust into distinct planes before choosing any database."
- "The system must fail closed for the second factor: a degraded MFA service may offer fallback factors, but it never silently skips verification."