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

Issue 332233002: enterprise.platformKeys: Copy-on-read the 'algorithm' member of Key objects. (Closed)

Created:
6 years, 6 months ago by pneubeck (no reviews)
Modified:
6 years, 6 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Project:
chromium
Visibility:
Public.

Description

enterprise.platformKeys: Copy-on-read the 'algorithm' member of Key objects. With this change, a Key object's algorithm member is copied on every read access. Effectively preventing it's modification as required by the WebCrypto specification. BUG=385143 R=bartfab@chromium.org, kalman@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278833

Patch Set 1 : #

Total comments: 3

Patch Set 2 : Rebased. #

Patch Set 3 : Changed to copy-on-read. #

Total comments: 1

Patch Set 4 : Moved deepCopy to utils.js and unit tested it. #

Patch Set 5 : Ensure that crx is up-to-date. #

Total comments: 4

Patch Set 6 : Use WebSerializedScriptValue. #

Total comments: 2

Patch Set 7 : Removed the unnecessary unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -4 lines) Patch
M chrome/renderer/resources/extensions/enterprise_platform_keys/key.js View 1 2 3 1 chunk +13 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/enterprise_platform_keys.crx View 1 2 3 4 Binary file 0 comments Download
M chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js View 1 2 3 2 chunks +46 lines, -0 lines 0 comments Download
M extensions/renderer/resources/utils.js View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M extensions/renderer/utils_native_handler.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M extensions/renderer/utils_native_handler.cc View 1 2 3 4 5 6 3 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
pneubeck (no reviews)
Benjamin/Eric, I'd like to get your feedback on the recursive freeze. I'm not sure yet, ...
6 years, 6 months ago (2014-06-16 17:53:34 UTC) #1
not at google - send to devlin
https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js File chrome/renderer/resources/extensions/enterprise_platform_keys/key.js (right): https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js#newcode56 chrome/renderer/resources/extensions/enterprise_platform_keys/key.js:56: deepFreeze(this.algorithm); why do you need this? the way that ...
6 years, 6 months ago (2014-06-16 17:58:33 UTC) #2
pneubeck (no reviews)
https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js File chrome/renderer/resources/extensions/enterprise_platform_keys/key.js (right): https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js#newcode56 chrome/renderer/resources/extensions/enterprise_platform_keys/key.js:56: deepFreeze(this.algorithm); On 2014/06/16 17:58:32, kalman wrote: > why do ...
6 years, 6 months ago (2014-06-16 18:01:19 UTC) #3
not at google - send to devlin
https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js File chrome/renderer/resources/extensions/enterprise_platform_keys/key.js (right): https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js#newcode56 chrome/renderer/resources/extensions/enterprise_platform_keys/key.js:56: deepFreeze(this.algorithm); On 2014/06/16 18:01:18, pneubeck wrote: > On 2014/06/16 ...
6 years, 6 months ago (2014-06-16 18:08:32 UTC) #4
pneubeck (no reviews)
On 2014/06/16 18:08:32, kalman wrote: > https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js > File chrome/renderer/resources/extensions/enterprise_platform_keys/key.js > (right): > > https://codereview.chromium.org/332233002/diff/60001/chrome/renderer/resources/extensions/enterprise_platform_keys/key.js#newcode56 ...
6 years, 6 months ago (2014-06-16 18:37:19 UTC) #5
pneubeck (no reviews)
-kalman (there is now deepFreeze anymore ;-) ) @Eric, this should now correctly prevent modifications ...
6 years, 6 months ago (2014-06-17 21:12:04 UTC) #6
pneubeck (no reviews)
@Bartosz, please take a look.
6 years, 6 months ago (2014-06-18 09:09:50 UTC) #7
bartfab (slow)
lgtm https://codereview.chromium.org/332233002/diff/140001/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js File chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js (right): https://codereview.chromium.org/332233002/diff/140001/chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js#newcode284 chrome/test/data/extensions/api_test/enterprise_platform_keys/basic.js:284: fail('Expected that the property is read only and ...
6 years, 6 months ago (2014-06-18 16:19:06 UTC) #8
eroman
The change itself looks fine, however I am not familiar enough with the javascript runtime ...
6 years, 6 months ago (2014-06-18 18:12:13 UTC) #9
pneubeck (no reviews)
Adding Benjamin back; do have any concern with this copy-on-read?
6 years, 6 months ago (2014-06-18 18:18:02 UTC) #10
pneubeck (no reviews)
@Benjamin, ptal
6 years, 6 months ago (2014-06-18 22:30:27 UTC) #11
pneubeck (no reviews)
@Benjamin, please check the commit flag if you're ok with the change. With this and ...
6 years, 6 months ago (2014-06-18 22:47:43 UTC) #12
not at google - send to devlin
consider the comment about using WebSerializedScriptValue. I'm hesitant to CQ this for you now, but ...
6 years, 6 months ago (2014-06-19 00:12:43 UTC) #13
pneubeck (no reviews)
@Benjamin, ptal https://codereview.chromium.org/332233002/diff/180001/extensions/renderer/resources/utils.js File extensions/renderer/resources/utils.js (right): https://codereview.chromium.org/332233002/diff/180001/extensions/renderer/resources/utils.js#newcode131 extensions/renderer/resources/utils.js:131: * prototypes). On 2014/06/19 00:12:42, kalman wrote: ...
6 years, 6 months ago (2014-06-19 16:09:42 UTC) #14
not at google - send to devlin
lgtm https://codereview.chromium.org/332233002/diff/200001/extensions/renderer/resources/utils.js File extensions/renderer/resources/utils.js (right): https://codereview.chromium.org/332233002/diff/200001/extensions/renderer/resources/utils.js#newcode133 extensions/renderer/resources/utils.js:133: return nativeDeepCopy(value); On 2014/06/19 16:09:41, pneubeck wrote: > ...
6 years, 6 months ago (2014-06-19 17:23:13 UTC) #15
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 6 months ago (2014-06-19 17:24:07 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/332233002/200001
6 years, 6 months ago (2014-06-19 17:26:12 UTC) #17
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-19 22:43:02 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_rel/builds/43883)
6 years, 6 months ago (2014-06-19 22:43:03 UTC) #19
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 6 months ago (2014-06-20 14:43:09 UTC) #20
pneubeck (no reviews)
The CQ bit was unchecked by pneubeck@chromium.org
6 years, 6 months ago (2014-06-20 14:43:25 UTC) #21
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 6 months ago (2014-06-20 15:00:47 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/332233002/220001
6 years, 6 months ago (2014-06-20 15:03:17 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 19:06:07 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-20 19:15:43 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/86114)
6 years, 6 months ago (2014-06-20 19:15:44 UTC) #26
pneubeck (no reviews)
The CQ bit was checked by pneubeck@chromium.org
6 years, 6 months ago (2014-06-20 20:26:30 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@chromium.org/332233002/220001
6 years, 6 months ago (2014-06-20 20:28:42 UTC) #28
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-20 20:40:48 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-20 20:48:05 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_aosp/builds/86191)
6 years, 6 months ago (2014-06-20 20:48:06 UTC) #31
pneubeck (no reviews)
6 years, 6 months ago (2014-06-20 21:59:57 UTC) #32
Message was sent while issue was closed.
Committed patchset #7 manually as r278833 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698