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

Issue 2066553002: Certificate Transparency DNS log client (Closed)

Created:
4 years, 6 months ago by Rob Percival
Modified:
4 years, 5 months ago
CC:
chromium-reviews, certificate-transparency-chrome_googlegroups.com, sdefresne+watchlist_chromium.org, Eran Messeri, droger+watchlist_chromium.org, blundell+watchlist_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mock_dns_responses
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Certificate Transparency DNS log client This can query CT logs over DNS, as defined by: https://github.com/google/certificate-transparency-rfcs/blob/master/dns/draft-ct-over-dns.md This is required for obtaining audit proofs, which will allow Chrome to verify that SCTs it receives are trustworthy and that logs are behaving correctly. BUG=612439 Committed: https://crrev.com/59b6ea2217dbc10400b6a9d433ad13c91bb6b7c2 Committed: https://crrev.com/2c7cd56d182ae1a14191170c47154641a24633fa Cr-Original-Commit-Position: refs/heads/master@{#403798} Cr-Commit-Position: refs/heads/master@{#404199}

Patch Set 1 #

Patch Set 2 : Adds base32 to dependencies #

Patch Set 3 : Do not exclude dns/record_* from builds if mdns is disabled #

Patch Set 4 : Improves documentation #

Patch Set 5 : Simplifies handling of DnsTransactions #

Patch Set 6 : Use GMock to test callback results #

Patch Set 7 : Report invalid arguments in more cases #

Patch Set 8 : Use mock sockets instead of mock DNS for tests #

Patch Set 9 : Removes changes to mock DNS framework #

Patch Set 10 : Rebase #

Total comments: 23

Patch Set 11 : Addresses some of mmenke's comments #

Patch Set 12 : Test with both async and sync socket reads #

Total comments: 2

Patch Set 13 : Replaces GMock callback with hand-rolled callback #

Patch Set 14 : Addresses almost all remaining comments by mmenke #

Patch Set 15 : Tests that socket read errors are handled #

Patch Set 16 : More tests and a comment describing a performance improvement that could be made #

Patch Set 17 : Removes unneeded #include #

Total comments: 1

Patch Set 18 : Rebase #

Patch Set 19 : Removes clock from LogDnsClient #

Patch Set 20 : Removes use of content::TestBrowserThreadBundle #

Patch Set 21 : Rebase #

Total comments: 12

Patch Set 22 : Rebase #

Patch Set 23 : Addresses Eran's comments and tests timeouts #

Patch Set 24 : Use net::Error matchers from net/test/gtest_util.h #

Patch Set 25 : Extra precondition checks (also downgrades some CHECKs to DCHECKs) #

Patch Set 26 : Revert using MerkleAuditProof::tree_size #

Total comments: 2

Patch Set 27 : Move parsing functions into unnamed namespace #

Patch Set 28 : Addresses Eran's final comment #

