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
F18946888: D19898.diff
Tue, Nov 11, 9:02 PM
F18860615: D19898.diff
Sun, Nov 2, 12:10 PM
F18766384: D19898.diff
Oct 7 2025, 4:28 PM
F18748615: D19898.id.diff
Oct 3 2025, 11:41 PM
F18743153: D19898.diff
Oct 2 2025, 10:33 PM
F18673245: D19898.diff
Sep 25 2025, 9:51 AM
F18673217: D19898.diff
Sep 25 2025, 9:45 AM
F18673161: D19898.diff
Sep 25 2025, 9:31 AM
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