Page MenuHomePhabricator

Carry MFA responses which have been "answered" but not "completed" through the MFA workflow
ClosedPublic

Authored by epriestley on Dec 17 2018, 7:12 PM.
Tags
None
Referenced Files
F14061564: D19895.diff
Mon, Nov 18, 7:20 AM
F14047061: D19895.diff
Thu, Nov 14, 1:44 AM
F14035037: D19895.diff
Sun, Nov 10, 3:39 AM
F14021464: D19895.diff
Wed, Nov 6, 9:08 AM
F13962591: D19895.diff
Oct 15 2024, 10:58 AM
Unknown Object (File)
Oct 13 2024, 11:34 AM
Unknown Object (File)
Oct 9 2024, 10:58 AM
Unknown Object (File)
Sep 6 2024, 4:43 AM
Subscribers
None

Details

Summary

Depends on D19894. Ref T13222. See PHI873. When you provide a correct response to an MFA challenge, we mark it as "answered".

Currently, we never let you reuse an "answered" token. That's usually fine, but if you have 2+ factors on your account and get one or more (but fewer than all of them) right when you submit the form, you need to answer them all again, possibly after waiting for a lockout period. This is needless.

When you answer a challenge correctly, add a hidden input with a code proving you got it right so you don't need to provide another answer for a little while.

Why not just put your response in a form input, e.g. <input type="hidden" name="totp-response" value="123456" />?

  • We may allow the "answered" response to be valid for a different amount of time than the actual answer. For TOTP, we currently allow a response to remain valid for 60 seconds, but the actual code you entered might expire sooner.
  • In some cases, there's no response we can provide (with push + approve MFA, you don't enter a code, you just tap "yes, allow this" on your phone). Conceivably, we may not be able to re-verify a push+approve code if the remote implements one-shot answers.
  • The "responseToken" stuff may end up embedded in normal forms in some cases in the future, and this approach just generally reduces the amount of plaintext MFA we have floating around.
Test Plan
  • Added 2 MFA tokens to my account.
  • Hit the MFA prompt.
  • Provided one good response and one bad response.
  • Submitted the form.
  • Old behavior: good response gets locked out for ~120 seconds.
  • New behavior: good response is marked "answered", fixing the other response lets me submit the form.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable