Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support of kerberos.GSS_MECH_OID_SPNEGO #15
Hello Bernie (@behackett),
This change allows implemention of Spnego/Negotiate authentication in requests_kerberos (and potentially in urllib_kerberos after switching to winkerberos):
If you are fine with the change and merge it, I am going to add HttpSpnegoAuth to requests_kerberos and urllib_kerberos (migrating it to winkerberos).
Though it's not strictly necessary, maybe we should use PyCObject / PyCapsule for the OIDs, rather than strings, to match the API of PyKerberos?
apple pykerberos compatiblity
generic pykerberos compatibillity
Jan 19, 2017
@behackett - I have changed the code to use capsules.
Good catch about 02strich/pykerberos vs apple/ccs-pykerberos
Meanwhile, could you take a look at my attempt to integrate this into requests-kerberos:
Looks pretty good so far. The only issue is that we have to support Python versions that don't provide PyCapsule. I've added comments explaining what to do instead.
@behackett - Hi. I will update the code as you suggested. I adapted PyCapsule implementation used in Apple's code, and I did the same while merging Apple's fix into 02strich/pykerberos (02strich/pykerberos#25). I literally copied it. Could you take a look at that pull request and suggest whether it makes sense to use similar macroses there?
referenced this pull request
Jan 23, 2017
Great work. I'll do some testing and merge this soon.
The issue with PyCapsule is that Python 2.6 doesn't provide it. PyKerberos currently works on 2.6, and provides aliases similar to WinKerberos. It appears that Apple's project broke support for Python 2.6.
Note that requests (and therefore requests-kerberos) claims to support Python 2.6.
ok. It turned out that PyKerberos automatically runs tests for pull requests. Mine passed https://travis-ci.org/02strich/pykerberos/builds/193902068 (including Python 2.6 build). By the way, I have not got any response for 02strich/pykerberos#25 . Maybe 02strich is out. Do you know who else can review it?
Looking at the Travis test output I'm not sure what it actually tests. Python 2.6 definitely doesn't provide PyCapsule. PyKerberos provides PyNew, PyCheck, and PyGet aliases for this purpose: