Fork me on GitHub
#clojars
<
2023-02-02
>
rickmoynihan11:02:10

What is the current status of jar signing in clojars and the clojure community? My understanding is that clojars will verify signatures if the jars are signed; but does tools.deps/leiningen verify signatures on the fetching side? My feeling is that they don’t, and that the typical state of jar signing is that some are some aren’t, and that until almost all are signed, that policy can’t tightened. Also for signed jars, how are the public keys obtained to verify? I’m guessing through php keyservers, and then you have the problem of verifying keychains etc which likely doesn’t bottom out at a trustable authority (unless we’re to trust key-signing parties etc, which would probably be hard to automate). So is it the case that this isn’t really worth doing? My feeling is that since clojars etc are now https the risk is minimised; so the main vector is just a malicious party hacking jar on clojars and replacing your jar with something else. Is the above a fair assessment of the current status of this? If so it seems like signing jars in CI probably isn’t worth the hassle at the minute??

tcrawley11:02:08

Clojars does not verify signatures, it just verifies that if you provided a signature for at least one file in a release you provided them for all. It used to allow you to upload your public GPG key and verify that anything you deploy that was signed with that key, but that was removed (maybe around 2016?) because there was no link to a wider web of trust, IIRC. There is some discussion here, but no real direction or decisions: https://github.com/clojars/clojars-web/discussions/834

Alex Miller (Clojure team)12:02:16

The crux of the problem is that consumer side tools could verify signatures, but to do so they need to know what to verify them against, and that relies entirely on manually deciding whether keys are trusted

rickmoynihan12:02:50

yeah that was precisely my conclusion too

Alex Miller (Clojure team)13:02:10

For Clojure and contrib libs, there are instructions on how to do this at https://clojure.org/releases/download_key but for everything else, this is much harder

rickmoynihan13:02:51

thanks for the replies both are super helpful, and basically what I was expecting

lread14:02:15

Also @U04V5VAUN might have some thoughts. He setup jar signing for some of the clj-commons projects.

seancorfield16:02:00

For a while, Phil H pushed very hard for people to verify each other's keys "in person" at conferences and meetups and he was the main one pushing for artifact signing and why Leiningen did it by default (but Boot did not -- and tools.deps etc does not). Clojars used to have a two-tiered system where signed JARs could be "promoted" to a sort of "trusted" layer on the repo. That meant a lot of friction for developers, wrestling with the very fragile cryptographic toolchain (extremely painful on Windows and bad enough on Macs -- but fairly straightforward on Linux, where Phil "lived"), so very few JARs ended up being signed -- people just configured Leiningen to not sign artifacts and the two-tiered approach on Clojars was a lot of machinery to support for the handful of folks who were actually using it. I was one of those folks who had horrible experiences with the experience on Mac and got tired of the pro-signing folks repeatedly telling me "it's simple" -- and it was part of the reason I switched my OSS projects from Leiningen to Boot to get away from it. (just to provide a bit more background color on the topic)

Alex Miller (Clojure team)16:02:22

I think this is an important area we should have better answers for but I don't think the "web of trust" thing is that answer

Alex Miller (Clojure team)16:02:00

but I have chatted a bit with Phil lately about some things in this area and I hope at some point we can do something

Alex Miller (Clojure team)16:02:24

I just don't have the bandwidth to do it right now

seancorfield17:02:24

Has the signing/crypto tooling improved since 2016? (I would hope so with the huge amount of time and effort being spent, in the context of other crypto-based works)

Alex Miller (Clojure team)17:02:44

afaict, not one bit

😞 2
Alex Miller (Clojure team)17:02:22

something something blockchain

4
slipset17:02:15

Setting up the signing process was a royal PITA on my Mac. Getting a signing key onto circle and having circle sign releases to clonâtes was about the same. And I never got around to publish my key to anywhere.

Alex Miller (Clojure team)18:02:33

and without that ... it was all for nought

slipset18:02:44

Ah but, no, I could upload that key to somewhere retroactively if I ever found again. But seriously, yes, this whole process need to be more streamlined.

slipset18:02:50

Imagine if this was a service provided by circle or GitHub. They acting as a key server for the public keys, and having fns for signing stuff with a properly configured private key.