jcmturner / gokrb5

Pure Go Kerberos library for clients and services
Apache License 2.0
723 stars 245 forks source link

Handling of "Authorization: Kerberos ..." header #452

Open jonas-koeritz opened 2 years ago

jonas-koeritz commented 2 years ago

I am trying to implement a server that accepts a client connection from a WinRM client application. The request looks like this:

POST /<my route> HTTP/1.1
Connection: Keep-Alive
Content-Type: application/soap+xml;charset=UTF-16
Authorization: Kerberos YIIGgQYJKo....<Base64 truncated/redacted>
User-Agent: Microsoft WinRM Client
Content-Length: 0
Host: <my server>

spnego.SPNEGOKRB5Authenticate() doesn't accept this and answers with a 401 and the WWW-Authenticate: Negotiate header (as expected for SPNEGO). How do I use gokrb5 to authenticate the given request? Do I need to parse the ticket myself and validate it using other functions in this library? A small example would be greatly appreciated.

tooptoop4 commented 1 year ago

did u solve?