Open sea-kelp opened 1 year ago
Tagging @abandoned-prototype and @dismantl in case you had any thoughts before we start working on this
A pretty exciting and important addition! I don't have much experience with implementing MFA, but I will offer my thoughts on the questions. Feel free to disagree or ignore :)
Should we require all users to add MFA instead of only admins? (Or should this be configurable at the instance/department level?)
Configurable probably would be best here, for openoversight.com I don't think we would ever require users to have MFA enabled.
Should users who have not logged in in X time and who have not added MFA be automatically deactivated?
For instances that don't allow anyone to create an account this might make sense. I would probably implement this as a separate feature however.
Should there be other mechanisms for resetting MFA beside reaching out to ACs/admins?
I don't think other mechanisms are necessary for our use case. The option I see github using are having a recovery code or following a time-delayed automatic process. I can't really imagine these would actually be used (in our case) and they also increase the overall attack surface so I would be against adding other mechanisms
Should MFA be turned on in test/local dev? (Leaning toward yes, although having to input an MFA code while testing may get annoying)
If it can be turned on in dev, that would be great, but personally I would prefer it be turned off by default
If an admin without MFA setup logs in, should there be additional checks (ex: email verification) before being allowed to set MFA?
Good question. Email verification would make sense to me. But I think that functionality wouldn't need to exist right away.
How does MFA interact with the Reset Password workflow?
I don't think there is a specific interaction required. If you only forgot your password, you can reset it as before and use the existing MFA to log in after resetting the password.
What if there is only one admin? Is there any way for them to reset their MFA through the website?
No, but I think having a cli command to reset the MFA makes sense
Background
Multi-factor authentication is a widely used mechanism for defending against several types of user account attacks. Implementing MFA would go a long way toward strengthening user account security in OpenOversight.
There are currently two main algorithms for generating the MFA one-time passwords (OTP) used to log in:
We should implement TOTP support but should also either support HOTP upfront or be extensible enough to support HOTP in the future.
User Stories
As an OpenOversight administrator:
As an OpenOversight area coordinator:
As an OpenOversight user:
Anticipated Changes
otp_secret
: the secret used to generate OTP tokenslast_token
: the last token used, to prevent token re-useotp_type
: whether the secret is TOTP or HOTPOpen Questions
Blocking questions in bold:
Related Links