Add containerd image verification to k8s and expand ecs-3 verifiers#4832
Open
ginglis13 wants to merge 3 commits into
Open
Add containerd image verification to k8s and expand ecs-3 verifiers#4832ginglis13 wants to merge 3 commits into
ginglis13 wants to merge 3 commits into
Conversation
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Add image verification packages aws-signer-notation-plugin, digestion-image-verifier, notation-image-verifier, and bottlerocket-thar-be-image-verifiers, in k8s-1.33, k8s-1.34, and k8s-1.35 variants Add digestion-image-verifier and bottlerocket-thar-be-image-verifiers in ecs-3 variants Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Add migration for these new settings for k8s variants. no-op on ecs variants as these settings have previously existed Signed-off-by: Gavin Inglis <giinglis@amazon.com>
3adeb5d to
1c5ee7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number:
Closes #4684
Description of changes:
aws-signer-notation-plugin,digestion-image-verifier,notation-image-verifier, andbottlerocket-thar-be-image-verifiers, in k8s-1.33, k8s-1.34, and k8s-1.35 variantsdigestion-image-verifierandthar-be-image-verifiersin ecs-3 variantsPending #4827 to add these packages and settings for the new k8s-1.36 variants
Testing done:
k8s testing performed on:
ecs-3 testing performed on:
Details
Trust policy that allows signed image
public.ecr.aws/o7o0w6s5/public-alpine-clone:latest:Test 3 cases: 1/ pull the signed image (allow), 2/ pull an unsigned image (deny) 3/ pull an image with a different signature not explicitly allowed in the trustpolicy (deny):
Details
Trust policy that allows digest of
public.ecr.aws/docker/library/redis:7.4.8-alpine3.21only:Test for allow/deny:
Details
Used the Dockerfile and Go program below. The Go program checks for existence of a mock config file; if present, pass, if not, fail. The Go binary is written to
/.bottlerocket/rootfs/opt/civ/bin/custom-verifier, which is thebin_dirconfigured for containerd image verifiers. Configured as a bootstrap container on k8s instance with user-data script below b64 encoded for the "allow" case. For deny case, adjusted the script to not include configuration file.On the instance:
With script that does not write config file to /var/lib/civ-config, pull rejected by
custom-verifier.Details
Same process as digestion verifier test on k8s with only
public.ecr.aws/docker/library/redis:7.4.8-alpine3.21in digest allowlist:Details
Same userdata for image-verifier-plugins and boostrap-containers as the k8s testing above.Details
On ecs-3 variant. After 1.61.0 upgrade, my image verifier settings remain:
Downgrade:
Existing settings remain for ecs ✅
Now for k8s:
Downgrade:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.