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

[PATCH 0/1] Proactive authentication over HTTP

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 28, 2024, 00:27 UTC
Message-ID
<20240628002742.3421311-1-sandals@crustytoothpaste.net>

Currently Git only sends authentication over HTTP once it's received a 401 response from the server. This series allows users to indicate that they (or the credential helper) know what kind of authentication is to be performed and avoid the extra round trip.

This has a couple of use cases:
* Some connections are high-latency or potentially unreliable and the
  extra round trip is expensive or flaky, so avoiding it can be
  desirable.
* Users can authenticate even to public repositories for fetches and
  clones, such as to access higher rate limits or to allow better
  identification of the requesting party.  This can be useful to help
  identify, say, an internal service that is requesting excessive
  amounts of resources and throttle it appropriately.  (An incident
  involving this very situation is the impetus for this series.)
* Some environments have very unusual proxy setups which require all
  requests to be authenticated, and this might be useful there.  (This
  is not a goal of this series and not a problem I'm generally
  interested in solving, but it happens to benefit those people as well,
  so I thought I'd mention it.)

Note that the types of authentication for which we can do proactive auth are relatively limited. Of the standard forms provided by libcurl, I believe only Basic is possible, because the others require a nonce or challenge from the server that is used in the computation of the authentication value. Due to the new credential functionality recently introduced, Bearer is also a useful possibility.

brian m. carlson (1):
  http: allow authenticating proactively
 Documentation/config/http.txt |  15 +++++
 http.c                        |  59 +++++++++++++++--
 t/t5563-simple-http-auth.sh   | 116 ++++++++++++++++++++++++++++++++++
 3 files changed, 184 insertions(+), 6 deletions(-)
Next: brian m. carlson
Message 1 of 12 in “Proactive authentication over HTTP”
  1. 0/1 Proactive authentication over HTTPbrian m. carlson, Jun 28, 2024
  2. 1/1 http: allow authenticating proactivelybrian m. carlson, Jun 28, 2024
  3. Junio C HamanoJun 28, 2024
  4. brian m. carlsonJun 28, 2024
  5. Junio C HamanoJun 28, 2024
  6. brian m. carlsonJun 29, 2024
  7. Junio C HamanoJul 1, 2024
  8. 0/1 Proactive authentication over HTTPbrian m. carlson, Jul 4, 2024
  9. 1/1 http: allow authenticating proactivelybrian m. carlson, Jul 4, 2024
  10. Junio C HamanoJul 4, 2024
  11. 0/1 Proactive authentication over HTTPbrian m. carlson, Jul 10, 2024
  12. 1/1 http: allow authenticating proactivelybrian m. carlson, Jul 10, 2024

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.