Bug 1354334

Summary: authGSSClientInit no longer accepts None for principal
Product: [Fedora] Fedora Reporter: Dan Callaghan <dcallagh>
Component: python-kerberosAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: abokovoy, rcritten
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-kerberos-1.2.4-2.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-15 13:22:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1333786    

Description Dan Callaghan 2016-07-11 07:02:29 UTC
Description of problem:
In previous releases the kerberos.authGSSClientInit() function would accept None for the principal argument, meaning use the default found in the credentials cache. This regressed as part of recent upstream refactoring:

https://www.calendarserver.org/ticket/942

Version-Release number of selected component (if applicable):
python2-kerberos-1.2.4-1.fc24.x86_64

How reproducible:
easily

Steps to Reproduce:
>>> import kerberos
>>> kerberos.authGSSClientInit('HTTP/beaker-devel.app.eng.bos.redhat.com', principal=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: argument 2 must be string, not None
>>> kerberos.authGSSClientInit('SERVICE/host@REALM', principal=None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: argument 2 must be string, not None

Actual results:
doesn't accept None

Expected results:
accepts None

Additional info:
This affects python-requests-kerberos:
https://github.com/requests/requests-kerberos/issues/76
where upstream has switched to the PyKerberos fork of the original module. That fork was better maintained (up until Apple came back to the table on the original CalendarServer version of the module) and is now slowly diverging. This is one example of the divergence.

Comment 1 Dan Callaghan 2016-07-11 07:04:36 UTC
Please consider applying the patch I posted in the upstream issue:
https://www.calendarserver.org/attachment/ticket/942/942.patch

It seems to be quite trivial and not likely to break, and it will let me upgrade python-requests-kerberos which is currently stuck due to this issue.

Comment 2 Fedora Update System 2016-07-11 15:59:18 UTC
python-kerberos-1.2.4-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-220096fb67

Comment 3 Fedora Update System 2016-07-12 03:57:48 UTC
python-kerberos-1.2.4-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-220096fb67

Comment 4 Fedora Update System 2016-07-15 13:22:10 UTC
python-kerberos-1.2.4-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.