docker:security:sign_and_verify_images_to_mitigate_mitm_attacks
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
docker:security:sign_and_verify_images_to_mitigate_mitm_attacks [2020/04/18 19:28] – created peter | docker:security:sign_and_verify_images_to_mitigate_mitm_attacks [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
* Sign your images with the help of [[https:// | * Sign your images with the help of [[https:// | ||
* Verify the trust and authenticity of the images you pull. | * Verify the trust and authenticity of the images you pull. | ||
+ | |||
+ | |||
+ | Tampering may occur over the wire, between the Docker client and the registry, or by compromising the registry of the owner’s account in order to push a malicious image to. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Verify docker images ===== | ||
+ | |||
+ | Docker defaults allow pulling Docker images without validating their authenticity, | ||
+ | |||
+ | Make it a best practice that you always verify images before pulling them in, regardless of policy. | ||
+ | |||
+ | To experiment with verification, | ||
+ | |||
+ | < | ||
+ | export DOCKER_CONTENT_TRUST=1 | ||
+ | </ | ||
+ | |||
+ | Now attempt to pull an image that you know is not signed—the request is denied and the image is not pulled. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Sign docker images ===== | ||
+ | |||
+ | Prefer [[https:// | ||
+ | |||
+ | Docker allows signing images, and by this, provides another layer of protection. | ||
+ | |||
+ | When Docker Content Trust is enabled, as we exhibited above, a Docker image build signs the image. When the image is signed for the first time, Docker generates and saves a private key in **~/ | ||
+ | |||
+ | For detailed instructions on setting up signed images, refer to [[https:// | ||
+ | |||
+ | How is signing docker images with Docker’s Content Trust and Notary different from using GPG? | ||
+ | |||
+ | Diogo Mónica has a [[https:// | ||
+ | |||
+ |
docker/security/sign_and_verify_images_to_mitigate_mitm_attacks.1587238090.txt.gz · Last modified: 2020/07/15 09:30 (external edit)