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

Issue 8364023: Report second-level domains for UMA on pin failure. (Closed)

Created:
9 years, 2 months ago by palmer
Modified:
9 years, 1 month ago
Reviewers:
agl, cevans, wtc, Chris Evans
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Report second-level domains for UMA on pin failure. Fix some minor "gcl lint" results in these files while I'm at it. Implementation notes: 1. ScanForHostAndCerts tried to do too much: both search the list for an HSTS preload and also set one limited criterion (check on required_hashes). It also returned too little, limiting its usefulness. Replaced it with GetHSTSPreload which just implements the "return a match; prefer exact match" semantics and returns the HSTSPreload entry. The caller can then apply their arbitrary decision criterion (as in IsGooglePinnedProperty) or use any field from the entry (as in ReportUMAPinFailure). This makes its interface and implementation simpler, and makes it more useful to more callers. 2. The IsGooglePinnedProperty unit test still passes, in light of (1). 3. I needed to get from a full hostname to an enum value that I can send in an UMA_HISTOGRAM_ENUMERATION. Baking the enums into struct HSTSPreload was the most straightforward and least-bloated way of doing that. BUG=99782 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107993

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 12

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 12

Patch Set 5 : '' #

Total comments: 17

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+252 lines, -134 lines) Patch
M net/base/transport_security_state.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M net/base/transport_security_state.cc View 1 2 3 4 5 6 4 chunks +236 lines, -126 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 3 chunks +11 lines, -8 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
wtc
Review comments on Patch Set 2: I believe all the issues I found are style ...
9 years, 2 months ago (2011-10-25 00:49:57 UTC) #1
agl
http://codereview.chromium.org/8364023/diff/5001/net/base/transport_security_state.cc File net/base/transport_security_state.cc (right): http://codereview.chromium.org/8364023/diff/5001/net/base/transport_security_state.cc#newcode813 net/base/transport_security_state.cc:813: typedef enum { This typeful is significantly larger than ...
9 years, 2 months ago (2011-10-25 15:00:00 UTC) #2
palmer
> http://codereview.chromium.org/8364023/diff/5001/net/base/transport_security_state.cc#newcode41 > net/base/transport_security_state.cc:41: static const char kPinFailure[] = > "SSL.PinFailure"; > > Same here: ...
9 years, 2 months ago (2011-10-25 21:41:04 UTC) #3
palmer
> http://codereview.chromium.org/8364023/diff/5001/net/base/transport_security_state.cc#newcode813 > net/base/transport_security_state.cc:813: typedef enum { > This typeful is significantly larger than the ...
9 years, 2 months ago (2011-10-25 21:43:57 UTC) #4
agl
On Tue, Oct 25, 2011 at 5:43 PM, <palmer@chromium.org> wrote: > I'm not sure what ...
9 years, 2 months ago (2011-10-25 21:45:39 UTC) #5
palmer
> They may be HSTS hosts, but we don't have certificate pins for most of ...
9 years, 2 months ago (2011-10-25 21:57:17 UTC) #6
agl
On Tue, Oct 25, 2011 at 5:57 PM, <palmer@chromium.org> wrote: > So what are the ...
9 years, 2 months ago (2011-10-25 21:59:21 UTC) #7
palmer
> I think it's pretty clear that we wouldn't accept pins from most of > ...
9 years, 2 months ago (2011-10-26 00:37:28 UTC) #8
Chris Evans
http://codereview.chromium.org/8364023/diff/11006/net/base/transport_security_state.cc File net/base/transport_security_state.cc (right): http://codereview.chromium.org/8364023/diff/11006/net/base/transport_security_state.cc#newcode254 net/base/transport_security_state.cc:254: DCHECK_EQ(tokenizer.token().length(), 1U); Style nit: the expectation usually comes first ...
9 years, 1 month ago (2011-10-26 22:49:46 UTC) #9
palmer
http://codereview.chromium.org/8364023/diff/11006/net/base/transport_security_state.cc File net/base/transport_security_state.cc (right): http://codereview.chromium.org/8364023/diff/11006/net/base/transport_security_state.cc#newcode817 net/base/transport_security_state.cc:817: // domains at the END of the listing. On ...
9 years, 1 month ago (2011-10-27 01:15:45 UTC) #10
palmer
> Ok, I updated histograms.xml and am creating a CL for it. I get a ...
9 years, 1 month ago (2011-10-27 01:29:17 UTC) #11
cevans
On Wed, Oct 26, 2011 at 6:15 PM, <palmer@chromium.org> wrote: > > http://codereview.chromium.**org/8364023/diff/11006/net/** > base/transport_security_state.**cc<http://codereview.chromium.org/8364023/diff/11006/net/base/transport_security_state.cc> ...
9 years, 1 month ago (2011-10-27 04:51:04 UTC) #12
palmer
> > cevans and other reviewers: Should I generate another CL to > > de-sni_available-ize ...
9 years, 1 month ago (2011-10-27 18:55:19 UTC) #13
wtc
Review comments on Patch Set 5. The most important comment is the very last one, ...
9 years, 1 month ago (2011-10-27 22:21:41 UTC) #14
palmer
http://codereview.chromium.org/8364023/diff/14002/net/base/transport_security_state.cc File net/base/transport_security_state.cc (right): http://codereview.chromium.org/8364023/diff/14002/net/base/transport_security_state.cc#newcode816 net/base/transport_security_state.cc:816: enum LowResolutionDomainName { On 2011/10/27 22:21:42, wtc wrote: > ...
9 years, 1 month ago (2011-10-28 00:24:39 UTC) #15
palmer
LGTY? I hate to nag but I want to do additional work on transport_security_state* (de-sni_available-izing, ...
9 years, 1 month ago (2011-10-28 19:38:40 UTC) #16
wtc
Patch Set 6 LGTM. I suggest two changes related to histograms before you commit this ...
9 years, 1 month ago (2011-10-28 23:36:10 UTC) #17
palmer
9 years, 1 month ago (2011-10-28 23:57:00 UTC) #18
> net/url_request/url_request_http_job.cc:695:
> UMA_HISTOGRAM_BOOLEAN("Net.CertificatePinSuccess", true);
> 
> Argh, I'm sorry that I didn't see this line here.
> My previous suggestion doesn't make sense.  Please
> move the
>   UMA_HISTOGRAM_BOOLEAN("Net.CertificatePinSuccess", false);
> call back to this file.  It's bad to have them spread in two
> files.

Done.

> Are you sure you want to rename an existing histogram?
> I can live with "CertificatePin" even though it is not
> 100% accurate.

On jar's advice, I Put "CertificatePin" back in but marked it
<obsolete>...</obsolete>. So now both names for the signal are in, with the
obsolete one marked. I think that's best.

Powered by Google App Engine
This is Rietveld 408576698