RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1490998 - need backport of upstream commit 4dbe6646 for mixed Negotiate/Basic authentication
Summary: need backport of upstream commit 4dbe6646 for mixed Negotiate/Basic authentic...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: git
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Petr Stodulka
QA Contact: Alois Mahdal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-12 17:34 UTC by James Ralston
Modified: 2021-06-10 13:01 UTC (History)
3 users (show)

Fixed In Version: git-1.8.3.1-13.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 11:48:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
untested patch (1.42 KB, patch)
2017-09-13 01:39 UTC, Petr Stodulka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0735 0 None None None 2018-04-10 11:48:23 UTC

Description James Ralston 2017-09-12 17:34:25 UTC
Description of problem:

From upstream commit https://github.com/git/git/commit/4dbe66464b4fd695c5989cc272fa0edd6475037c:

"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.

However, libcurl will try very hard to use something other than Basic auth, even over HTTPS. If Basic and something else are offered, libcurl will never attempt to use Basic, even if the other option fails. 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."

This is biting us, because we are dealing with an application (Atlassian Bitbucket) for which most clients can use Negotiate authentication (via GSSAPI/Kerberos), but a few clients need to fall back to Basic auth. Even though we have set KrbMethodK5Passwd on in the httpd configuration, because httpd offers both Negotiate and Basic auth, without commit 4dbe6646, git fails to fall back to Basic authentication due to the underlying behavior of libcurl.

Commit 4dbe6646 landed in git 2.3.1, so no officially support version of git in RHEL7 has this fix. (The base git is 1.8; the version of git in the RHSC is 1.9.)

Please backport commit 4dbe6646 to RHEL7, by taking one of the following actions (in order of preference):

1. Backport commit 4dbe6646 to the base git package (git-1.8).
2. Rebase the RHSC version of git to at least git 2.3.1.
3. Backport commit 4dbe6646 to the current RHSC version of git (git19).

Version-Release number of selected component (if applicable):

git-1.8.3.1-12.el7_4
git19-1.2-4.el7

Comment 2 James Ralston 2017-09-12 17:59:57 UTC
Cross-filed as support case 01930149.

Comment 4 Petr Stodulka 2017-09-13 01:39:29 UTC
Created attachment 1325122 [details]
untested patch

Just note that git19 from RHSCL is EOL and for rh-git29 has to be created new BZ. This bug is only about git-1.8.3.1.

The attached file contains untested backported patch.

Comment 5 James Ralston 2017-09-13 18:32:50 UTC
We rebuilt local git-1.8.3.1 packages with the patch in comment 4, and can confirm that the patch corrects the issue: the patched version of git properly falls back to Basic auth if both Negotiate and Basic authentication are offered and the first attempt to use Negotiate fails.

Please queue this patch for RHEL 7.5. In the meantime, we'll roll local git packages with the patch, and backport security fixes as necessary.

Thanks!

Comment 6 Petr Stodulka 2017-09-14 10:06:41 UTC
Thanks James for help.

Comment 8 Alois Mahdal 2018-02-22 16:14:09 UTC
We have no reliable reproducer; falling back to SanityOnly.

Suite passed, no issues found in SUT.

Comment 11 errata-xmlrpc 2018-04-10 11:48:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0735


Note You need to log in before you can comment on or make changes to this bug.