Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy authentication: enable negotiate as additional authentication method, resolves #257 #258

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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