Release signing key¶
dunscaith's releases are signed with one key:
| Identity | Dunscaith Release Signing <dunscaith-release@phpboyscout.uk> |
| Fingerprint | 3138 FF73 BFA4 41F9 1C67 09A6 82F4 9DCF 02CE 6330 |
| Type | RSA, 4096 bits |
Its public half is in three places, which must agree:
- built into every
dunscaithbinary; internal/trustkeys/keys/dunscaith.ascin the repository;- the Web Key Directory (WKD) of
phpboyscout.uk. WKD is how OpenPGP tools find a key from an email address, over HTTPS from the address's own domain.
Check a download by hand¶
A release's files are under https://pkg.phpboyscout.uk/dunscaith/<tag>/. checksums.txt lists the
SHA-256 of each archive, and checksums.txt.sig is a detached OpenPGP signature of checksums.txt.
Fetch the key, check the signature, then check the archive against the signed checksums:
gpg --locate-external-keys dunscaith-release@phpboyscout.uk
gpg --verify checksums.txt.sig checksums.txt
sha256sum --ignore-missing -c checksums.txt
gpg --verify must report a good signature from the fingerprint above. A different key, or no
checksums.txt.sig, means the release isn't one dunscaith published.
What dunscaith update checks¶
Before it replaces the binary, dunscaith update makes three checks of its own:
- It fetches the published key from WKD and compares it with the one built in. If they differ, or WKD cannot be reached, it stops.
- It checks
checksums.txt.sigagainst that key. A missing or failing signature stops it. - It checks the archive it downloaded against
checksums.txt. A missing or wrong checksum stops it.
When it stops, the binary in place is kept.
The first check needs HTTPS access to openpgpkey.phpboyscout.uk, as well as to gitlab.com and
pkg.phpboyscout.uk for the release itself. On a login node behind a proxy, allow all three.
Settings¶
| Key | Default | Meaning |
|---|---|---|
update.require_signature |
true |
Refuse a release with no valid signature. update --from-file cannot check a signature, so it is refused while this is true. |
update.require_checksum |
true |
Refuse an archive with no entry in checksums.txt. |
update.require_external_crosscheck |
true |
Refuse to update when WKD cannot be reached. With false, the update goes ahead on the built-in key alone and logs a warning. A published key that differs from the built-in one is refused either way. |
update.external_key_email |
dunscaith-release@phpboyscout.uk |
The address the published key is fetched by. |
Set each in a configuration file, for example with
dunscaith config set update.require_external_crosscheck false.
They are set in a file only. dunscaith ignores, with a warning naming it, every environment
variable whose name, after DUNSCAITH_, would be read as a key in the update section, whatever
its case and whether it separates words with _ or .. That includes DUNSCAITH_UPDATE itself,
which would replace the whole section. So a variable inherited from a CI job, a container or a
login script cannot loosen a check that a file states.
A build from before the key was added¶
v0.1.0 was tagged without release files and without a key built in. A build of it, or of the default branch from before the key was added, refuses every update with:
Leave update.require_signature on. Install a signed release by hand instead, from its files as
described in Check a download by hand, or with:
Either way the new build has the key built in.