1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00
phorge-phorge/webroot/rsrc/css/aphront
epriestley 1329b7b51e Add password authentication and registration to new registration
Summary:
Ref T1536. Ref T1930. Code is not reachable.

This provides password authentication and registration on the new provider/adapter framework.

I sort of cheated a little bit and don't really route any password logic through the adapter (instead, this provider uses an empty adapter and just sets the type/domain on it). I think the right way to do this //conceptually// is to treat username/passwords as an external black box which the adapter communicates with. However, this creates a lot of practical implementation and UX problems:

  - There would basically be two steps -- in the first one, you interact with the "password black box", which behaves like an OAuth provider. This produces some ExternalAccount associated with the username/password pair, then we go into normal registration.
  - In normal registration, we'd proceed normally.

This means:

  - The registration flow would be split into two parts, one where you select a username/password (interacting with the black box) and one where you actually register (interacting with the generic flow). This is unusual and probably confusing for users.
  - We would need to do a lot of re-hashing of passwords, since passwords currently depend on the username and user PHID, which won't exist yet during registration or the "black box" phase. This is a big mess I don't want to deal with.
  - We hit a weird condition where two users complete step 1 with the same username but don't complete step 2 yet. The box knows about two different copies of the username, with two different passwords. When we arrive at step 2 the second time we have a lot of bad choices about how to reoslve it, most of which create security problems. The most stragihtforward and "pure" way to resolve the issues is to put password-auth usernames in a separate space, but this would be incredibly confusuing to users (your login name might not be the same as your username, which is bizarre).
  - If we change this, we need to update all the other password-related code, which I don't want to bother with (at least for now).

Instead, let registration know about a "default" registration controller (which is always password, if enabled), and let it require a password. This gives us a much simpler (albeit slightly less pure) implementation:

  - All the fields are on one form.
  - Password adapter is just a shell.
  - Password provider does the heavy lifting.

We might make this more pure at some point, but I'm generally pretty satisfied with this.

This doesn't implement the brute-force CAPTCHA protection, that will be coming soon.

Test Plan: Registered with password only and logged in with a password. Hit various error conditions.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, chad

Maniphest Tasks: T1536, T1930

Differential Revision: https://secure.phabricator.com/D6164
2013-06-16 10:15:49 -07:00
..
aphront-bars.css Move Aphront bars and notes out of 'core' 2013-04-09 20:39:54 -07:00
aphront-notes.css Move Aphront bars and notes out of 'core' 2013-04-09 20:39:54 -07:00
attached-file-view.css Crop screenshot thumbs in Maniphest 2011-06-01 15:38:17 -07:00
calendar-view.css Highlighting the current day in calendar. 2013-04-29 12:15:38 -07:00
context-bar.css fix aphront context bar bottom margin -- don't need it 2012-12-13 10:46:53 -08:00
dark-console.css Color DarkConsole links 2013-02-28 16:19:36 -08:00
dialog-view.css Let mobile dialogs go full width 2013-05-31 07:17:52 -07:00
error-view.css Conpherence - make updating title + picture a dialogue that uses drag and drop upload control 2013-01-26 17:14:58 -08:00
form-view.css Add password authentication and registration to new registration 2013-06-16 10:15:49 -07:00
lightbox-attachment.css Move all CSS "z-index" rules to "z-index.css", fix Differential z-index problem 2012-12-30 09:30:21 -08:00
list-filter-view.css Improve some search behaviors on mobile/devices 2013-05-31 10:50:49 -07:00
multi-column.css Add Shadow Panels to PhabricatorMultiColumnView 2013-05-21 15:28:43 -07:00
notification.css Move all CSS "z-index" rules to "z-index.css", fix Differential z-index problem 2012-12-30 09:30:21 -08:00
pager-view.css AphrontPagerView and UIExamples. 2011-03-31 17:06:33 -07:00
panel-view.css Modernize Diffusion 2013-05-11 08:23:19 -07:00
phabricator-nav-view.css Flatten side nav 2013-05-17 09:58:37 -07:00
request-failure-view.css PhabricatorEnv 2011-01-31 11:55:26 -08:00
table-view.css Define background for table header 2013-04-24 12:20:27 -07:00
tokenizer.css Fix placeholder color 2013-05-12 20:14:17 -07:00
tooltip.css Move all CSS "z-index" rules to "z-index.css", fix Differential z-index problem 2012-12-30 09:30:21 -08:00
transaction.css Group inline transactions in Pholio 2013-03-09 19:23:50 -08:00
two-column.css Phriction Redesign 2013-04-11 15:05:50 -07:00
typeahead.css Cleanup Typeahead and Global Search Typeahead 2013-05-16 13:10:06 -07:00