cosign-provider is used for validating whether images are signed with cosign.
This repo is meant for testing Gatekeeper external data feature. Do not use for production.
Installation
Deploy Gatekeeper with external data enabled (--enable-external-data)
kubectl apply -f manifest
Update SECRET_NAME environment variable
kubectl apply -f policy/provider.yaml
Update proxyURL if it's not http://cosign-provider.default:8090
kubectl apply -f policy/template.yaml
kubectl apply -f policy/constraint.yaml
Verification
kubectl apply -f policy/examples/signed.yaml
Request should be rejected
Error from server ([signed-image] Image gcr.io/google_containers/pause-amd64:3.0 does not contain a valid cosign signature): error when creating "policy/examples/unsigned.yaml": admission webhook "validation.gatekeeper.sh" denied the request: [signed-image] Image gcr.io/google_containers/pause-amd64:3.0 does not contain a valid cosign signature