-
Notifications
You must be signed in to change notification settings - Fork 8
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
Stronger password encryption - bcrypt instead of SHA256 #25
Comments
Triage 13 - Mikk said there are things we need to discuss here. |
@loorm To give you an idea how many people MAY be affected, I counted the total Users in the DB that have passwords (non FB, Google... logins) and I counted 332. |
Assigning to Triage 23 on June 8. |
Triage 23. This will not be the last time a crypto algorithm becomes out-dated and we need to migrate users. Therefore, let's create a new flow, where we ask users to update their password and explain why this is necessary. Sending to in prep. |
Legally reviewed, no additional comments. |
First, I'm assuming this is still relevant. @tiblu, @ilmartyrk - is it? If it is, then Mikk had this solution above: Can we do this, minus the e-mail? Instead, notify these specific users with an in-app notification the next time they try to log in? Text could be: "Your previous password was less secure due to crypto algorithms developing over time. We have updated to more secure algorithms. Please click "Forgot password" to create a new, stronger password." |
Yes, still relevant. Technically we can do an in-app notification, BUT I would not AS Users MAY think of it as a suspicious behavior. Maybe they were hacked? Maybe my password has leaked? But it's preventative action, none of the cases stated. IF at the time of implementation, we find that there are too many Users logging in with password, so many that we do not want them all go through the "Forgot password" flow, we can use a different migration to new hash:
I still prefer, if password using User numbers are acceptable, send everyone through forgot password flow. |
Date: 28.09.2021:
By the numbers on the 28th of Sept 2021 29.95% of Users use or have used password to log in to Citizen OS. |
We both agree, that making the change and sending these 2512 people through the "forgot password" flow is the way to go. I think we also both agree, that you cannot send someone to "Forgot password" flow, if they haven't really forgotten their password, without giving them an explanation. You would prefer to send the explanation via e-mail. Is this a correct understanding of things? If it is, what is your argument for e-mail over in-app message? |
Triage 63. Important update. When user starts logging-in, we direct her to change her password through password-reset flow. There should also be explanatory text which explains that we are renewing our security systems and user has to change the password for any further action. We inform users about the changes in notification/information bar in bottom of the page AND in password reset view as well, in case user enters via email invitation or link. Est. dev. time 4 days. Sending this issue to To Do. |
Technical solution would be to update password encryption on API side, we delete all passwords that exist in our DB, then when users are logging in we can check if password exists and matches, exists, but doesn't match (display the current wrong password error) or doesn't exist and redirect them into reset/create password window in FE that has informative text displayed about what is going on. |
@ilmartyrk I'll assume this one's OK to go to 'later' as is an old dormant issue |
Overview
SHA256-s time is over and a person with an access to Citizen OS database can figure out the actual password with a reasonable effort.
TODO
bcrypt
OR something else. There is a whitepaper on the subject by RIA - https://www.ria.ee/sites/default/files/content-editors/publikatsioonid/cryptoreport2021.pdfSHA256
tobcrypt
.bcrypt
in the DB. IF allowed, we can e-mail Users that we did it. The solution is the easisest and does not clutter the code.SHA256
usebcrypt
to hash the password and store it to DB. The problem with this solution is that we have to support parallel hashes for a while.The text was updated successfully, but these errors were encountered: