1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications
epriestley cac61980f9 Add "temporary tokens" to auth, for SMS codes, TOTP codes, reset codes, etc
Summary:
Ref T4398. We have several auth-related systems which require (or are improved by) the ability to hand out one-time codes which expire after a short period of time.

In particular, these are:

  - SMS multi-factor: we need to be able to hand out one-time codes for this in order to prove the user has the phone.
  - Password reset emails: we use a time-based rotating token right now, but we could improve this with a one-time token, so once you reset your password the link is dead.
  - TOTP auth: we don't need to verify/invalidate keys, but can improve security by doing so.

This adds a generic one-time code storage table, and strengthens the TOTP enrollment process by using it. Specifically, you can no longer edit the enrollment form (the one with a QR code) to force your own key as the TOTP key: only keys Phabricator generated are accepted. This has no practical security impact, but generally helps raise the barrier potential attackers face.

Followup changes will use this for reset emails, then implement SMS multi-factor.

Test Plan:
  - Enrolled in TOTP multi-factor auth.
  - Submitted an error in the form, saw the same key presented.
  - Edited the form with web tools to provide a different key, saw it reject and the server generate an alternate.
  - Change the expiration to 5 seconds instead of 1 hour, submitted the form over and over again, saw it cycle the key after 5 seconds.
  - Looked at the database and saw the tokens I expected.
  - Ran the GC and saw all the 5-second expiry tokens get cleaned up.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4398

Differential Revision: https://secure.phabricator.com/D9217
2014-05-20 11:43:45 -07:00
..
arcanist/conduit Move Conduit methods inside applications 2012-12-21 12:21:59 -08:00
audit Give audits a clickable commit title, even if they are importing or messageless 2014-05-17 15:25:31 -07:00
auth Add "temporary tokens" to auth, for SMS codes, TOTP codes, reset codes, etc 2014-05-20 11:43:45 -07:00
base Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
cache Put an in-request cache in front of APC 2014-05-12 12:34:04 -07:00
calendar Calendar - make calendar publicly accessible 2014-05-14 10:00:46 -07:00
chatlog Modernize chatlog a bit 2014-04-10 11:45:21 -07:00
conduit When a conduit method requires a string constant, call it "string-const" not "enum" 2014-05-14 21:59:03 -07:00
config Found some missing icons 2014-05-13 07:45:39 -07:00
conpherence Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
countdown Allow public countdowns to be viewed by logged out users 2014-05-17 13:40:20 -07:00
daemon Found some missing icons 2014-05-13 07:45:39 -07:00
dashboard Embed dashboard panels in comments 2014-05-20 11:37:40 -07:00
differential Fix explosive runtime of detectCopiedCode() 2014-05-19 12:39:12 -07:00
diffusion Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
diviner Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
doorkeeper Fix JIRA issue URI selection for JIRA installs which are not on the domain root 2014-05-18 05:45:21 -07:00
draft/storage Differential - add DifferentialDraft to track whether revisions have draft feedback or not 2014-02-18 16:25:16 -08:00
drydock Move Drydock object list rendering to SearchEngine 2014-05-13 12:14:33 -07:00
fact Make "Facts" publicly viewable 2014-05-19 12:39:00 -07:00
feed Move audit rendering into SearchEngine 2014-05-08 20:04:18 -07:00
files Found some missing icons 2014-05-13 07:45:39 -07:00
flag Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
harbormaster Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
help Add support for aural-only and visual-only elements 2014-05-01 07:18:18 -07:00
herald Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
home Dashboards - add ability to install dashboard as home 2014-05-19 16:09:31 -07:00
legalpad Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
lipsum Use DifferentialRevisionEditor in lipsum 2014-03-11 13:02:00 -07:00
macro Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
mailinglists Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
maniphest Allow workboards to be filtered with ApplicationSearch 2014-05-20 11:42:05 -07:00
meta Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
metamta Add config to require real name, respect config when creating new users, drop real name from full name if not provided. 2014-05-12 09:51:41 -07:00
notification Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
nuance Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
oauthserver Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
owners Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
passphrase Don't disable the "Show Public Key" action for locked credentials 2014-05-19 12:40:42 -07:00
paste Move paste rendering into SearchEngine 2014-05-15 19:17:22 -07:00
people Make PeopleQuery throw, not select everything, when handed empty array 2014-05-20 08:26:55 -07:00
phame Found some missing icons 2014-05-13 07:45:39 -07:00
phid Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
phlux Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
pholio Close pholio mocks 2014-05-19 11:34:23 -07:00
phortune Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
phpast Remove phpast.* Conduit methods 2014-03-12 11:30:22 -07:00
phragment Found some missing icons 2014-05-13 07:45:39 -07:00
phrequent Update PHUIStatusItemView to FontAwesome 2014-05-16 18:59:02 -07:00
phriction Apply hierarchical policy checks to Phriction 2014-05-19 12:41:30 -07:00
policy Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
ponder Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
project Allow workboards to be filtered with ApplicationSearch 2014-05-20 11:42:05 -07:00
releeph Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
remarkup/conduit When a conduit method requires a string constant, call it "string-const" not "enum" 2014-05-14 21:59:03 -07:00
repository Provide a rough, unstable API for reporting coverage into Diffusion 2014-05-17 16:10:54 -07:00
search Allow workboards to be filtered with ApplicationSearch 2014-05-20 11:42:05 -07:00
settings Move activity log rendering to a dashboard panel 2014-05-15 19:17:02 -07:00
slowvote Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
subscriptions Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
support/application Whitelist allowed editor protocols 2014-03-17 13:00:37 -07:00
system Allow structured destruction of Differential Revisions 2014-05-01 18:25:30 -07:00
tokens Replace Sprite-Icons with FontAwesome 2014-05-12 10:08:32 -07:00
transactions Fix watchers to actually work properly 2014-05-20 08:20:34 -07:00
typeahead Convert rest of SPRITE_STATUS to FontAwesome 2014-05-18 16:10:54 -07:00
uiexample Update PHUIStatusItemView to FontAwesome 2014-05-16 18:59:02 -07:00
xhprof Use JSON, not PHP serialization, for XHProf profiles. 2014-02-24 04:16:52 -08:00