Closed Bug 1580398 Opened 5 years ago Closed 7 hours ago

Clarify and refactor how and when FxA keys are fetched

Categories

(Cloud Services :: Server: Firefox Accounts, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1647588

People

(Reporter: markh, Unassigned)

References

Details

There's some confusion when we need to fetchKeys():

  • sync needs the keys, but explicitly calls this._fxaService.keys.getKeys() when it needs them.

  • FxAccountsWebChannel explictly calls this._fxAccounts.keys.getKeys() whenever the password changes, and a comment indicates this is because they are needed for device registration (specifically, for send tab command registration)

But they can't both be correct - we want to register a device as soon as a login happens, so either we must already have keys when sync explicitly asks for them, or we don't actually need them at device registration time. We should work out who is lying :)

or we don't actually need them at device registration time

We can register basic device record without them, but we definitely do need the keys in order to register support for send-tab. So...maybe sync is the one doing it wrong here, and is doing it as a kind of 'ensure we have the keys just in case, even though we probably do already' kind of thing?

I suspect I can going to resolve this as part of a key-derivation refactor over in Bug 1647588, linking it for context.

See Also: → 1647588

@mark - Is there more to do here?

Flags: needinfo?(markh)

Most of the work was done in bug 1647588 and any other identified work is now stale.

Status: NEW → RESOLVED
Closed: 7 hours ago
Duplicate of bug: 1647588
Flags: needinfo?(markh)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.