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

fix: expose image manifest from build-vm-image task #1147

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

ralphbean
Copy link
Member

The way this previously worked was that each build-vm-image task would produce an image index (index1), which was later fed into a the build-image-index task to produce a second image index (index2), which (by use of the --all option) would throwaway the vm image's original index image (index1), keeping only its image manifest.

The problem this caused was that the vm image's original index image (index1) was exposed as a result, and not the image manifest. This meant that tekton chains would not see the image manifest, would not generate an attestation for it, and would not sign it.

Later, when trying to validate the aggregate index image (index2), policy checks would fail since the index image (index2) was signed, but non of the image manifests were signed.

The change here modifies things so that the build-vm-image task exposes only an image manifest, which will be attested to and signed. Its exposed pullspect will be fed to the build-image-index task, which will expose its own image index pullspec as a result to be attested to and signed. And in the end, we should have a correct situation with one image index (signed) referring to $N image manifests (also signed).

The way this previously worked was that each build-vm-image task would
produce an image index (index1), which was later fed into a the
build-image-index task to produce a second image index (index2), which
(by use of the --all option) would throwaway the vm image's original
index image (index1), keeping only its image manifest.

The problem this caused was that the vm image's original index image
(index1) was exposed as a result, and not the image manifest. This meant
that tekton chains would not see the image manifest, would not generate
an attestation for it, and would not sign it.

Later, when trying to validate the aggregate index image (index2),
policy checks would fail since the index image (index2) was signed, but
non of the image manifests were signed.

The change here modifies things so that the build-vm-image task exposes
only an image manifest, which will be attested to and signed. Its
exposed pullspect will be fed to the build-image-index task, which will
expose its own image index pullspec as a result to be attested to and
signed. And in the end, we should have a correct situation with one
image index (signed) referring to $N image manifests (also signed).
Copy link
Member

@arewm arewm left a comment

Choose a reason for hiding this comment

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

I am fine with the change. The comments are closer to being nitpicks.

task/build-vm-image/0.1/build-vm-image.yaml Show resolved Hide resolved
task/build-vm-image/0.1/build-vm-image.yaml Outdated Show resolved Hide resolved
@ralphbean ralphbean added this pull request to the merge queue Jul 11, 2024
Merged via the queue into main with commit 6e5906c Jul 11, 2024
7 checks passed
@ralphbean ralphbean deleted the build-vm-fix branch July 11, 2024 21:01
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.

2 participants