TSC icon indicating copy to clipboard operation
TSC copied to clipboard

Require Physical 2fa for Build WG & Web Infra members

Open flakey5 opened this issue 8 months ago • 27 comments

Members of the Build WG & @nodejs/web-infra have access to sensitive resources. Despite this however, there aren't any actual requirements for 2fa to be enabled on a member's accounts afaik.

I think there should be a requirement for members to have some form of physical 2fa (i.e. yubikey) connected to their GitHub and other relevant accounts.

@nodejs/web-infra is relevant here since, even though members aren't under the Build WG governance, they still follow the Build WG contributor guidelines as per the website's governance doc.

I don't have an answer as to who's going to be paying for the keys however

flakey5 avatar Apr 07 '25 01:04 flakey5

Everyone in the Node.js GitHub org is, as far as I can remember, required to have general 2fa enabled on their accounts. Physical keys would be a good additional layer for folks on the build/infra/release teams. The foundation can likely be asked to pay for the keys. /cc @mcollina

jasnell avatar Apr 07 '25 01:04 jasnell

+1 to requiring physical hardware for authentication -- I have YubiKeys on my GH account. I wish GH had a way at the org level to require that 2FA on accounts is a physical factor, and can't be bypassed with another factor like GH mobile (it always gives me this option for sudo mode which scares me).

MattIPv4 avatar Apr 07 '25 01:04 MattIPv4

+1 for Web Infra. We should also require 2fa (Physical) on 1Password which has access to Vercel and Sentry and our GitHub bot accounts.

ovflowd avatar Apr 07 '25 07:04 ovflowd

Despite this however, there aren't any actual requirements for 2fa to be enabled on a member's accounts afaik.

I think this should be a requirement.

I don't think there is money available to massively buy yubykeys for everyone, but it really depends on the volume.

mcollina avatar Apr 07 '25 10:04 mcollina

... massively buy yubikeys for everyone...

We don't need them for everyone... just for the build, build-infra, web-infra, and release teams I would imagine. That would be about 25 keys, which should come to just under about $2k.

jasnell avatar Apr 07 '25 15:04 jasnell

While requiring a physical key would increase security, I also think it would discourage volunteering. I have a physical Yubikey that I'm not using because it looks like it's not so straightforward to get it working under WSL.

richardlau avatar Apr 10 '25 15:04 richardlau

I think we should have a flexible requirement either have a Passkey or a Yubikey. Passkeys are already more secure and usually tied to Devicesd (iOS Phones, Windows computers, Android phones can serve as a Passkey)

ovflowd avatar Apr 24 '25 20:04 ovflowd

Passkeys can also be emulated by password managers. In that case they are not tied to physical devices.

targos avatar Apr 30 '25 13:04 targos

I believe that using 2FA is essential at this stage and should be considered non-negotiable. That said, we can recommend passkeys or physical security keys as preferred 2FA methods, and we should be able to provide a physical key to any volunteer from those teams who requests one. This approach helps us maintain strong security practices without discouraging contributors or forcing specific setups or environments.

Personally, I use YubiKeys, although they can sometimes be tricky to use, especially in virtual machines. It might be helpful to point volunteers to a guide that outlines the best available 2FA options and explains why we prefer certain methods, such as passkeys or security keys, over others like SMS-based 2FA.

UlisesGascon avatar Apr 30 '25 15:04 UlisesGascon

I think code-based 2FA, SMS-based or anything tied to something that could be compromised without a hardware in-person devioce should be no go. That's why I said Android Phones/iPhones;Windows Computers can act as Physical Security Keys (these are features built-in in these devices) if we want to avoid costs of Yubikeys (I have 4 Yubikeys tho)

ovflowd avatar May 02 '25 22:05 ovflowd

From the discussion in the build WG today we are wondering if there are any Open Source projects who already required physical 2FA for some of the collaborators. If so can you let us know who they are as maybe we can reach out to them to see what their experience has been.

