Skip to content

Verify OpenPGP signatures on Maven artifacts and hold signer changes #480

Open

Description

@andrew

Since #484 the Maven handler caches .asc files alongside their artifacts (isChecksumFile in internal/handler/maven.go), but nothing checks that a jar or POM matches its OpenPGP signature or that the signer is the one who signed earlier versions. #42 covers cached-content hashes and sigstore attestations; this is the OpenPGP side, which is still what most of Maven Central carries.

Jenesis's repository server has a worked design for this (https://github.com/jenesis/jenesis-repository, source/compliance/signatures/). Its signature check has four outcomes, each with its own policy: invalid (bytes do not match) is rejected, untrusted (a good signature by a key nobody admitted) is served and recorded, signer changed (earlier accepted versions carried another signer) is held for a person because a key rotation and a takeover look the same, and missing is allowed on the proxy path because upstreams hold artifacts from before they required signing. The expected signer is kept per coordinate and per scheme, so OpenPGP and Sigstore signatures on the same artifact do not overwrite each other, and only admitted versions update it. Operators can pin signer identities per namespace or namespace prefix, so a key trusted for one group cannot vouch for another. Unknown keys are looked up off the request path from keyservers by key id, from WKD by maintainer email in the POM, and from GitHub by login; a discovered key verifies a signature but leaves it untrusted until an operator admits it.

Proposed change: verify OpenPGP signatures for Maven artifacts at fetch time, record the signer per coordinate, and hold a new version whose signer differs from the recorded one, alongside the cooldown hold.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions