This diff updates the signup process to encrypt user information as it comes in.
Test Plan
User created by this signup process, note no plaintext username / email:
Account information, note the auto-created encryption + indexes:
Potential Concerns
A two-stage commit is used here, to create the user object in Django, and then update them with the correct parameters and delete unsafe data. This might present a problem if the encryption process is halted halfway through, since unsafe data will be present, but that's a small enough risk that I'm comfortable leaving this as is for now.
Summary
This diff updates the signup process to encrypt user information as it comes in.
Test Plan
User created by this signup process, note no plaintext username / email:![Screen Shot 2019-07-17 at 2 17 44 PM](https://user-images.githubusercontent.com/558471/61412466-cdf18480-a89d-11e9-9ef3-33dfe0dfb38c.png)
Account information, note the auto-created encryption + indexes:![Screen Shot 2019-07-17 at 2 18 38 PM](https://user-images.githubusercontent.com/558471/61412482-d47ffc00-a89d-11e9-85b9-b0f902b04cd6.png)
Potential Concerns
A two-stage commit is used here, to create the user object in Django, and then update them with the correct parameters and delete unsafe data. This might present a problem if the encryption process is halted halfway through, since unsafe data will be present, but that's a small enough risk that I'm comfortable leaving this as is for now.