Closed Bug 1539578 Opened 6 years ago Closed 6 years ago

Add telemetry for DH use in WebCrypto API

Categories

(Core :: DOM: Web Crypto, enhancement, P1)

68 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jcj, Assigned: jcj)

References

Details

(Whiteboard: [psm-assigned])

Attachments

(2 files)

Our WebCrypto implementation supports using DH as an algorithm in generateKey, which is not one of the recognized algorithms in the published specification [0].

We should seek to remove it from Firefox, but before we do, it'd be good to gather some telemetry on whether it's used at all, even in its' non-standard form.

[0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

Severity: normal → enhancement

Our WebCrypto implementation supports using DH as an algorithm in generateKey,
which is not one of the recognized algorithms in the published specification [0].

We should seek to remove it from Firefox, but before we do, it'd be good to
gather some telemetry on whether it's used at all, even in its' non-standard
form.

[0] https://www.w3.org/TR/WebCryptoAPI/#algorithm-overview

Attached file Data Collection Review (deleted) —

This patch adds a new bucket ID for an existing telemetry histogram.

Attachment #9054488 - Flags: data-review?(chutten)
Comment on attachment 9054488 [details] Data Collection Review Ohhhhh, this is what you meant by "add a bucket". This is fine without an update to the data collection review. The collection was "counting which webcrypto algorithms are used" and covers this nicely. (( I will go through and review this if you'd like, but in that case you should add this bug's number to the bug_numbers field in its definition in Histograms.json ))
Attachment #9054488 - Flags: data-review?(chutten)

(In reply to Chris H-C :chutten from comment #3)

Comment on attachment 9054488 [details]
Data Collection Review

Ohhhhh, this is what you meant by "add a bucket".

This is fine without an update to the data collection review. The collection
was "counting which webcrypto algorithms are used" and covers this nicely.

(( I will go through and review this if you'd like, but in that case you
should add this bug's number to the bug_numbers field in its definition in
Histograms.json ))

Awesome. Then we will proceed! Happy Friday, Chris. :)

Pushed by jjones@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e356ebea641d Add telemetry for DH use in WebCrypto API r=keeler

Welp.

Flags: needinfo?(jjones)
Blocks: 1471684
Pushed by jjones@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/37530e362d32 Add telemetry for DH use in WebCrypto API r=keeler

Backed out changeset 37530e362d32 (Bug 1539578) for browser_WebCrypto_telemetry.js failures

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=37530e362d329083cb3d1a57e2c735252a1b3b83&selectedJob=237704589

Backout link: https://hg.mozilla.org/integration/autoland/rev/576e8aa7f48ce4bc64a9fa64a7459b030fa8bcd4

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=237704589&repo=autoland&lineNumber=12976

[task 2019-04-02T21:36:03.478Z] 21:36:03 INFO - TEST-START | dom/crypto/test/browser/browser_WebCrypto_telemetry.js
[task 2019-04-02T21:36:03.522Z] 21:36:03 INFO - GECKO(4238) | ++DOMWINDOW == 2 (0x7fcd28c98400) [pid = 4357] [serial = 2] [outer = 0x7fcd29bbaf20]
[task 2019-04-02T21:36:03.768Z] 21:36:03 INFO - TEST-INFO | started process screentopng
[task 2019-04-02T21:36:04.696Z] 21:36:04 INFO - TEST-INFO | screentopng: exit 0
[task 2019-04-02T21:36:04.696Z] 21:36:04 INFO - Buffered messages logged at 21:36:03
[task 2019-04-02T21:36:04.696Z] 21:36:04 INFO - Entering test bound ecdh_key
[task 2019-04-02T21:36:04.696Z] 21:36:04 INFO - TEST-PASS | dom/crypto/test/browser/browser_WebCrypto_telemetry.js | Should be 16 bytes derived -
[task 2019-04-02T21:36:04.697Z] 21:36:04 INFO - Buffered messages finished
[task 2019-04-02T21:36:04.698Z] 21:36:04 INFO - TEST-UNEXPECTED-FAIL | dom/crypto/test/browser/browser_WebCrypto_telemetry.js | Should have found an entry for WEBCRYPTO_ALG at index 20 - false == true - JS frame :: resource://testing-common/TelemetryTestUtils.jsm :: assertHistogram :: line 242
[task 2019-04-02T21:36:04.699Z] 21:36:04 INFO - Stack trace:
[task 2019-04-02T21:36:04.699Z] 21:36:04 INFO - resource://testing-common/TelemetryTestUtils.jsm:assertHistogram:242
[task 2019-04-02T21:36:04.700Z] 21:36:04 INFO - chrome://mochitests/content/browser/dom/crypto/test/browser/browser_WebCrypto_telemetry.js:ecdh_key:23
[task 2019-04-02T21:36:04.700Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-04-02T21:36:04.700Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-04-02T21:36:04.700Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-04-02T21:36:04.701Z] 21:36:04 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-04-02T21:36:04.702Z] 21:36:04 INFO - Leaving test bound ecdh_key
[task 2019-04-02T21:36:04.702Z] 21:36:04 INFO - Entering test bound dh_key
[task 2019-04-02T21:36:04.702Z] 21:36:04 INFO - TEST-PASS | dom/crypto/test/browser/browser_WebCrypto_telemetry.js | Should be 16 bytes derived -
[task 2019-04-02T21:36:04.703Z] 21:36:04 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-04-02T21:36:04.703Z] 21:36:04 INFO - TEST-UNEXPECTED-FAIL | dom/crypto/test/browser/browser_WebCrypto_telemetry.js | Should have found an entry for WEBCRYPTO_ALG at index 24 - false == true - JS frame :: resource://testing-common/TelemetryTestUtils.jsm :: assertHistogram :: line 242
[task 2019-04-02T21:36:04.703Z] 21:36:04 INFO - Stack trace:
[task 2019-04-02T21:36:04.704Z] 21:36:04 INFO - resource://testing-common/TelemetryTestUtils.jsm:assertHistogram:242
[task 2019-04-02T21:36:04.705Z] 21:36:04 INFO - chrome://mochitests/content/browser/dom/crypto/test/browser/browser_WebCrypto_telemetry.js:dh_key:40
[task 2019-04-02T21:36:04.705Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-04-02T21:36:04.706Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-04-02T21:36:04.706Z] 21:36:04 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-04-02T21:36:04.707Z] 21:36:04 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-04-02T21:36:04.708Z] 21:36:04 INFO - Leaving test bound dh_key
[task 2019-04-02T21:36:04.712Z] 21:36:04 INFO - GECKO(4238) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2019-04-02T21:36:04.719Z] 21:36:04 INFO - GECKO(4238) | MEMORY STAT | vsize 1742MB | residentFast 332MB | heapAllocated 126MB
[task 2019-04-02T21:36:04.720Z] 21:36:04 INFO - TEST-OK | dom/crypto/test/browser/browser_WebCrypto_telemetry.js | took 516ms

Flags: needinfo?(jjones)

I wish I had any idea why this doesn't work. Welp, disable tests-o-clock.

Flags: needinfo?(jjones)
Pushed by jjones@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c9062e713bf Add telemetry for DH use in WebCrypto API r=keeler
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1564509
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: