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

Issue 1953273002: Add support to GCMKeyStore for multiple keys per app_id (Closed)

Created:
4 years, 7 months ago by johnme
Modified:
4 years, 3 months ago
CC:
chromium-reviews, Peter Beverloo, johnme+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@iid6fixstore
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support to GCMKeyStore for multiple keys per app_id Specifically, allow one key per (app_id, authorized_entity) pair. This will only be used for Instance ID tokens; legacy GCM registrations will store an empty string for the authorized_entity (rather than storing the sender ID) for backwards compatibility. The clunky name instance_id_authorized_entity is designed to remind people of this. Part of a series of patches: 1. https://codereview.chromium.org/1832833002 adds InstanceIDWithSubtype 2. https://codereview.chromium.org/1830983002 adds JNI bindings 3. https://codereview.chromium.org/1829023002 adds fake and test 4. https://codereview.chromium.org/1899753002 fixes strict mode violations 5. https://codereview.chromium.org/1854093002 enables InstanceID by default 6. this patch 7. https://codereview.chromium.org/1923953002 integrates IIDs with crypto 8. https://codereview.chromium.org/1851423003 switches Push to InstanceIDs Also depends on https://codereview.chromium.org/1948133003 BUG=589461 Committed: https://crrev.com/36ae5806242390404f2492c8a5c39041cd374fd6 Cr-Commit-Position: refs/heads/master@{#392617}

Patch Set 1 #

Patch Set 2 : Fix DatabaseKey #

Patch Set 3 : Simplify Decrypt fallback by banning IID token & GCM reg from sharing same app_id #

Total comments: 24

Patch Set 4 : Address review comments #

Total comments: 8

Patch Set 5 : Address review nits #

Patch Set 6 : Only EXPECT_DFATAL when LOG_DCHECK == LOG_DFATAL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+763 lines, -160 lines) Patch
M components/gcm_driver/crypto/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/crypto/gcm_encryption_provider.h View 1 2 3 2 chunks +15 lines, -4 lines 0 comments Download
M components/gcm_driver/crypto/gcm_encryption_provider.cc View 1 2 3 2 chunks +21 lines, -12 lines 0 comments Download
M components/gcm_driver/crypto/gcm_encryption_provider_unittest.cc View 1 2 3 4 10 chunks +214 lines, -9 lines 0 comments Download
M components/gcm_driver/crypto/gcm_key_store.h View 1 2 3 5 chunks +42 lines, -17 lines 0 comments Download
M components/gcm_driver/crypto/gcm_key_store.cc View 1 2 3 4 9 chunks +107 lines, -36 lines 0 comments Download
M components/gcm_driver/crypto/gcm_key_store_unittest.cc View 1 2 3 4 5 13 chunks +340 lines, -70 lines 0 comments Download
M components/gcm_driver/crypto/proto/gcm_encryption_data.proto View 1 2 3 1 chunk +12 lines, -6 lines 0 comments Download
M components/gcm_driver/gcm_driver.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M net/BUILD.gn View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M net/net.gyp View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 25 (11 generated)
johnme
Forked off from https://codereview.chromium.org/1923953002/#msg5
4 years, 7 months ago (2016-05-06 12:23:16 UTC) #2
Peter Beverloo
Thank you John! The code mostly lg with a few questions and suggestions. I like ...
4 years, 7 months ago (2016-05-09 14:10:10 UTC) #4
johnme
Addressed review comments - thanks! https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_encryption_provider.cc File components/gcm_driver/crypto/gcm_encryption_provider.cc (right): https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_encryption_provider.cc#newcode163 components/gcm_driver/crypto/gcm_encryption_provider.cc:163: // (key store owner ...
4 years, 7 months ago (2016-05-09 18:15:55 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1953273002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1953273002/60001
4 years, 7 months ago (2016-05-10 12:38:48 UTC) #7
wildcur20
4 years, 7 months ago (2016-05-10 12:43:32 UTC) #9
johnme
rch@chromium.org: Please review GN/GYP changes in net/ that move the files required for EXPECT_DFATAL to ...
4 years, 7 months ago (2016-05-10 12:49:11 UTC) #11
Peter Beverloo
lgtm https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_key_store_unittest.cc File components/gcm_driver/crypto/gcm_key_store_unittest.cc (right): https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_key_store_unittest.cc#newcode57 components/gcm_driver/crypto/gcm_key_store_unittest.cc:57: if (pair_out) On 2016/05/09 18:15:55, johnme wrote: > ...
4 years, 7 months ago (2016-05-10 12:52:39 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/209805)
4 years, 7 months ago (2016-05-10 13:15:48 UTC) #14
Ryan Hamilton
net/ lgtm
4 years, 7 months ago (2016-05-10 13:20:03 UTC) #15
johnme
Addressed nits - thanks! https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_key_store_unittest.cc File components/gcm_driver/crypto/gcm_key_store_unittest.cc (right): https://codereview.chromium.org/1953273002/diff/40001/components/gcm_driver/crypto/gcm_key_store_unittest.cc#newcode57 components/gcm_driver/crypto/gcm_key_store_unittest.cc:57: if (pair_out) On 2016/05/10 12:52:38, ...
4 years, 7 months ago (2016-05-10 13:24:45 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1953273002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1953273002/100001
4 years, 7 months ago (2016-05-10 14:31:34 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-05-10 15:46:39 UTC) #21
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/36ae5806242390404f2492c8a5c39041cd374fd6 Cr-Commit-Position: refs/heads/master@{#392617}
4 years, 7 months ago (2016-05-10 15:47:48 UTC) #23
Ryan Sleevi
4 years, 3 months ago (2016-09-13 18:15:54 UTC) #25
Message was sent while issue was closed.
I realize this is a four-month after-the fact drive-by, but we shouldn't be
exporting the DFATAL stuff of gtest_util from //net as part of //net's
interface.

While gtest_util has now also grown to accomodate aspects that //net consumers
do apparently need (such as GMock matchers for //net concepts), the notion of
DFATAL & friends are something that we reasonably should be discussing as either
part of //base or duplicated in //components, but I don't think the goal should
be that //net provides API surface for GTest-utilities.

Since this code appears to be the only (outside-net) consumer, would it be
possible to revisit this decision so that we can remove those bits from //net?

Powered by Google App Engine
This is Rietveld 408576698