From 9627f18cebab38cdfe45592d83371ee7bbc62cfa Mon Sep 17 00:00:00 2001
From: "Matt A. Tobin"
Date: Fri, 2 Feb 2018 09:21:33 -0500
Subject: Remove kinto client, Firefox kinto storage adapter, blocklist update
client and integration with sync, OneCRL and the custom time check for
derives system time.
---
browser/base/content/content.js | 43 +-
.../locales/en-US/chrome/overrides/netError.dtd | 2 +-
modules/libpref/init/all.js | 25 -
security/manager/ssl/CertBlocklist.cpp | 23 +-
security/manager/ssl/CertBlocklist.h | 2 -
services/common/blocklist-clients.js | 310 --
services/common/blocklist-updater.js | 117 -
services/common/kinto-http-client.js | 1891 ---------
services/common/kinto-offline-client.js | 4286 --------------------
services/common/moz.build | 4 -
.../tests/unit/test_blocklist_certificates.js | 224 -
.../common/tests/unit/test_blocklist_clients.js | 412 --
.../common/tests/unit/test_blocklist_signatures.js | 510 ---
.../common/tests/unit/test_blocklist_updater.js | 173 -
services/common/tests/unit/test_kinto.js | 412 --
services/common/tests/unit/xpcshell.ini | 8 -
services/sync/modules/engines/extension-storage.js | 277 --
services/sync/modules/service.js | 1 -
services/sync/moz.build | 1 -
testing/profiles/prefs_general.js | 2 -
.../components/extensions/ExtensionStorageSync.jsm | 848 ----
toolkit/components/extensions/ext-storage.js | 22 -
toolkit/components/extensions/moz.build | 1 -
.../test/xpcshell/test_ext_storage_sync.js | 1073 -----
.../extensions/test/xpcshell/xpcshell.ini | 3 -
.../mozapps/extensions/internal/AddonTestUtils.jsm | 1 -
toolkit/mozapps/extensions/nsBlocklistService.js | 11 -
.../test/xpcshell/test_blocklist_regexp.js | 6 -
28 files changed, 24 insertions(+), 10664 deletions(-)
delete mode 100644 services/common/blocklist-clients.js
delete mode 100644 services/common/blocklist-updater.js
delete mode 100644 services/common/kinto-http-client.js
delete mode 100644 services/common/kinto-offline-client.js
delete mode 100644 services/common/tests/unit/test_blocklist_certificates.js
delete mode 100644 services/common/tests/unit/test_blocklist_clients.js
delete mode 100644 services/common/tests/unit/test_blocklist_signatures.js
delete mode 100644 services/common/tests/unit/test_blocklist_updater.js
delete mode 100644 services/common/tests/unit/test_kinto.js
delete mode 100644 services/sync/modules/engines/extension-storage.js
delete mode 100644 toolkit/components/extensions/ExtensionStorageSync.jsm
delete mode 100644 toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js
diff --git a/browser/base/content/content.js b/browser/base/content/content.js
index 658d2014d..8d6f0745e 100644
--- a/browser/base/content/content.js
+++ b/browser/base/content/content.js
@@ -315,29 +315,26 @@ var AboutNetAndCertErrorListener = {
case MOZILLA_PKIX_ERROR_NOT_YET_VALID_CERTIFICATE:
case MOZILLA_PKIX_ERROR_NOT_YET_VALID_ISSUER_CERTIFICATE:
- // use blocklist stats if available
- if (Services.prefs.getPrefType(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS)) {
- let difference = Services.prefs.getIntPref(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS);
-
- // if the difference is more than a day
- if (Math.abs(difference) > 60 * 60 * 24) {
- let formatter = new Intl.DateTimeFormat();
- let systemDate = formatter.format(new Date());
- // negative difference means local time is behind server time
- let actualDate = formatter.format(new Date(Date.now() - difference * 1000));
-
- content.document.getElementById("wrongSystemTime_URL")
- .textContent = content.document.location.hostname;
- content.document.getElementById("wrongSystemTime_systemDate")
- .textContent = systemDate;
- content.document.getElementById("wrongSystemTime_actualDate")
- .textContent = actualDate;
-
- content.document.getElementById("errorShortDesc")
- .style.display = "none";
- content.document.getElementById("wrongSystemTimePanel")
- .style.display = "block";
- }
+ let appBuildId = Services.appinfo.appBuildID;
+ let year = parseInt(appBuildID.substr(0, 4), 10);
+ let month = parseInt(appBuildID.substr(4, 2), 10) - 1;
+ let day = parseInt(appBuildID.substr(6, 2), 10);
+ let buildDate = new Date(year, month, day);
+ let systemDate = new Date();
+
+ // if the difference is more than a day
+ if (buildDate > systemDate) {
+ let formatter = new Intl.DateTimeFormat();
+
+ content.document.getElementById("wrongSystemTime_URL")
+ .textContent = content.document.location.hostname;
+ content.document.getElementById("wrongSystemTime_systemDate")
+ .textContent = formatter.format(systemDate);
+
+ content.document.getElementById("errorShortDesc")
+ .style.display = "none";
+ content.document.getElementById("wrongSystemTimePanel")
+ .style.display = "block";
}
learnMoreLink.href = baseURL + "time-errors";
break;
diff --git a/browser/locales/en-US/chrome/overrides/netError.dtd b/browser/locales/en-US/chrome/overrides/netError.dtd
index 30dd2346a..92db8ee3a 100644
--- a/browser/locales/en-US/chrome/overrides/netError.dtd
+++ b/browser/locales/en-US/chrome/overrides/netError.dtd
@@ -199,7 +199,7 @@ was trying to connect. -->
-A secure connection to isn’t possible because your clock appears to show the wrong time.
Your computer thinks it is , when it should be . To fix this problem, change your date and time settings to match the correct time.
">
+&brandShortName; did not connect to because your computer’s clock appears to show the wrong time and this is preventing a secure connection. Your computer is set to . To fix this problem, change your date and time settings to match the correct time.
">
lastUpdate) {
int64_t interval = now - lastUpdate;
@@ -659,13 +647,8 @@ CertBlocklist::PreferenceChanged(const char* aPref, void* aClosure)
if (strcmp(aPref, PREF_BACKGROUND_UPDATE_TIMER) == 0) {
sLastBlocklistUpdate = Preferences::GetUint(PREF_BACKGROUND_UPDATE_TIMER,
uint32_t(0));
- } else if (strcmp(aPref, PREF_BLOCKLIST_ONECRL_CHECKED) == 0) {
- sLastKintoUpdate = Preferences::GetUint(PREF_BLOCKLIST_ONECRL_CHECKED,
- uint32_t(0));
} else if (strcmp(aPref, PREF_MAX_STALENESS_IN_SECONDS) == 0) {
sMaxStaleness = Preferences::GetUint(PREF_MAX_STALENESS_IN_SECONDS,
uint32_t(0));
- } else if (strcmp(aPref, PREF_ONECRL_VIA_AMO) == 0) {
- sUseAMO = Preferences::GetBool(PREF_ONECRL_VIA_AMO, true);
}
}
diff --git a/security/manager/ssl/CertBlocklist.h b/security/manager/ssl/CertBlocklist.h
index 60f675cd8..2cad45eef 100644
--- a/security/manager/ssl/CertBlocklist.h
+++ b/security/manager/ssl/CertBlocklist.h
@@ -80,9 +80,7 @@ private:
protected:
static void PreferenceChanged(const char* aPref, void* aClosure);
static uint32_t sLastBlocklistUpdate;
- static uint32_t sLastKintoUpdate;
static uint32_t sMaxStaleness;
- static bool sUseAMO;
virtual ~CertBlocklist();
};
diff --git a/services/common/blocklist-clients.js b/services/common/blocklist-clients.js
deleted file mode 100644
index fc51aaca4..000000000
--- a/services/common/blocklist-clients.js
+++ /dev/null
@@ -1,310 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = ["AddonBlocklistClient",
- "GfxBlocklistClient",
- "OneCRLBlocklistClient",
- "PluginBlocklistClient",
- "FILENAME_ADDONS_JSON",
- "FILENAME_GFX_JSON",
- "FILENAME_PLUGINS_JSON"];
-
-const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-const { Task } = Cu.import("resource://gre/modules/Task.jsm");
-const { OS } = Cu.import("resource://gre/modules/osfile.jsm");
-Cu.importGlobalProperties(["fetch"]);
-
-const { loadKinto } = Cu.import("resource://services-common/kinto-offline-client.js");
-const { KintoHttpClient } = Cu.import("resource://services-common/kinto-http-client.js");
-const { CanonicalJSON } = Components.utils.import("resource://gre/modules/CanonicalJSON.jsm");
-
-const PREF_SETTINGS_SERVER = "services.settings.server";
-const PREF_BLOCKLIST_BUCKET = "services.blocklist.bucket";
-const PREF_BLOCKLIST_ONECRL_COLLECTION = "services.blocklist.onecrl.collection";
-const PREF_BLOCKLIST_ONECRL_CHECKED_SECONDS = "services.blocklist.onecrl.checked";
-const PREF_BLOCKLIST_ADDONS_COLLECTION = "services.blocklist.addons.collection";
-const PREF_BLOCKLIST_ADDONS_CHECKED_SECONDS = "services.blocklist.addons.checked";
-const PREF_BLOCKLIST_PLUGINS_COLLECTION = "services.blocklist.plugins.collection";
-const PREF_BLOCKLIST_PLUGINS_CHECKED_SECONDS = "services.blocklist.plugins.checked";
-const PREF_BLOCKLIST_GFX_COLLECTION = "services.blocklist.gfx.collection";
-const PREF_BLOCKLIST_GFX_CHECKED_SECONDS = "services.blocklist.gfx.checked";
-const PREF_BLOCKLIST_ENFORCE_SIGNING = "services.blocklist.signing.enforced";
-
-const INVALID_SIGNATURE = "Invalid content/signature";
-
-this.FILENAME_ADDONS_JSON = "blocklist-addons.json";
-this.FILENAME_GFX_JSON = "blocklist-gfx.json";
-this.FILENAME_PLUGINS_JSON = "blocklist-plugins.json";
-
-function mergeChanges(localRecords, changes) {
- // Kinto.js adds attributes to local records that aren't present on server.
- // (e.g. _status)
- const stripPrivateProps = (obj) => {
- return Object.keys(obj).reduce((current, key) => {
- if (!key.startsWith("_")) {
- current[key] = obj[key];
- }
- return current;
- }, {});
- };
-
- const records = {};
- // Local records by id.
- localRecords.forEach((record) => records[record.id] = stripPrivateProps(record));
- // All existing records are replaced by the version from the server.
- changes.forEach((record) => records[record.id] = record);
-
- return Object.values(records)
- // Filter out deleted records.
- .filter((record) => record.deleted != true)
- // Sort list by record id.
- .sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
-}
-
-
-function fetchCollectionMetadata(collection) {
- const client = new KintoHttpClient(collection.api.remote);
- return client.bucket(collection.bucket).collection(collection.name).getData()
- .then(result => {
- return result.signature;
- });
-}
-
-function fetchRemoteCollection(collection) {
- const client = new KintoHttpClient(collection.api.remote);
- return client.bucket(collection.bucket)
- .collection(collection.name)
- .listRecords({sort: "id"});
-}
-
-/**
- * Helper to instantiate a Kinto client based on preferences for remote server
- * URL and bucket name. It uses the `FirefoxAdapter` which relies on SQLite to
- * persist the local DB.
- */
-function kintoClient() {
- let base = Services.prefs.getCharPref(PREF_SETTINGS_SERVER);
- let bucket = Services.prefs.getCharPref(PREF_BLOCKLIST_BUCKET);
-
- let Kinto = loadKinto();
-
- let FirefoxAdapter = Kinto.adapters.FirefoxAdapter;
-
- let config = {
- remote: base,
- bucket: bucket,
- adapter: FirefoxAdapter,
- };
-
- return new Kinto(config);
-}
-
-
-class BlocklistClient {
-
- constructor(collectionName, lastCheckTimePref, processCallback, signerName) {
- this.collectionName = collectionName;
- this.lastCheckTimePref = lastCheckTimePref;
- this.processCallback = processCallback;
- this.signerName = signerName;
- }
-
- validateCollectionSignature(payload, collection, ignoreLocal) {
- return Task.spawn((function* () {
- // this is a content-signature field from an autograph response.
- const {x5u, signature} = yield fetchCollectionMetadata(collection);
- const certChain = yield fetch(x5u).then((res) => res.text());
-
- const verifier = Cc["@mozilla.org/security/contentsignatureverifier;1"]
- .createInstance(Ci.nsIContentSignatureVerifier);
-
- let toSerialize;
- if (ignoreLocal) {
- toSerialize = {
- last_modified: `${payload.last_modified}`,
- data: payload.data
- };
- } else {
- const localRecords = (yield collection.list()).data;
- const records = mergeChanges(localRecords, payload.changes);
- toSerialize = {
- last_modified: `${payload.lastModified}`,
- data: records
- };
- }
-
- const serialized = CanonicalJSON.stringify(toSerialize);
-
- if (verifier.verifyContentSignature(serialized, "p384ecdsa=" + signature,
- certChain,
- this.signerName)) {
- // In case the hash is valid, apply the changes locally.
- return payload;
- }
- throw new Error(INVALID_SIGNATURE);
- }).bind(this));
- }
-
- /**
- * Synchronize from Kinto server, if necessary.
- *
- * @param {int} lastModified the lastModified date (on the server) for
- the remote collection.
- * @param {Date} serverTime the current date return by the server.
- * @return {Promise} which rejects on sync or process failure.
- */
- maybeSync(lastModified, serverTime) {
- let db = kintoClient();
- let opts = {};
- let enforceCollectionSigning =
- Services.prefs.getBoolPref(PREF_BLOCKLIST_ENFORCE_SIGNING);
-
- // if there is a signerName and collection signing is enforced, add a
- // hook for incoming changes that validates the signature
- if (this.signerName && enforceCollectionSigning) {
- opts.hooks = {
- "incoming-changes": [this.validateCollectionSignature.bind(this)]
- }
- }
-
- let collection = db.collection(this.collectionName, opts);
-
- return Task.spawn((function* syncCollection() {
- try {
- yield collection.db.open();
-
- let collectionLastModified = yield collection.db.getLastModified();
- // If the data is up to date, there's no need to sync. We still need
- // to record the fact that a check happened.
- if (lastModified <= collectionLastModified) {
- this.updateLastCheck(serverTime);
- return;
- }
- // Fetch changes from server.
- try {
- let syncResult = yield collection.sync();
- if (!syncResult.ok) {
- throw new Error("Sync failed");
- }
- } catch (e) {
- if (e.message == INVALID_SIGNATURE) {
- // if sync fails with a signature error, it's likely that our
- // local data has been modified in some way.
- // We will attempt to fix this by retrieving the whole
- // remote collection.
- let payload = yield fetchRemoteCollection(collection);
- yield this.validateCollectionSignature(payload, collection, true);
- // if the signature is good (we haven't thrown), and the remote
- // last_modified is newer than the local last_modified, replace the
- // local data
- const localLastModified = yield collection.db.getLastModified();
- if (payload.last_modified >= localLastModified) {
- yield collection.clear();
- yield collection.loadDump(payload.data);
- }
- } else {
- throw e;
- }
- }
- // Read local collection of records.
- let list = yield collection.list();
-
- yield this.processCallback(list.data);
-
- // Track last update.
- this.updateLastCheck(serverTime);
- } finally {
- collection.db.close();
- }
- }).bind(this));
- }
-
- /**
- * Save last time server was checked in users prefs.
- *
- * @param {Date} serverTime the current date return by server.
- */
- updateLastCheck(serverTime) {
- let checkedServerTimeInSeconds = Math.round(serverTime / 1000);
- Services.prefs.setIntPref(this.lastCheckTimePref, checkedServerTimeInSeconds);
- }
-}
-
-/**
- * Revoke the appropriate certificates based on the records from the blocklist.
- *
- * @param {Object} records current records in the local db.
- */
-function* updateCertBlocklist(records) {
- let certList = Cc["@mozilla.org/security/certblocklist;1"]
- .getService(Ci.nsICertBlocklist);
- for (let item of records) {
- try {
- if (item.issuerName && item.serialNumber) {
- certList.revokeCertByIssuerAndSerial(item.issuerName,
- item.serialNumber);
- } else if (item.subject && item.pubKeyHash) {
- certList.revokeCertBySubjectAndPubKey(item.subject,
- item.pubKeyHash);
- }
- } catch (e) {
- // prevent errors relating to individual blocklist entries from
- // causing sync to fail. At some point in the future, we may want to
- // accumulate telemetry on these failures.
- Cu.reportError(e);
- }
- }
- certList.saveEntries();
-}
-
-/**
- * Write list of records into JSON file, and notify nsBlocklistService.
- *
- * @param {String} filename path relative to profile dir.
- * @param {Object} records current records in the local db.
- */
-function* updateJSONBlocklist(filename, records) {
- // Write JSON dump for synchronous load at startup.
- const path = OS.Path.join(OS.Constants.Path.profileDir, filename);
- const serialized = JSON.stringify({data: records}, null, 2);
- try {
- yield OS.File.writeAtomic(path, serialized, {tmpPath: path + ".tmp"});
-
- // Notify change to `nsBlocklistService`
- const eventData = {filename: filename};
- Services.cpmm.sendAsyncMessage("Blocklist:reload-from-disk", eventData);
- } catch(e) {
- Cu.reportError(e);
- }
-}
-
-
-this.OneCRLBlocklistClient = new BlocklistClient(
- Services.prefs.getCharPref(PREF_BLOCKLIST_ONECRL_COLLECTION),
- PREF_BLOCKLIST_ONECRL_CHECKED_SECONDS,
- updateCertBlocklist,
- "onecrl.content-signature.mozilla.org"
-);
-
-this.AddonBlocklistClient = new BlocklistClient(
- Services.prefs.getCharPref(PREF_BLOCKLIST_ADDONS_COLLECTION),
- PREF_BLOCKLIST_ADDONS_CHECKED_SECONDS,
- updateJSONBlocklist.bind(undefined, FILENAME_ADDONS_JSON)
-);
-
-this.GfxBlocklistClient = new BlocklistClient(
- Services.prefs.getCharPref(PREF_BLOCKLIST_GFX_COLLECTION),
- PREF_BLOCKLIST_GFX_CHECKED_SECONDS,
- updateJSONBlocklist.bind(undefined, FILENAME_GFX_JSON)
-);
-
-this.PluginBlocklistClient = new BlocklistClient(
- Services.prefs.getCharPref(PREF_BLOCKLIST_PLUGINS_COLLECTION),
- PREF_BLOCKLIST_PLUGINS_CHECKED_SECONDS,
- updateJSONBlocklist.bind(undefined, FILENAME_PLUGINS_JSON)
-);
diff --git a/services/common/blocklist-updater.js b/services/common/blocklist-updater.js
deleted file mode 100644
index 3b39b9552..000000000
--- a/services/common/blocklist-updater.js
+++ /dev/null
@@ -1,117 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-this.EXPORTED_SYMBOLS = ["checkVersions", "addTestBlocklistClient"];
-
-const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/Task.jsm");
-Cu.importGlobalProperties(['fetch']);
-const BlocklistClients = Cu.import("resource://services-common/blocklist-clients.js", {});
-
-const PREF_SETTINGS_SERVER = "services.settings.server";
-const PREF_BLOCKLIST_CHANGES_PATH = "services.blocklist.changes.path";
-const PREF_BLOCKLIST_BUCKET = "services.blocklist.bucket";
-const PREF_BLOCKLIST_LAST_UPDATE = "services.blocklist.last_update_seconds";
-const PREF_BLOCKLIST_LAST_ETAG = "services.blocklist.last_etag";
-const PREF_BLOCKLIST_CLOCK_SKEW_SECONDS = "services.blocklist.clock_skew_seconds";
-
-
-const gBlocklistClients = {
- [BlocklistClients.OneCRLBlocklistClient.collectionName]: BlocklistClients.OneCRLBlocklistClient,
- [BlocklistClients.AddonBlocklistClient.collectionName]: BlocklistClients.AddonBlocklistClient,
- [BlocklistClients.GfxBlocklistClient.collectionName]: BlocklistClients.GfxBlocklistClient,
- [BlocklistClients.PluginBlocklistClient.collectionName]: BlocklistClients.PluginBlocklistClient
-};
-
-// Add a blocklist client for testing purposes. Do not use for any other purpose
-this.addTestBlocklistClient = (name, client) => { gBlocklistClients[name] = client; }
-
-// This is called by the ping mechanism.
-// returns a promise that rejects if something goes wrong
-this.checkVersions = function() {
- return Task.spawn(function* syncClients() {
- // Fetch a versionInfo object that looks like:
- // {"data":[
- // {
- // "host":"kinto-ota.dev.mozaws.net",
- // "last_modified":1450717104423,
- // "bucket":"blocklists",
- // "collection":"certificates"
- // }]}
- // Right now, we only use the collection name and the last modified info
- let kintoBase = Services.prefs.getCharPref(PREF_SETTINGS_SERVER);
- let changesEndpoint = kintoBase + Services.prefs.getCharPref(PREF_BLOCKLIST_CHANGES_PATH);
- let blocklistsBucket = Services.prefs.getCharPref(PREF_BLOCKLIST_BUCKET);
-
- // Use ETag to obtain a `304 Not modified` when no change occurred.
- const headers = {};
- if (Services.prefs.prefHasUserValue(PREF_BLOCKLIST_LAST_ETAG)) {
- const lastEtag = Services.prefs.getCharPref(PREF_BLOCKLIST_LAST_ETAG);
- if (lastEtag) {
- headers["If-None-Match"] = lastEtag;
- }
- }
-
- let response = yield fetch(changesEndpoint, {headers});
-
- let versionInfo;
- // No changes since last time. Go on with empty list of changes.
- if (response.status == 304) {
- versionInfo = {data: []};
- } else {
- versionInfo = yield response.json();
- }
-
- // If the server is failing, the JSON response might not contain the
- // expected data (e.g. error response - Bug 1259145)
- if (!versionInfo.hasOwnProperty("data")) {
- throw new Error("Polling for changes failed.");
- }
-
- // Record new update time and the difference between local and server time
- let serverTimeMillis = Date.parse(response.headers.get("Date"));
-
- // negative clockDifference means local time is behind server time
- // by the absolute of that value in seconds (positive means it's ahead)
- let clockDifference = Math.floor((Date.now() - serverTimeMillis) / 1000);
- Services.prefs.setIntPref(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS, clockDifference);
- Services.prefs.setIntPref(PREF_BLOCKLIST_LAST_UPDATE, serverTimeMillis / 1000);
-
- let firstError;
- for (let collectionInfo of versionInfo.data) {
- // Skip changes that don't concern configured blocklist bucket.
- if (collectionInfo.bucket != blocklistsBucket) {
- continue;
- }
-
- let collection = collectionInfo.collection;
- let client = gBlocklistClients[collection];
- if (client && client.maybeSync) {
- let lastModified = 0;
- if (collectionInfo.last_modified) {
- lastModified = collectionInfo.last_modified;
- }
- try {
- yield client.maybeSync(lastModified, serverTimeMillis);
- } catch (e) {
- if (!firstError) {
- firstError = e;
- }
- }
- }
- }
- if (firstError) {
- // cause the promise to reject by throwing the first observed error
- throw firstError;
- }
-
- // Save current Etag for next poll.
- if (response.headers.has("ETag")) {
- const currentEtag = response.headers.get("ETag");
- Services.prefs.setCharPref(PREF_BLOCKLIST_LAST_ETAG, currentEtag);
- }
- });
-};
diff --git a/services/common/kinto-http-client.js b/services/common/kinto-http-client.js
deleted file mode 100644
index 57f6946d1..000000000
--- a/services/common/kinto-http-client.js
+++ /dev/null
@@ -1,1891 +0,0 @@
-/*
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * This file is generated from kinto-http.js - do not modify directly.
- */
-
-this.EXPORTED_SYMBOLS = ["KintoHttpClient"];
-
-/*
- * Version 2.0.0 - 61435f3
- */
-
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.KintoHttpClient = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o {
- this._backoffReleaseTime = backoffMs;
- });
- }
- }
-
- /**
- * Retrieve a bucket object to perform operations on it.
- *
- * @param {String} name The bucket name.
- * @param {Object} [options={}] The request options.
- * @param {Boolean} [options.safe] The resulting safe option.
- * @param {String} [options.bucket] The resulting bucket name option.
- * @param {Object} [options.headers] The extended headers object option.
- * @return {Bucket}
- */
- bucket(name, options = {}) {
- const bucketOptions = (0, _utils.omit)(this._getRequestOptions(options), "bucket");
- return new _bucket2.default(this, name, bucketOptions);
- }
-
- /**
- * Generates a request options object, deeply merging the client configured
- * defaults with the ones provided as argument.
- *
- * Note: Headers won't be overriden but merged with instance default ones.
- *
- * @private
- * @param {Object} [options={}] The request options.
- * @property {Boolean} [options.safe] The resulting safe option.
- * @property {String} [options.bucket] The resulting bucket name option.
- * @property {Object} [options.headers] The extended headers object option.
- * @return {Object}
- */
- _getRequestOptions(options = {}) {
- return _extends({}, this.defaultReqOptions, options, {
- batch: this._isBatch,
- // Note: headers should never be overriden but extended
- headers: _extends({}, this.defaultReqOptions.headers, options.headers)
- });
- }
-
- /**
- * Retrieves server information and persist them locally. This operation is
- * usually performed a single time during the instance lifecycle.
- *
- * @param {Object} [options={}] The request options.
- * @return {Promise