brandond / requests-negotiate-sspi

Windows SSPI-based Negotiate authentication support for Requests.
Apache License 2.0
131 stars 24 forks source link

The token supplied to the function is invalid #31

Open jg-son opened 2 years ago

jg-son commented 2 years ago

Hi,

I'm getting this error pywintypes.error: (-2146893048, 'InitializeSecurityContext', 'The token supplied to the function is invalid') The server is an apache httpd with mod_auth_kerb running on Ubuntu 20.04 and with a keytab from our AD. It's on the secondary authentication it fails, when validating WWW-Authenticate.

It's strange because the same web server works with curl+sspi and also with any web browser. I have also tried the same keytab with a Flask-GSSAPI server and then requests-negotiate-sspi succeeds.

Any advice is much appreciated Best Regards

michael-o commented 2 years ago

mod_auth_kerb is dead, dude. Move on. Use mod_gssapi, this perfectly works with this library.