Skip to content

Conversation

@brassh
Copy link

@brassh brassh commented Oct 26, 2020

issue #257

add CURLAUTH_NEGOTIATE to enable proxy authentication via negotiate method
@bzeller
Copy link
Contributor

bzeller commented Oct 27, 2020

Thanks for contributing but before merging this we will first need to make sure that we do not get failed requests in case that the server responds that negotiate is available but there are actually no credentials set by the user.

The curl documentation says:
If more than one bit is set, libcurl will first query the site to see what authentication methods it supports and then pick the best one you allow it to use

Picking the auth is implemented here: https://github.com/curl/curl/blob/master/lib/http.c#L374 , which means if we signal that we want to use negotiate and the server supports it as well it would always be the first choice.

I did not yet find code that would amend the list of auth methods we enable by checking if there are actually credentials available

@brassh
Copy link
Author

brassh commented Oct 28, 2020

I see your point. This might break existing setups which rely on password based authentication.
A solution may be to activate negotiate only in case no password is given, see updated pull request.
In this case, the user can decide whether he wants password authentication (by providing proxyuser and password, as before) or password-less authentication (by providing only proxyuser, but no password in config or .curlrc)

@brassh
Copy link
Author

brassh commented Nov 12, 2020

any comments?

@brassh brassh changed the title proxy authentication: enable negotiate as additional authentication method proxy authentication: enable negotiate as additional authentication method, resolves #257 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants