Closed CravateRouge closed 2 years ago
What happens if you don't pass the principal argument?
Here is the use case:
winkerberos.authGSSClientInit("ldap@WIN-IJ5B521UO5L.bloody.local")
LDAPAuthMethodNotSupportedResult - 7 - authMethodNotSupported
because I don't have a ticket for this SPNwinkerberos.authGSSClientInit("ldap/WIN-IJ5B521UO5L@BLOODY.LOCAL")
winkerberos.GSSError: SSPI: InitializeSecurityContext: No credentials are available in the security package
klist
, I still have a ticket as you saw in my previous comment and if I purge and reload the same ticket it works like a charm (using the correct SPN)It's like winkerberos has it's own cache based on the Windows one and once an authentication error is linked to it, it will ignore the ticket even if it's a valid one. Could you enlighten me on this?
WinKerberos doesn't have a ticket cache of its own. It just calls SSPI functions to do its work. It supports both RFC-2078 format for the service param or SPN format. Does ldap@WIN-IJ5B521UO5L.BLOODY.LOCAL work?
No, ldap@WIN-IJ5B521UO5L.BLOODY.LOCAL is not recognized by the KDC, so I can't request a service ticket for it.
But what's bugging me is the weird behavior of needing to reload the service ticket when there was a failed attempt with the wrong SPN.
winkerberos.authGSSClientInit("ldap@WIN-IJ5B521UO5L.bloody.local")
works like a charm since 0.9.0
For now, winkerberos seems to need a TGT to authenticate to a service but a service ticket should be enough. For example when I'm trying to connect to a LDAP AD service:
However, I've the following service ticket available:
Would it be possible to add support for this use case?