Patch Set 29 : Rebase and lint fixes #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+1171 lines, -16 lines) Patch
M components/certificate_transparency.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
M components/certificate_transparency/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +5 lines, -0 lines 0 comments Download
M components/certificate_transparency/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
A components/certificate_transparency/log_dns_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +120 lines, -0 lines 0 comments Download
A components/certificate_transparency/log_dns_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +294 lines, -0 lines 0 comments Download
A components/certificate_transparency/log_dns_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +746 lines, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 4 chunks +1 line, -4 lines 4 comments Download
M net/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +0 lines, -6 lines 0 comments Download
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +0 lines, -2 lines 0 comments Download
M net/net_common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 91 (33 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/1
4 years, 6 months ago (2016-06-13 16:05:16 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/228812) win_clang on ...
4 years, 6 months ago (2016-06-13 16:12:41 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/20001
4 years, 6 months ago (2016-06-13 16:38:09 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/86653)
4 years, 6 months ago (2016-06-13 16:58:22 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/40001
4 years, 6 months ago (2016-06-14 10:42:56 UTC) #10
Rob Percival
PTAL. More tests will be added, but first I'm evaluating whether reworking the tests to ...
4 years, 6 months ago (2016-06-14 10:45:34 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/80001
4 years, 6 months ago (2016-06-14 13:14:40 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-14 13:53:15 UTC) #16
Rob Percival
Hi Matt, mind reviewing my use of mock sockets? This is the result of your ...
4 years, 6 months ago (2016-06-23 16:28:51 UTC) #18
mmenke
On 2016/06/23 16:28:51, Rob Percival wrote: > Hi Matt, mind reviewing my use of mock ...
4 years, 6 months ago (2016-06-23 16:33:02 UTC) #19
Rob Percival
On 2016/06/23 16:33:02, mmenke wrote: > On 2016/06/23 16:28:51, Rob Percival wrote: > > Hi ...
4 years, 6 months ago (2016-06-24 00:10:51 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/160001
4 years, 6 months ago (2016-06-24 00:12:10 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/93042) ios-device on ...
4 years, 6 months ago (2016-06-24 00:16:51 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2066553002/180001
4 years, 6 months ago (2016-06-24 03:01:43 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-24 04:31:59 UTC) #30
mmenke
A number of suggestions. I just focused on the tests and the use of SequencedSocketData ...
4 years, 5 months ago (2016-06-27 17:01:08 UTC) #31
mmenke
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode307 components/certificate_transparency/log_dns_client_unittest.cc:307: std::unique_ptr<net::BoundTestNetLog> net_log_; Also, you don't need this - just ...
4 years, 5 months ago (2016-06-27 17:04:09 UTC) #32
mmenke
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode307 components/certificate_transparency/log_dns_client_unittest.cc:307: std::unique_ptr<net::BoundTestNetLog> net_log_; On 2016/06/27 17:04:09, mmenke wrote: > Also, ...
4 years, 5 months ago (2016-06-27 17:05:02 UTC) #33
Rob Percival
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode169 components/certificate_transparency/log_dns_client_unittest.cc:169: class MockSocket { On 2016/06/27 17:01:08, mmenke wrote: > ...
4 years, 5 months ago (2016-06-27 19:01:18 UTC) #35
mmenke
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode175 components/certificate_transparency/log_dns_client_unittest.cc:175: expected_write_(net::SYNCHRONOUS, On 2016/06/27 19:01:18, Rob Percival wrote: > On ...
4 years, 5 months ago (2016-06-27 19:26:21 UTC) #36
mmenke
LGTM, as-is. Looks like DnsTransactions can complete synchronously on Start, or at least the API ...
4 years, 5 months ago (2016-06-27 19:30:32 UTC) #37
mmenke
Whether you want to follow my suggestions on Gmock and RunUntilIdle are up to you. ...
4 years, 5 months ago (2016-06-27 19:32:04 UTC) #38
mmenke
Actually, net/ Not LGTM. What's up with the net/ changes? You're removing stuff from the ...
4 years, 5 months ago (2016-06-27 19:33:53 UTC) #39
Rob Percival
On 2016/06/27 19:33:53, mmenke wrote: > Actually, net/ Not LGTM. What's up with the net/ ...
4 years, 5 months ago (2016-06-27 20:02:13 UTC) #40
mmenke
On 2016/06/27 20:02:13, Rob Percival wrote: > On 2016/06/27 19:33:53, mmenke wrote: > > Actually, ...
4 years, 5 months ago (2016-06-27 20:07:14 UTC) #41
Rob Percival
On 2016/06/27 19:30:32, mmenke wrote: > LGTM, as-is. Looks like DnsTransactions can complete synchronously on ...
4 years, 5 months ago (2016-06-27 20:10:51 UTC) #42
Rob Percival
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode287 components/certificate_transparency/log_dns_client_unittest.cc:287: base::RunLoop().RunUntilIdle(); On 2016/06/27 19:26:20, mmenke wrote: > On 2016/06/27 ...
4 years, 5 months ago (2016-06-27 20:12:11 UTC) #43
mmenke
On 2016/06/27 20:10:51, Rob Percival wrote: > On 2016/06/27 19:30:32, mmenke wrote: > > LGTM, ...
4 years, 5 months ago (2016-06-27 20:22:40 UTC) #44
mmenke
https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode287 components/certificate_transparency/log_dns_client_unittest.cc:287: base::RunLoop().RunUntilIdle(); On 2016/06/27 20:12:11, Rob Percival wrote: > On ...
4 years, 5 months ago (2016-06-27 20:24:45 UTC) #45
Rob Percival
On 2016/06/27 20:24:45, mmenke wrote: > https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc > File components/certificate_transparency/log_dns_client_unittest.cc (right): > > https://codereview.chromium.org/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode287 > ...
4 years, 5 months ago (2016-06-27 20:50:05 UTC) #46
mmenke
On 2016/06/27 20:50:05, Rob Percival wrote: > On 2016/06/27 20:24:45, mmenke wrote: > > > ...
4 years, 5 months ago (2016-06-27 20:58:05 UTC) #47
Rob Percival
All comments have been addressed. https://chromiumcodereview-hr.appspot.com/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc File components/certificate_transparency/log_dns_client_unittest.cc (right): https://chromiumcodereview-hr.appspot.com/2066553002/diff/180001/components/certificate_transparency/log_dns_client_unittest.cc#newcode182 components/certificate_transparency/log_dns_client_unittest.cc:182: 1), On 2016/06/27 17:01:07, ...
4 years, 5 months ago (2016-06-28 21:44:54 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2066553002/360001
4 years, 5 months ago (2016-06-28 21:45:27 UTC) #50
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-28 23:36:14 UTC) #52
jam
https://chromiumcodereview-hr.appspot.com/2066553002/diff/360001/components/certificate_transparency/DEPS File components/certificate_transparency/DEPS (right): https://chromiumcodereview-hr.appspot.com/2066553002/diff/360001/components/certificate_transparency/DEPS#newcode4 components/certificate_transparency/DEPS:4: "+content/public/test/test_browser_thread_bundle.h", content/ is pretty large, so we avoid depending ...
4 years, 5 months ago (2016-06-30 06:32:47 UTC) #54
Rob Percival
On 2016/06/30 06:32:47, jam wrote: > https://chromiumcodereview-hr.appspot.com/2066553002/diff/360001/components/certificate_transparency/DEPS > File components/certificate_transparency/DEPS (right): > > https://chromiumcodereview-hr.appspot.com/2066553002/diff/360001/components/certificate_transparency/DEPS#newcode4 > ...
4 years, 5 months ago (2016-06-30 17:14:54 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2066553002/420001
4 years, 5 months ago (2016-06-30 17:16:14 UTC) #57
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/29531) ios-device-gn on ...
4 years, 5 months ago (2016-06-30 17:18:54 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2066553002/440001
4 years, 5 months ago (2016-06-30 18:04:37 UTC) #61
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-30 19:14:43 UTC) #63
jam
lgtm
4 years, 5 months ago (2016-06-30 22:28:37 UTC) #65
Eran Messeri
overall looks good, the only major comment is handling of an empty response from the ...
4 years, 5 months ago (2016-07-01 09:08:00 UTC) #66
Rob Percival
PTAL. The latest patch set is dependent on https://chromiumcodereview-hr.appspot.com/2107423004/. https://codereview.chromium.org/2066553002/diff/440001/components/certificate_transparency/log_dns_client.cc File components/certificate_transparency/log_dns_client.cc (right): https://codereview.chromium.org/2066553002/diff/440001/components/certificate_transparency/log_dns_client.cc#newcode49 components/certificate_transparency/log_dns_client.cc:49: ...
4 years, 5 months ago (2016-07-01 16:01:01 UTC) #67
Eran Messeri
lgtm with one minor comment. On a side note, the tests having to create a ...
4 years, 5 months ago (2016-07-05 15:28:12 UTC) #68
Rob Percival
On 2016/07/05 15:28:12, Eran Messeri wrote: > lgtm with one minor comment. > > On ...
4 years, 5 months ago (2016-07-05 15:44:50 UTC) #69
Rob Percival
https://codereview.chromium.org/2066553002/diff/530001/components/certificate_transparency/log_dns_client.cc File components/certificate_transparency/log_dns_client.cc (right): https://codereview.chromium.org/2066553002/diff/530001/components/certificate_transparency/log_dns_client.cc#newcode52 components/certificate_transparency/log_dns_client.cc:52: std::ostringstream qname; On 2016/07/05 15:28:12, Eran Messeri wrote: > ...
4 years, 5 months ago (2016-07-05 15:51:30 UTC) #70
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/2066553002/570001
4 years, 5 months ago (2016-07-05 15:54:34 UTC) #73
commit-bot: I haz the power
Committed patchset #28 (id:570001)
4 years, 5 months ago (2016-07-05 16:58:35 UTC) #74
commit-bot: I haz the power
Patchset 28 (id:??) landed as https://crrev.com/59b6ea2217dbc10400b6a9d433ad13c91bb6b7c2 Cr-Commit-Position: refs/heads/master@{#403798}
4 years, 5 months ago (2016-07-05 17:00:35 UTC) #76
jbroman
A revert of this CL (patchset #28 id:570001) has been created in https://codereview.chromium.org/2124873002/ by jbroman@chromium.org. ...
4 years, 5 months ago (2016-07-05 17:40:11 UTC) #77
Rob Percival
On 2016/07/05 17:40:11, jbroman wrote: > A revert of this CL (patchset #28 id:570001) has ...
4 years, 5 months ago (2016-07-05 18:10:48 UTC) #79
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/2066553002/590001
4 years, 5 months ago (2016-07-07 16:34:27 UTC) #82
commit-bot: I haz the power
Committed patchset #29 (id:590001)
4 years, 5 months ago (2016-07-07 19:05:04 UTC) #84
commit-bot: I haz the power
Patchset 29 (id:??) landed as https://crrev.com/2c7cd56d182ae1a14191170c47154641a24633fa Cr-Commit-Position: refs/heads/master@{#404199}
4 years, 5 months ago (2016-07-07 19:07:10 UTC) #86
Primiano Tucci (use gerrit)
This patch seems to have landed with some rebase conflicts, which dropped unittests from the ...
4 years, 5 months ago (2016-07-08 08:21:47 UTC) #88
chromium-reviews
Sorry about that, I'm surprised I didn't get any merge conflicts when I rebased. No, ...
4 years, 5 months ago (2016-07-08 08:27:05 UTC) #89
Rob Percival
Re-added unittests to build file in https://codereview.chromium.org/2129113002/. Looks like they were accidentally dropped by patch ...
4 years, 5 months ago (2016-07-08 08:51:06 UTC) #90
Primiano Tucci (use gerrit)
4 years, 5 months ago (2016-07-08 09:03:31 UTC) #91
Message was sent while issue was closed.
On 2016/07/08 08:51:06, Rob Percival wrote:
> Re-added unittests to build file in
https://codereview.chromium.org/2129113002/.
> Looks like they were accidentally dropped by patch set 21 and missed by both
> myself and my reviewers.

Yup saw that. I started a thread on chromium-dev
(https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/GrZTVNcvlyE)
To be clear, I can see how these kind of conflicts can happen.
It's just unfortunate that we don't have any mechanism in place to prevent that.
Some presubmit / CQ test should have went red here. Instead scarily this made
its way to master (almost) unnoticed :-/

Powered by Google App Engine
This is Rietveld 408576698