git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Vitaly VS <strikervitaly@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git via MITM transparent proxy with HTTPS Interception
Date: Wed, 14 Apr 2021 00:05:10 +0000	[thread overview]
Message-ID: <YHYxtvKgKz+Uv2xO@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CAEaE=iyUGiPK-HX850mEgC=X6atEhbjJ0dCK0dci0nOCahPhgQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2464 bytes --]

On 2021-04-13 at 12:07:58, Vitaly VS wrote:
> Hello! Can a Git client work properly through a MITM transparent proxy
> with HTTPS interception?

Yes, with some important caveats.  The proxy must be completely
transparent.  It must not modify or impede the data in any way, it must
speak both HTTP 1.1 and HTTP 2 correctly and fully, and the proxy must
speak TLS completely correctly, including terminating the connection in
accordance with the protocol.  It must be completely impossible to tell
that a proxy is being used.

I do want to point out that TLS interception is by definition a security
vulnerability and almost always significantly weakens security, often by
using weaker protocols, breaking or disabling certificate verification,
and impeding the upgrading and interoperability of the protocol[0].  You
should definitely read and understand the literature about TLS
intercepting proxies and have personally verified that your
implementation is free of vulnerabilities before deploying.  You
shouldn't rely on your implementer for this information, because they
usually aren't aware that their implementation has vulnerabilities.

Also, my experience is that many, many proxies of this nature are
completely broken and don't work correctly, so if you are not fully
aware of what's going on and haven't fully tested your implementation,
you shouldn't deploy this technology.  I frequently answer questions
from users in scenarios such as this who are having problems due to a
broken proxy and often have to tell them to contact their network
administrator.  I therefore do not in any sense recommend deploying such
infrastructure.

Git really does need a properly functioning HTTP and TLS implementation
and things tend to break in a variety of ways when encountering broken
proxies.  I would say "exciting ways", but I recognize them all now and
they're not exciting anymore.

> Getting a bunch of errors when trying to "git clone https://SOME_REPO.git"
> On small REPOs (about 1-5 MB) there is a chance that the clone will be
> successful, but mostly I get these errors:

Your proxy is broken and doesn't speak the protocol correctly.  It isn't
a transparent proxy.  You should either remove it or contact your
network administrator to have it removed.

[0] https://www.ftc.gov/system/files/documents/public_comments/2016/09/00019-129028.pdf
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  parent reply	other threads:[~2021-04-14  0:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 12:07 Git via MITM transparent proxy with HTTPS Interception Vitaly VS
2021-04-13 12:24 ` Jason Pyeron
2021-04-14  0:05 ` brian m. carlson [this message]
2021-04-14  9:35   ` Vitaly VS
2021-04-14 11:49     ` brian m. carlson
2021-04-14 12:29       ` Jason Pyeron
2021-04-14 15:41         ` Vitaly VS

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=YHYxtvKgKz+Uv2xO@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=strikervitaly@gmail.com \
    /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).