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

kyverno fails - option to copy cosign signature from source to target registry #751

Open
wosiu opened this issue Jun 20, 2024 · 2 comments

Comments

@wosiu
Copy link

wosiu commented Jun 20, 2024

When I enabled k8s-image-swapper it turned out that kyverno's image signature verification is failing.

So while k8s-image-swapper works fine for pulling/pushing docker images and mutating their references, I’m getting errors in replicasets like:

admission webhook "mutate.kyverno.svc-ignore" denied the request: policy Pod/my-pod/ for resource violation: image-signature-valid: verify-cosign-signature: | failed to verify image <my-account-id>.dkr.ecr.us-west-1.amazonaws.com/<my-account-id>.dkr.ecr.us-west-2.amazonaws.com/<my-docker-image>: .attestors[0].entries[0].keys: no matching signatures:

..which makes sense, because k8s-image-swapper currently does not fetch signatures from a source ECR while fetching a corresponding docker image. And because image name is mutated, kyverno is looking for a signature in a target ECR created by k8s-image-swapper.

So it would be nice to have option to enable copying signatures (if exist) from source to target registry.

FWIW I tried to hack this on kyverno side and no luck :(

@wosiu
Copy link
Author

wosiu commented Jun 26, 2024

Referencing #633 as it also mentions sigstore signatures.

@wosiu
Copy link
Author

wosiu commented Jun 26, 2024

Discussion on slack for reference: https://kubernetes.slack.com/archives/C04LETF7KEC/p1718703080654259

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

No branches or pull requests

1 participant