add support for encrypted Telemetry, and expose to privileged WebExtensions
Categories
(Toolkit :: Telemetry, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: rhelmer, Assigned: rhelmer)
References
(Blocks 1 open bug, )
Details
Attachments
(2 files)
We currently expose browser.telemetry
to privileged WebExtensions: https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/collection/webextension-api.html
Privileged WebExtensions are those signed as first-party by Mozilla, and not third-party by addons.mozilla.org
To support Pioneer v2, we need a way to allow privileged add-ons as well as regular Firefox code. I'm proposing that we add a few new options to submitCustomPing
in the client-side Telemetry code (to enable encryption, pass a public key, and add a Pioneer ID).
Client-side encryption should use the already-in-tree jwcrypto.jsm
to produce JSON Web Encryption object (https://tools.ietf.org/html/rfc7516) for a given JSON Web Key (https://tools.ietf.org/html/rfc7517).
To make it easy for Pioneer add-ons to get things right, we should expose a thin wrapper to this as a browser.telemetry.submitEncryptedPing
function which only takes a payload. Other data such as the public key, option to add the Pioneer ID, etc. will be specified in the WebExtension's manifest.
Full details are in this proposal: https://docs.google.com/document/d/1OB9wTj7BKHM3q8eRyNv7zLcOKIu76Y7O92jhVj3u9IQ/edit#
Assignee | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
(setting some fields so Triagebot won't yell at me)
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D73524
Assignee | ||
Comment 4•5 years ago
|
||
Here's the URL to a sample repo that shows how to use this from a privileged WebExtension.
Assignee | ||
Comment 5•5 years ago
|
||
Also did some testing to make sure it works with the new ingestion setup for Pioneer v2 in bug 1628539.
Comment 7•5 years ago
|
||
Backed out for xpcshell failures on test_TelemetryController.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/18b8c731f2b3377f41ef43215e1e5530983bb727
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301446556&repo=autoland&lineNumber=1421
Assignee | ||
Comment 8•5 years ago
•
|
||
(In reply to Narcis Beleuzu [:NarcisB] from comment #7)
Backed out for xpcshell failures on test_TelemetryController.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/18b8c731f2b3377f41ef43215e1e5530983bb727
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=301446556&repo=autoland&lineNumber=1421
Looks like we need to disable on Android, we have no current plans to use encrypted payloads in Telemetry pings there so being Desktop-only is fine for now.
Including Android in my try run before landing again:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d90d0d28196c65eab3cf6d06e8dbf4b2c458a1a8
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8ee55768675e
https://hg.mozilla.org/mozilla-central/rev/1b10b4ffe94d
Description
•