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

Issue 103803012: Make HSTS headers not clobber preloaded pins. (Closed)

Created:
7 years ago by palmer
Modified:
6 years, 7 months ago
Reviewers:
eroman, agl, Ryan Sleevi
Visibility:
Public.

Description

Make HSTS headers not clobber preloaded pins. BUG=329386 TEST=With a fresh profile, ensure that accounts.google.com and twitter.com have public keys pinned. (Check chrome://net-internals/#hsts.) Then visit those sites. Close the browser, re-launch it, and check that the pins are still present in a query in chrome://net-internals/#hsts. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268966

Patch Set 1 #

Total comments: 2

Patch Set 2 : Retain the ability to push new static pins; don't persist static pins in dynamic profile state. #

Patch Set 3 : Remove spurious debugging junk. Sigh. #

Total comments: 15

Patch Set 4 : NOT READY YET. Starting on rsleevi's fresh approach. #

Patch Set 5 : Fix DeleteAllDynamicStateSince. #

Patch Set 6 : Make use of has_dynamic. #

Total comments: 15

Patch Set 7 : Rebase and respond to comments. #

Patch Set 8 : Mega-rebase. #

Patch Set 9 : Rebase and updated comment. #

Total comments: 19

Patch Set 10 : Respond to comments. Big change still to come. #

Patch Set 11 : Rebase and refactor. (Not done yet.) #

Total comments: 3

Patch Set 12 : Rebase, clean up, fix tests. #

Patch Set 13 : Rebase and improve display of dynamic settings. #

Patch Set 14 : Fix browser_tests by setting the domain name correctly. Rebase. #

Total comments: 17

Patch Set 15 : Prioritize dynamic state over static. #

Patch Set 16 : Rebase and resolve conflict. #

Patch Set 17 : Rebase and resolve conflict. #

Total comments: 8

Patch Set 18 : Respond to comments and fix compilation errors. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+872 lines, -756 lines) Patch
M chrome/browser/net/predictor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -8 lines 0 comments Download
M chrome/browser/resources/net_internals/hsts_view.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +66 lines, -40 lines 2 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +54 lines, -18 lines 0 comments Download
M chrome/test/data/webui/net_internals/hsts_view.js View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M net/http/http_security_headers_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +90 lines, -34 lines 0 comments Download
M net/http/transport_security_persister.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +30 lines, -27 lines 0 comments Download
M net/http/transport_security_persister_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +28 lines, -23 lines 0 comments Download
M net/http/transport_security_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +75 lines, -93 lines 0 comments Download
M net/http/transport_security_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 14 chunks +129 lines, -120 lines 0 comments Download
M net/http/transport_security_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +313 lines, -303 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -5 lines 0 comments Download
M net/socket_stream/socket_stream.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -6 lines 0 comments Download
M net/socket_stream/socket_stream_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -4 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -6 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -6 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +58 lines, -59 lines 0 comments Download

Messages

