pythongssapi / requests-gssapi

An authentication handler for using GSSAPI with Python Requests. Drop-in replacement for old requests-kerberos.
Other
32 stars 21 forks source link

Add support for specifing an explicit GSSAPI mech #19

Closed optiz0r closed 4 years ago

optiz0r commented 5 years ago

Add support for passing an explicit mech through to gssapi's SecurityContext constructor. This allows overriding the auto-detected mechanism, and enabling support for RFC4178 SPNEGO.

Fixes #18

PeteW commented 5 years ago

Looking forward to seeing this support added as we are coming from the same common need.

cap1tan commented 5 years ago

Have been scratching my head wondering why authentication was failing but this solved my issue! Thank you!

simo5 commented 5 years ago

@frozencemetery this sounds reasonable to me

frozencemetery commented 4 years ago

@simo5 Have you changed your mind from your comment on https://github.com/pythongssapi/requests-gssapi/issues/18#issuecomment-515686935 then?

optiz0r commented 4 years ago

Even if the go library is poor, this pull request is just to add some more flexibility into the requests-gssapi library that might be useful for other purposes and can be ignored in most cases where not needed. It would be useful to have this merged/released anyway.

simo5 commented 4 years ago

@simo5 Have you changed your mind from your comment on #18 (comment) then?

Btw, no I have not changed idea, but allowing to specify a mechanism is not endorsing another library, and has other uses, including testing that it can apply to, so I think this request is worth considering. But you are the ultimate arbiter here.

optiz0r commented 4 years ago

I was doing some more work on this yesterday, and found a viable workaround which does not require this PR being merged, so I'll leave it up to you whether you want to merge or abandon. I'll post details on #18.

frozencemetery commented 4 years ago

Alright. I'd misinterpreted your comment as an objection to this functionality.

I have no objection either. @optiz0r would you mind fixing the code to pass CI? Looks like flake errors.

kamikaze commented 4 years ago

please

frozencemetery commented 4 years ago

Thanks for updating. Github doesn't notify me when you do that (though I think that might have finally changed). Working on this now.

frozencemetery commented 4 years ago

Pushed to master as c9e429c50d990051519114c5455d1eb13260b4bc