FR: Sign container images and build artifacts #2434
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Compliance
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2434
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What new feature do you want to see? What problem does it solve?
Hi, thanks for amazing work here. I currently deploy continuwuity on my home server. To the best of my knowledge, the prebuilt binaries and containers are not signed (DCT, cosign, or GPG), and this breaks the chain of trust. To maintain this chain of trust, I need to have a Forgejo action that checks out the repo, verifies the signature of a tag/commit, and rebuilds the container from scratch. It would be nice if you guys could set up a pipeline to automatically sign the containers and the binaries in the releases page so I don't have to duplicate this work that is already done by the bot.
Further reading
No response
Additional context
No response
Since this project isn't homed on GitHub or GitLab.com, the method of signing with Cosign & OIDC workload identities (bound to an ephemeral key) that works well for those forges is not attainable here. That said, as long as the project is willing to generate and store a persistent key (either as a CI/CD secret or with a hyperscaler's KMS, OVHcloud KMS, OpenBao/HashiCorp Vault, etc.), and add some CI steps to generate binary/container signatures then push those to release assets & container registries, this doesn't seem out of the question entirely.
FWIW, the following packaging formats already have signatures of some form in place:
pkg-compatible repository provided by a community member)I've been dealing with OpenBao at my work recently, I don't think its fitting for this project. Quite a complex piece of software, and not really useful for the kind of signing we'd need imo.
I am leaning towards generating a gpg key, certifying it with the maintainers' keys, storing it as a secret, and using that with gpg signatures. I believe docker images can be signed directly, and binaries can have a .gpg signature file attached as part of the release artifacts
OCI containers can be signed with GPG -- that's what Red Hat does with their images, and I've been doing that myself for quite some time. I suppose the maintainer can generate a signing subkey that can be used directly by Forgejo?
For reference, here is my own Forgejo workflow that does exactly that:
My solution is a bit of a makeshift one -- it works, but it creates a bit of noise in the container registry. Since I'm the only one using my repository, it really doesn't matter. I believe Red Hat does it a slightly different way to keep their container registry clean.
@silversys wrote in #2434 (comment):
To be clear, OpenBao is simply one external KMS-shaped place that could store a Cosign key. Like I said, persistent Cosign keys can live in something as simple as a CI/CD secret.
I would recommend against using GPG for a few reasons:
that all sounds reasonable to me, you clearly know more about this than i do so I'll just leave y'all to it :3
@macthecadillac wrote in #2434 (comment):
Red Hat, you'll find, does a weird hodgepodge of GPG and Sigstore that I haven't seen from any other vendor or player in this space.