Skip to content
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

chore: create backup container signing keys #232

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

p5
Copy link
Member

@p5 p5 commented Feb 23, 2025

Closes ublue-os/main#703

These keys will be unused until a time when we need to rotate. When we do need to rotate, we can change the priv key in GitHub Actions, and these will be accepted by the signing policy.

p5 and others added 4 commits February 23, 2025 18:32
These keys will be unused until a time when we need to rotate.  

We need to be certain this change doesn't break anything, since it could cause failed updates.
private key is in shared vault and accessible for actions to sign via
org-wide secret: `SIGNING_SECRET_BACKUP`
@ledif
Copy link
Member

ledif commented Mar 13, 2025

Some testing from me indicates that this seems to be working in the sense that it does not break the ability to do upgrades. My testing steps:

$ curl -L https://raw.githubusercontent.com/ublue-os/packages/3987d25ef80816a114027e00ca0d36053ff0e714/packages/ublue-os-signing/src/etc/pki/containers/ublue-os-backup.pub \
  | sudo tee /etc/pki/containers/ublue-os-backup.pub

$ curl -L https://raw.githubusercontent.com/ublue-os/packages/3987d25ef80816a114027e00ca0d36053ff0e714/packages/ublue-os-signing/src/usr/etc/containers/policy.json \
  | sudo tee /etc/containers/policy.json

$ sudo rpm-ostree upgrade
note: automatic updates (stage) are enabled
Pulling manifest: ostree-image-signed:docker://ghcr.io/ublue-os/aurora-dx:stable-daily
[ ... snip ... ]

There wasn't a new update for me but it did not complain about signing. Will check again later to confirm that it was able to successfully update.

@p5 p5 requested a review from a team March 13, 2025 16:04
@p5
Copy link
Member Author

p5 commented Mar 13, 2025

Calling all @ublue-os/approver (s)

Please can we get some testing on this PR. The main thing is ensuring the changes to the policy.json doesn't harm existing installations, and that the updates still occur.

The idea is not to sign with a new key. The idea is to trust a new key that we can switch to in a disaster recovery scenario (i.e. the existing signing keys are lost or leaked). When we do need to rotate, the certificates will be already trusted by the entire userbase, and therefore users will switch over to images signed with the backup key seamlessly.

Bsherman and Kyle have access to the backup private key. They are not and will not be put in GitHub until we are required to sign images with it.

Please comment on or approve the PR if you were successfully able to run an update after the policy.json changes.

@p5 p5 marked this pull request as ready for review March 13, 2025 16:09
@Copilot Copilot bot review requested due to automatic review settings March 13, 2025 16:09

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Copy link
Member

@ledif ledif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that I was able to upgrade to the latest stable-daily image for aurora-dx with the changes to my /etc/containers/policy.json and the new public key on disk.

So this LGTM.

@m2Giles
Copy link
Member

m2Giles commented Mar 17, 2025

Can also confirm that this works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create backup trusted container signing keys
4 participants