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

Issue 2225223002: Certificate Transparency: Change CTVerifyResult to have a single list (Closed)

Created:
4 years, 4 months ago by Eran Messeri
Modified:
4 years, 4 months ago
Reviewers:
eroman, estark
CC:
Eran Messeri, cbentzel+watch_chromium.org, certificate-transparency-chrome_googlegroups.com, chromium-reviews, Ryan Sleevi
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Certificate Transparency: Change CTVerifyResult to have a single list CTVerifyResult currently has 3 lists of SCTs according to their verification status. As a result, adding a new SCT verification status that doesn't directly map into one of the existing lists loses information. This change switches the CTVerifyResult to have a single 'scts' list that contains SCTs and their statuses, making it easy to extend the SCT verify status enum and generally unifying handling of the SCTs list across the different layers of Chrome. BUG=634006 Committed: https://crrev.com/4bed0b57efe07c94d98836f5ae82fa6557e2b262 Cr-Commit-Position: refs/heads/master@{#411924}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Removed redundant change & other coment #

Total comments: 10

Patch Set 3 : Addressing Eric's comments #

Total comments: 5

Patch Set 4 : NetLog int to string #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -77 lines) Patch
M net/cert/ct_signed_certificate_timestamp_log_param.cc View 1 2 3 3 chunks +10 lines, -14 lines 0 comments Download
M net/cert/ct_verify_result.h View 1 2 3 chunks +10 lines, -7 lines 0 comments Download
M net/cert/ct_verify_result.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download
M net/cert/multi_log_ct_verifier.cc View 4 chunks +13 lines, -17 lines 0 comments Download
M net/cert/multi_log_ct_verifier_unittest.cc View 1 2 3 3 chunks +9 lines, -14 lines 0 comments Download
M net/quic/chromium/crypto/proof_verifier_chromium.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M net/quic/chromium/crypto/proof_verifier_chromium_test.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_impl.cc View 2 chunks +7 lines, -3 lines 0 comments Download
M net/ssl/ssl_info.cc View 1 2 1 chunk +3 lines, -12 lines 0 comments Download
M net/test/ct_test_util.cc View 1 2 3 1 chunk +9 lines, -5 lines 0 comments Download

Messages

