git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: "lilinchao@oschina.cn" <lilinchao@oschina.cn>,
	git <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [QUESTION]Is it possible that git would support two-factor authentication?
Date: Wed, 11 Aug 2021 11:23:05 -0400	[thread overview]
Message-ID: <YRPrWSj2TbshKTor@mit.edu> (raw)
In-Reply-To: <20210811135055.tqdblurgk3vw5lgm@nitro.local>

On Wed, Aug 11, 2021 at 09:50:55AM -0400, Konstantin Ryabitsev wrote:
> On Wed, Aug 11, 2021 at 07:00:50PM +0800, lilinchao@oschina.cn wrote:
> > Many websites support two-factor authentication(2FA) to log in,
> > like Github, I wander if we can support it in application layer.
> > When client clone something, they need  input username and
> > password, it is like a website login process. For security, we can
> > enable  2FA during this process.
> 
> As you well know, "cloning" a repository can be done via any number of
> mechanisms:
> 
> 1. locally from another repository on disk
> 2. locally, from a git bundle file
> 3. remotely, using the anonymous git:// protocol
> 4. remotely, using ssh or http(s) protocols
> 
> 2-factor authentication does not make sense in the first three cases (you
> already have access to all the objects with 1 and 2, and the git:// protocol
> is public and anonymous by design). For the ssh/https scheme, 2fa is already
> supported by the underlying protocol, so it does not make sense for git to
> implement it again on the application level.

It might be helpful to be explicit about what *kind* of two-factor
authentication you are interested in.  There are multiple different
kinds of 2FA systems, including ssh keys stored on a hardware token
such as a smartcard or a Yuibikey, U2F Fido systems using a security
key, TOTP or HOTP otp systems, etc.

Each of these systems have different tradeoffs in terms of ease of use
from the user perspective (both from the point of view of initial
setup and day-to-day use after getting set up), security against MITM
attacks, and ease of integration/deployment from the system
administrator's perspective.

Cheers,

						- Ted

  reply	other threads:[~2021-08-11 15:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 11:00 [QUESTION]Is it possible that git would support two-factor authentication? lilinchao
2021-08-11 13:50 ` Konstantin Ryabitsev
2021-08-11 15:23   ` Theodore Ts'o [this message]
2021-08-13 22:56   ` brian m. carlson
2021-08-11 13:54 ` Derrick Stolee
     [not found] ` <9b199de2faab11eba548a4badb2c2b1195555@gmail.com>
2021-08-13  7:49   ` lilinchao
2021-08-14 22:02     ` Johannes Schindelin
     [not found]       ` <BEBB4A79-9773-4701-A8C5-06C20AB42686@github.com>
     [not found]         ` <1F2C610F-8800-466A-A0CA-7A6068A14805@github.com>
     [not found]           ` <D8CFA50F-266A-4995-8058-D29A2D490D5F@github.com>
2021-08-17 10:19             ` Matthew Cheetham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YRPrWSj2TbshKTor@mit.edu \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=lilinchao@oschina.cn \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).