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

Issue 4568002: Remember if a user declines to provide a server with a client certificate (Closed)

Created:
10 years, 1 month ago by Ryan Sleevi
Modified:
9 years, 7 months ago
Reviewers:
wtc, agl, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Remember if a user declines to provide a server with a client certificate When an SSL/TLS server requests a client certificate, the user may opt to not send any certificate. This will work if the server does not require a client certificate to be sent in order to load the resource - for example, to fall-back to forms-based authentication or when client certificates are configured as optional. If the user declines to provide a client certificate, remember that choice in the SSLClientAuthCache so that they will not be repeatedly prompted to select a certificate (declining each time) for every sub-resource that loads, similar to how the SSLClientAuthCache remembers an explicit certificate selected by a user. If the server requires a client certificate, it is expected that it will abort the TLS handshake with an appropriate TLS error code. When the server aborts and the error code is processed, the existing cached selection will be removed, and the user will be re-prompted to select a certificate on their next connection to that server. If the server requires a client certificate to continue, but does not use the TLS stack to indicate that requirement - for example, to return a "friendlier" error page or an HTTP error code like 403, the selection will not be evicted from the cache, and the user must restart the browser before they will be prompted again for a certificate from that server. This is the same lifetime and behaviour as would happen if the user actively selected a certificate, rather than declined to provide one. BUG=56177 TEST=SSLClientAuthCacheTest.LookupNullPreference . Also see the Apache configuration in http://crbug.com/56177. Access a site that requests, but does not require, client authentication, which will attempt to load multiple sub-resources, and which does not permit HTTP KeepAlives. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66931

Patch Set 1 #

Patch Set 2 : Forgot about unittests #

Total comments: 6

Patch Set 3 : wtc feedback #

Patch Set 4 : Rebase to trunk #

Patch Set 5 : Fix unittest failures #

Total comments: 1

Patch Set 6 : Rebase and wtc feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -44 lines) Patch
M net/base/ssl_client_auth_cache.h View 1 2 2 chunks +12 lines, -6 lines 0 comments Download
M net/base/ssl_client_auth_cache.cc View 1 2 1 chunk +13 lines, -2 lines 0 comments Download
M net/base/ssl_client_auth_cache_unittest.cc View 2 3 4 5 3 chunks +74 lines, -15 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 3 chunks +32 lines, -21 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Ryan Sleevi
Could you please take a look at this, and let me know if you agree ...
10 years, 1 month ago (2010-11-06 00:20:45 UTC) #1
Ryan Sleevi
Also, if this is an acceptable approach, can you let me know whether or not ...
10 years, 1 month ago (2010-11-06 00:28:31 UTC) #2
Ryan Hamilton
This approach seems reasonable to me, and it looks like you got the logic right. ...
10 years, 1 month ago (2010-11-09 16:36:42 UTC) #3
agl
LGTM. (Sorry for not replying sooner. I hadn't starred the email. You should ping me ...
10 years, 1 month ago (2010-11-09 17:04:06 UTC) #4
Ryan Sleevi
wtc: Ping?
10 years, 1 month ago (2010-11-12 05:50:25 UTC) #5
wtc
rsleevi: I missed this CL, too. I will review it tomorrow.
10 years, 1 month ago (2010-11-17 01:59:24 UTC) #6
wtc
rsleevi: this looks good. I suggest that you force the caller to store the returned ...
10 years, 1 month ago (2010-11-18 01:33:07 UTC) #7
wtc
rsleevi: just to clarify: if you agree to make the scoped_refptr change that I suggested, ...
10 years, 1 month ago (2010-11-18 01:35:04 UTC) #8
Ryan Sleevi
wtc: Thanks for the feedback. Patchset 3 contains the fixes for the issues you brought ...
10 years, 1 month ago (2010-11-18 06:32:52 UTC) #9
wtc
LGTM. Thanks. http://codereview.chromium.org/4568002/diff/11002/net/base/ssl_client_auth_cache_unittest.cc File net/base/ssl_client_auth_cache_unittest.cc (right): http://codereview.chromium.org/4568002/diff/11002/net/base/ssl_client_auth_cache_unittest.cc#newcode62 net/base/ssl_client_auth_cache_unittest.cc:62: EXPECT_FALSE(cache.Lookup(server1, &cached_cert)); Nit: for consistency, may want ...
10 years, 1 month ago (2010-11-18 18:55:54 UTC) #10
Ryan Hamilton
10 years, 1 month ago (2010-11-18 19:02:28 UTC) #11
LGTM.  It'd be great if we could add a test, but if it's not trivial,
let's not get into a yak shaving party...

On Wed, Nov 17, 2010 at 10:32 PM, <rsleevi@chromium.org> wrote:
>
> wtc: Thanks for the feedback. Patchset 3 contains the fixes for the issues you
> brought up. I don't have strong feelings for or against scoped_refptr<>, so I
> went ahead and implemented it as you requested. Please take another look.
>
> agl, rch: The lack of unit tests for client auth in the HttpNetworkTransaction
> is unfortunately a known issue at the moment. The general problem is on my
> radar, and davidben has a TODO in that file for it. I took a look through the
> classes, to see what it would take, and I think it'd be best served by a
> separate CL for the tests, as it'd be non-trivial. Is the lack of test
coverage
> for this change, which is no worse than our existing lack of test coverage, a
> blocker?
>
> http://codereview.chromium.org/4568002/

Powered by Google App Engine
This is Rietveld 408576698