GitHub to require 2FA on accounts by October 6, 2023

Xylight (Photon dev)@lemmy.xylight.dev to Technology@lemmy.ml – 395 points –
Raising the bar for software security: GitHub 2FA begins March 13
github.blog

I personally am fine with this.

129

Yep, should be standard everywhere

..... for accounts you actually give a shit about

And not the twitch way, where you have to have in an identifier, your phone number, but using proper, standards ways for it, like TOTP and such

twitch has TOTP

As the other commenter said, only if you give them your phone number, and only through that garbage authy that does not use standard TOTP, but some proprietary crap, specifically made for twitch.

And if you give them a phone number, which another user will also try to use in the future, then the secret used for TOTP can change in any moment, which means if you exported the secret to e.g. Aegis and deleted that tracking filled garbage that is named authy, at one point the codes just won't work anymore, and you're practically locked out. Apparently support should be able to help, but they don't give a single fuck.

and only through that garbage authy

you can use any TOTP app. I use bitwarden

How? How do you import the secret key to it? Are they finally showing a proper QR code when setting it up?

My account is still locked to authy, and the support pages I have read are written as if it would still work through authy for everyone.

Are they finally showing a proper QR code when setting it up?

At least that was the case for me. I removed 2FA to make the authy key invalid and activated it again. and they do the normal TOTP setup stuff during setup

That sounds good. I still have a working login somehow, but unfortunately I can't disable authy, because they want a code to do that, and they won't accept those that I have, even though it was working when I have set it up.

do you have the backup codes somewhere? Could help

I don't. Not sure whether they even provided those when I have set it up, maybe they thought that since it's stored online you can't just lose it, but I really don't remember whether there was any I could have saved. It way years ago.

Also, thinking about it, the prompt does not give an option to use a recovery code, but only to try with the phone number (which is dead by now), or contact support.

tbf, that's a bit on you. The whole point of 2FA is to prove that you are you. and if you completely killed that factor without deactivating it first or having a backup in any way, I can see the support not doing much. I'd be pissed if someone could just contact support and deactivate my 2FA method

I didn't enable it because I wanted it for security, but because twitch required it. And then I have set it up with TOTP for security while I was doing it, which does not work anymore either. Also, I did not kill the phone number, it is a public phone number that doesn't receive messages anymore. And if you blame me for not wanting to give up my own phone number, I don't know that to tell you. My privacy matters much more than caring about the possibility that someone finds out my 30 long random password and catches the SMS code from the website where they were shown.

I can see the support not doing much. I'd be pissed if someone could just contact support and deactivate my 2FA method

The 2FA prompt itself tells to contact support in cases like this.
Other than that, email verification is perfectly fine for verifying that it's me. The address was never changed. Actually, as I have seen in a friend's account they are using email already as 2FA for logins, if you don't have any other way set up, maybe for other functions too.

What’s wrong with Authy?

First of all, that they are totally unnecessary for twitch to be able to provide 2fa authentication.

Other than that, their app has tracker components, all secret keys are stored in the cloud, who knows whether that's encrypted, but on your phone's storage surely not, if yours is rooted you can just view it in a file manager and copy it to a normal code generator app.
Generally they support standard TOTP code generation, but for twitch they are using some weird shit that generates 8 long numbers (instead of the standard 6), of which the middle 2 is the same so they drop one of them, and then also codes expire in third the time as it is normally.

6 more...
6 more...

emphasis on the

… for accounts you actually give a shit about

15 more...

While you are adding this anyway consider using an open source app instead of google auth like aegis. There are many others but I wish I knew about them sooner.

I personally love keeweb. Passwords and 2fa all in one place.

I mean you could argue that defeats the purpose of having 2fa, but it's convenient

It weakens it a bit, but in my opinion it still has strength where it counts. If an attacker gets access to your password outside your password manager (man-in-the-middle, keylogger, phishing), then you’re still protected. Maybe it’s hubris in my own ability to keep my password manager safe, but I’ve never been worried about storing MFA in my password manager.

1 more...
1 more...

Bitwarden is also good.

Bitwarden crew checking in. The best thing about bitwarden is the 10$/year to have a pro account. It gives you, amongst other things the ability to store up to 1tb of attachments and reports on various risk assessments.

You can even host your own instance.

I recommend it.

You probably shouldn't be storing your passwords and 2FA in the same place.

1 more...

Good, people are fucking stupid and if it effects others it's often better to choose the security for them!

