AMO/SigningService

Draft-template-image.png THIS PAGE IS A WORKING DRAFT Pencil-emoji U270F-gray.png
The page may be difficult to navigate, and some information on its subject might be incomplete and/or evolving rapidly.
If you have any questions or ideas, please add them as a new topic on the discussion page.

Add-on Signature System

Hi. This project is the AMO piece of the larger Add-on Signature System. Please read that document so the rest of this wiki page makes sense.

We will need to modify several pieces of AMO and its libraries in order to accommodate this new system. Those changes are roughly laid out below and divided up into phases. See the diagram below (which compares to Marketplace for a reference) for a high level view:

 

Notes:

  • The flows are very similar. Apps load a certificate from disk and get signed. For add-ons we'll load a certificate from disk, but we'll generate a new certificate as well, use the loaded certificate to sign the new certificate, and then sign the add-on with the new certificate.
  • When we're done signing we discard the new certificate.
  • Any pre-existing signatures on the add-on are replaced. This includes developers who have signed the add-on with a valid AMO certificate already. The expected flow for self-hosting in addition to AMO hosting is to download the signed add-on from AMO, not do any manual signing.
  • We don't do any signing before the add-on is approved for the public. Reviewers are expected to use developer versions or debug versions of Firefox so won't need to have the add-ons signed to test them.
  • Should not need any API changes since this is all after add-on review
  • We're looking at high 10s to low 100s of signed packages per day

Roadmap

Phase 1: Signing with Trunion

Current Status Needs Bugs Filed
Owners Ryan Tilder, Wil Clouser

Summary:

We currently don't sign add-ons at all on AMO, but we do sign apps on the Marketplace using trunion and could use the same system (with modifications). A rough summary of the Trunion overview is as follows:

 1. This CA will be entirely automated and self contained
     1. The CA's root certificate will be hard coded into Firefox/Fennec
        in a similar manner to the privileged FxOS apps
     2. For every request to sign an addon:
          o a brand new 2048 bit or stronger RSA key pair will be
            generated by the signing service
          o the ephemeral public key will be certified by this CA
          o the ephemeral private key generated will then be used to
            sign the addon archive in Mozilla's own bastardized
            implementation of JAR signing that we know as "XPI signing"
          o the freshly certified ephemeral public key will be included
            in the addon as part of the signature chain
          o the ephemeral private key and certificate are thrown away

In practical terms, this means:

  • Modifying Trunion to accept meta-data about what it is signing (at least an add-on ID)
  • Modifying Trunion to send meta-data about what it signed (at least the certificate serial number)
  • Modifying Trunion to generate certs on-the-fly

Open Bugs:

Full Query
ID Priority Status Summary
1070155 P1 RESOLVED Define and document the API for add-on signing
1076052 -- RESOLVED Add Python key & certificate generation to trunion
1123915 P1 RESOLVED Where should we put "Preliminary" in the cert?
1124321 -- RESOLVED trunion addon signing: ephemeral certs are missing all attributes but CN
1126894 -- RESOLVED Create parallel "preliminary" addon signing trunion instance for dev
1135926 -- VERIFIED Hide existing signature warning until relevant
1158467 P1 RESOLVED Signed extensions on AMO have invalid signatures (And cause to many crashes for Fx28 and older versions)
1158938 P1 RESOLVED End mozilla.sf with two newlines

8 Total; 0 Open (0%); 7 Resolved (87.5%); 1 Verified (12.5%);


Phase 2: Initial AMO Support

Current Status Needs Review
  • Modifying the Validator to warn about pre-existing signatures which will be clobbered
  • Modifying the Reviewer Tools to send add-on data to Trunion and using the returned data to save a signed add-on to disk (API to Trunion needs definition)
  • Modifying AMO to add a signing script which will sign the latest versions of existing add-ons to bootstrap the system
  • Modifying MDN by adding any necessary documentation about this project

Open Bugs:

