Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly documentation of Firefox client behavior #859

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions autograph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ signers:
# with Firefox, set security.content.signature.root_hash to
# 5E:36:F2:14:DE:82:3F:8B:29:96:89:23:5F:03:41:AC:AF:A0:75:AF:82:CB:4C:D4:30:7C:3D:B3:43:39:2A:FE
#
# NOTE: The above comment is only valid for Firefox <= 102.
# In Firefox 103+ (bug 1769669), roots are hard-coded in Firefox and the
# chosen root is dependent on the app.normandy.api_url pref, see
# https://searchfox.org/mozilla-central/rev/2bf90dc51ce7e8274ce208fbb9d68b3ff535185e/toolkit/components/normandy/lib/NormandyApi.sys.mjs#15-30
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwine to do

  • also needs to be copied to production configs

# Note the private key of the root was not saved. Use tools/genpki to
# make a new config as needed.
- id: normandy
Expand Down Expand Up @@ -130,6 +135,11 @@ signers:
# with Firefox, set security.content.signature.root_hash to
# 5E:36:F2:14:DE:82:3F:8B:29:96:89:23:5F:03:41:AC:AF:A0:75:AF:82:CB:4C:D4:30:7C:3D:B3:43:39:2A:FE
#
# NOTE: The above comment is only valid for Firefox <= 102.
# In Firefox 103+ (bug 1769669), roots are hard-coded in Firefox and the
# chosen root is dependent on multiple conditions, see
# https://searchfox.org/mozilla-central/rev/2bf90dc51ce7e8274ce208fbb9d68b3ff535185e/services/settings/Utils.sys.mjs#53-76,97-101,110-124
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwine to do

  • also needs to be copied to production configs

# Note the private key of the root was not saved. Use tools/genpki to
# make a new config as needed.
- id: remote-settings
Expand Down
5 changes: 1 addition & 4 deletions signer/contentsignature/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ signature:
PEM format, where the first certificate is the end-entity that
issued the signature, and the last certificate is the root of the
PKI. Firefox is configured to only accept signatures from the
internal PKI shared with AMO. This is controlled via the
`security.content.signature.root_hash` preference, where
the value is the hexadecimal of the sha256 of the DER of the root
certificate.
internal PKI shared with AMO.

When Firefox verifies a content signature, it first retrieves the X5U
and checks the signature validity using the end-entity certificate, the
Expand Down
7 changes: 2 additions & 5 deletions signer/contentsignaturepki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ signature:
signature. In practice, this file usually contains three
certificates: the end-entity that issues the content signature, the
intermediate issuer and the root of the Firefox private PKI. Firefox
is configured to only accept signatures from the private PKI, as
controlled via the
`security.content.signature.root_hash` preference, where
the value is the hexadecimal of the sha256 of the DER of the root
certificate.
is configured to only accept signatures from the private PKI, which
is hard-coded in Firefox (https://bugzilla.mozilla.org/1846866).

When Firefox verifies a content signature, it first retrieves the X5U
and checks the signature validity using the end-entity certificate, the
Expand Down
3 changes: 3 additions & 0 deletions signer/xpi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ graph LR
VerifyPK7Signature == Extract hash of SF signature file ==> VerifySignature
VerifySignature == Extract Signing Certificate ==> VerifyCertificate
VerifyCertificate == Get Trusted Root ==> BuildCertChain
%% NOTE: Only end-entity certs can potentially end up here. Intermediates/root do not.
BuildCertChain == ERROR_EXPIRED_CERTIFICATE ==> Success
BuildCertChain == ERROR_NOT_YET_VALID_CERTIFICATE ==> Success
Success --> VerifyPK7Signature
%% Expired intermediates/root will reach this state:
BuildCertChain == else ==> Error
Error --> VerifyPK7Signature
end
Expand Down