Yup. I'm actually a bit baffled by how much negativity/misinformation there's around 2FA even in a place like this, which should naturally have a more technically inclined userbase.

Well negativity is there because every app wants it.

I don't care if account x is compronised, as it has absolutly no value

I dislike MFA because it creates a risk of losing access to my account. I can back up my passwords; I can't back up a hardware device.

Normally you get a handful of recovery codes when you set up 2FA. If not, you can just create a backup of the QR-Code or secret when setting up 2FA and store it in a safe location. And even if all that fails there's usually a way to recover an account by going through support.

Although I wouldn't recommend it, there's also 2FA apps out there that have cloud-sync.

It's pretty hard to hand-write a QR code, I don't wish to pay the printer cartel $50 for the privilege of printing it, and it would of course be horribly insecure to print it with someone else's printer.

And how would I use the QR code? I can't scan it with my phone's camera because allowing my phone access to my GitHub account is a security risk, and I can't scan it with my desktop because it doesn't have a camera.

So, how is this going to work? How do I recover my GitHub account without making it less secure than it is with just a password?

Is this some kind of joke that's going over my head?

If not: The QR code alone doesn't give you access to the account. That's the entire point of 2FA. Plus, you always get a ~20 character code that can be backed up instead of the QR code. Screenshots are also a thing.

1 more...
1 more...

A hardware device is a physical key. Its no different than backing up your home key. Get two keys and copy them. Keep one on you, and the other in a safe somewhere in case you lose the first.

Hardware tokens are specifically designed to resist copying. Any means of copying it would be considered a security vulnerability.

Bits rot. A hardware token kept in a bank vault may or may not still work when I need it 10 years later, and there is no reasonable process for regularly verifying the integrity of its contents. Backup drives' checksums are verified with every backup cycle, and so are the checksums on the file system being backed up (I'm using btrfs for that reason).

Hardware tokens are expensive. Mechanical lock keys are not.

Not literally copy, as in have an extra set of keys. A spare key. A bank vault is total overkill. I just bought 2 fido2 keys and register both for the services that support them. Have one on your keychain and another in your desk. 2FA is often way over thought, any adversary needs both factors so something you know and something you own is plenty for most people.

How will I notice when the spare fails, if it's only a spare and I don't regularly use it? Then I'm down to only one key, and as any grumpy backup admin will tell you, if you have only one copy of something, you have zero copies.

I would have a key plugged into the computer pretty much all the time when I'm working, so anyone who compromises the computer can impersonate me as long as I'm at work. This would be mildly inconvenient to the attacker, but wouldn't actually stop the attacker. And if the computer isn't compromised, how is anyone going to get into my GitHub account even without 2FA? They certainly aren't going to do it by guessing my 16-character generated password or Ed25519 SSH key.

Something-I-know is worthless for authentication in the age of GPU password cracking. Most humans, including myself, do not have photographic memories with which to memorize cryptographically secure passwords. We're all using password managers for a reason, and a password database is something you have, not something you know.

1 more...
1 more...
1 more...

2fa should be mandatory everywhere

Hard disagree. I do not want to have 2FA for every shittly little thing I do not care about.

Yeah. GitHub makes sense because most users are writing code that can be executed by others. That makes GitHub accounts security critical.

But a Lemmy account? Naw, you lose almost nothing if that gets compromised. A little bit of history and subscriptions, mostly.

I'm in a discord that for some reason "requires" 2FA. Based on searching, I think they give everyone some kinda admin role or something? It doesn't actually require 2FA, but it shows a very annoying warning that covers up a bunch of the channel selection screen. But despite that, I don't really wanna deal with the hassle of 2FA on a chat app that's basically consequence free for me if it gets exploited.

Specifically app-based 2FA, ideally Google Authenticator based. There are tons of great authenticator apps available that are all compatible, so it should absolutely be preferred over SMS or email.

2FA is the biggest bane to my productivity in the last 15 years, no part of my work life should require me to pull out my magic distraction device.

Use a password manager that lets you autofill 2fa, like Bitwarden.

1password does this, too and it's magical. I've had my SMS go to my browser via Google Messages for a while, but it's so much easier to just auto-fill it instead of copy/paste

Also, 1password logs you out when you stare at it wrong, so I'm not worried about someone who would somehow get local access abusing it.

That's bad advice

Is it less secure than it could be? Yes.

Is it better than no 2FA? Also yes.

In the end if it doesn’t work for your security model, than more power to you. But if it helps to increase the security of the average Joe, it’s good advice.

