πŸ“‘ Forwarding data with asrelayΒΆ

OverviewΒΆ

asrelay is a tool for Windows and macOS computers to relay data for consumption through the ricloud APIs. It can efficiently and securely stream data through asmaster.

Whilst it can be used for relay of more general data, the tool has deep integration with support for iOS device and backup data. It is able to trigger backups of iOS devices over wi-fi and USB, allowing clients to consume both iCloud and iTunes data with asmaster, and to switch transparently between them.

Reincubate have been making desktop software since 2008, and the company has years of experience producing robust applications and supporting them on Windows and macOS. Binaries are available on request.

Key features include:

CustomisationΒΆ

  • Full white-label and customisation functionality for clients to “make it their own”. Imagery, text and links can all be overridden.

Robustness across a variety of platforms & connectionsΒΆ

  • Support for all iOS versions, including iOS 11 beta, leveraging Reincubate’s proprietary iPhone Backup Extractor technology.
  • Native integration with notification system where appropriate in both Windows and macOS.
  • Support for Windows Vista and newer, and macOS 10.8 and newer.
  • Robust auto-update mechanism.
  • Small footprint (~5Mb on Windows) with no external dependancies.

Rapid relaying of dataΒΆ

Locally stored repositories of data can be large and frequently updated, so asrelay uses a number of techniques to ensure it is highly scaleable.

  • Selective examination of data to relay only that which is required at any given time.
  • Full use of since mechanism to reduce upload times: even when files have changed they are not dumbly resubmitted, only their new data is. [coming soon]
  • Automatic thumbnailing and compression of media to accelerate previews. [coming soon]
  • Automatic selection of geographically close servers.
  • Support for resumable uploads of relay data.
  • Smart detection of full and partial backup updates.

SecurityΒΆ

  • Fool-proof “one-time-code” pairing process to simplify authentication of client applications to data relay.
  • Robust permissions system allow end-users to grant access to a subset of backups.
  • Full support for all versions of iTunes’ encrypted backups.
  • Secure AES-256 encryption on relay buckets.
  • Functionality for clients to purge partially relayed data.

The end-user’s journeyΒΆ

From an end-user’s perspective, their journey using asrelay looks like this:

  1. Ensure their PC or Mac is set to back up their iOS device over USB or wi-fi
  2. Download the white-labelled desktop software
  3. Enter the pairing code it presents into the client’s site or app
  4. Respond to the desktop prompt to grant permission the first time a backup is accessed

...all done.

The flow including API callsΒΆ

The end-user logs into the client’s site and chooses to work with data from their local backups.

The site presents the user with a small download, which is native for macOS or Windows.

The user runs the downloaded program, and is presented with a prompt bearing the branding of the client. The prompt asks the user to click to pair, and presents a six-digit pairing code. The pairing-code is time-limited (to some minutes) and is single-use.

The user enters that pairing code into the client’s site or app.

The client’s server issues some instructions to the asmaster API, shown here in the format of our open source client wrapper:

$ # This first command uses the pairing code to subscribe to data from the end-user, using an identifier that the client chooses themselves
$ python ricloud -m --subscribe-account [end-user-identifier] [pairing-code] asrelay-itunes
{
  "account_id": 123456,
  "success": true
}

Once this command is sent, the API will return an account ID to the client, and communicate with the end-user’s computer to receive a list of device backup names.

The client will use the command below to fetch a list of available backups from the end-user. Those backups will be presented to the end-user on the client’s site, and the end-user will choose one or more to examine.

$ # This command is used to return a list of available backups to the client.
$ python ricloud -m --list-devices [account-id]
{
  "devices": [
    {
      "ios_version": "10.2",
      "name": "iPhone 7 Plus",
      "colour": "1",
      "device_name": "Johnny's iPhone",
      "latest-backup": "2017-01-31 22:06:06.000000",
      "model": "D111AP",
      "device_tag": "3d0d7e5fb2ce288813306e4d4636395e047a3d28",
      "serial": "ABC123BBBBBB",
      "device_id": 2
    }
  ],
  "success": true
}

If a request for device list data is made before asrelay has sent it to the server, this response will be given. Typically, this will take a few seconds at most.

{
  "message": "Waiting for asrelay to upload the information necessary to complete this task.",
  "success": false,
  "error": "asmaster-awaiting-data"
}

With a list of devices, the server can request a subscription using the following command:

$ python -m ricloud  --subscribe-device  123456 2
{
  "success": true
}

Once this is done, the user will receive a prompt on their computer stating Client-name wants to access backup data from your device "Johnny's iPhone". Approve or deny? Clicking on the prompt will allow the end-user to approve or deny access. If the backup is password protected, the user will also be prompted on the desktop to enter their backup password. Backup passwords are never uploaded. If access is granted, data will automatically flow to the client through their aschannel endpoint immediately, and then as and when it is updated.