Digitally sign geckodriver binaries on Linux and Windows
Categories
(Testing :: geckodriver, enhancement, P2)
Tracking
(firefox68 verified)
Tracking | Status | |
---|---|---|
firefox68 | --- | verified |
People
(Reporter: whimboo, Assigned: jlorenzo)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file, 1 obsolete file)
Updated•7 years ago
|
Assignee | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Assignee | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Assignee | ||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Reporter | ||
Updated•7 years ago
|
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Reporter | ||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
Reporter | ||
Comment 17•6 years ago
|
||
Assignee | ||
Comment 18•6 years ago
|
||
Reporter | ||
Comment 19•6 years ago
|
||
Assignee | ||
Comment 20•6 years ago
|
||
Reporter | ||
Comment 21•6 years ago
|
||
Sorry for the delay here, but bug 1493948 will cover that. It's something I want to work on next now.
Reporter | ||
Comment 22•6 years ago
|
||
Chris, I started to work on the repackage task to extract the geckodriver binary from common.tests.zip. Not sure how long it will take given that it is new to me. If RelEng would have a bit of capacity and take it, I assume it would be done much faster. If not, I will continue and may have a lot of questions through.
Given all the discussion above I wonder if you could have a look at comment 1 again. Is the signing something RelEng could do in Q1 or early Q2? Maybe there are some dependencies listed in comment 1 which are independent from my work and already could be worked on?
Thanks in advance.
Comment 23•6 years ago
|
||
These tasks fetch build artifacts and extract them. Then there's a
final repackaging job that produces the format that the existing
geckodriver Github releases have.
Eventually, signing jobs will sit between the fetch and the
repackaging job.
Comment 24•6 years ago
|
||
Oh my, apparently two people wanted this in the last ~24 hours. Henrik, please take over :)
The next steps would be to add a new taskgraph transform to remove all the duplication in the tasks; they're very manual right now. I'm not 100% sure this does the right thing because my try jobs aren't appearing on TH right now.
Reporter | ||
Comment 25•6 years ago
|
||
Sounds amazing! But lets take this conversation / work over to bug 1493948. This bug is for the signing job only.
Reporter | ||
Comment 26•6 years ago
|
||
With bug 1493948 fixed now, there shouldn't be a blocker anymore for RelEng to get started on that bug. Given that I haven't gotten feedback from catlee yet, I wonder whom else I could ask if there is any work for this bug planned in Q1/Q2? Johan, maybe know whom to ask?
Reporter | ||
Comment 27•6 years ago
|
||
Repack jobs appear here now:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&searchStr=geckodriver
Assignee | ||
Comment 28•6 years ago
|
||
:jlund may have some input regarding comment 26 and comment 22.
Comment 29•6 years ago
|
||
@whimboo - sounds like we provide some authenticity through signing the checksums file. So this is mostly about ensuring that AV and windows security doesn't prevent execution of geckodriver itself? How important is this?
@jlorenzo - Depending on priority, we could fit it in in Q2. Not in Q1 given time left and other work in flight. Does that sound reasonable to you if we put it on your plate?
@mtabara - I want to put this on your radar as you have vested interest in how we declare artifacts. It sounds like from bug 1493948 we are extracting the webdriver artifact out later on in the per-checkin graph and will end up needing to be beetmoved? Does this break our goal of having all release artifacts defined from in-tree manifest?
Reporter | ||
Comment 30•6 years ago
|
||
(In reply to Jordan Lund (:jlund) from comment #29)
@whimboo - sounds like we provide some authenticity through signing the checksums file. So this is mostly about ensuring that AV and windows security doesn't prevent execution of geckodriver itself? How important is this?
Correct. For each release of geckodriver we have such reports from users. We lived with that already for a while, and it would be great to see the binary signed. But it is not critical right now. If there would be a chance for Q2 that would be great.
@mtabara - I want to put this on your radar as you have vested interest in how we declare artifacts. It sounds like from bug 1493948 we are extracting the webdriver artifact out later on in the per-checkin graph and will end up needing to be beetmoved? Does this break our goal of having all release artifacts defined from in-tree manifest?
Callek pinged me on IRC and there is also some work he will do which will refactor parts of that. Maybe he can explain it here.
Comment 31•6 years ago
|
||
To be clear the work whimboo mentioned was shippable builds, which I feel like mihai and jordan have a good understanding on. I'm happy to chat with others but I don't think it directly impacts this bug any more than me just needing to know what this bugs general plan and needs were, so I can make sure my code doesn't hamper this effort
Assignee | ||
Comment 32•6 years ago
|
||
(In reply to Jordan Lund (:jlund) from comment #29)
@jlorenzo - Depending on priority, we could fit it in in Q2. Not in Q1 given time left and other work in flight. Does that sound reasonable to you if we put it on your plate?
I can work on this in Q2 👍
Updated•6 years ago
|
Assignee | ||
Comment 33•6 years ago
|
||
Digitally sign geckodriver binaries on Windows and Linux
Assignee | ||
Comment 34•6 years ago
|
||
Status update:
Windows signature
I checked the signature[1] of my try build[2]:
SignTool verify /v geckodriver.exe
Signature Index: 0 (Primary Signature)
Hash of file (sha1): EF4AA0E309F44B84B12D662810432F725D4D5DEF
Signing Certificate Chain:
Issued to: Mozilla Fake SPC
Issued by: Mozilla Fake CA
Expires: Tue Jun 30 17:20:46 2037
SHA1 hash: B7298151F99A58B118109BDDB8523BD91517BCB8
File is not timestamped.
SignTool Error: A certificate chain processed, but terminated in a root
certificate which is not trusted by the trust provider.
Number of files successfully Verified: 0
Number of warnings: 0
Number of errors: 1
This shows the binary was indeed signed. The error tells the signing key that was used is not trusted. That's what we want on try. Result should be different once it's landed.
Linux signature
It's a regular detached gpg signature[3]
Mac signature
Like said in comment 1, Mac requires more work. That said bug 1470607 is paving the way. I'm planning on not landing the mac signature, until bug 1470607 is done. I can open a followup bug.
[1] https://docs.microsoft.com/en-us/windows/desktop/seccrypto/using-signtool-to-verify-a-file-signature
[2] https://treeherder.mozilla.org/#/jobs?repo=try&revision=186dcadf5b929cf876189982fc44225dd8fe4c63&selectedJob=241003234
[3] https://treeherder.mozilla.org/#/jobs?repo=try&revision=186dcadf5b929cf876189982fc44225dd8fe4c63&selectedJob=241002480
Reporter | ||
Comment 35•6 years ago
|
||
Fantastic news Johan! I agree that we should get this landed as is, and have a follow-up bug for the Mac signing part. I will file a bug in a moment.
Comment 36•6 years ago
|
||
Comment 37•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Reporter | ||
Comment 38•6 years ago
|
||
Starting with https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&searchStr=geckodriver&revision=4b0811d7b8e1591d4e48a26bdb8666a1bc5ccf61 we now have signed builds on Windows and Linux! Tested and it looks great. Thanks a lot Johan!
Assignee | ||
Comment 39•6 years ago
|
||
I confirm Windows doesn't yell anymore when trying to start the binary. I ran signtool.exe against the binaries in comment 38 and here's the output:
c:\Program Files (x86)\Windows Kits\10\bin\x64>signtool.exe verify /v /pa c:\Users\gilou\Documents\geckodriver-1\geckodriver.exe
Verifying: c:\Users\gilou\Documents\geckodriver-1\geckodriver.exe
Signature Index: 0 (Primary Signature)
Hash of file (sha1): 551690840E1E6ECE7AC83CD9BEC113C8223CBB7A
Signing Certificate Chain:
Issued to: DigiCert Assured ID Root CA
Issued by: DigiCert Assured ID Root CA
Expires: Mon Nov 10 02:00:00 2031
SHA1 hash: 0563B8630D62D75ABBC8AB1E4BDFB5A899B24D43
Issued to: DigiCert SHA2 Assured ID Code Signing CA
Issued by: DigiCert Assured ID Root CA
Expires: Sun Oct 22 14:00:00 2028
SHA1 hash: 92C1588E85AF2201CE7915E8538B492F605B80C6
Issued to: Mozilla Corporation
Issued by: DigiCert SHA2 Assured ID Code Signing CA
Expires: Fri Jun 28 14:00:00 2019
SHA1 hash: B6B24AEA9E983ED6BDA9586A145A7DDD7E220196
The signature is timestamped: Wed Apr 24 02:17:44 2019
Timestamp Verified by:
Issued to: Thawte Timestamping CA
Issued by: Thawte Timestamping CA
Expires: Fri Jan 01 01:59:59 2021
SHA1 hash: BE36A4562FB2EE05DBB3D32323ADF445084ED656
Issued to: Symantec Time Stamping Services CA - G2
Issued by: Thawte Timestamping CA
Expires: Thu Dec 31 01:59:59 2020
SHA1 hash: 6C07453FFDDA08B83707C09B82FB3D15F35336B1
Issued to: Symantec Time Stamping Services Signer - G4
Issued by: Symantec Time Stamping Services CA - G2
Expires: Wed Dec 30 01:59:59 2020
SHA1 hash: 65439929B67973EB192D6FF243E6767ADF0834E4
Successfully verified: c:\Users\gilou\Documents\geckodriver-1\geckodriver.exe
Number of files successfully Verified: 1
Number of warnings: 0
Number of errors: 0
Note for anybody trying to verify a signature with SignTool: don't forget to put the /pa
flag, otherwise SignTool outputs an error because [1][2]:
/pa Specifies that the Default Authentication Verification Policy is used. If the /pa option is not specified, SignTool uses the Windows Driver Verification Policy. This option cannot be used with the catdb options.
[1] https://stackoverflow.com/questions/2722061/why-is-my-code-signing-ms-authenticode-verification-failing
[2] https://docs.microsoft.com/en-us/windows/desktop/seccrypto/signtool
Updated•5 years ago
|
Description
•