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

Issue 1244803002: Add parsers for the Encryption and Encryption-Key HTTP headers. (Closed)

Created:
5 years, 5 months ago by Peter Beverloo
Modified:
5 years, 1 month ago
CC:
chromium-reviews, zea+watch_chromium.org, svaldez, davidben
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add parsers for the Encryption and Encryption-Key HTTP headers. These headers are defined in the following IETF draft: https://tools.ietf.org/html/draft-thomson-http-encryption-01 They contain the information required to decrypt an encryption GCM message send through either the Web Push protocol, or using the same properties in the existing GCM protocol. The messages will be received by the Google Cloud Messaging (GCM) driver, either through the GCM engine (on desktop) or Google Play Services on Android, together with these headers. The messages then have to be decrypted before being forwarded to the feature consumer, which will initially be Push Notifications. BUG=486040 Committed: https://crrev.com/1f99ff0f7ccd143dcfcd46161500bc9d62d031c6 Cr-Commit-Position: refs/heads/master@{#352027}

Patch Set 1 #

Total comments: 28

Patch Set 2 : #

Total comments: 3

Patch Set 3 : rewrite #

Total comments: 30

Patch Set 4 : Anton's comments #

Total comments: 25

Patch Set 5 : address comments #

Total comments: 12

Patch Set 6 : #

Total comments: 16

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+589 lines, -0 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver.gypi View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M components/gcm_driver/crypto/BUILD.gn View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M components/gcm_driver/crypto/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A components/gcm_driver/crypto/encryption_header_parsers.h View 1 2 3 4 5 6 1 chunk +64 lines, -0 lines 0 comments Download
A components/gcm_driver/crypto/encryption_header_parsers.cc View 1 2 3 4 5 6 1 chunk +224 lines, -0 lines 0 comments Download
A components/gcm_driver/crypto/encryption_header_parsers_unittest.cc View 1 2 3 4 5 1 chunk +293 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (6 generated)
Peter Beverloo
+johnme for early review, before I add OWNERS.
5 years, 5 months ago (2015-07-20 15:43:12 UTC) #2
johnme
Initial comments (haven't reviewed the code yet). https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc File components/gcm_driver/crypto/encryption_header_parsers_unittest.cc (right): https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers_unittest.cc#newcode51 components/gcm_driver/crypto/encryption_header_parsers_unittest.cc:51: { "keyid=foo; ...
5 years, 5 months ago (2015-07-20 19:15:20 UTC) #3
Peter Beverloo
+Ryan, given his love for this stuff. We'll initially use |salt| and |rs| from EncryptionHeaderValue, ...
5 years, 5 months ago (2015-07-20 22:44:33 UTC) #5
johnme
https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc (right): https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers.cc#newcode40 components/gcm_driver/crypto/encryption_header_parsers.cc:40: net::HttpUtil::NameValuePairsIterator parser(tokenizer.token_begin(), I notice that NameValuePairsIterator allows arbitrary LWS. ...
5 years, 5 months ago (2015-07-21 14:34:43 UTC) #6
Peter Beverloo
https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc (right): https://codereview.chromium.org/1244803002/diff/1/components/gcm_driver/crypto/encryption_header_parsers.cc#newcode40 components/gcm_driver/crypto/encryption_header_parsers.cc:40: net::HttpUtil::NameValuePairsIterator parser(tokenizer.token_begin(), On 2015/07/21 14:34:43, johnme wrote: > I ...
5 years, 5 months ago (2015-07-21 17:51:31 UTC) #7
Peter Beverloo
Friendly ping :)
5 years, 4 months ago (2015-08-03 18:35:05 UTC) #8
Ryan Sleevi
Sorry for the delay. This seems like it's doing a lot of (unnecessary) string manipulation. ...
5 years, 4 months ago (2015-08-03 18:59:24 UTC) #9
Ryan Sleevi
I should also add that chrome-security@ generally dislikes HTTP parsing in the browser :) From ...
5 years, 4 months ago (2015-08-03 19:02:04 UTC) #10
Peter Beverloo
I have rewritten this patch based on http_security_headers.cc - thank you for that pointer, Ryan, ...
5 years, 3 months ago (2015-09-09 14:25:47 UTC) #11
whywhat
drive-by lgtm with a bunch of nits you can mostly ignore ;) https://codereview.chromium.org/1244803002/diff/40001/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc ...
5 years, 3 months ago (2015-09-14 14:57:43 UTC) #13
Ryan Sleevi
I'm swamped with a few other things for this week and next, so I'm gonna ...
5 years, 3 months ago (2015-09-14 21:18:57 UTC) #15
Peter Beverloo
Thanks Anton! https://codereview.chromium.org/1244803002/diff/40001/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc (right): https://codereview.chromium.org/1244803002/diff/40001/components/gcm_driver/crypto/encryption_header_parsers.cc#newcode17 components/gcm_driver/crypto/encryption_header_parsers.cc:17: const int64_t kDefaultRecordSize = 4096; On 2015/09/14 ...
5 years, 3 months ago (2015-09-15 19:41:12 UTC) #16
Peter Beverloo
Friendly ping. If you would like me to do something to make reviewing this easier ...
5 years, 3 months ago (2015-09-23 16:34:55 UTC) #17
eroman
The implementation LGTM. I didn't review the spec itself though to judge if we really ...
5 years, 2 months ago (2015-09-25 18:18:20 UTC) #18
Peter Beverloo
Thank you for the review! All addressed, PTAL. https://codereview.chromium.org/1244803002/diff/60001/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc (right): https://codereview.chromium.org/1244803002/diff/60001/components/gcm_driver/crypto/encryption_header_parsers.cc#newcode19 components/gcm_driver/crypto/encryption_header_parsers.cc:19: const ...
5 years, 2 months ago (2015-09-28 11:27:16 UTC) #19
eroman
https://codereview.chromium.org/1244803002/diff/60001/components/gcm_driver/crypto/encryption_header_parsers.cc File components/gcm_driver/crypto/encryption_header_parsers.cc (right): https://codereview.chromium.org/1244803002/diff/60001/components/gcm_driver/crypto/encryption_header_parsers.cc#newcode21 components/gcm_driver/crypto/encryption_header_parsers.cc:21: bool Base64URLDecode(const base::StringPiece& input, std::string* output) { On 2015/09/28 ...
5 years, 2 months ago (2015-09-28 16:25:29 UTC) #20
Ryan Sleevi
This is a spec that I really don't like, but where I *especially* don't want ...
5 years, 2 months ago (2015-09-28 19:35:49 UTC) #21
Peter Beverloo
Ryan, Eric, thank you for the comments! The parser can now parse the header according ...
5 years, 2 months ago (2015-10-01 14:56:20 UTC) #22
Ryan Sleevi
LGTM, although with a *lot* of angst (read the .h file comments first) and mod ...
5 years, 2 months ago (2015-10-01 22:50:45 UTC) #23
Peter Beverloo
Thank you for the review. I have filed crbug.com/538576 for updating the parser to be ...
5 years, 2 months ago (2015-10-02 13:10:22 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1244803002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1244803002/120001
5 years, 2 months ago (2015-10-02 13:11:10 UTC) #27
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 2 months ago (2015-10-02 14:21:10 UTC) #28
commit-bot: I haz the power
5 years, 2 months ago (2015-10-02 14:21:44 UTC) #29
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/1f99ff0f7ccd143dcfcd46161500bc9d62d031c6
Cr-Commit-Position: refs/heads/master@{#352027}

Powered by Google App Engine
This is Rietveld 408576698