-
Notifications
You must be signed in to change notification settings - Fork 25
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
Optional signature verification #63
Comments
Git already has PGP signing for repositories - that could be integrated once Git support is implemented, and would allow signing the entire contents of the repo. Of course, this wouldn't be able to verify the PGP signatures of files packwiz-installer itself downloads, but you could implement signature verification when you create the pack and have everyone trust that you verified those files, without any extensions to the actual packwiz format (as the hashes ensure that the files you verified haven't been tampered with). Reducing points of compromise is beneficial to security though, so verifying signatures in packwiz-installer seems like a good idea particularly if you want to link the trust to the original authors/builders of JARs. The following are my main concerns:
|
I will give my perspective on these concerns based on my/our experiences.
We used BouncyCastle to implement PGP verification. The jar is fairly large, though (~6 MiB). Using shadow with minimization may reduce the size, but we didn't try that before we dropped the project as a whole.
For us, signatures were shipped separately.
I personally think only packwiz-installer should care about signatures. However, that leaves a question of "where should packwiz CLI obtain those URLs to signatures when serving the pack". Honestly speaking, I ran out of ideas on this one. Unless major players in mod hosting (namely CurseForge and Modrinth) will provide some conventions regarding this. It may be a good idea to allow packwiz CLI to generate these signatures (either through BouncyCastle, or invoking
As online convention organizers, there is only one source of mods: us the organizers. Thus, in our specific case, only we were signing the mods.
Visitors/players to our event only need to pay attention to this specific key. Of course, this setup won't work well when a lot of people start to signing things… I would leave this question to MMPA as well.
To me, it sounds like another topic that should be left to MMPA. Valid signature is not a sign of safety, only authenticity. For we the event organizers, we only need to audit all the mods we used in the convention. With audit, we assure our visitors/players that, if you have this jar, and the signature shows that this jar is from us, then it is safe to use; if a vulnerability is discovered at a later time, a valid signature will hold us responsible. |
A follow-up:
MMPA has decided that P2I approach was not worth collaborating. Do note that PGP does not require a P2I, though. PGP can operate on the Web of Trust, but that also requires effort. |
We migrated from our home-brewed mod-updater to packwiz-installer for our new iteration of online convention event this year.
Everything works as expected, except one feature missing: mandatory PGP signature verification.
As some background information: ever since 2020 when we started our convention event, we requires all submitted mods to be built on our own. Since 2021, we streamlined this process by leveraging GitHub Actions, and added a signing step after build, so that everyone with correct tooling can verify that those jars are from us.
To make the verification easier, as well as to make mod updates faster, I rolled out the said home-brewed mod-updater. From a high-level point of view, this home-brewed updater:
This home-brewed updater has many flaws, however; I will not list them here to make this ticket less wordy. To address these flaws, we decided to drop our own tooling entirely in favor or packwiz, which, according to our initial testing earlier this year, is satisfactory.
... except the absence of PGP signature verification. Whilst in the last two years, we did not suffer from incidents akin to the Fractureiser, the Fractureiser incident itself is nonetheless a reminder that we need some kind of defense.
Therefore, I am writing this ticket to request such a feature. There are at least two ways to approach this, however:
I anticipate that both approaches involve changes to the existing packwiz format. Also, it is also worth noting that, the signature does not have to be PGP. We chose PGP because it was probably the most obvious choice when we were thinking about authenticity check.
Signature verification should be optional - that is, if a pack creator does not want to use it, the workflow is the same as what we have now; however, if a pack creator enables signature verification, the pack update should fail when signature verification fails.
Further, if a file does not have its accompanying detached signature, either the installer should skip verification for that file, or give some sort of warning about the absence of signature.
The text was updated successfully, but these errors were encountered: