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

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 5, 2016, 21:02 UTC
Message-ID
<xmqqa8nedg59.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160205204648.GA7403@vauxhall.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 16 quoted lines
> On Fri, Feb 05, 2016 at 12:18:22PM +0300, Dmitry Vilkov wrote:
>> You are right, we are using a bare URL (without a username component).
>> With username encoded in URL everything works just fine. But it's
>> generally wrong to pass creds in URL (in my opinion) and security
>> policy of my employer prohibits doing such thing.
>> Anyway, as you said libcurl needs valid (not NULL) username/password
>> to do GSS-Negotiate, so there is nothing wrong if I set empty
>> username/password combination when git prompts for creds. Even more,
>> there is no other way to let libcurl to use GSS-Negotiate without
>> username in URL.
>
> You can literally do https://:@git.crustytoothpaste.net/git/repo.git as
> the URL, and that will work.  GSS-Negotiate using Kerberos passes the
> ticket, which contains the principal name in it, so an actual username
> and password is not needed at all.  libcurl just needs something to tell
> it to do authentication.

Hmph, so documenting that <emptyname>:<emptypassword>@<repository> as a supported way might be an ugly-looking solution to the original problem. A less ugly-looking solution might be a boolean that can be set per URL (we already have urlmatch-config infrastructure to help us do so) to tell us to pass the empty credential to lubCurl, bypassing the step to ask the user for password that we do not use.

The end-result of either of these solution would strictly be better than the patch we discussed in that the end user will not have to interact with the prompt at all, right?

Previous: brian m. carlsonNext: brian m. carlson
Message 9 of 25 in “remote-curl: don't fall back to Basic auth if we haven't tried Negotiate”
  1. remote-curl: don't fall back to Basic auth if we haven't tried NegotiateDmitry Vilkov, Feb 2, 2016
  2. Junio C HamanoFeb 2, 2016
  3. brian m. carlsonFeb 2, 2016
  4. Dmitry VilkovFeb 5, 2016
  5. Junio C HamanoFeb 5, 2016
  6. brian m. carlsonFeb 5, 2016
  7. Daniel StenbergFeb 6, 2016
  8. brian m. carlsonFeb 5, 2016
  9. Junio C HamanoFeb 5, 2016
  10. brian m. carlsonFeb 5, 2016
  11. Junio C HamanoFeb 5, 2016
  12. Dmitry VilkovFeb 8, 2016
  13. http: add option to try authentication without usernamebrian m. carlson, Feb 15, 2016
  14. Eric SunshineFeb 15, 2016
  15. brian m. carlsonFeb 15, 2016
  16. Jeff KingFeb 15, 2016
  17. brian m. carlsonFeb 15, 2016
  18. Junio C HamanoFeb 15, 2016
  19. brian m. carlsonFeb 15, 2016
  20. Eric SunshineFeb 15, 2016
  21. brian m. carlsonFeb 15, 2016
  22. Dmitry VilkovFeb 20, 2016
  23. brian m. carlsonFeb 20, 2016
  24. Junio C HamanoFeb 20, 2016
  25. Dmitry VilkovFeb 25, 2016

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.