← Back to context

Comment by fc417fc802

4 days ago

Maybe signed publishing or verified publishing would have been better terms?

It’s neither signed or verified, though. There’s a signature involved, but that signature is over a JWT not over the package.

(There’s an overlaid thing called “attestations” on PyPI, which is a form of signing. But Trusted Publishing itself isn’t signing.)

  • Re signed - that is a fair point, although it raises the question, why is the distributed artifact not cryptographically authenticated?

    Maybe I'm misunderstanding but I thought the whole point of the exercise was to avoid token compromise. Framed another way that means the goal is authentication of the CI/CD pipeline itself, right? Wouldn't signing a fingerprint be the default solution for that?

    Unless there's some reason to hide the build source from downstream users of the package?

    Re verified, doesn't this qualify as verifying that the source of the artifact is the expected CI/CD pipeline? I suppose "authenticated publishing" could also work for the same reason.

    • > why is the distributed artifact not cryptographically authenticated?

      With what key? That’s the layer that “attestations” add on top, but with Trusted Publishing there’s no user/package—associated signature.

      > Maybe I'm misunderstanding but I thought the whole point of the exercise was to avoid token compromise. Framed another way that means the goal is authentication of the CI/CD pipeline itself, right? Wouldn't signing a fingerprint be the default solution for that?

      Yes, the goal is to authenticate the CI/CD pipeline (what we’d call a “machine identity”). And there is a signature involved, but it only verifies the identity of the pipeline, not the package being uploaded by that pipeline. That’s why we layer attestations on top.

      (The reasons for this are unfortunately nuanced but ultimately boil down to it being hard to directly sign arbitrary inputs with just OIDC in a meaningful way. I have some slides from talks I gave in the past that might help clarify Trusted Publishing, the relationship with signatures/attestations, etc.[1][2])

      > I suppose "authenticated publishing" could also work for the same reason.

      I think this would imply that normal API token publishing is somehow not authenticated, which would be really confusing as well. It’s really not easy to come up with a name that doesn’t have some amount of overlap with existing concepts, unfortunately.

      [1]: https://yossarian.net/res/pub/packagingcon-2023.pdf

      [2]: https://yossarian.net/res/pub/scored-2023.pdf

      5 replies →