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

[wicketd] Accept TUF repos with RoT archives signed with different keys #4289

Merged
merged 9 commits into from
Oct 19, 2023

Conversation

jgallagher
Copy link
Contributor

@jgallagher jgallagher commented Oct 17, 2023

As of this PR, wicketd will (a) accept TUF repos containing multiple RoT archives for the same board target (e.g., multiple gimlet RoT images), and when performing a mupdate, it will ask the RoT for its currently-active CMPA and CFPA pages and search for an RoT archive that matches.

After this is deployed to all fielded systems, we'll be able to drop the -rot-staging-dev and -prod-rel TUF repos from CI, and only build a single TUF repo with all RoT images. This PR adds a new -rot-all TUF repo publishing step but does not remove the old ones, as we'll need them to update into this version of wicketd.

@jgallagher jgallagher force-pushed the wicketd-tuf-repo-multiple-rot-keys branch from 916226c to 4302c93 Compare October 18, 2023 18:04
@jgallagher jgallagher requested a review from iliana October 18, 2023 18:09
@jgallagher jgallagher marked this pull request as ready for review October 18, 2023 18:09
# boards. While we still need to build multiple TUF repos,
# `add_hubris_artifacts` below will append RoT images to this manifest (in
# addition to the single-RoT manifest it creates).
prep_rot_all_series() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iliana You probably care most about the changes here. They feel pretty janky, but (a) it wasn't clear how to fit this into the existing add_hubris_artifacts and (b) once we don't need the separate staging/dev and prod/rel TUF repos, we can probably drop most of what makes it ugly. Happy to do any cleanup if there's a nicer way to do this for now, though!

Copy link
Contributor

Choose a reason for hiding this comment

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

No more janky than the rest of the script. :) I am excited to clean this up after all known racks have updated beyond this PR!

// Read the CMPA and currently-active CFPA so we can find the
// correctly-signed artifact.
let base64_decode_rot_page = |data: String| {
// Even though we know `data` should decode to exactly
Copy link
Contributor

Choose a reason for hiding this comment

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

🙀

)),
}
})?;
match archive.verify(&cmpa, &cfpa) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's handy that this function exists! 😄

@jgallagher jgallagher merged commit 58c8c6e into main Oct 19, 2023
24 checks passed
@jgallagher jgallagher deleted the wicketd-tuf-repo-multiple-rot-keys branch October 19, 2023 17:24
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.

3 participants