gokrb5 icon indicating copy to clipboard operation
gokrb5 copied to clipboard

spnego: Support proxy authentication

Open andybalholm opened this issue 4 years ago • 3 comments

I'd like to add support for HTTP proxy authentication. I think the changes would basically be limited to header names and status codes:

Authorization -> Proxy-Authorization WWW-Authenticate -> Proxy-Authenticate http.StatusUnauthorized -> http.StatusProxyAuthRequired

The biggest question is where to put the switch between the two modes. I would suggest a new function, perhaps SPNEGOKRB5ProxyAuthenticate. Then that function and SPNEGOKRB5Authenticate would both call an unexported function with an extra parameter which would switch between regular HTTP authentication and proxy authentication.

What do you think?

andybalholm avatar Jul 11 '20 21:07 andybalholm

I needed similar flexibility for other features and suggested PR #391. I think your use case could technically be integrated in that approach too. However be aware that it is currently pending review.

nrolans avatar Jul 25 '20 14:07 nrolans

Hi! Please take a look at this PR: https://github.com/jcmturner/gokrb5/pull/535

sandy2008 avatar Dec 18 '23 08:12 sandy2008

I'm glad to see it's being added, but we already found another solution to our problem, so I can't really test it at this point.

andybalholm avatar Dec 18 '23 17:12 andybalholm