Is a verification engine as a binary executable and on Kubernetes which enables verification of artifact security metadata and admits for deployment only those that comply with policies you create.
WARNING: This is not considered production-grade code by its developers, nor is it "supported" software.
- Agenda: https://hackmd.io/ABueHjizRz2iFQpWnQrnNA
- We hold a weekly Ratify community meeting with alternating times to accommodate more time zones. Series #1 Tues 4-5pm Series #2 Wed 1-2pm Get Ratify Community Meeting Calendar here
- We meet regularly to discuss and prioritize issues. The meeting may get cancelled due to holidays, all cancellation will be posted to meeting notes prior to the meeting.
- Reach out on Slack at cloud-native.slack.com#ratify. If you're not already a member of cloud-native slack channel, first add yourself here.
Try out ratify in Kubernetes through Gatekeeper as the admission controller.
Prerequisite: Kubernetes v1.20 or higher
- Setup Gatekeeper with external data
helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
helm install gatekeeper/gatekeeper \
--name-template=gatekeeper \
--namespace gatekeeper-system --create-namespace \
--set enableExternalData=true \
--set validatingWebhookTimeoutSeconds=7
NOTE: validatingWebhookTimeoutSeconds
increased from 3 to 7 so all Ratify operations complete in complex scenarios. See discussion here to remove this requirement. Kubernetes v1.20 or higher is REQUIRED to increase timeout.
- Deploy ratify and a
demo
constraint on gatekeeper in the default namespace.
export RATIFY_NAMESPACE=default
export CERT_DIR=path/to/your/certificate/directory # the directory will be created by generate-certs
make generate-certs RATIFY_NAMESPACE=$RATIFY_NAMESPACE CERT_DIR=$CERT_DIR
helm repo add ratify https://deislabs.github.io/ratify
helm install ratify \
ratify/ratify --atomic \
--set-file provider.tls.crt=${CERT_DIR}/server.crt \
--set-file provider.tls.key=${CERT_DIR}/server.key \
--set provider.tls.cabundle="$(cat ${CERT_DIR}/ca.crt | base64 | tr -d '\n')"
kubectl apply -f https://deislabs.github.io/ratify/library/default/template.yaml
kubectl apply -f https://deislabs.github.io/ratify/library/default/samples/constraint.yaml
Once the installation is completed, you can test the deployment of an image that is signed using Notary V2 solution.
- This will successfully create the pod
demo
kubectl run demo --image=wabbitnetworks.azurecr.io/test/notary-image:signed
kubectl get pods demo
Optionally you can see the output of the pod logs via: kubectl logs demo
- Now deploy an unsigned image
kubectl run demo1 --image=wabbitnetworks.azurecr.io/test/notary-image:unsigned
You will see a deny message from Gatekeeper denying the request to create it as the image doesn't have any signatures.
Error from server (Forbidden): admission webhook "validation.gatekeeper.sh" denied the request: [ratify-constraint] Subject failed verification: wabbitnetworks.azurecr.io/test/net-monitor:unsigned
You just validated the container images in your k8s cluster!
- Uninstall Ratify
kubectl delete -f https://deislabs.github.io/ratify/library/default/template.yaml
kubectl delete -f https://deislabs.github.io/ratify/library/default/samples/constraint.yaml
helm delete ratify
If the image reference provided resolves to an OCI Index or a Docker Manifest List, validation will occur ONLY at the index or manifest list level. Ratify currently does NOT support image validation based on automatic platform selection. For more information, see this issue.
The docs folder contains the beginnings of a formal specification for the Reference Artifact Verification framework and its plugin model.
Meeting notes for weekly project syncs can be found here
This project has adopted the Microsoft Open Source Code of Conduct.
For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
The Ratify release process is defined in RELEASES.md.
This project is released under the Apache-2.0 License.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.