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

Issue 2489883007: [net/auth] Discard current handler token generation fails. (Closed)

Created:
4 years, 1 month ago by asanka
Modified:
4 years, 1 month ago
Reviewers:
mmenke
CC:
cbentzel+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[net/auth] Discard current handler token generation fails. Errors that occur during token generation should be considered fatal for that instance of HttpAuthHandler. I.e. the handler should not be used to process any additional authentication challenges and definitely should not be used to generate any tokens. Why? Because, any external state associated with an HttpAuthHandler may not in a consistent or known state. While we would like to write auth handlers that revert to a known safe state after a token generation failure, that is not trivial when dealing with external token sources with unpredictable behavior. Hence we are going to take the safer option of tearing down the HttpAuthHandler following such a failure event. In the case referred to in https://crbug.com/648366, we were leaving the HttpAuthSspiWin in a state where it was expecting a new token, but the credential handle it was in posession of could no longer be used to generate a new token. This resulted in an ERR_INVALID_HANDLE error. Oops. R=mmenke@chromium.org BUG=648366 Committed: https://crrev.com/463ca4262fc277c5e724d02705ba1a61cbc4e849 Cr-Commit-Position: refs/heads/master@{#432359}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 24

Patch Set 3 : . #

Patch Set 4 : Missed a few comments in the last round. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+259 lines, -80 lines) Patch
M net/http/http_auth_controller.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_auth_controller.cc View 1 2 3 4 chunks +8 lines, -5 lines 0 comments Download
M net/http/http_auth_handler_mock.h View 1 2 5 chunks +14 lines, -0 lines 0 comments Download
M net/http/http_auth_handler_mock.cc View 6 chunks +59 lines, -14 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 59 chunks +177 lines, -60 lines 0 comments Download

Messages

Total messages: 33 (18 generated)
asanka
4 years, 1 month ago (2016-11-12 01:46:06 UTC) #2
mmenke
Haven't looked at the mock changes yet. https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc#newcode484 net/http/http_auth_controller.cc:484: // If ...
4 years, 1 month ago (2016-11-14 18:03:50 UTC) #6
mmenke
https://codereview.chromium.org/2489883007/diff/20001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/2489883007/diff/20001/net/http/http_network_transaction_unittest.cc#newcode12224 net/http/http_network_transaction_unittest.cc:12224: &kServerChallenge), On 2016/11/14 18:03:49, mmenke wrote: > I don't ...
4 years, 1 month ago (2016-11-14 18:07:13 UTC) #7
asanka
https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc#newcode484 net/http/http_auth_controller.cc:484: // If the handler does not support any remaining ...
4 years, 1 month ago (2016-11-14 18:49:53 UTC) #9
mmenke
https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc#newcode516 net/http/http_auth_controller.cc:516: void HttpAuthController::OnIOComplete(int result) { On 2016/11/14 18:03:49, mmenke wrote: ...
4 years, 1 month ago (2016-11-14 19:01:21 UTC) #11
asanka
https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2489883007/diff/20001/net/http/http_auth_controller.cc#newcode516 net/http/http_auth_controller.cc:516: void HttpAuthController::OnIOComplete(int result) { On 2016/11/14 at 19:01:21, mmenke ...
4 years, 1 month ago (2016-11-14 21:10:14 UTC) #14
mmenke
LGTM (Sorry didn't get to this one earlier today, forgot about it)
4 years, 1 month ago (2016-11-15 19:02:51 UTC) #15
asanka
On 2016/11/15 at 19:02:51, mmenke wrote: > LGTM (Sorry didn't get to this one earlier ...
4 years, 1 month ago (2016-11-15 20:09:41 UTC) #16
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/2489883007/60001
4 years, 1 month ago (2016-11-15 22:25:28 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/261204)
4 years, 1 month ago (2016-11-15 22:57:51 UTC) #24
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/2489883007/60001
4 years, 1 month ago (2016-11-15 23:19:51 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/261355)
4 years, 1 month ago (2016-11-15 23:40:01 UTC) #28
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/2489883007/60001
4 years, 1 month ago (2016-11-16 02:03:31 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 1 month ago (2016-11-16 02:34:58 UTC) #31
commit-bot: I haz the power
4 years, 1 month ago (2016-11-16 02:39:32 UTC) #33
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/463ca4262fc277c5e724d02705ba1a61cbc4e849
Cr-Commit-Position: refs/heads/master@{#432359}

Powered by Google App Engine
This is Rietveld 408576698