Closed Bug 958464 Opened 6 years ago Closed 6 years ago

Client support for tokenserver "invalid-generation" response.

Categories

(Firefox :: Sync, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: rfkelly, Assigned: jedp)

References

Details

(Whiteboard: [qa+])

Attachments

(1 file)

To speed up the propagation of password changes, the FxA server will include a "generation number" in all identity certificates that it issues.  This is an integer that will increase monotonically with each change of the user's password.

If the tokenserver received an assertion with an old generation number, it will reject it with an "invalid-generation" response as described in Bug 958462.

The client needs to detect this response and fetch a fresh identity certificate from the FxA auth server.  Which almost certainly entails re-prompting the user for their updated password.
Whiteboard: [qa+]
Assignee: nobody → jparsons
When a 401 is returned by the token server, TokenServerClient.getTokenFromBrowserIDAssertion() will call back with an error that includes the cause, e.g., invalid-generation.

It looks like the only place this method is invoked is in browserid_identity.js [1] where the error will be caught and cause the _fetchTokenForUser() promise to be rejected.

Mark, is this enough to get the info you need for the UI bits?

[1] https://mxr.mozilla.org/mozilla-central/source/services/sync/modules/browserid_identity.js#308
Flags: needinfo?(mhammond)
yes
Flags: needinfo?(mhammond)
Attachment #8366941 - Flags: review?(mhammond)
Comment on attachment 8366941 [details] [diff] [review]
Report cause of 401 error (invalid-generation, etc.)

Review of attachment 8366941 [details] [diff] [review]:
-----------------------------------------------------------------

Mark Hammond r+ over my shoulder
Attachment #8366941 - Flags: review?(mhammond) → review+
https://hg.mozilla.org/integration/fx-team/rev/d8d2ac7002ff
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [qa+] → [qa+][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/d8d2ac7002ff
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [qa+][fixed-in-fx-team] → [qa+]
Target Milestone: --- → mozilla29
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.