mhdawson avatar May 08 '25 15:05 mhdawson

@mhdawson I've found a blog and an open source project that enforced 2FA.

  • https://ropensci.org/blog/2022/05/16/requiring-2fa-for-the-ropensci-github-organization/
  • https://github.com/ossf/great-mfa-project

iuuukhueeee avatar May 08 '25 15:05 iuuukhueeee

  • https://github.com/ossf/great-mfa-project

Heh looks like Node.js was meant to be part of that: https://github.com/nodejs/node/issues/41126

MattIPv4 avatar May 08 '25 15:05 MattIPv4

@iuuukhueeee the Node.js org had already enforced 2FA just not physical 2FA so looking for projects that have required collaborators or some subset of collaborators to use physical hardware with 2FA.

mhdawson avatar May 08 '25 19:05 mhdawson

From the discussion in the Build WG meeting today it seems that the team might be comfortable recommending but not requiring the use of the hardware tokens.

mhdawson avatar May 29 '25 15:05 mhdawson

For the github organization, at least, there is a setting we can enable that restricts 2fa methods to "only secure methods"

Image

This at least disables sms auth as an acceptable 2fa for github.

ryanaslett avatar May 30 '25 19:05 ryanaslett

@ryanaslett thats a good find as that might be acceptable to the project. We would need to find out if there are any project members using sms and if there is some reason they could not switch to an authenticator app.

mhdawson avatar Jun 02 '25 15:06 mhdawson

https://github.com/orgs/nodejs/people?query=two-factor%3Ainsecure will show a list for org owners.

MattIPv4 avatar Jun 02 '25 15:06 MattIPv4

The list is very long, and it included me. I haven't used SMS 2FA in years and just disabled it.

targos avatar Jun 02 '25 16:06 targos

https://github.com/orgs/nodejs/people?query=two-factor%3Ainsecure will show a list for org owners.

The filter two-factor:insecure / two-factor:secure doesn't seem to be working.

ovflowd avatar Jun 02 '25 17:06 ovflowd

https://github.com/orgs/nodejs/people?query=two-factor%3Ainsecure will show a list for org owners.

The filter two-factor:insecure / two-factor:secure doesn't seem to be working.

Unless I'm mistaken, you're not an owner of the org? As I said, only org owners can use the filter (and in general, only owners can see members' 2FA status)

MattIPv4 avatar Jun 02 '25 17:06 MattIPv4

Ah

ovflowd avatar Jun 02 '25 18:06 ovflowd

Yes unfortnately the list includes many people (like myself) who are not use sms for 2fa but did not specifically disable it.

A first step may be to ask all those who are not actively using sms to disable it and then we could check atain.

mhdawson avatar Jun 02 '25 19:06 mhdawson

Suggestion: Move this to the TSC, as it doesnt appear to be something the build WG can enforce or decide.

ryanaslett avatar Jul 31 '25 15:07 ryanaslett

Moved to the TSC repo as discussed in today's TSC meeting.

Quick summary, the original request was requiring hardware 2FA for web-infra and build-infra. The Build WG considered this, but there is no practical way the Build WG can enforce the use of hardware 2FA.

The only practical additional enforcement in GitHub that looks possible is to disallow less secure (insecure?) 2FA methods (such as SMS) but that is an org-wide setting (as opposed to being able to apply to a smaller subset of people). And that would be a TSC decision (tightening 2FA requirements for everybody in the org).

richardlau avatar Aug 06 '25 13:08 richardlau

There doesn't seem to be clarity in the GitHub docs in what tightening the 2FA requirements for everybody in the org would result in to (people kicked out? limited permissions?)

mcollina avatar Aug 07 '25 14:08 mcollina

https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization

Users who do not have a secure method of 2FA configured, or who have any insecure method (such as SMS) configured, will be prevented from accessing organization resources.

targos avatar Aug 07 '25 14:08 targos