Allowing a smartphone access to anything sensitive is even worse advice. Smartphones are notoriously insecure.

You're right. Dont grant your smartphone access to your GitHub. Just give it one factor.

I don't like how a lot of things require their own custom app, especially when there's no automatic notification. I need to try and remember what the app is called, open it, navigate through, then approve it

I like the app setup rather than shoving everything into a browser. But I'm not a fan of this 2fa stuff. I get the point is security, but let me decide which app/method to use, and whether I want to use it at all. Otherwise it's just annoying.

I'm absolutely a fan of choosing which method to use, and also a fan of requiring choosing one. I prefer Google Authenticator-style 2FA (I use Aegis, but there are plenty of options), and I get annoyed when I need something else (e.g. Fidelity only offers Symantec, Steam only offers Steam Guard, etc).

Get a hardware 2FA key instead of using your phone for TOTP

You can use KeePassXC to generate the TOTP codes on your PC. With the browser plugin, you can generate the code and fill the textbox with one click when the password database is unlocked.

Sites that don't use standard TOTP for 2FA are a pain in the ass though.

Authy has a desktop app and syncing across devices

…through a third-party cloud server that you have no good reason to trust. No bueno. Keep sensitive information off the cloud unless you want it to become public.

yup, that's the tradeoff, this or reaching for your procrastinating device, but yeah, maybe Bitwarden could be better alternative, now i'm too lazy to migrate + it's paid

KeePassXC seems reputable, so I guess I'll try to use that when the time comes.

This! Authy is very very nice. Syncing accounts is a life saver, both as backup, and not having to pick up the phone all the time.
Cut and pasting with a click instead of reading and typing, is so much faster.
Easily search the very long list of entries.
Not open source tho, but free as in beer.
If Aegis had the sync option, i would have used that. But it did not last time i checked.

No offense to companies but I'm honestly sick of companies forcing 2fa. Every single one seems to have a different shitty way of doing it. Like why on earth do I need two different authenticator apps on my phone (authy&google authenticator)? Some do sms/phone number, but then yell at you and prevent you from doing 2fa if you have a "bad phone number". This happened on discord where I'm locked out of certain servers because I can't do phone verification, and I can't do it because discord doesn't like my phone number. Twitter was the same way for a long while (couldn't do 2fa/phone verification due to them not liking my number).

From the article it sounds like they're doing authenticator app or sms. I'm guessing sms won't work for me, so app it is. I decided to dig to see which authenticator app they use and they list: 1password, authy, lastpass, and microsoft.... no google?

Honestly, even email requirements for accounts is annoying because you know it just ends up spamming you. is the future where we're gonna have to have 30 different authenticator apps on our phone?

Like why on earth do I need two different authenticator apps on my phone (authy&google authenticator)?

you... don't?

Both of these implement exactly the same protocol (TOTP). Used authy for all my Top Of The Pops Time-based one-time password needs exclusively, before moving everything to bitwarden

Unfortunately there are some websites that require Authy (probably because Authy wined and dined some business executive). I absolutely loathe these sites but if it’s a site you’re not willing to live without, you’re stuck with having Authy plus your main 2FA app.

which ones are that? I'd love to check, because afaik, they have a feature that enables push-2fa via authy, but should generally work on other apps as well

Sendgrid's only options for 2FA are Authy (their proprietary token generation, no option for TOTP) or SMS. Tried signing up the other day and was surprised to find no option to use standard TOTP.

https://docs.sendgrid.com/ui/account-and-settings/two-factor-authentication

Are you sure that you can't use a different TOTP generator? There's a difference between telling you to use Authy and still being able to use a different app

Yes I'm sure, hence why I specifically mentioned that. Try the sign up procedure yourself. It REQUIRES 2fa and it has to be Authy's non-standard token or SMS. No option for regular TOTP.

thx. just making sure. I already saw a lot of people annoyed about a specific app, just because that was the one being advertised, but in the end it was TOTP

websites explicitly said to get one or the other so I did.

Well the good news for you is that a website specifying one or the other is nothing more than marketing from that app maker! So long as there is a QR code (or a long random-ish string), you can use any authenticator app that supports that website’s 2FA algorithms!

That last bit is important because I think Lemmy had a non-standard 2FA algorithm (SHA-256?) that wouldn’t work with Google Authenticator.

Lemmy works with Google Authenticator, but not with Authy.

Annoyingly Authy fails silently and ignores the part of the code that specifies SHA-256 and just generates a SHA-1 code that won't work with no warning or indication to the user.

that's good to know. I'll just switch everything over to google authenticator then.

