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 1787630 - mod_auth_gssapi doesn't work when Negotiate, GssapiLocalName, and gssproxy are used
Summary: mod_auth_gssapi doesn't work when Negotiate, GssapiLocalName, and gssproxy ar...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: mod_auth_gssapi
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Trivino
QA Contact: Filip Dvorak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-03 18:01 UTC by Joseph C. Sible
Modified: 2022-11-08 10:21 UTC (History)
11 users (show)

Fixed In Version: mod_auth_gssapi-1.6.1-8.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:34:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-6902 0 None None None 2021-09-23 11:26:32 UTC
Red Hat Product Errata RHBA-2022:7534 0 None None None 2022-11-08 09:34:37 UTC

Description Joseph C. Sible 2020-01-03 18:01:51 UTC
Description of problem:
When using mod_auth_gssapi with Negotiate, GssapiLocalName and gssproxy, authentication fails.

Version-Release number of selected component (if applicable):
mod_auth_gssapi 1.6.1-6.el8
gssproxy 0.8.0-14.el8

How reproducible:
always

Steps to Reproduce:

1. Set up gssproxy, with configuration like this:

[service/HTTP]
  mechs = krb5
  cred_store = keytab:/etc/krb5.keytab
  cred_store = ccache:/var/lib/gssproxy/clients/krb5cc_%U
  euid = 48
  krb5_principal = HTTP

2. Set up httpd and mod_auth_gssapi, with configuration like this:

        AuthType GSSAPI
        AuthName "Login"
        GssapiCredStore keytab:/etc/krb5.keytab
        GssapiLocalName On
        GssapiBasicAuth On
        Require valid-user

3. Create /etc/systemd/system/httpd.service with this content:

.include /usr/lib/systemd/system/httpd.service
[Service]
Environment=GSS_USE_PROXY=1

4. Try to connect with a browser with Negotiate authentication

Actual results:
I get a 401 error, and a message like this appears in error_log:
[Fri Jan 03 12:35:22.497355 2020] [auth_gssapi:error] [pid xxx:xxx] [client xxx:xxx] GSS ERROR gss_localname() failed: [A required input parameter could not be read (Unknown error)]

Expected results:
I expect authentication to succeed.

Additional info:
This problem only occurs because all of gssproxy, GssapiLocalName, and Negotiate authentication are in use. If I do any one of the following, then it will work:

1. Unset GSS_USE_PROXY, and give Apache permission to read the keytab directly
2. Set "GssapiLocalName Off"
3. Connect with HTTP Basic authentication

Also, it's unrelated to SELinux, as it happens even with it in permissive mode.

Comment 1 Kodiak Firesmith 2020-01-03 20:28:40 UTC
Created Red Hat paid support request linking to this BZ.  https://access.redhat.com/support/cases/#/case/02552561

Comment 4 Simo Sorce 2020-04-24 18:58:51 UTC
Issue has been reproduced and fix is here:
https://github.com/gssapi/mod_auth_gssapi/pull/215

Comment 5 Joseph C. Sible 2020-04-28 16:08:04 UTC
To test that fix myself, I got our SRPM and added the patch to it. Two oddities I noticed in the process:

1. mod_auth_gssapi has a build dependency on gssntlmssp-devel, which seems to be missing from the RHEL 8 repos. I worked around that by building gssntlmssp from source, which produced the -devel package.
2. The patch said it was fixing a regression from 9c555e2, but the changes from that commit weren't in the current version of the RHEL RPM. (And in fact, I needed to take the 9c555e2 patch first, or this new patch wouldn't apply.)

Unfortunately, it didn't work for me. With the new mod_auth_gssapi RPM I built, I still have the same problem.

Comment 6 Joseph C. Sible 2020-04-28 16:19:12 UTC
I also thought the issue might be with something else that was fixed upstream, so I tried 1.6.2 straight from upstream without involving an RPM at all, but it also still has the problem on my system.

Comment 7 Simo Sorce 2020-04-28 22:26:20 UTC
Sounds like I misdiagnosed the problem, sorry.
Is GSS-proxy always integral to the problem?

Have you tried GssapiLocalName On but gssproxy off
and
gssproxy enabled but GssapiLocalName Off

do any of these combinations work?

Comment 8 Joseph C. Sible 2020-04-29 03:45:31 UTC
Both of those combinations worked fine when I tested them.

Comment 32 errata-xmlrpc 2022-11-08 09:34:34 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 (mod_auth_gssapi bug fix and enhancement update), 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-2022:7534


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