Total messages: 43 (0 generated)
palmer
PTAL.
7 years ago (2013-12-18 01:44:08 UTC) #1
agl
This seems like it might be a bit of a partial solution. For example, if ...
7 years ago (2013-12-18 15:49:19 UTC) #2
agl
LGTM
7 years ago (2013-12-18 15:49:27 UTC) #3
palmer
> This seems like it might be a bit of a partial solution. For example, ...
7 years ago (2013-12-18 21:04:33 UTC) #4
palmer
https://codereview.chromium.org/103803012/diff/1/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/1/net/http/transport_security_state.cc#newcode610 net/http/transport_security_state.cc:610: GetDomainState(host, true, &domain_state); On 2013/12/18 15:49:19, agl wrote: > ...
7 years ago (2013-12-18 21:04:39 UTC) #5
Ryan Sleevi
As a temporary solution, this LGTM, but we've discussed in the past why this is ...
7 years ago (2013-12-18 21:48:17 UTC) #6
agl
On 2013/12/18 21:48:17, Ryan Sleevi wrote: > Most importantly, by using GetDomainState, rather than GetDynamicState, ...
7 years ago (2013-12-18 21:52:32 UTC) #7
Ryan Sleevi
On 2013/12/18 21:52:32, agl wrote: > On 2013/12/18 21:48:17, Ryan Sleevi wrote: > > Most ...
7 years ago (2013-12-18 21:59:21 UTC) #8
agl
As a short term solution, how about: if there's a static match, use it. Otherwise ...
7 years ago (2013-12-18 22:01:05 UTC) #9
palmer
> As a short term solution, how about: if there's a static match, use it. ...
7 years ago (2013-12-18 22:27:38 UTC) #10
Ryan Sleevi
https://codereview.chromium.org/103803012/diff/40001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/40001/net/http/transport_security_state.cc#newcode617 net/http/transport_security_state.cc:617: //GetDomainState(host, true /* SNI enabled */, &domain_state); Remove https://codereview.chromium.org/103803012/diff/40001/net/http/transport_security_state.cc#newcode641 ...
6 years, 12 months ago (2013-12-27 00:21:05 UTC) #11
palmer
https://codereview.chromium.org/103803012/diff/40001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/40001/net/http/transport_security_state.cc#newcode617 net/http/transport_security_state.cc:617: //GetDomainState(host, true /* SNI enabled */, &domain_state); On 2013/12/27 ...
6 years, 11 months ago (2014-01-03 22:43:43 UTC) #12
palmer
Am I approaching something plausible? PTAL. :)
6 years, 11 months ago (2014-01-27 23:47:30 UTC) #13
Ryan Sleevi
Awesome work, palmer. I've not taken an in-depth review of the whole CL, but I've ...
6 years, 10 months ago (2014-01-31 20:24:43 UTC) #14
palmer
Thanks for the review! https://codereview.chromium.org/103803012/diff/150001/net/http/transport_security_persister.cc File net/http/transport_security_persister.cc (right): https://codereview.chromium.org/103803012/diff/150001/net/http/transport_security_persister.cc#newcode259 net/http/transport_security_persister.cc:259: SPKIHashesFromListValue(*pins_list, &domain_state.static_pkp.spki_hashes); On 2014/01/31 20:24:43, ...
6 years, 10 months ago (2014-01-31 22:20:51 UTC) #15
palmer
https://codereview.chromium.org/103803012/diff/150001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/150001/net/http/transport_security_state.cc#newcode893 net/http/transport_security_state.cc:893: HashesIntersect(static_pkp.spki_hashes, hashes)) { On 2014/01/31 22:20:51, Chromium Palmer wrote: ...
6 years, 10 months ago (2014-02-20 22:13:26 UTC) #16
palmer
> Where do we think we are on this? I'd like to get this bug ...
6 years, 9 months ago (2014-03-07 01:07:47 UTC) #17
Ryan Sleevi
https://codereview.chromium.org/103803012/diff/270001/net/http/http_security_headers_unittest.cc File net/http/http_security_headers_unittest.cc (right): https://codereview.chromium.org/103803012/diff/270001/net/http/http_security_headers_unittest.cc#newcode523 net/http/http_security_headers_unittest.cc:523: std::string domain("accounts.google.com"); Use the same form as the other ...
6 years, 9 months ago (2014-03-07 01:39:18 UTC) #18
palmer
https://codereview.chromium.org/103803012/diff/270001/net/http/http_security_headers_unittest.cc File net/http/http_security_headers_unittest.cc (right): https://codereview.chromium.org/103803012/diff/270001/net/http/http_security_headers_unittest.cc#newcode523 net/http/http_security_headers_unittest.cc:523: std::string domain("accounts.google.com"); On 2014/03/07 01:39:19, Ryan Sleevi wrote: > ...
6 years, 9 months ago (2014-03-14 21:33:39 UTC) #19
Ryan Sleevi
https://codereview.chromium.org/103803012/diff/270001/net/http/transport_security_state.h File net/http/transport_security_state.h (right): https://codereview.chromium.org/103803012/diff/270001/net/http/transport_security_state.h#newcode142 net/http/transport_security_state.h:142: // static state. On 2014/03/14 21:33:39, Chromium Palmer wrote: ...
6 years, 9 months ago (2014-03-14 21:55:28 UTC) #20
Ryan Sleevi
I think your refactor is on the right approach for simplifying the public interactions. https://codereview.chromium.org/103803012/diff/310001/net/http/http_security_headers_unittest.cc ...
6 years, 8 months ago (2014-04-08 20:29:10 UTC) #21
palmer
> https://codereview.chromium.org/103803012/diff/310001/net/http/http_security_headers_unittest.cc#newcode506 > net/http/http_security_headers_unittest.cc:506: * TSS::GetPublicKeyPins? > indent issue? > > Still trying to grok ...
6 years, 8 months ago (2014-04-21 19:17:24 UTC) #22
agl
LGTM, although sleevi was doing this review so you might want to wait for him. ...
6 years, 8 months ago (2014-04-24 20:51:09 UTC) #23
Ryan Sleevi
I know how desperate you are to finish this, and I'm with you. A few ...
6 years, 8 months ago (2014-04-24 21:40:20 UTC) #24
agl
https://codereview.chromium.org/103803012/diff/370001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/370001/net/http/transport_security_state.cc#newcode120 net/http/transport_security_state.cc:120: if (static_state.ShouldUpgradeToSSL()) On 2014/04/24 21:40:21, Ryan Sleevi wrote: > ...
6 years, 8 months ago (2014-04-24 21:45:54 UTC) #25
palmer
(patchset comin' right up) https://codereview.chromium.org/103803012/diff/370001/chrome/browser/ui/webui/net_internals/net_internals_ui.cc File chrome/browser/ui/webui/net_internals/net_internals_ui.cc (right): https://codereview.chromium.org/103803012/diff/370001/chrome/browser/ui/webui/net_internals/net_internals_ui.cc#newcode1267 chrome/browser/ui/webui/net_internals/net_internals_ui.cc:1267: result->SetString("domain", domain); > Let's file ...
6 years, 8 months ago (2014-04-25 00:59:58 UTC) #26
Ryan Sleevi
LGTM mod nits, which you don't need a re-review for. https://codereview.chromium.org/103803012/diff/430001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/430001/net/http/transport_security_state.cc#newcode124 ...
6 years, 7 months ago (2014-05-05 23:24:23 UTC) #27
palmer
https://codereview.chromium.org/103803012/diff/430001/net/http/transport_security_state.cc File net/http/transport_security_state.cc (right): https://codereview.chromium.org/103803012/diff/430001/net/http/transport_security_state.cc#newcode124 net/http/transport_security_state.cc:124: if (static_state.ShouldUpgradeToSSL()) On 2014/05/05 23:24:23, Ryan Sleevi wrote: > ...
6 years, 7 months ago (2014-05-06 18:37:59 UTC) #28
palmer
The CQ bit was checked by palmer@chromium.org
6 years, 7 months ago (2014-05-06 22:57:24 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/palmer@chromium.org/103803012/450001
6 years, 7 months ago (2014-05-06 22:59:32 UTC) #30
palmer
The CQ bit was unchecked by palmer@chromium.org
6 years, 7 months ago (2014-05-07 02:59:45 UTC) #31
palmer
The CQ bit was checked by palmer@chromium.org
6 years, 7 months ago (2014-05-07 02:59:55 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/palmer@chromium.org/103803012/450001
6 years, 7 months ago (2014-05-07 03:02:15 UTC) #33
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 05:03:28 UTC) #34
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #2). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-07 11:03:49 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-07 11:19:00 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-05-07 11:19:00 UTC) #37
palmer
eroman: Can you please take a look at chrome/browser/resources/net_internals/hsts_view.js chrome/browser/ui/webui/net_internals/net_internals_ui.cc ? Thanks!
6 years, 7 months ago (2014-05-07 19:54:04 UTC) #38
eroman
net_internals lgtm https://codereview.chromium.org/103803012/diff/450001/chrome/browser/resources/net_internals/hsts_view.js File chrome/browser/resources/net_internals/hsts_view.js (right): https://codereview.chromium.org/103803012/diff/450001/chrome/browser/resources/net_internals/hsts_view.js#newcode120 chrome/browser/resources/net_internals/hsts_view.js:120: var t; Is there any point to ...
6 years, 7 months ago (2014-05-07 21:17:16 UTC) #39
palmer
Thanks eroman! I assigned a bug to myself to do this clean-up ASAP.
6 years, 7 months ago (2014-05-07 21:27:55 UTC) #40
palmer
The CQ bit was checked by palmer@chromium.org
6 years, 7 months ago (2014-05-07 21:28:05 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/palmer@chromium.org/103803012/450001
6 years, 7 months ago (2014-05-07 21:29:52 UTC) #42
commit-bot: I haz the power
6 years, 7 months ago (2014-05-07 21:46:31 UTC) #43
Message was sent while issue was closed.
Change committed as 268966

Powered by Google App Engine
This is Rietveld 408576698