Signed distribution of Platform modules with Docker Content Trust
Available from release 2.3.0-immortal
Introduction
In Q4, 2020, Docker module signing will be added to the platform to ensure that distributed images have not been tampered with.
This is a process known in Docker as DCT (Docker Content Trust) and it involves two processes:
Signing process: Integrated in the generation of the images and prior to publishing them in a registry.
Verification of the signature: Depends on the environment where the image is going to be executed (Docker, Kubernetes...). It involves verifying the signature just after downloading the image and before executing it.
Both signing and verification involve a number of infrastructure elements and processes.
Signing and verification process
This Docker image signing process involves Notary (https://github.com/theupdateframework/notary). This is a tool that, following the DCT specification, allows signing and publishing and managing trusted content by means of signature.
Notary integrates with Docker Engine during image generation to include an electronic signature. The signature data is stored in Notary's own verification server so that the integrity of the artefacts can be checked later when they are downloaded.
Once the image is signed, it is deployed in a Docker registry in the usual way.
Verification of the image on download, prior to execution, can be done directly by Docker if DCT is enabled. The problem arises when the image is deployed in Kubernetes, as is currently done with Onesait Platform when deployed on CaaS platforms such as Rancher2 and Openshift. In this case, another piece is needed: An Admision Controller, to do the verification.
There are different Admision Controllers: Connaisseur has been chosen, due to its ease of installation directly on top of Kubernetes.
Lines of work in Onesait Platform
Integration of Notary in our cicd cycle.
Installation of Notary server.
Installation of Notary signer.
Installation of Notary DB.
Establishing trust relationships between Notary Server, Jenkins and Docker Registry.
Generation of signing keys for Onesait Platform artifacts.
Extending image generation pipelines to sign docker artefacts and publish signed artefacts to the registry.
Enabling signature verification in CloudLab environment.
Installation of Connaisseur on CloudLab’s CaaS.
Enabling signature verification of platform Docker artefacts.