1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 01:32:42 +01:00
phorge-phorge/src/applications/legalpad/controller
epriestley 1d0b99e1f8 Allow applications to require a High Security token without doing a session upgrade
Summary:
Ref T13222. See PHI873. Currently, when applications prompt users to enter MFA, their session upgrades as a side effect.

In some cases (like managing your email addresses) it makes sense to upgrade your session for a little while since it's common to make multiple edits in sequence (add a new address, make it primary, remove an old address). We generally want MFA to stay out of the way and not feel annoying.

In other cases, we don't expect multiple high-security actions in a row. Notably, PHI873 looks at more "one-shot" use cases where a prompt is answering a specific workflow. We already have at least one of these in the upstream: answering an MFA prompt when signing a Legalpad document.

Introduce a "token" workflow (in contrast to the existing "session") workflow that just does a one-shot prompt without upgrading your session statefully. Then, make Legalpad use this new workflow.

Note that this workflow has a significant problem: if the form submission is invalid for some other reason, we re-prompt you on resubmit. In Legalpad, this workflow looks like:

  - Forget to check the "I agree" checkbox.
  - Submit the form.
  - Get prompted for MFA.
  - Answer MFA prompt.
  - Get dumped back to the form with an error.
  - When you fix the error and submit again, you have to do another MFA check.

This isn't a fatal flaw in Legalpad, but would become a problem with wider adoption. I'll work on fixing this (so the MFA token sticks to the form) in the next set of changes.

Roughly, this is headed toward "MFA sticks to the form/workflow" instead of "MFA sticks to the user/session".

Test Plan:
  - Signed a legalpad document with MFA enabled.
  - Was prompted for MFA.
  - Session no longer upgraded (no purple "session in high security" badge).
  - Submitted form with error, answered MFA, fixed error, submitted form again.
    - Bad behavior: got re-prompted for MFA. In the future, MFA should stick to the form.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13222

Differential Revision: https://secure.phabricator.com/D19843
2018-11-28 13:39:59 -08:00
..
LegalpadController.php Update Legalpad for EditEngine 2017-05-10 15:11:49 -07:00
LegalpadDocumentDoneController.php Update Legalpad for handleRequest 2015-07-29 17:02:10 -07:00
LegalpadDocumentEditController.php Update Legalpad for EditEngine 2017-05-10 15:11:49 -07:00
LegalpadDocumentListController.php Update Legalpad for EditEngine 2017-05-10 15:11:49 -07:00
LegalpadDocumentManageController.php Update Legalpad to use comment transactions 2017-05-11 10:14:13 -07:00
LegalpadDocumentSignatureAddController.php Convert all tokenizers to take token/scalar inputs 2015-03-31 14:10:55 -07:00
LegalpadDocumentSignatureListController.php Update Legalpad for handleRequest 2015-07-29 17:02:10 -07:00
LegalpadDocumentSignatureVerificationController.php Update Legalpad for handleRequest 2015-07-29 17:02:10 -07:00
LegalpadDocumentSignatureViewController.php Update Legalpad for handleRequest 2015-07-29 17:02:10 -07:00
LegalpadDocumentSignController.php Allow applications to require a High Security token without doing a session upgrade 2018-11-28 13:39:59 -08:00