This post has been republished via RSS; it originally appeared at: Azure Developer Community Blog articles.
AKS Image Integrity feature allows you to check the authenticity and ensure integrity of the container images used for deployments. But do you know what the signing technology behind it is? Notary Project is a CNCF project established in 2017 with the goal to improve the security for software supply chains. In the past few years, one of the main goals of the Notary Project community was to implement a portable signature format that can be used to sign cloud-native artifacts including container images.
How do Notary Project signatures work?
Notary Project signatures are detached signatures that can be linked to the container image in any OCI-compliant registry. The resulting hierarchy in the registry is shown here:
The benefit of using detached signatures is that the signature can be downloaded and verified independently from the image. However, due to the content addressable nature of the OCI registries, the integrity of the verified content is preserved - the signature refers to the content by its SHA256 hash. Any changes in the content will invalidate the signature. Having the ability to verify the signature without downloading the full content of the image can significantly improve the performance of the large-scale applications deployed on AKS.
Another benefit of Notary Project signatures is their portability. Images and their signatures can be copied from one registry to another without breaking the signatures.
Use Notation CLI to sign container images
Notation is a subproject of Notary Project and offers a reference implementation for Notary Project signatures. Notation has a CLI to use on the command line as well as Golang libraries that can be used for integration in other projects.
Signing a container image with Notation CLI is as simple as issuing the following command:
The CLI has a plugin architecture that allows you to use signing keys stored in various key management systems (KMS). Using a key saved in a KMS ensures that the key never leaves the vault and stays secure. For signing container images in Azure, you can leverage the Azure Key Vault plugin for Notation CLI.
Want to learn more?
The following two videos talk about the history of Notary Project and show demoes of how to sign and verify images with Notation.
How to get started?
You can use the following tutorial to learn how to sign container images using Notation CLI. The following tutorial explains how to set up Image Integrity on your AKS cluster to verify signed images. Notary Project documentation offers more details and examples how to use Notation CLI.
Go ahead and make your supply chain for containers more secure!