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

Issue 1522813002: Add public key and signature verification to browser-side API keys (Closed)

Created:
5 years ago by iclelland
Modified:
4 years, 11 months ago
Reviewers:
chasej, davidben
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@keys
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add public key and signature verification to browser-side API keys This adds the ability for experimental API keys to be cryptographically verified in the browser. There is currently a single fixed signing key, whose public key is embeddded in the browser code. This makes use of Ed25519 cryptographic signature verification in boringssl, so boringssl is added as a dependency to content/common for all platforms (except iOS) BUG=543215 Committed: https://crrev.com/592c59e49f7a1c1ce7fb469dd1f7ef0d98482ad8 Cr-Commit-Position: refs/heads/master@{#369329}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Update tests #

Patch Set 4 : Rebase; update tests for consistency with rest of framework #

Patch Set 5 : Rebase against nonbroken issue 1521063003 #

Total comments: 2

Patch Set 6 : Add TODOs for future work #

Total comments: 34

Patch Set 7 : Rebase against parent issue #

Patch Set 8 : Addressing comments from PS#6 #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Patch Set 11 : Switch to Ed25519 for signature verification #

Total comments: 8

Patch Set 12 : Remove pk length param; fix broken test #

Total comments: 15

Patch Set 13 : Addressing feedback from PS#12 #

Total comments: 4

Patch Set 14 : Addressing comments from PS#13 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -7 lines) Patch
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/common/experiments/api_key.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/experiments/api_key.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +50 lines, -4 lines 0 comments Download
M content/common/experiments/api_key_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +65 lines, -3 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (7 generated)
iclelland
+r chasej, PTAL, thanks! (Sorry for the flood of reviews today)
5 years ago (2015-12-14 15:01:17 UTC) #2
iclelland
+r davidben, especially because of the use of crypto for validating the signatures.
5 years ago (2015-12-16 19:34:44 UTC) #4
chasej
LGTM, with nits. https://codereview.chromium.org/1522813002/diff/80001/content/browser/experiments/api_key.cc File content/browser/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/80001/content/browser/experiments/api_key.cc#newcode117 content/browser/experiments/api_key.cc:117: crypto::SignatureVerifier::SHA256, crypto::SignatureVerifier::SHA256, Nit: add a TODO ...
5 years ago (2015-12-17 14:13:58 UTC) #5
iclelland
https://codereview.chromium.org/1522813002/diff/80001/content/browser/experiments/api_key.cc File content/browser/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/80001/content/browser/experiments/api_key.cc#newcode117 content/browser/experiments/api_key.cc:117: crypto::SignatureVerifier::SHA256, crypto::SignatureVerifier::SHA256, On 2015/12/17 14:13:58, chasej wrote: > Nit: ...
5 years ago (2015-12-17 15:46:02 UTC) #6
davidben
https://codereview.chromium.org/1522813002/diff/100001/content/browser/experiments/api_key.cc File content/browser/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/100001/content/browser/experiments/api_key.cc#newcode32 content/browser/experiments/api_key.cc:32: "-----END PUBLIC KEY-----"; Here, use this: static const uint8_t ...
5 years ago (2015-12-18 22:23:17 UTC) #7
iclelland
https://codereview.chromium.org/1522813002/diff/100001/content/browser/experiments/api_key.cc File content/browser/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/100001/content/browser/experiments/api_key.cc#newcode32 content/browser/experiments/api_key.cc:32: "-----END PUBLIC KEY-----"; On 2015/12/18 22:23:17, davidben wrote: > ...
5 years ago (2015-12-22 05:45:28 UTC) #8
iclelland
On 2015/12/22 05:45:28, iclelland wrote: > That's a great idea, and I appreciate you enabling ...
4 years, 11 months ago (2016-01-06 21:43:52 UTC) #10
chasej
https://codereview.chromium.org/1522813002/diff/200001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/200001/content/common/experiments/api_key.cc#newcode119 content/common/experiments/api_key.cc:119: size_t public_key_length) { Remove the public_key_length parameter? I don't ...
4 years, 11 months ago (2016-01-11 16:11:26 UTC) #11
iclelland
https://codereview.chromium.org/1522813002/diff/200001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/200001/content/common/experiments/api_key.cc#newcode119 content/common/experiments/api_key.cc:119: size_t public_key_length) { On 2016/01/11 16:11:25, chasej wrote: > ...
4 years, 11 months ago (2016-01-11 18:59:40 UTC) #12
davidben
https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc#newcode8 content/common/experiments/api_key.cc:8: #include <openssl/curve25519.h> Nit: I believe this should be #include ...
4 years, 11 months ago (2016-01-11 20:18:57 UTC) #13
iclelland
https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc#newcode8 content/common/experiments/api_key.cc:8: #include <openssl/curve25519.h> On 2016/01/11 20:18:57, davidben wrote: > Nit: ...
4 years, 11 months ago (2016-01-12 14:52:49 UTC) #14
davidben
lgtm https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc#newcode8 content/common/experiments/api_key.cc:8: #include <openssl/curve25519.h> On 2016/01/12 14:52:49, iclelland wrote: > ...
4 years, 11 months ago (2016-01-13 20:50:39 UTC) #15
iclelland
https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc File content/common/experiments/api_key.cc (right): https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc#newcode8 content/common/experiments/api_key.cc:8: #include <openssl/curve25519.h> On 2016/01/13 20:50:39, davidben wrote: > On ...
4 years, 11 months ago (2016-01-13 21:30:11 UTC) #16
chasej
On 2016/01/13 21:30:11, iclelland wrote: > https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc > File content/common/experiments/api_key.cc (right): > > https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.cc#newcode8 > ...
4 years, 11 months ago (2016-01-13 21:40:32 UTC) #17
davidben
https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.h File content/common/experiments/api_key.h (right): https://codereview.chromium.org/1522813002/diff/220001/content/common/experiments/api_key.h#newcode59 content/common/experiments/api_key.h:59: bool ValidateSignature(const uint8_t* public_key) const; On 2016/01/13 21:30:11, iclelland ...
4 years, 11 months ago (2016-01-13 22:18:13 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1522813002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1522813002/260001
4 years, 11 months ago (2016-01-14 03:24:09 UTC) #21
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 11 months ago (2016-01-14 05:02:08 UTC) #23
commit-bot: I haz the power
4 years, 11 months ago (2016-01-14 05:03:32 UTC) #25
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/592c59e49f7a1c1ce7fb469dd1f7ef0d98482ad8
Cr-Commit-Position: refs/heads/master@{#369329}

Powered by Google App Engine
This is Rietveld 408576698