-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1146649 - Retry token server token fetches to avoid 401/invalid-t…
…imestamp. This adds the token server's remote timestamp (from the X-Timestamp header, which every healthy token server should return) to both token server errors and token server tokens. The Firefox Sync auth state uses an error's remote timestamp to retry a request made with an invalid-timestamp. This fixes the immediate problem. In future, we can do better by persisting the local clock skew relative to the token server in the auth state local cache. To test, set your local clock a few minutes ahead of "true" and restart the iOS simulator. You should consistently see token server retries (which eventually succeed). The Mozilla storage service endpoints accept a HAWK requests signed at a variety of different timestamps. Eventually, we will track skew against an individual storage service endpoint and use it to improve our HAWK requests. As a half-way step, we could use the remote timestamp added to token server tokens: the token server and storage service clocks are expected to be very close.
- Loading branch information
Showing
3 changed files
with
69 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters