Sign the update site with PGP - #69
Merged
Merged
Conversation
Add the tycho-gpg-plugin to the updatesite module so that the artifacts of the p2 repository get a PGP signature in the p2 metadata. The jars stay unchanged, Eclipse bundles keep their own jar signature and only the vogella bundles and unsigned third party bundles are signed. Signing is off by default. The CI enables it and uses the release key from the MAVEN_GPG_KEY and MAVEN_GPG_PASSPHRASE secrets, or a throwaway Ed25519 key when the secrets are not set, so the signing step runs on every build. The key is passed as file via tycho.pgp.signer.bc.secretKeys, since the Bouncy Castle signer of Tycho otherwise still reads the key through the gpg executable. Assisted-by: multiple AI agents and layers of automated tooling 🤖
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds PGP signing of the update site via the tycho-gpg-plugin in the updatesite module, following the recommendation in the Tycho tutorial for open source plug-ins. The signatures land in the p2 metadata, so the jars stay unchanged and there is no interaction with the p2 checksums. Eclipse bundles keep their existing jar signature; the vogella bundles and the unsigned third party bundles from Maven Central get the PGP signature, and the public key is added to the repository so p2 can show it to the user.
Signing is skipped by default, so local builds are unaffected. The CI enables it and takes the release key from the MAVEN_GPG_KEY and MAVEN_GPG_PASSPHRASE secrets; until those are set it generates a throwaway Ed25519 key per run, which keeps the signing step exercised. The key is handed to Tycho as a file via tycho.pgp.signer.bc.secretKeys, because with signer=bc alone Tycho 5.0.4 still shells out to gpg to read the key from the keybox. Verified locally: 49 artifacts carry pgp.signatures, the build passes.