Azure / go-ntlmssp

NTLM/Negotiate authentication over HTTP
MIT License
189 stars 70 forks source link

Authenticate using default credentials from SSPI #45

Open sean-r-williams opened 9 months ago

sean-r-williams commented 9 months ago

Hi all,

I'm trying to call an NTLM-authenticated HTTP service in Go. I'm running on a Windows host and the process's default user credentials accessible via SSPI have access to this service.

I see that the usage examples for this package showcase providing explicit credentials (via the SetBasicAuth method) - I'd like to avoid this so that my service (possibly running as a GMSA) does not need to consume credentials from an insecure source or marshal credentials around otherwise.

I see that alexbrainman/sspi provides some methods to call SSPI, but I'm not sure how to chain these two packages together if that's even possible.

Can someone provide some guidance on how to make this work?