BTW, any authenticator app works when it tells you to use one. They all use a standard, so it doesn't matter which one you use.

BTW, any authenticator app works when it tells you to use one. They all use a standard, so it doesn't matter which one you use.

Eh, it's a little more nuanced than that, there're more standards for MFA code generation than just TOTP.

And even within the TOTP standard, there are options to adjust the code generation (timing, hash algorithm, # of characters in the generated code, etc.) that not all clients are going to support or will be user-configureable. Blizzard's Battle.net MFA is a good example of that.

If the code is just your basic 6-digit HMAC/SHA1 30-second code, yeah, odds are almost 100% that your client of choice will support it, but anything other than that I wouldn't automatically assume that it's going to work.

Anyone who claims they're doing OTPs over SMS for "security" ia lying to you. Discord wants your phone number; it has nothing to do with your security

there's quite a lot of services that want phone for verification/2fa/whatever. whenever I run into them I usually just refuse to use the service altogether.

How do you even use the internet? I mean, you could never book a flight, use any food rewards program, book a ride share, etc. Almost everything uses my phone number for 2FA.

There is literally no bank in my country that doesn't use sms for 2fa.

Yes banks are terrible about this, and it makes no sense

what happens if you don't have a phone number? you're just prevented from having a bank account?

You can have a bank account, but you wouldn't be able to do online or mobile banking.

Sms is the only 2fa option (some offer email as well, but last I checked all fall back on sms), and it's mandatory for online/mobile.

Google Auth works just fine. The standard for app generated 2FA is, well, standard. They're only listing a non-complete list of options for people that don't know what an authenticator app is and need to get one for the first time.

The google auth which transmits your totp code in plaintext to there servers?

That is the specific app the person I replied to was asking about, so yea. Would have been a little weird if I was talking about some other app.

do all authenticators work for all services?

Mostly. The 6 digit standard ones that you see almost everywhere are standard TOTP codes and most apps work for them. There are some proprietary things out there too but you typically see those with a matching app from the same company. Those are far less common though so for practical reasons you can assume they are all interchangeable.

Those values are computed separately what the app is really storing is just the input values which are then combines with the current time to create the 6 digit code. That means that keeping that input value (seed) safe is a big deal, and how and where that is done is one of the major differentiators between the various options.

3 more...

I personally am afraid of this. What if something gets botched? I'll be permanently locked out of my account!

Print off your recovery codes and keep them safe. If you want to be extra, hammer them into metal plates like the crypto weirdos do.

Printing recovery codes would require me to either be price gouged by the printer ink cartel or use someone else's printer, and using someone else's printer is begging to get my account stolen.

I have no idea how to hammer things into metal plates, but I'm guessing that's even more expensive than printer ink.

Just use your pen and paper.

I can do that with alphanumeric codes, yeah, but can I get alphanumeric codes from GitHub, or is it going to be a QR code? I can't write down a QR code…

QR codes are just an encoding. Just use any half-competent QR code app, and it will give you it's content, which you can then write down. For the reverse you can use any QR code generator.

How do I feed the generated QR code back to GitHub, then? Can I upload an image of it?

Have you ever used any website with 2FA? You don't need to upload QR codes.

I've only used SMS and Steam 2FA so far. I've been avoiding 2FA as much as I can.

Okay, so generally the way it works is you have some app (e.g. Google Authenticator, 1password, Aegis, Bit warden -- anything that supports TOTP). When you enable 2FA for a site, it'll give you a QR code. You scan that with your app and then the app gives you a six digit code that changes every 30 seconds.

The QR code is really just an easy way to get a long string of characters into your app, though, and if the QR code doesn't work there should be an option to see the raw code and manually enter it.

You enter that code in once to confirm that you have actually set up the 2FA. Then it will show you a list of recovery codes. It'll only show you these once; it doesn't store them anywhere. You need to note them down in whatever way suits you best (I print mine; you could also just write them down). You cannot see these again. The best you can do, if you still have access to your account, is generate new ones (probably by disabling and re-enabling 2FA)

Now, whenever you login, you'll be asked for your authenticator code (much like an SMS). You just open whatever app you used and enter in whatever code it's currently showing (remember it's time based).

If your authenticator app gets messed up somehow, you can recover it using your recovery codes.

I'd prefer me getting permanently locked out over someone who isnt me getting allowed in. Even more so to services which have my credit card number.

But unlikely anyway, as long as I save my pass and 2fa to a password manager, and keep the backup codes backed up.