Page MenuHomePhabricator

Tighten some MFA/TOTP parameters to improve resistance to brute force attacks
ClosedPublic

Authored by epriestley on Dec 18 2018, 2:01 PM.
Tags
None
Referenced Files
F19943158: D19898.id.diff
Thu, Apr 16, 1:31 AM
F19936441: D19898.id47508.diff
Sun, Apr 12, 1:13 PM
F19911633: D19898.diff
Thu, Apr 2, 1:52 PM
F19858744: D19898.diff
Mar 14 2026, 1:50 AM
F19715954: D19898.diff
Feb 12 2026, 8:18 AM
F19554969: D19898.id47508.diff
Jan 30 2026, 5:55 AM
F19543840: D19898.diff
Jan 22 2026, 11:50 PM
F19463174: D19898.id.diff
Jan 2 2026, 10:33 PM
Subscribers
None

Details

Summary

Depends on D19897. Ref T13222. See some discussion in D19890.

  • Only rate limit users if they're actually answering a challenge, not if they're just clicking "Wait Patiently".
  • Reduce the number of allowed attempts per hour from 100 back to 10.
  • Reduce the TOTP window from +/- 2 timesteps (allowing ~60 seconds of skew) to +/- 1 timestep (allowing ~30 seconds of skew).
  • Change the window where a TOTP response remains valid to a flat 60 seconds instead of a calculation based on windows and timesteps.
Test Plan
  • Hit an MFA prompt.
  • Without typing in any codes, mashed "submit" as much as I wanted (>>10 times / hour).
  • Answered prompt correctly.
  • Mashed "Wait Patiently" as much as I wanted (>>10 times / hour).
  • Guessed random numbers, was rate limited after 10 attempts.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable