Closed
Bug 791741
Opened 12 years ago
Closed 12 years ago
[tracking] Sign packaged apps for users
Categories
(Marketplace Graveyard :: Security, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
2012-12-20
People
(Reporter: andy+bugzilla, Unassigned)
References
Details
(Keywords: meta)
In bug 791732 we allow packaged apps to be signed for users. This bug covers how we actually sign the apps. Note this is all about verification, not encryption. How the client will be checking the apps is covered in bug 772365.
Reporter | ||
Comment 2•12 years ago
|
||
I'm going to give some of the code here a clean and a try before using signtool.
https://adblockplus.org/blog/signing-firefox-extensions-with-python-and-m2crypto
https://github.com/nmaier/xpisign.py/
Assignee: nobody → amckay
Reporter | ||
Comment 4•12 years ago
|
||
xpisign code is in, blocked on bug 793876
https://github.com/mozilla/zamboni/commit/540bfe
Waiting for an end-to-end to test to be possible before resolving.
Reporter | ||
Updated•12 years ago
|
Target Milestone: 2012-09-27 → 2012-10-04
Reporter | ||
Updated•12 years ago
|
Target Milestone: 2012-10-04 → 2012-10-11
Updated•12 years ago
|
blocking-basecamp: ? → +
Reporter | ||
Comment 6•12 years ago
|
||
Sent example signed app on -dev to bsmith to check it's done correctly.
Reporter | ||
Updated•12 years ago
|
Target Milestone: 2012-10-18 → 2012-10-25
Reporter | ||
Updated•12 years ago
|
Assignee: amckay → bsmith
Comment 7•12 years ago
|
||
Any updates here?
Comment 8•12 years ago
|
||
Please point me to the the script (OpenSSL response file) that was/is used to generate the certificates, so I can modify them to correct some of the metadata. I want to change the key usage, hash algorithm, and key size, in particular. I am writing the documentation for what the certificates should contain and I want to test the steps in the documentation before I post it. Thanks.
Comment 9•12 years ago
|
||
The dev cert/key generation was a one-off. If you document what all is needed, then we can use that information when creating the production cert/key.
Comment 10•12 years ago
|
||
Here are the steps to sign an app that will be accepted by the device:
1. Get the updated xpisign.py from https://github.com/briansmith/xpisign.py/tree/b2g
2. Generate test certificates according to the script in bug 793876.
In python:
from xpisign import xpisign
xpisign("unsigned.jar", "examplla-marketplace-app-signing-1-combined.pem", "signed.jar", optimize_signatures=True, omit_sf_entry_sections=True, , omit_created_by=True)
The three boolean parameters in the end are all unnecessary. They make the JAR file smaller by removing redundant information. The key thing to look for is that the zigbert.sf file **MUST** have a SHA1-Digest-Manifest entry in its main section. This is something that the unmodified xipsign.py script does NOT do, and it is why you must use my modified version, or another tool that does output SHA1-Digest-Manifest.
Comment 11•12 years ago
|
||
Not on-device - removing nom.
Inevitably the platform pieces are actually what blocks (and should in some ways could be tested interdependently of marketplace), but not the marketplace piece.
blocking-basecamp: + → ---
Comment 12•12 years ago
|
||
The example signing script that shows all the settings needed for the certs is now in bug 772365 attachment 682525 [details] [diff] [review].
That script also does some rudimentary sanity checks on the app before signing them. There are probably more sanity checks that need to be done before signing.
Note that the Java jarsigner tool, and NSS's signtool, basically assume that the party that generated the unsigned app is the same party that is signing the app, so they don't do (m)any checks to identify malicious apps.
One thing that is particularly important: we should always generate the signed version of the JAR by creating a new JAR and copying entries from the unsigned JAR to the new JAR, and then signing the new JAR. We should never sign the origial unsigned JAR directly. It is possible to create corrupted metadata in a JAR (e.g. lie about the size of an entry or possibly other things.) Creating a brand-new JAR with 100% clean metadata avoids this problem.
Comment 13•12 years ago
|
||
basecamp-blocking+ this. We discusssed this in our meeting. Lucas, Caitlin, and I all think we need this this to ship. Please talk to us before changing the flag. Thanks.
blocking-basecamp: --- → +
Comment 14•12 years ago
|
||
(In reply to Wil Clouser [:clouserw] from comment #13)
> basecamp-blocking+ this. We discusssed this in our meeting. Lucas, Caitlin,
> and I all think we need this this to ship. Please talk to us before
> changing the flag. Thanks.
So exactly what is the work effort associated with this bug? I can't tell if this is an implementation bug or a meta bug. If it's a meta, it doesn't block - we block on the individual work items, as meta bugs are not measurable.
Even so - if you are going to flag this for basecamp blocking, then we need to give clarity on two items - the priority as a basecamp blocker (which in this case is a P1) and a convergence milestone (which I have no idea how we would be able to set in a marketplace component).
Comment 15•12 years ago
|
||
The inherent problem here is a need to have an implementation completed for signing of packaged apps for users. I think for clarity, let's stick this under the b2g general bucket and send this into platform triage. That will mitigate the tracking concerns possibly.
blocking-basecamp: + → ?
Product: Marketplace → Boot2Gecko
Target Milestone: 2012-10-25 → ---
Version: 1.0 → unspecified
Updated•12 years ago
|
blocking-basecamp: ? → +
Comment 16•12 years ago
|
||
Hi Brian. What actual work needs to be done here, and when do you expect it to be complete?
Comment 17•12 years ago
|
||
If this is the Marketplace-side of verification, why isn't it in the Marketplace component?
Flags: needinfo?(jsmith)
Updated•12 years ago
|
Component: General → Security
Product: Boot2Gecko → Marketplace
Version: unspecified → 1.0
Comment 18•12 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #17)
> If this is the Marketplace-side of verification, why isn't it in the
> Marketplace component?
I think that's right. Let's move it back.
Flags: needinfo?(jsmith)
Comment 19•12 years ago
|
||
Can we get a priority and target milestone for this>
Updated•12 years ago
|
Priority: -- → P1
Target Milestone: --- → 2012-12-06
Updated•12 years ago
|
Blocks: packaged-apps
Comment 20•12 years ago
|
||
Talking with Rob, this appears to be a meta bug. The actual work is happening in the dependencies. I'll flag the dependencies instead.
blocking-basecamp: + → ---
Keywords: meta
Updated•12 years ago
|
Summary: Sign packaged apps for users → [tracking] Sign packaged apps for users
Updated•12 years ago
|
No longer blocks: packaged-apps
Updated•12 years ago
|
Target Milestone: 2012-12-06 → 2012-12-13
Updated•12 years ago
|
Target Milestone: 2012-12-13 → 2012-12-20
Updated•12 years ago
|
Assignee: bsmith → nobody
Comment 21•12 years ago
|
||
bug 819053 is directly blocking bug 818641 which is a more useful association than routing through this tracking bug. Closing this as fixed.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•