-
Notifications
You must be signed in to change notification settings - Fork 38.1k
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
Please publish PGP signing keys publicly #23434
Comments
Maven requires those to be published (see "Distributing Your Public Key" under https://central.sonatype.org/pages/working-with-pgp-signatures.html), and can be downloaded. For example:
|
@rstoyanchev I don't think you've understood the problem I'm facing here yet. You need to understand that anyone can upload a key to the public keyservers, and it can be associated with any email address. You gave the example of searching for the key on pool.sks-keyservers.net: You can see that the key has not been signed by anyone! There is no indication that this key is legitimate. If an attacker wanted to carry out a supply chain attack, this is what can happen: replace the artifacts on Maven with malicious ones, and also upload signatures of the malicious artifacts using a PGP key that the attacker controls. Then upload the public key to the keyservers, and bingo! If users follow your policy, they will trust the malicious artifacts because the only requirement you put on trusting a key is that it exists on a public keyserver. Spring needs to indicate the correct key for signing Maven artifacts, so that users can trust those key(s) and no others. Another way would be to leverage the PGP Web of Trust by having other people sign your PGP key, but as I pointed out, that has not been done here. |
Here is an example of someone doing the correct thing: https://pivotal.io/security Notice that the Pivotal security team publishes the fingerprint of their PGP key on a website they own and which is protected by https. As far as I know, Spring has not published fingerprints (or better yet the public keys themselves) anywhere for the Maven signing keys. |
Hi @EricPetersonIBKR - that's a good question (and the latest news point to this very problem). The point you're making with our official security email channel is not the exact same thing, because here the key is required to encrypt any email sent to that email address. You don't strictly need such a key to consume Spring artifacts, or at least this feature is not supported (as far as I know) natively by build tools. That's an interesting point still and we could publish that information on https://spring.io or somewhere else. It could be also interesting to provide information about how to check for those at the build level. It seems that there's an existing Maven plugin but I'm not aware of any solution for Gradle. How would you enforce such checks in your organization? |
@bclozel for now in our case, imports of 3rd party software require manual checks, so that's why I'm bugging you guys here instead of a PGP Key Bot or similar. :) It would be great if Sonotype made this process more friendly to automation, but what they have actually done is just make it very easy to upload PGP signatures but then almost no one publishes what the correct keys are. That instills a false sense of security in users. The mere presence of a valid PGP signature doesn't mean the artifact is legitimate unless you can also verify that the signing key is controlled by the project maintainers. Here is another example of doing the right thing: https://www.elastic.co/guide/en/kibana/current/rpm.html Unless there is an official location, controlled by Spring, that publishes what the correct keys are, the PGP signatures have no value. Possibly less than no value: users have no way to verify that the key is correct, but they may mistakenly trust the signatures anyway. |
@bclozel that said, I fully expect to automate the process of artifact verification as we have more resources to do so. To do that right though, we will need to decide which keys to trust and right now there is not a good way to do that in a fully automated way. So far in my experience, it requires a lot of effort contacting maintainers and asking for verification. The Apache family of projects is a notable exception, they do a good job of publishing their maintainer PGP keys on their websites, which are protected by https. Anyway, the point is that Spring could also set a good example here and get us one step closer to making it easier to automate securing the software supply chain. :) |
…checksums `checksum-dependency-plugin` is a superset of `gradle-witness`, and it enables to increase the level of security. See https://github.com/vlsi/vlsi-release-plugins#checksum-dependency-plugin Note: GPars is signed with 74DAFDFD6DAE2441, however it is not available on pulic key servers: GPars/GPars#62 Note: SpringFramework misses PGP keys, see spring-projects/spring-framework#23434
I've implemented Gradle plugin to verify PGP/checksums for dependencies, and it turns out SpringFramework indeed misses the official PGP keys. Certain artifacts are signed though: <!-- It is a cut from the generated checksum.xml -->
<trusted-key id='9a2c7a98e457c53d' group='org.springframework.boot' />
<trusted-key id='257d4510e2e11827' group='org.springframework.retry' />
<trusted-key id='257d4510e2e11827' group='org.springframework.security' />
<trusted-key id='9a2c7a98e457c53d' group='org.springframework.shell' />
<trusted-key id='51a00fa751b91849' group='org.springframework.vault' />
<trusted-key id='9a2c7a98e457c53d' group='org.springframework.webflow' />
<trusted-key id='9a2c7a98e457c53d' group='org.springframework.ws' /> |
…checksums `checksum-dependency-plugin` is a superset of `gradle-witness`, and it enables to increase the level of security. See https://github.com/vlsi/vlsi-release-plugins#checksum-dependency-plugin Note: GPars is signed with 74DAFDFD6DAE2441, however it is not available on pulic key servers: GPars/GPars#62 Note: SpringFramework misses PGP keys, see spring-projects/spring-framework#23434
…checksums `checksum-dependency-plugin` is a superset of `gradle-witness`, and it enables to increase the level of security. See https://github.com/vlsi/vlsi-release-plugins#checksum-dependency-plugin Note: GPars is signed with 74DAFDFD6DAE2441, however it is not available on pulic key servers: GPars/GPars#62 Note: SpringFramework misses PGP keys, see spring-projects/spring-framework#23434
…checksums `checksum-dependency-plugin` is a superset of `gradle-witness`, and it enables to increase the level of security. See https://github.com/vlsi/vlsi-release-plugins#checksum-dependency-plugin Note: GPars is signed with 74DAFDFD6DAE2441, however it is not available on pulic key servers: GPars/GPars#62 Note: SpringFramework misses PGP keys, see spring-projects/spring-framework#23434
…checksums `checksum-dependency-plugin` is a superset of `gradle-witness`, and it enables to increase the level of security. See https://github.com/vlsi/vlsi-release-plugins#checksum-dependency-plugin Note: GPars is signed with 74DAFDFD6DAE2441, however it is not available on pulic key servers: GPars/GPars#62 Note: SpringFramework misses PGP keys, see spring-projects/spring-framework#23434
As I see
use Bintray Key, I detected it in my project, where I have verification for pgp keys used by artifacts |
Yes, I can confirm we have created this new key and will use it for the next releases (it has been used already for the releases performed this week). |
@bclozel @rstoyanchev What is needed by other projects which want to actually use artifact signatures to secure their software supply chain is that the Spring project publish the signing keys independently somewhere so that we can confirm a link between the artifacts and the keys. Downloading an unsigned key from a key server doesn't help us. Having someone (even a project member) refer to "this new key" in an issue comment isn't enough either. One convention used by other projects that you might consider would be to to include the public keys in a KEYS file within the project repository itself, or publish the full fingerprints in your reference documentation. It would be really helpful if this could be arranged. Otherwise, adopting 6.0.5 requires a leap of faith on the part of dependent projects. |
@iay adding a Related issues linked here point to specific web pages on the official website, a I'll take this discussion to the broader team. |
This might be relevant for inspiration: https://kotlinlang.org/docs/security.html |
@bclozel It has been a few weeks, and 6.0.6 is out now as well so we've now had two releases where we have no way to rationally validate the Spring Framework artifacts. Can I ask if there is likely to be any progress on this front soon?
I missed this statement the last time round. Just to be clear, we're not looking to you to produce some kind of automated solution to the software supply chain problem. We expect, and indeed require, human interaction in evaluating the signing keys that we accept for specific artifacts (based on Maven |
@iay thanks for the reminder - I've submitted a PR internally for publishing this information on the official website. I'll report back here when it's published. |
We've published relevant information here: https://spring.io/GPG-KEY-spring.txt |
@bclozel , would you please adjust the recommended command in Currently, the file suggests |
This is a follow-up to issue gh-20182.
Could Spring please publish the public PGP keys used to create artifact signatures so that they are available via https download from an official Spring site?
That way users have a way to reliably verify the authenticity of downloaded artifacts.
The text was updated successfully, but these errors were encountered: