Firefox/Kinto: Difference between revisions

Jump to navigation Jump to search
Improve specifications
(Code updates and overall improvement)
(Improve specifications)
Line 1: Line 1:
= Kinto Integration in Firefox =
= Kinto Integration in Firefox =


[[http://www.kinto-storage.org Kinto]] is a simple JSON storage service.
[[http://www.kinto-storage.org Kinto]] is a simple JSON storage service that is used in Firefox for remote settings and the <code>storage.sync</code> API.


= Key features =
= Key features =
Line 98: Line 98:
</pre>
</pre>


== Add a new data set ==
== Servers ==
 
{|class="wikitable"
! Server
! API
! Admin
! Contact
|-
|Public development instance (flushed every day) with many plugins
|https://kinto.dev.mozaws.net/v1/
|[https://kinto.dev.mozaws.net/v1/admin/ Admin UI]
|[https://mail.mozilla.org/listinfo/kinto Kinto mailing-list]
|-
|Remote settings STAGE
|https://kinto.stage.mozaws.net/v1/ (read-only)
|[https://kinto-writer.stage.mozaws.net/v1/admin/ Admin UI] '''VPN only'''
|OPS via Bugzilla
|-
|Remote settings PROD
|https://firefox.settings.services.mozilla.com/v1/ (read-only)
|[https://settings.prod.mozaws.net/v1/admin/ Admin UI] '''VPN only'''
|OPS via Bugzilla
|-
|storage.sync
|https://webextensions.settings.services.mozilla.com/v1/
|N/A
|OPS via Bugzilla
|}
 
== How to add a new official dataset ? ==


The only persons allowed to create buckets/collections in stage/production is the OPs team, so you have to create a Bugzilla ticket and specify everything you need to be created.
The only persons allowed to create buckets/collections in stage/production is the OPs team, so you have to create a Bugzilla ticket and specify everything you need to be created.
Line 113: Line 142:


For use-cases where a lot of users write data (like storage.sync), the [https://kinto.readthedocs.io/en/latest/api/1.x/quotas.html quota plugin] may have to be configured.
For use-cases where a lot of users write data (like storage.sync), the [https://kinto.readthedocs.io/en/latest/api/1.x/quotas.html quota plugin] may have to be configured.




Line 123: Line 151:
== Blocklists ==  
== Blocklists ==  


Currently, the instance of Kinto used by Blocklist clients is hosted at https://firefox.settings.services.mozilla.com/v1/
The goal is to replace the current system — based on a single XML file downloaded everyday — by several Kinto collections on the '''remote settings instance'''.


The goal is to replace the current system — based on a single XML file downloaded everyday — by several Kinto collections.


* The bucket is '''blocklists'''
{|class="wikitable"
* The collection for OneCRL entries is '''certificates''' https://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/certificates/records
! List
* The collection for Add-ons entries is '''addons''' https://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/certificates/records
! Bucket
* The collection for Plugins entries is '''plugins''' https://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/certificates/records
! Collection
* The collection for Gfx entries is '''gfx''' https://firefox.settings.services.mozilla.com/v1/buckets/blocklists/collections/certificates/records
|-
|OneCRL
|<code>blocklists</code>
|<code>certificates</code>
|-
|Add-ons
|<code>blocklists</code>
|<code>addons</code>
|-
|Plugins
|<code>blocklists</code>
|<code>plugins</code>
|-
|Gfx
|<code>blocklists</code>
|<code>gfx</code>
|-
|HPKP
|<code>pinnings</code>
|<code>pings</code>
|}


See https://bugzilla.mozilla.org/show_bug.cgi?id=1197707
See https://bugzilla.mozilla.org/show_bug.cgi?id=1197707
Line 142: Line 189:


Using the same XPCOM notification callback, the new mechanism will [https://dxr.mozilla.org/mozilla-central/rev/fc15477ce628599519cb0055f52cc195d640dc94/toolkit/mozapps/extensions/nsBlocklistService.js#632-642 synchronize the local copy of each collection from the remote server].
Using the same XPCOM notification callback, the new mechanism will [https://dxr.mozilla.org/mozilla-central/rev/fc15477ce628599519cb0055f52cc195d640dc94/toolkit/mozapps/extensions/nsBlocklistService.js#632-642 synchronize the local copy of each collection from the remote server].
If changes are available, the [https://dxr.mozilla.org/mozilla-central/rev/fc15477ce628599519cb0055f52cc195d640dc94/services/common/KintoBlocklist.js#78-105 local copy will be updated] and [https://bugzilla.mozilla.org/show_bug.cgi?id=1263602 content signature verified].


* In '''phase 1''', it will be a no-op. Both mechanisms will run in parallel but only the legacy one will be used. We'll keep both mainly because the current download of the XML is used to count active daily users. Once we are ok with the statistics, we'll go to phase 2.
If changes are available, the local copy of the data will be updated and content signature verified.
* In '''phase 2''', we'll change the source of truth of block entries on the server side. The data from the Addons server won't be used anymore. That means the [https://github.com/mozilla-services/kinto-amo/ server will produce the same XML file] but using the data stored in the new service.  
 
* In '''phase 3''', the [https://bugzilla.mozilla.org/show_bug.cgi?id=1257565 blocking mechanism will rely on the data managed via JSON], and the old XML client will be decommissioned.  
* '''phase 1: DONE''': Both mechanisms run in parallel but only the legacy one will be used.
* '''phase 2: DONE''': The source of truth for blocklist is Kinto but produces the same XML as the legacy one.
* '''phase 3''': Eventually, [https://bugzilla.mozilla.org/show_bug.cgi?id=1257565 blocking mechanism will rely on the data managed via JSON], and the old XML client will be decommissioned.  




== Fennec assets catalog ==
== Fennec assets catalog ==


The goal is to remove the static assets (fonts, hyphenation dicts, etc.) from the distribution package and download them asynchronously using an online Kinto catalog.
The goal is to remove the static assets (fonts, hyphenation dicts, etc.) from the distribution package and download them asynchronously using an online Kinto catalog, on the '''remote settings instance'''.


* The bucket is '''fennec'''
{|class="wikitable"
* The collection is '''catalog'''
! List
! Bucket
! Collection
|-
|Download catalog
|<code>fennec</code>
|<code>catalog</code>
|}


See https://bugzilla.mozilla.org/show_bug.cgi?id=1201059
See https://bugzilla.mozilla.org/show_bug.cgi?id=1201059
== WebExtensions storage.sync ==
* Users are authenticated
* Every users have their own bucket (using the ''default bucket plugin'')
* The amount of data that users are allowed to store is limited
* Data is encrypted using Firefox Accounts keys




24

edits

Navigation menu