Firefox OS

Sync Architecture

High level picture

Firefox Sync on Firefox OS

Authentication and security

Everything is encrypted on the client

onepw protocol

  • Verified Firefox Accounts
  • Session Token
  • BrowserID certificate -> BrowserID assertions
  • Crypto keys: kA and kB

Token server

BrowserID assertion -> sync token + node assignment

onepw specification

Token server specification

Client

services/fxaccounts/*

services/common/tokenserverclient.js

Sync Storage Server

1.5 API spec

HAWK authentication

https://github.com/hueniverse/hawk/

Client

  • services/sync/modules (service.js, record.js, rest.js, policies.js)
  • Two separate HTTP request libraries
  • Spinning the event loop via the synchronous Resource

Starting from scratch

Synchronizers

Basic Storage Objects (BSOs)

Collections

  • Bookmarks
  • History
  • Forms
  • Prefs
  • Tabs
  • Passwords
  • Clients
  • Crypto
  • Keys
  • Meta

Synchronizer API

or maybe chrome datastores

Sync UI

SyncUIManagement API

SyncStateMachine

iOS code and documentation as reference