From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org,
"Dan Langille (dalangil)" <dalangil@cisco.com>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH] remote-curl: fall back to Basic auth if Negotiate fails.
Date: Sat, 27 Dec 2014 12:56:04 -0500 [thread overview]
Message-ID: <20141227175604.GA23732@peff.net> (raw)
In-Reply-To: <1419652893-477694-1-git-send-email-sandals@crustytoothpaste.net>
On Sat, Dec 27, 2014 at 04:01:33AM +0000, brian m. carlson wrote:
> Apache servers using mod_auth_kerb can be configured to allow the user
> to authenticate either using Negotiate (using the Kerberos ticket) or
> Basic authentication (using the Kerberos password). Often, one will
> want to use Negotiate authentication if it is available, but fall back
> to Basic authentication if the ticket is missing or expired.
>
> Teach the HTTP client code to stop trying authentication mechanisms that
> don't use a password (currently Negotiate) after the first failure,
> since if they failed the first time, they will never succeed.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> I was able to reproduce the problem on my server. This fixes the
> problem for me both when info/refs requires authentication and when it
> does not. Dan, please try and see if this fixes the problem for you.
>
> I'm not clear on whether NTLM is a passwordless authentication method.
> Since I don't use Windows or NTLM, I can't test it, but if it is, just
> adding it to HTTP_AUTH_PASSWORDLESS should be sufficient.
I don't think this should make things any worse for NTLM if it is. It
would just not get the benefit of the feature you are adding, and
somebody with a working setup can test and add it at that time, right?
I'm not familiar enough with Negotiate auth to do give a thorough review
on the logic above. But FWIW, it makes sense to me, and the code looks
correct.
The number of places you needed to add calls to disable_passwordless_auth
is a sign that we might need to factor out our http auth handling better.
Though that is not a problem you are introducing. :)
The credential struct is already a global for all requests. If you made
the "no_passwordless" flag similarly global, it would be enough to set
it in handle_curl_result and respect it in get_curl_handle.
-Peff
next prev parent reply other threads:[~2014-12-27 17:56 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 22:19 git-http-backend auth via Kerberos Dan Langille (dalangil)
2014-12-18 22:54 ` brian m. carlson
2014-12-19 15:07 ` Dan Langille (dalangil)
2014-12-19 15:50 ` Dan Langille (dalangil)
2014-12-19 16:07 ` Dan Langille (dalangil)
2014-12-19 20:16 ` brian m. carlson
2014-12-19 20:57 ` Dan Langille (dalangil)
2014-12-27 4:01 ` [PATCH] remote-curl: fall back to Basic auth if Negotiate fails brian m. carlson
2014-12-27 17:56 ` Jeff King [this message]
2014-12-27 21:09 ` brian m. carlson
2014-12-27 21:29 ` Jeff King
2014-12-28 0:05 ` brian m. carlson
2015-01-01 19:56 ` [PATCH v2] " brian m. carlson
2015-01-03 11:19 ` Jeff King
2015-01-03 17:45 ` brian m. carlson
2015-01-03 20:14 ` Jeff King
2015-01-05 16:02 ` Dan Langille (dalangil)
2015-01-05 21:23 ` Dan Langille (dalangil)
2015-01-05 23:53 ` brian m. carlson
2015-01-06 15:31 ` Dan Langille (dalangil)
2015-01-06 15:41 ` Dan Langille (dalangil)
2015-01-06 16:07 ` Dan Langille (dalangil)
2015-01-08 0:02 ` brian m. carlson
2015-01-08 0:29 ` [PATCH v3] " brian m. carlson
2015-01-20 16:40 ` Dan Langille (dalangil)
2015-01-21 0:22 ` Junio C Hamano
2015-01-22 14:47 ` Dan Langille (dalangil)
2015-02-17 23:05 ` Dan Langille (dalangil)
2015-02-17 23:36 ` Junio C Hamano
2015-02-18 16:17 ` Dan Langille (dalangil)
2015-02-19 20:35 ` brian m. carlson
2015-02-24 21:03 ` Dan Langille (dalangil)
2015-02-25 20:59 ` Dan Langille (dalangil)
2015-03-10 18:05 ` Dan Langille (dalangil)
2015-03-10 22:29 ` brian m. carlson
2015-03-11 19:33 ` Dan Langille (dalangil)
2015-03-11 21:59 ` brian m. carlson
2015-03-12 13:09 ` Dan Langille (dalangil)
2015-01-05 13:12 ` [PATCH] " Dan Langille (dalangil)
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141227175604.GA23732@peff.net \
--to=peff@peff.net \
--cc=dalangil@cisco.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=sandals@crustytoothpaste.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.
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 NNTP newsgroup(s).