Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Issue 2688173002: Don't rely on SSL cipher fallback in proxy auth. (Closed)

Created:
3 years, 10 months ago by davidben
Modified:
3 years, 8 months ago
Reviewers:
asanka
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't rely on SSL cipher fallback in proxy auth. When doing HTTP proxy auth, we may need to continue or retry auth on a fresh connection. This may happen if the server did not allow keep-alive or if the server timed out while we were prompting the user. In response to this, we may choose to continue the existing HttpAuthHandler state on a new connection (which would require the server not bind auth state to the connection) or to restart it (if the server did do so). The existing logic in HttpProxyClientSocketWrapper distinguished these cases with the ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH error code; if we had not send anything out of the HttpAuthController yet, we assume that it's okay to continue without a reset. (We can't simply reset it every time because a server which does not support connection reuse at all would never make progress.) If we had extracted a token from the HttpAuthController and hit an error reading the response, HttpProxyClientSocketWrapper would forward the error up to be retried at a higher level. However, there was no higher level logic to retry it. The usual socket reuse race condition retry acts on a different set of signals. Instead, we were relying on the SSL cipher fallback (which triggers on a similar set of errors) to restart everything from the top. Instead, if we see an error code indicative of such a race, retry at the HttpProxyClientSocketWrapper level, after telling the HttpAuthController to drop all state from the current HttpAuthHandler. This unblocks removing the now otherwise unused SSL cipher fallback. BUG=684730 Review-Url: https://codereview.chromium.org/2688173002 Cr-Commit-Position: refs/heads/master@{#465009} Committed: https://chromium.googlesource.com/chromium/src/+/8c7089a4184074fb5edcc9865906147e185f0514

Patch Set 1 #

Total comments: 3

Patch Set 2 : rebase #

Patch Set 3 : unnecessary virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -7 lines) Patch
M net/http/http_auth_controller.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M net/http/http_auth_controller.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M net/http/http_proxy_client_socket.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M net/http/http_proxy_client_socket_wrapper.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M net/http/http_proxy_client_socket_wrapper.cc View 1 2 chunks +26 lines, -5 lines 0 comments Download

Messages

Total messages: 16 (10 generated)
davidben
RFC for whether this is the correct approach or not.
3 years, 10 months ago (2017-02-10 17:36:38 UTC) #3
asanka
https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc File net/http/http_proxy_client_socket_wrapper.cc (right): https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc#newcode596 net/http/http_proxy_client_socket_wrapper.cc:596: http_auth_controller_->OnConnectionClosed(); The one case I can think of where ...
3 years, 9 months ago (2017-03-02 22:38:52 UTC) #7
davidben
https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc File net/http/http_proxy_client_socket_wrapper.cc (right): https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc#newcode596 net/http/http_proxy_client_socket_wrapper.cc:596: http_auth_controller_->OnConnectionClosed(); On 2017/03/02 22:38:52, asanka wrote: > The one ...
3 years, 8 months ago (2017-04-07 18:11:46 UTC) #8
asanka
LGTM. Apologies for the unreasonably long delay. https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc File net/http/http_proxy_client_socket_wrapper.cc (right): https://codereview.chromium.org/2688173002/diff/1/net/http/http_proxy_client_socket_wrapper.cc#newcode596 net/http/http_proxy_client_socket_wrapper.cc:596: http_auth_controller_->OnConnectionClosed(); On ...
3 years, 8 months ago (2017-04-12 23:02:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2688173002/40001
3 years, 8 months ago (2017-04-17 19:29:36 UTC) #12
commit-bot: I haz the power
3 years, 8 months ago (2017-04-17 20:39:40 UTC) #16
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/8c7089a4184074fb5edcc9865906...

Powered by Google App Engine
This is Rietveld 408576698