-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Update the people.email
to use Fields.EmailEncrypted
#285
Comments
Getting the following error: 15:06:13.691 [info] alter table people
** (Postgrex.Error) ERROR 42804 (datatype_mismatch) column "email" cannot be cast automatically to type bytea
hint: You might need to specify "USING email::bytea". |
Sadly, having the auth/lib/auth/accounts/person_token.ex Lines 110 to 129 in da0af7e
I don't see us using this function in our see: #223 (comment) So I'm going to explore removing this function and seeing what the ramifications are ... 💭 |
people
and people_tokens
to use fields
people.email
to use Fields.EmailEncrypted
…cy/security #285 also comment out all insecure/unused code - to be removed shortly
…cy/security #285 also comment out all insecure/unused code - to be removed shortly
Following the changes made in: 2bbba99 If we now run a query to view the data in the SELECT id, email, inserted_at FROM people; We see that the Registration and Login still works as expected: But now the personal data captured in registration is stored |
As noted in #284 sadly, by
default
themix phx.gen.auth
generatordoes not setup any protection for personal data in the database. 😢
Email addresses are stored as
plaintext
:Similarly the
people_tokens
table storesemail
addresses asplaintext
in thesent_to
column:This is obviously undesirable. 🙃
This is a privacy/security issue waiting to become a scandal!
Todo
fields
to the newly re-createdauth
(Phoenix 1.7
) apppeople
andpeople_tokens
schemas to useFields.EmailEncrypted
This shouldn't take very long but allocating
T2h
to allow for documenting the stepsThe text was updated successfully, but these errors were encountered: