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

Two factor authentication (2FA) #926

Open
rugk opened this issue Jan 13, 2018 · 17 comments
Open

Two factor authentication (2FA) #926

rugk opened this issue Jan 13, 2018 · 17 comments
Labels
defense protecting ourselves, our users and innocent third-parties

Comments

@rugk
Copy link

rugk commented Jan 13, 2018

2FA is a big and great mechanism for improving the security of your account. As Liberapay is about money, it should really have this.

See https://www.turnon2fa.com/ for common explanations of what it is.

How I'd say it is good to do:

  1. Support TOTP first. It works with many phone apps and with a lib it is relatively easy to implement.
  2. Maybe support U2F ("web auth", YubiKey), i.e. USB keys as a second factor later. See https://webauthn.io/ for testing them.

What you can do:

  • Recovery codes. Show them once when the mode is activated and urge users to write them down and store in a save place. Users can then login with one of them. If it is used, you should trigger special precautions, e.g. send a mail to the user or forcing them to reset their password and invalidate all other recovery codes.
  • You can get on https://twofactorauth.org/, when you've implemented it.

What do do not need to care about:

  • SMS 2FA. It is insecure and costs money.
  • Some custom cool app for 2FA. There are standards to use and there is no need to develop yet another app.

What you must not do:

  • Confuse 2FA with password-less login. 2FA is an additional authentication. It does not replace passwords.
@sebastiansterk
Copy link

  • FIDO U2F
  • Yubico OTP
  • OATH-TOTP

Would be great.

@rugk
Copy link
Author

rugk commented Jan 13, 2018

Note that most YubiKeys also support U2F, so that would enough to support, is not it?
But anyway, TOTP should get first as it is easy and can be used by anyone.

@rugk rugk changed the title Two factor authentication Two factor authentication (2FA) Jan 13, 2018
@revi
Copy link
Member

revi commented Jan 13, 2018

TOTP should be priority, I agree with that too. TOTP can be used without dedicated hardware, but FIDO, you need hardware keys (i.e. Yubikeys).

Most of the site with FIDO sets TOTP as a fallback, like GitHub and/or Facebook.

@EdOverflow EdOverflow added the defense protecting ourselves, our users and innocent third-parties label Jan 16, 2018
@gergelypolonkai
Copy link
Contributor

I don’t think Yubico OTP is really needed. Most YubiKeys support U2F. Some statistics would be nice with the ratio of U2F enabled to all Yubikeys.

A side note on U2F: even Google Authenticator supports it on Android (it’s not hardware, per se, but it’s limited to platforms where Authenticator can run). Browser support is also limited as of now.

As a conclusion, I also vote for TOTP + backup codes (although I think U2F would also be a great addition.)

@Changaco
Copy link
Member

@sliptonic
Copy link

I would like to see this as well. For me u2f/fido/fido2 should be priority. There are now open-source keys available.
I'm willing to buy someone a key (yubikey or solokey) if they'll implement.

@hydrargyrum
Copy link

Are there any news? For a site involving money, 2FA is a must-have. TOTP is basic yet is very effective and very well-supported.

@rugk
Copy link
Author

rugk commented Feb 9, 2022

Is this a django app? If so I can recommend https://github.com/xi/django-mfa3

@sebastiansterk
Copy link

It is very sad to see that for 2 years there has been no priority or awareness of how important account security is.

@mimi89999
Copy link

Would you prefer to have Webauthn as a second factor or as the only factor (but with user verification on device) as described in #2163?

@rhamzeh
Copy link

rhamzeh commented Jul 14, 2022

@mimi89999 I personally would prefer it as a second factor.

Not sure if requiring some thing like TwoOff(password, webauthn, 2fa) code is worth the trouble to give users the choice.

But for me, at this point at least I'm not sure I'd use WebAuthn as a replacement for passwords.

with User Verification on Device
On some devices, this is a simple as touching the device (e.g. YubiKeys) and does not provide the extra biometric validation.

@rugk
Copy link
Author

rugk commented Jul 14, 2022

You can implement both. The user can add it as a second factor as the only factor for login.

She e.g. how nextclpud has implemented it:
https://github.com/nextcloud/twofactor_webauthn

If you have to decide I would also prefer the safe version as 2FA IMHO. But that may just be my personal "taste"/preference.

@mimi89999
Copy link

@rhamzeh

On some devices, this is a simple as touching the device (e.g. YubiKeys) and does not provide the extra biometric validation.

It depends on the value of https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement and whether the https://www.w3.org/TR/webauthn-2/#uv flag is verified.

@jozip
Copy link

jozip commented Nov 23, 2022

Is this a django app? If so I can recommend https://github.com/xi/django-mfa3

Any word on whether or not this is a viable option? No, I took the time to actually read the README.

I've been trying to find something done for Pando, but nothing comes up. Should be possible to roll something competent using PyOTP.

@jozip
Copy link

jozip commented Dec 11, 2022

I went ahead with this: #2195

@nehemiagurl
Copy link

nehemiagurl commented Dec 19, 2023

TOTP + recovery codes is a must, otherwise anyone who saves a payment method is essentially one correct guess away from having their credit card abused.
U2F is very good to have, but if it's too much of a hassle then it's best to get TOTP out of the gate first and then U2F. But there should be some sort of 2FA as soon as possible.

@recursiveAdaption
Copy link

recursiveAdaption commented May 16, 2024

Does anyone know what the requirements are for setting up [2FA]: TOTP?

I would also like to see this implemented as having TOTP enabled would give others and myself some additional peace of mind when it comes to security when using Liberapay in contrast to some of the other sites that already provides this security feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defense protecting ourselves, our users and innocent third-parties
Development

No branches or pull requests