Total messages: 32 (20 generated)
Eran Messeri
Eric, Emily, This is another step on the way to extending the ct::SCTVerifyStatus enum. There ...
4 years, 4 months ago (2016-08-08 23:07:08 UTC) #4
estark
https://codereview.chromium.org/2225223002/diff/1/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc File chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc (right): https://codereview.chromium.org/2225223002/diff/1/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc#newcode195 chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc:195: std::unique_ptr<base::ListValue> sct_list; Hrmm, not sure I understand this change, ...
4 years, 4 months ago (2016-08-09 02:43:22 UTC) #7
Eran Messeri
https://codereview.chromium.org/2225223002/diff/1/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc File chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc (right): https://codereview.chromium.org/2225223002/diff/1/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc#newcode195 chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc:195: std::unique_ptr<base::ListValue> sct_list; On 2016/08/09 at 02:43:22, estark wrote: > ...
4 years, 4 months ago (2016-08-09 08:14:21 UTC) #10
estark
non-owners LGTM https://codereview.chromium.org/2225223002/diff/20001/net/cert/ct_signed_certificate_timestamp_log_param.cc File net/cert/ct_signed_certificate_timestamp_log_param.cc (right): https://codereview.chromium.org/2225223002/diff/20001/net/cert/ct_signed_certificate_timestamp_log_param.cc#newcode63 net/cert/ct_signed_certificate_timestamp_log_param.cc:63: // list is a dictionary created by ...
4 years, 4 months ago (2016-08-09 20:02:04 UTC) #13
eroman
https://codereview.chromium.org/2225223002/diff/20001/net/cert/ct_signed_certificate_timestamp_log_param.cc File net/cert/ct_signed_certificate_timestamp_log_param.cc (right): https://codereview.chromium.org/2225223002/diff/20001/net/cert/ct_signed_certificate_timestamp_log_param.cc#newcode83 net/cert/ct_signed_certificate_timestamp_log_param.cc:83: SCTListToPrintableValues(ct_result->scts, ct::SCT_STATUS_OK)); Is there a need to preserve the ...
4 years, 4 months ago (2016-08-10 19:00:40 UTC) #14
Eran Messeri
Addressed Eric's and Emily's comments, PTAL. Thanks for the thorough review. https://codereview.chromium.org/2225223002/diff/20001/net/cert/ct_signed_certificate_timestamp_log_param.cc File net/cert/ct_signed_certificate_timestamp_log_param.cc (right): ...
4 years, 4 months ago (2016-08-10 22:05:07 UTC) #16
eroman
lgtm https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_certificate_timestamp_log_param.cc File net/cert/ct_signed_certificate_timestamp_log_param.cc (right): https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_certificate_timestamp_log_param.cc#newcode45 net/cert/ct_signed_certificate_timestamp_log_param.cc:45: out->SetInteger("verification_status", status); [optional] Unless the integer code is ...
4 years, 4 months ago (2016-08-11 22:55:50 UTC) #20
Eran Messeri
https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_certificate_timestamp_log_param.cc File net/cert/ct_signed_certificate_timestamp_log_param.cc (right): https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_certificate_timestamp_log_param.cc#newcode45 net/cert/ct_signed_certificate_timestamp_log_param.cc:45: out->SetInteger("verification_status", status); On 2016/08/11 at 22:55:50, eroman wrote: > ...
4 years, 4 months ago (2016-08-13 21:53:26 UTC) #22
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/2225223002/60001
4 years, 4 months ago (2016-08-14 20:57:37 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-14 21:00:57 UTC) #29
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/4bed0b57efe07c94d98836f5ae82fa6557e2b262 Cr-Commit-Position: refs/heads/master@{#411924}
4 years, 4 months ago (2016-08-14 21:02:24 UTC) #31
eroman
4 years, 4 months ago (2016-08-15 17:48:07 UTC) #32
Message was sent while issue was closed.
https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_cert...
File net/cert/ct_signed_certificate_timestamp_log_param.cc (right):

https://codereview.chromium.org/2225223002/diff/40001/net/cert/ct_signed_cert...
net/cert/ct_signed_certificate_timestamp_log_param.cc:45:
out->SetInteger("verification_status", status);
On 2016/08/13 21:53:26, Eran Messeri wrote:
> On 2016/08/11 at 22:55:50, eroman wrote:
> > [optional] Unless the integer code is going to be stable, I suggest turning
it
> into a string here (easier to then read the NetLog). There are other options
> like doing the reverse mapping on the NetLog viewer UI that can be explored,
but
> unless the data size is going to be a problem I suggest just saving a string.
> 
> The integer could should be stable as the same enum (SCTVerifyStatus) is used
> for UMA and its documentation explicitly states that the values should remain
> stable.
> 
> I've simply turned this into a string as you suggested, though,  as there's
> already a handy function to do this
> (https://cs.chromium.org/chromium/src/net/cert/ct_sct_to_string.h?l=33).
> 
> As a side note, are there memory constraints around NetLog logging? the reason
I
> stuck with an integer is the lower memory consumption. Is that a concern when
> logging to NetLog?

<background>....

Memory is always a concern. In the case of NetLog these are serialized to disk
so the important metric is filesize, not so much the amount of RAM (which is
short lived).

That said, there is also a tension with ease-of-use and revisioning. So unless
the status code is going to appear frequently, I discourage against it.

The NetLog format aims to be self-describing (by virtue of being JSON), and
independent of C++ side changes. This makes it easy on the C++ developers as I
don't want them to have to worry about refactoring changes breaking NetLogs
(case in point this CL).

Yet at the same time there is enough information in the log format for it to be
useful when consuming. String statuses are self-describing to the viewer so no
special visualization needs to be added for those events in the NetLog viewer
application.

There are some frequently used enums like load status and net error codes which
are encoded in the logs as integers, however the log file itself also carries
the mapping back to their symbolic name (i.e. like a symbol table) so this
really just serves as a dumb form of compression (effectively their string value
is still encoded in the log).

At some point in the future I hope to make NetLog's use a compressed file
format, so the duplication of string status wasting disk space will be less of a
concern.

Powered by Google App Engine
This is Rietveld 408576698