Skip to content
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

Ensure password hash validation is working and secure as can be #10

Open
angusmcleod opened this issue Mar 31, 2021 · 4 comments
Open
Assignees
Labels
help wanted Extra attention is needed

Comments

@angusmcleod
Copy link
Member

angusmcleod commented Mar 31, 2021

A key piece of the data migration is to ensure that password hashes created in Wordpress still function as expected in the new architechture. There is existing handling for this here: password.go, i.e. it first attempts to validate the hash using bcrypt, and then attempts an MD5 (Wordpress). I want to be sure

  1. It's working for all passwords, whether created in Wordpress or via the ID server app
  2. That it's secure as it can be (granted that Wordpress passwords are not particularly secure)

@auggod Do you have any concerns about the password hash validation logic you've added in the linked file? Any potential issues we should be aware of?

@angusmcleod angusmcleod changed the title Ensure password hash validation will work on existing passwords Ensure password hash validation is working and secure as can be Mar 31, 2021
@angusmcleod angusmcleod added the help wanted Extra attention is needed label Mar 31, 2021
@auggod
Copy link
Member

auggod commented Apr 1, 2021

We need to deprecate this phpass thing. For the migration, I would request existing users to create a new password (bcrypt only) We could validate existing password but anyway we also need to do email validations again.

It would be great if someone could review this piece: https://github.com/resonatecoop/id/blob/develop/oauth/email_token.go

@auggod
Copy link
Member

auggod commented Apr 1, 2021

We may have compat problems between this phpass function and the wordpress passwords.

@David-Chadwick
Copy link

One possible way forward is to introduce a new password policy (e.g. min 8 chars, mixture of upper lower number and special at least one of each) so that when everyone logs in for the first time to the new system you make them create a new password that fits the rules (can be the same as their old one, dont bother checking). You do this by asking them to click the reset pw link that emails them a secure URL to click on, valid for 10 minutes, and puts up a new PW screen. Then you will be sure that everyone is using the new system and you wont need to bother about compatibility with the old passwords

@angusmcleod
Copy link
Member Author

angusmcleod commented Jun 28, 2021

@auggod Our plan is to

  1. Remove WP pwd validation entirely

  2. When a user attempts to log in, we check the last password changed date, if this is before July 15, then we don't authenticate. We show the message:

    Your password has expired. We've sent you an email with instructions on how to set your new password.

  3. We send a password reset email (existing forgot password mechanism)

  4. User must reset their password before logging in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants