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

Add digest resolution to cosigned. #800

Merged
merged 1 commit into from
Sep 26, 2021
Merged

Conversation

mattmoor
Copy link
Member

This change introduces a mutating webhook to complement our validating webhook.

The validating webhook in #799 began rejecting tag reference because tags are mutable and can drift between validation and resolution by the kubelet. This change introduces a mutating webhook that resolves tags to digests as resources are created, so that users aren't necessarily forced to provide digests, but we get the benefits of them nonetheless.

Signed-off-by: Matt Moore mattomata@gmail.com

Ticket Link

Fixes: #784

Release Note

cosigned now includes a mutating webhook that resolves tags to digests

@mattmoor mattmoor changed the title Add digest resolution to cosigned. [WIP] Add digest resolution to cosigned. Sep 25, 2021
@mattmoor
Copy link
Member Author

Marking this as WIP because of the remaining e2e TODO (w/ DO NOT SUBMIT), but I wanted to let the automation do a pass over things while I play with that 😁

@mattmoor mattmoor force-pushed the resolve-digests branch 2 times, most recently from 5a62482 to fb3011e Compare September 25, 2021 15:35
@mattmoor mattmoor changed the title [WIP] Add digest resolution to cosigned. Add digest resolution to cosigned. Sep 25, 2021
@mattmoor
Copy link
Member Author

Okay, this should be RFAL. I've updated the e2e test to check the digest resolution using a dry run on the resources.

@mattmoor
Copy link
Member Author

@dlorenc this is RFAL 😁

@mattmoor mattmoor changed the title Add digest resolution to cosigned. [WIP] Add digest resolution to cosigned. Sep 25, 2021
@mattmoor
Copy link
Member Author

Scratch that, the logs don't look right 🤔

This change introduces a mutating webhook to complement our validating webhook.

The validating webhook in sigstore#799 began rejecting tag reference because tags are mutable and can drift between validation and resolution by the kubelet.  This change introduces a mutating webhook that resolves tags to digests as resources are created, so that users aren't necessarily forced to provide digests, but we get the benefits of them nonetheless.

Fixes: sigstore#784
Signed-off-by: Matt Moore <mattomata@gmail.com>
@mattmoor
Copy link
Member Author

Ok, I fixed the script so it fails properly, and found the bug 🤦

Turns out it doesn't matter if you resolve tags to digests if the digest still isn't signed!

I'm optimistic this will pass now 🤞

@mattmoor
Copy link
Member Author

@mattmoor mattmoor changed the title [WIP] Add digest resolution to cosigned. Add digest resolution to cosigned. Sep 25, 2021
Copy link
Member

@dlorenc dlorenc left a comment

Choose a reason for hiding this comment

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

Nice!

@dlorenc dlorenc merged commit 549e301 into sigstore:main Sep 26, 2021
@github-actions github-actions bot added this to the v1.3.0 milestone Sep 26, 2021
@mattmoor mattmoor deleted the resolve-digests branch September 26, 2021 14:57
mrjoelkamp pushed a commit to mrjoelkamp/cosign that referenced this pull request Sep 28, 2021
This change introduces a mutating webhook to complement our validating webhook.

The validating webhook in sigstore#799 began rejecting tag reference because tags are mutable and can drift between validation and resolution by the kubelet.  This change introduces a mutating webhook that resolves tags to digests as resources are created, so that users aren't necessarily forced to provide digests, but we get the benefits of them nonetheless.

Fixes: sigstore#784
Signed-off-by: Matt Moore <mattomata@gmail.com>
Signed-off-by: Joel Kamp <joel.kamp@invitae.com>
mrjoelkamp pushed a commit to mrjoelkamp/cosign that referenced this pull request Sep 28, 2021
This change introduces a mutating webhook to complement our validating webhook.

The validating webhook in sigstore#799 began rejecting tag reference because tags are mutable and can drift between validation and resolution by the kubelet.  This change introduces a mutating webhook that resolves tags to digests as resources are created, so that users aren't necessarily forced to provide digests, but we get the benefits of them nonetheless.

Fixes: sigstore#784
Signed-off-by: Matt Moore <mattomata@gmail.com>
Signed-off-by: Joel Kamp <joel.kamp@invitae.com>
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.

cosigned webhook should resolve tags to digests
2 participants