Rationale of PGP signing disabled by default
(1) By anonymous on 2019-10-08 02:26:32 [link] [source]
I wonder what is the reason why clearsign was enabled by default, and then disabled by default.
I see several possibilities but I am not clear about the real reason.
Fossil is designed to be self-contained, so by default we don't want a dependency on another binary (PGP)
PGP is no more used to sign commit of Fossil or SQLite
PGP signing commits is basically useless (but why?)
There are better alternatives (store digital signature somewhere else?)
Signing was a wrong good idea (but why?)
Finally, is PGP signing still a good practice or not?
(2) By Richard Hipp (drh) on 2019-10-08 02:52:12 in reply to 1 [source]
Multiple reasons:
We don't want a default dependency on PGP.
I never really built-out the infrastructure for verifying PGP signatures
PGP signing turned out to be much less useful than I originally thought it would be.
I still sign most check-ins to TH3 using PGP. But, other than that, I don't know of anybody who uses the capability.
(3) By anonymous on 2019-10-08 15:54:30 in reply to 2 [link] [source]
PGP signing could be useful in a scenario where a business or agency needed to be able to prove who was responsible for each commit. But for such proof to be possible, it would be necessary to have an exact specification for how Fossil uses PGP and how it stores the signatures so that a 3rd party could independently verify the signatures - outside whatever verification Fossil might provide.
(5) By Richard Hipp (drh) on 2019-10-08 16:02:35 in reply to 3 [link] [source]
The file format is defined here: https://fossil-scm.org/fossil/doc/trunk/www/fileformat.wiki
Artifacts are PGP clearsigned. Here is an example:
Compare the example against an unsigned check-in:
(6) By ckennedy on 2019-10-08 16:27:43 in reply to 5 [link] [source]
Does PGP support require Manifests to be turned on?
(7) By Stephan Beal (stephan) on 2019-10-08 16:36:43 in reply to 6 [link] [source]
No - fossil always generates a manifest, that option simply says (IIRC) that fossil should save a copy of the manifest to the checkout directory.
(8) By anonymous on 2019-10-08 18:00:34 in reply to 7 [link] [source]
When that option is turned on, does the copy of the manifest in the check out include the PGP header and suffix (assuming the commit was signed) ?
(9) By Richard Hipp (drh) on 2019-10-08 18:11:56 in reply to 8 [link] [source]
Yes.
You can verify this by grabbing a copy of check-in [10fb90fcae08a311] and looking at the manifest file.
(10) By anonymous on 2019-10-08 21:10:34 in reply to 9 [link] [source]
Thanks.
So, to manually verify a PGP/GPG signature, I can either enable the manifest option to have the manifest in the checkout or I can retrieve the signed manifest with
fossil artifact COMMIT-HASH
Then use pgp/gpg to verify that document has a valid signature.
If this could be put in a document (other than the file formats document), that would be helpful to those who decide to use this feature.
(4) By ZanyScum (zany) on 2019-10-08 16:00:21 in reply to 1 [link] [source]
I have no idea about the development of Fossil, but perhaps it would be an idea to wait with changes on the PGP behavior until the Thunderbird team is done with its PGP changes and get inspiration from them?
Or an idea how not to do it, depending on the outcome.
(11) By sekao on 2020-03-29 00:34:30 in reply to 1 [link] [source]
Is there any documentation on fossil's PGP support? I couldn't find anything. Does it need to be built with some kind of flag to enable it?
(12) By Roy Keene (rkeene) on 2020-03-29 00:46:03 in reply to 1 [link] [source]
Somewhat related, I use S/MIME to sign instead of PGP since it is more widely supported for other types of signing of messages.
(13) By sekao on 2020-03-29 01:18:01 in reply to 12 [link] [source]
How do you sign your commits -- is this done with an external tool? And is it possible to sign any artifact, such as forum posts?
(14) By Jacob MacDonald (jaccarmac) on 2020-03-29 01:32:08 in reply to 13 [link] [source]
fossil setting --global clearsign on
to set up signing for all commits. It uses your installed GPG and can be configured with the pgp-command
setting. AFAIK signing is for commits only. It affects the manifest (see example).
(15) By sekao on 2020-03-29 01:59:03 in reply to 14 [link] [source]
I took a quick look at the code and it also seems to be used in the branch_new
function, so i guess branches can also be signed. But i wonder if the lack of signing in other areas is just due to lack of demand for the feature.
The reason i bring it up is because i'm curious about using fossil in a p2p system where there is no authoritative server. Without signing every artifact, it would be pretty chaotic since people with commit privileges can spoof any name they want.
(16) By Jacob MacDonald (jaccarmac) on 2020-03-29 02:33:01 in reply to 15 [link] [source]
Name spoofing is only as much of a problem as it is in Git, if I understand Git's signing model properly. Perhaps I'm missing the point and you're looking for something with stronger guarantees. Fossil does keep a log of where artifacts came from, which gives you a little bit more information, but ultimately it seems that any content-addressing system is going to struggle with verifying authorship in similar ways.
(17) By sekao on 2020-03-29 03:27:00 in reply to 16 [link] [source]
Right, i didn't mean that as a comparison to git -- it would have the same problem. What i'm thinking about doesn't exist yet :D I want a system where fossil push
doesn't just go to one server, but to a p2p network where any node "subscribed" to my repo would receive it. I'd also like to allow some people to push
to my repo through the same network (commits, forum comments, etc).
That's obviously way outside the purview of fossil's current design but it's fun to think about. That's why i ended up down this rabbit hole; if there is no authoritative server, the list of people with push access would need to include public keys, and every artifact that is pushed would need to be signed. At least, that's my current thought...
(18) By Stephan Beal (stephan) on 2020-03-29 05:14:42 in reply to 16 [link] [source]
There was a long discussion about this several years ago and it indeed boiled down to the problem of verification. It seems that there's no feasible way for fossil to actually make any guarantees based on a signature, so it does not, e.g., bother showing in the timeline that a commit is signed.
(19) By Roy Keene (rkeene) on 2020-04-07 02:20:05 in reply to 18 [link] [source]
This is one advantage of S/MIME, Fossil already links to OpenSSL for TLS and could thus match the certificate of the commit to the commiter if some mapping scheme were used (such as using email addresses as Fossil usernames)