Full Query
ID Priority Status Summary
1070188 P3 VERIFIED Modify the validator to warn about pre-existing signatures
1070189 P1 RESOLVED Call the Trunion API to sign add-ons when approved
1070190 P1 RESOLVED Record the certificate serial number
1070191 P2 RESOLVED Write a management command to sign specific add-ons
1070192 P2 RESOLVED Add documentation around add-on signing to MDN
1070227 P2 RESOLVED Write a script to sign all existing add-ons
1123611 -- RESOLVED sign_addons management command should be able to sign all addons
1126898 -- VERIFIED Add support for separate "preliminary" signing endpoint URL
1135139 -- RESOLVED Increment the versions in install.rdf when we sign the add-on
1142044 -- RESOLVED Make the "sign all addons" management command runnable multiple times
1148478 P1 VERIFIED Signed add-ons won't install
1152101 P1 RESOLVED Modify the add-on signing script to skip add-ons we've signed before
1152102 P1 VERIFIED Rename the .rsa files when we sign add-ons
1155786 -- RESOLVED Skip signing for Firefox and Thunderbird hot fix add-ons
1156217 -- RESOLVED Adding a .1 when bulk signing all addons might lead to version clashes
1156221 -- RESOLVED Only sign already reviewed files when bulk signing
1156333 -- VERIFIED Don't review a file if its signing failed
1156768 -- RESOLVED Using bulk sign script, sign all files of a version, and don't bump version if not signing files
1157349 P3 VERIFIED Add a visibility notice to status box and submissions page
1157444 -- RESOLVED Only bulk sign versions that are compatible with recent versions of Firefox
1158738 -- RESOLVED When auto-signing files are cached by cdn and it results in hash mismatch
1158739 -- RESOLVED When auto-signing files the Version.version_int isn't bumped
1161486 -- VERIFIED Display an information about the signed status of a file on the public pages
1162001 -- RESOLVED "Author not verified" message is displayed when installing a signed add-on
1162058 -- RESOLVED Bulk signing fails on non-ascii filenames
1162458 -- VERIFIED Add-ons which support both Thunderbird and android are signed after approval
1169463 P3 RESOLVED Use a better compression library when repackaging add-ons
1169537 -- RESOLVED some signed extensions on AMO fail to install (addon corrupted)
1169574 -- RESOLVED some signed extensions on AMO fail to install (signature not recognized)
1170266 -- VERIFIED Unable to change add-on authors for an unlisted add-on without being forced to select a license
1172030 P3 RESOLVED Improve the display of validation results for automated signing validation
1172035 -- RESOLVED Give rejected beta versions option to submit to unlisted preliminary review queue
1172037 -- VERIFIED Standalone /validate page should have option to run unlisted add-on validation
1172041 -- RESOLVED Beta versions that don't support Firefox shouldn't have signing requirements enforced
1172554 -- VERIFIED Adjust wording on themes submission page
1172555 -- RESOLVED Adjust the add-on submission text
1172690 -- RESOLVED Admins can't override failed validation for betas
1172696 -- VERIFIED Extensions contained in signed add-ons with type=32 aren't properly signed
1174012 -- RESOLVED Open the bugzilla link in a new tab
1185789 P1 RESOLVED Enable extension signatures for Firefox for Android
1190704 P2 RESOLVED Show a warning, or error, for multi-package XPIs with inner extensions not signed by Mozilla
1198425 P1 RESOLVED Sign locale packs
1201176 P2 RESOLVED Some add-ons have broken signatures due to missing ID in the CN field
1202016 -- VERIFIED Prevent submission of add-ons with GUIDs longer than 64 chars
1202063 -- RESOLVED [tracking] Improve Validator for Signing
1202880 -- RESOLVED Add-on signing of large CNs
1203915 -- VERIFIED Re-allow submitting add-ons with GUIDs longer than 64 chars
1204019 -- VERIFIED Update signing messages to refer to Firefox 43
1205823 -- RESOLVED Unsign multi-package XPIs that were signed
1206696 -- RESOLVED Adding Firefox as a supported appversion does not sign previously unsigned add-ons

50 Total; 0 Open (0%); 35 Resolved (70%); 15 Verified (30%);


Phase 3: Blocklist

Current Status Needs Review

Summary: This system expects to use the blocklist until a more official cert revocation system can be implemented. Blocklist administration will use the administrative scaffolding it currently uses. A new top level item will be added called <certificates>. An example entry is below:

 <certificates>
   <certificate blockID="100">
     <issuer>mozilla.com</issuer>
     <serialnumber>00245EADBDE07F113DEE</serialnumber>
   </certificate>
 </certificates>

Open Bugs:

Full Query
ID Priority Status Summary
1070218 P1 RESOLVED Add 'certificates' blocklist item
1070219 P1 RESOLVED Modify the blocklist to include certificates
1070220 P2 RESOLVED Add certificates to the /blocked/ list
1070221 P1 RESOLVED Add certificate block details pages

4 Total; 0 Open (0%); 4 Resolved (100%); 0 Verified (0%);


Phase 4: Non-AMO hosted add-ons

Current Status TBD

Summary:

  • This needs payments from Marketplace
  • This needs UX