-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Change password on first login #9547
Comments
Once the MVP is proven then reset password will be mandatory for all projects so we can ensure all users on all instances are not compromised in future. Until then it's fine to use a feature flag so projects can opt-in to try it out.
One addition to this, is the user loses their phone, or forgets their password and the administrator resets it for them, then the user will be required to change their password again. This is because the password has almost certainly been shared in plaintext so it's once again vulnerable to future leaks. |
Hi @garethbowen I'll be starting this tomorrow (Oct 23). Probably start with conceptualizing the data flow then work on the UI first. Just checking whether you have any comment / clarification before I start ..(anything to add other that what we have in this thread) ? cc @n-orlowski are we going with the single password input design or confirm password design in Figma? |
@Benmuiruri Nothing to add regarding the UX. Potentially explore ways to keep it simple for the MVP, for example, is the password strength bar strictly necessary or something we can do in a separate issue? From an implementation point of view, I think it's a fairly simple process of flagging the user with Finally, because this is in the authentication system we'll have to be very careful not to accidentally break anything. For example, if the feature flag is enabled once users are already logged in they should not be forced to change their password. |
@Benmuiruri let's do with the confirmation input. Also happy to drop the progress bar for MVP (but we should keep the written prompts) |
Adding this to 4.16 |
Okay, sorry for the last-minute design questions here, but I am a bit concerned about how the MVP functionality is going to work from a Programs perspective. (Started this discussion in this PR thread, but wanted to continue it here at a higher level for better visibility....)
Hopefully this has all been previously discussed in threads that I have just missed. If the answer is "yeah, we took all of this into consideration already and decided the current approach is best", then great! I will be happy to move forwards with this, as is. |
Another design question that has come up on the PR is how we should handle basic auth requests from a user that has The current implementation has added an extra lookup for the I am wondering if we could be content with not forcing a password reset for basic-auth requests like this. Instead, we only trigger the password-reset flow from the actual login flow. For normal users with a session cookie, when the admin resets their password, they will be forced to login again (and so will be funneled to the password-reset flow). I am just not sure it is worth adding an extra round-trip for every request just to address this basic-auth edge case.... |
You raise very pertinent issues Josh. I was concerned about the Programs disruptions as well, but I proceeded with the implementation believing prior discussions had taken place with all stakeholders about how it would work in terms of requiring password reset whenever the password is changed. Given the situation we are in, time constraints, and this being an MVP that (to the best of my knowledge) none of the partners is particularly waiting for it, how can we create a functional MVP that is not too disruptive? I see two paths here. Option 1: Put the PR on hold / Close it to resume it next year after further discussions. Option 2:
|
I agree with Josh on opting-in vs opting-out for the MVP. Especially because we don't have a password reset mechanism put in place. As for the 2nd point of Basic Auth requests, making this opt-in means that users intentionally created to be used with integrations can be kept opt-out. I'm not super happy with what is happening now though, getting that message "password change required" doesn't really give an indication of what should be done. If I didn't know how this worked, I would just edit the password through the admin console just to get the message again. That's a horrible user experience. I think we really need to come up with something else if we wish to keep this. Additionally, for the concern that we make an additional request to get the user, for most requests we already need the full user doc, and we get it in subsequent middleware: https://github.com/medic/cht-core/blob/master/api/src/middleware/authorization.js#L66 through |
This feature came up after an unfortunate event where a project got a document with user passwords leaked. It was designed as an opt-out feature because CHT should be secure-first and already have these features by default. It should not disrupt existing users; only new users or those getting a new password from the system admin will go through the process of changing passwords. Like other stuff (old UI design to new design), the opt-out capability is temporary, then removed, and that feature becomes "native". The token login has been an option but not popular (I don't remember of any project using it right now). This feature remains, and no changes are planned there. We understand the struggle to learn setting up a password, and that this will require user training. As a second phase to this feature, we thought of added a password suggestion mechanism. Programs has been in contact with one MoH to start using this feature as soon as it's available. I think it's best to follow up with them to get the latest details. I understand that Programs was very engaged in conversations with this partner about implementing this additional security mechanism, and avoid password leaks. |
About the basic auth question - |
Okay, so after discussing this more with @latin-panda I now better understand the motivations for making this functionality "opt-out" via a permission instead of "opt-in". This would follow the same pattern we have used for feature flagging other functionality that we intend to eventually be the default experience in the CHT (e.g. the FAB button). This "opt-out" approach will simplify the code maintenance going forward (making it easier to eventually remove the permission) while still allowing deployments the flexibility to avoid taking this behavior immediately if they need to update their operating procedures to work with the new approach. With that in mind, I think we should keep the However, I do also think that our base create/update user functionality (e.g. via the REST apis) needs to accept a I also want to second Jenni's proposal of pushing the basic auth flows into a new ticket. I think Diana is correct that we might not actually need an additional round-trip to the DB to make this work, but the details on how we want to handle erroring/redirecting a basic-auth request are things that we can sort out in a future ticket and do not need to be in the MVP PR. |
The documentation in cht-docs for this feature is here: medic/cht-docs#1711 |
Is your feature request related to a problem? Please describe.
System admin users create accounts for CHWs and then share the password with them. To enhance the security of these accounts, there should be a way to prompt a password change on the first login.
Describe the solution you'd like
On the login page, create a feature to change the password with the following considerations:
change_password_first_login
)Figma design
The scope of this work is to enable changing the password on the first login. It doesn't include changing the password rules or current authentication mechanisms.
The text was updated successfully, but these errors were encountered: