Closed
Bug 1267760
Opened 9 years ago
Closed 9 years ago
Send push public key and auth secret when registering/updating a device
Categories
(Firefox :: Sync, defect, P2)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
Firefox 49
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | fixed |
People
(Reporter: eoger, Assigned: eoger)
References
Details
Attachments
(1 file, 4 obsolete files)
We need these keys to use push payloads on the server side.
Updated•9 years ago
|
Flags: firefox-backlog+
| Assignee | ||
Comment 1•9 years ago
|
||
Extended description: We want the Fxa server to be able to send different types of notifications to the desktop client (new device joined, account verified, etc) in the future.
Sending data along a push notification helps us differentiate these commands with a single endpoint.
In order to send data payloads, we need to provide a couple of crypto keys to the server to encrypt the message when we register or update a device.
| Assignee | ||
Comment 2•9 years ago
|
||
We shouldn't merge this until the FxA servers accept push keys again
Attachment #8745805 -
Flags: review?(markh)
Comment 3•9 years ago
|
||
Comment on attachment 8745805 [details] [diff] [review]
bug-1267760.patch
Review of attachment 8745805 [details] [diff] [review]:
-----------------------------------------------------------------
Looks OK to me, but I suspect Kit better understands if this is the right thing to do.
::: services/fxaccounts/tests/xpcshell/test_accounts_device_registration.js
@@ +106,5 @@
> resolve({
> + endpoint: "http://mochi.test:8888",
> + getKey: function(type) {
> + if (type === "auth") {
> + return "GSsIiaD2Mr83iPqwFNK4rw";
it seems like these should be constants?
Attachment #8745805 -
Flags: review?(markh) → review?(kcambridge)
| Assignee | ||
Comment 4•9 years ago
|
||
I refactored the tests
Attachment #8745805 -
Attachment is obsolete: true
Attachment #8745805 -
Flags: review?(kcambridge)
Attachment #8745816 -
Flags: review?(kcambridge)
| Assignee | ||
Comment 5•9 years ago
|
||
Note to myself: I'll have to change the reviewer name on the commit message.
Comment 6•9 years ago
|
||
Comment on attachment 8745816 [details] [diff] [review]
bug-1267760.patch
Review of attachment 8745816 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks, looks great!
::: services/fxaccounts/FxAccounts.jsm
@@ +1498,5 @@
> if (subscription && subscription.endpoint) {
> deviceOptions.pushCallback = subscription.endpoint;
> + let publicKey = subscription.getKey('p256dh');
> + let authKey = subscription.getKey('auth');
> + let urlsafeBase64Encode = key => ChromeUtils.base64URLEncode(new Uint8Array(key), { pad: false });
Nit: This could be a top-level function, but leaving it here is OK, too.
::: services/fxaccounts/FxAccountsClient.jsm
@@ +367,5 @@
> * Extra device options
> * @param [options.pushCallback]
> * `pushCallback` push endpoint callback
> + * @param [options.pushPublicKey]
> + * `pushPublicKey` push public key
Nit: A comment that these are Base64 URL-encoded would be good.
Attachment #8745816 -
Flags: review?(kcambridge) → review+
| Assignee | ||
Comment 7•9 years ago
|
||
Thanks kit! Carrying r+ forward
Attachment #8745816 -
Attachment is obsolete: true
Attachment #8746238 -
Flags: review+
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Comment 9•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
| Assignee | ||
Comment 10•9 years ago
|
||
I asked Kit to back this out since I contradicted myself (see comment 2)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Comment on attachment 8746238 [details] [diff] [review]
bug-1267760.patch
I'm fairly sure that already registered devices will not register with this new info.
Attachment #8746238 -
Flags: review+
Updated•9 years ago
|
Status: REOPENED → ASSIGNED
Updated•9 years ago
|
Priority: -- → P2
Updated•9 years ago
|
| Assignee | ||
Comment 13•9 years ago
|
||
Rebased and bumped the DEVICE_REGISTRATION_VERSION constant we introduced in bug 1268761
Attachment #8746238 -
Attachment is obsolete: true
Attachment #8749804 -
Flags: review+
| Assignee | ||
Comment 14•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/54962/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/54962/
Attachment #8756118 -
Flags: review?(kcambridge)
| Assignee | ||
Updated•9 years ago
|
Attachment #8749804 -
Attachment is obsolete: true
| Assignee | ||
Comment 15•9 years ago
|
||
Rebased in prevision of the new fxa-auth-server release this week (with keys support!). ni myself to remind me to land this.
Flags: needinfo?(edouard.oger)
Updated•9 years ago
|
Attachment #8756118 -
Flags: review?(kcambridge) → review+
Comment 16•9 years ago
|
||
Comment on attachment 8756118 [details]
MozReview Request: Bug 1267760 - Send push public key and auth secret when registering/updating a device. r=kitcambridge
https://reviewboard.mozilla.org/r/54962/#review51632
| Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
| Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(edouard.oger)
Comment 17•9 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/7520b940afc8
Send push public key and auth secret when registering/updating a device. r=kitcambridge
Keywords: checkin-needed
Comment 18•9 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=9681002&repo=fx-team
Flags: needinfo?(edouard.oger)
Comment 19•9 years ago
|
||
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/e3d409d10dea
Backed out changeset 7520b940afc8 for eslint failure
| Assignee | ||
Comment 20•9 years ago
|
||
Comment on attachment 8756118 [details]
MozReview Request: Bug 1267760 - Send push public key and auth secret when registering/updating a device. r=kitcambridge
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/54962/diff/1-2/
| Assignee | ||
Comment 21•9 years ago
|
||
My bad, here it is corrected
Flags: needinfo?(edouard.oger)
Keywords: checkin-needed
Comment 22•9 years ago
|
||
Pushed by kcambridge@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/2df619ad3af0
Send push public key and auth secret when registering/updating a device. r=kitcambridge
Keywords: checkin-needed
Comment 23•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•