git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git via MITM transparent proxy with HTTPS Interception

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 14, 2021, 00:05 UTC
Message-ID
<YHYxtvKgKz+Uv2xO@camp.crustytoothpaste.net>
In-Reply-To
<CAEaE=iyUGiPK-HX850mEgC=X6atEhbjJ0dCK0dci0nOCahPhgQ@mail.gmail.com>
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
Previous: Jason PyeronNext: Vitaly VS
Message 3 of 7 in “Git via MITM transparent proxy with HTTPS Interception”
  1. Vitaly VSApr 13, 2021
  2. Jason PyeronApr 13, 2021
  3. brian m. carlsonApr 14, 2021
  4. Vitaly VSApr 14, 2021
  5. brian m. carlsonApr 14, 2021
  6. Jason PyeronApr 14, 2021
  7. Vitaly VSApr 14, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.