CloudServices/WheresMyFox
Where's My Fox
Overview
To provide a means for users to locate, track and purge devices remotely.
Project Contacts
Principal Point of Contact - Doug Turner dougt@mozilla.com
IRC - #services-dev
Group Email - TBD
Goals
- Be able to provide a simple, secure means for FirefoxOS users to remotely locate, track and purge their devices.
Use Cases
1) Albert can't remember the location of his phone. Going to a nearby computer, he logs into WheresMyFox and requests the phone to report it's location. The phone reports that it is nearby, so Albert requests the device to ring. Albert quickly finds that his phone is in his coat pocket.
2) Bea discovers that her phone is missing. Using a friends phone, she logs into WheresMyFox and requests the phone to report it's location. She discovers that the phone is currently headed down Broadway, and realizes she has left it in the cab. Realizing that she may never see her phone again, she requests the phone to remotely wipe itself, before calling the cab agency to see if she can recover her device.
Requirements
- The user must use a secure credentialing and authorization system to identify self and associate to a device.
- The login system is currently Out of Scope of these requirements, but should be or substantially similar to Firefox Accounts.
- A user may have one or more devices.
- A device shall have a Globally Unique Identifier (WTFID).
- A device shall be associated with a single user.
- Data exchanged between client and server shall be via JSON Web Signature format
- The secret shall be generated and stored on the client, and sent to the server ONLY on initialization.
- The secret shall be a 128bit value.
- The secret shall be stored on the device as long as the WTFID remains unchanged.
- A new WTFID shall require a new secret to be generated and the device to reconnect as if new.
- No data shall be preserved in the case of a WTFID changing.
- Data signatures shall use HMAC SHA-256 or any more secure signing method for any exchange EXCEPT for Initialization.
- The secret shall be generated and stored on the client, and sent to the server ONLY on initialization.
- A remote wipe operation will format any additional storage (e.g. SD card) on the phone and reset the phone to initial Factory conditions.
- Only allow registered user to display and remotely control devices.
- Securely send commands to:
- report location on a regular interval (for motion tracking)
- record tracking information keeping latest location for device
- older records expired after ? period ?
- play a default audio alarm.
- For known period? Forever? What happens if multiple of these commands sent?
- remove all user information from a device
- Remotely lock/unlock device?
- Factory reset or brick?
- report location on a regular interval (for motion tracking)
- Securely display UI for phone including
- current location
- previous locations
- available commands
- help
- login page
- store user & device information (multiple devices)
- How long to store data?
- How reliable does storage need to be?
Get Involved
Call to action for folks who want to help.
Design
Points of Contact
Engineer - Name jr@
Discussions
https://etherpad.mozilla.org/wheresmyfox-2013-10-28
Client API Reference/Documentation
Client UX was presented by Epic:
https://www.dropbox.com/sh/uaxlhzz211br438/rH2UA0Tf6_/WIMF_3.0.pdf
Server API Reference/Documentation
API calls will be a combination of REST calls and BOSH where possible. This avoids some of the issues with the fragility of websockets in areas where connectivity is sub-optimal or sporadic.
In addition, packet identifiers have been reduced as much as possible. This is to both reduce bandwidth costs as well as require less time to exchange data (remember, this content is being converted and wrapped in JWS)
Data Schema
Since each server system will be unique, it does not make sense to strictly specify the data storage method. Instead an example storage mechanism will be offered to illustrate how the server would manage data.
A simple storage object would be keyed off of the ID returned in the /$v/init
call.
key => {"lastPosition":{"lat":lat, // The last position reported by track "lon":lon, "alt":altitude?, // Optional "altitude", if provided "tim":UTC}, // UTC Timestamp "previousPositions":[{position},...], // the last 5? position reports for the device "state":"(rtn)", // the state the server thinks the device is in "lastExchange":UTC // last time an exchange happened. } user => ["key:name",...] // A list of known keys & user friendly names for devices
API
For this API discussion:
$v - API Version (currently 1)
$id - Globally unique ID for a device
Unless otherwise specified, all exchanged JSON blocks are wrapped in JWS (not shown here for simplicity).
POST /$v/init
Post the Init JSON block to the WMF server.
From Client (not wrapped in JWS):
{"secret":bin64encoded 128b value}
Server Reply:
200 {"id": $id}
GET /$v/cmd/$id
GET the next command from the Server. This call is triggered by a SimplePush version update.
From Server:
{"c":COMMAND, ARGS}
where COMMAND is:
- ring
- cause the phone to ring constantly for duration seconds.
e.g.{"c":"r","d":60}
will cause the phone to ring for 60 seconds or until dismissed on the device by the user. - track
- Have the phone report back it's location every period seconds
e.g.{"c":"t","p":20}
will cause the phone to POST to/$v/cmd/$id
{"c":"t", "la":$lattitudeDecimal, "lo":$longitudeDecimal} The server may reply back to the "track" POST with either an empty 200 or a COMMAND object - cancel
- Cancel the current activity ("ring" or "track").
- lock
- Lock a phone to the provided lock code.
{"c":"k", "c":$lockCode} - message
- Set a brief message on the lock screen of the phone. Messages must be less than 100 non control, UTF8 characters. {"c":"m", "m":"If found, please email reward@example.com..."} Note: this needs to be stripped and scrubbed like nobody's business. It's potentially an attack vector.
- nuke.
- Factory Reset your phone.
For each command the client receives, the client optionally POSTs an Ack:
{"command":"ack", "action":"command letter}
e.g. for the "ring" command:
{"c":"a", "a":"r"}
Each client Ack may return an additional COMMAND object from the server.
Platform Requirements
What are the things this needs (OS, language, databases, etc.)?
Libraries Required
List of external project dependencies. (Stuff that's not pulled in via the installation script)
Code Repository
Links to the published code bases
Release Schedule
Predicted code delivery dates
QA
Points of Contact
Engineer - Ed Wong edwong@
Test Framework
Security and Privacy
Tracking bug: 935724
- Bug 935725 - Security Review: Where's My Fox
- Bug 935726 - Legal Review: Where's My Fox
- Bug 935727 - Privacy-Technical Review: Where's My Fox
- Bug 935728 - Privacy-Policy Review: Where's My Fox
Points of Contact
Legal - udevi@
Questionnaire Answers
1.1 Goal of Feature
2. Potential Threat Vectors and Mitigation Points
Review Status
https://bugzilla.mozilla.org/show_bug.cgi?id=935725
see https://wiki.mozilla.org/Security/Reviews
Issues and Resolutions
Operations
Points of Contact
Deployment Architecture
Bugzilla Tracking # -