Managed signing
Amazon ECR managed signing automatically signs your container images by generating cryptographic signatures using AWS Signer when images are pushed to Amazon ECR. This eliminates the need to install and configure client-side tools and allows you to centrally govern signing as a registry configuration.
Prerequisites
To configure managed signing, you create a signing configuration with Amazon ECR that references one or more Signer signing profiles and, optionally, repository filters that restrict which repositories should have their images signed. Once configured, Amazon ECR managed signing automatically signs images as they are pushed using the identity of the entity pushing the image.
Before you can configure managed signing, you must have the following:
-
A Signer signing profile — Create at least one Signer signing profile. A signing profile is a unique AWS Signer resource that you can use to perform signing operations in Amazon ECR. Signing profiles enable you to sign and verify code artifacts, such as container images and AWS Lambda deployment bundles. Each signing profile designates the signing platform to sign for, a platform ID, and other platform-specific information. For example, a signing profile ARN looks like this:
arn:.partition:signer:region:account-id:/signing-profiles/profile-name -
IAM permissions — The IAM principal that pushes the image must have the necessary IAM permissions to access the relevant Signer signing profile and the relevant ECR repository. You need to modify the identity-based policy for the IAM principal to include permissions for both ECR repository operations and Signer signing operations. The following example policy shows the required permissions:
{ "Version": "2012-10-17", "Statement": [ { "Sid":"UploadSignaturePermissions", "Effect":"Allow", "Action":[ "ecr:CompleteLayerUpload", "ecr:UploadLayerPart", "ecr:InitiateLayerUpload", "ecr:BatchCheckLayerAvailability", "ecr:PutImage" ], "Resource":"arn:aws:ecr:region:account-id:repository/repository-name" }, { "Sid": "SignPermissions", "Effect": "Allow", "Action": [ "signer:SignPayload" ], "Resource": "arn:aws:signer:region:account-id:/signing-profiles/signing-profile-name" } ] }
With Amazon ECR managed signing, you can create multiple signing rules (up to 10 per registry) to create stronger security boundaries. For example, you might run multiple build pipelines and want to limit which repositories each pipeline can sign. Within each rule, you configure a signing profile and specify repository name filters. When a new image is pushed, Amazon ECR matches which signing rule and signing profile can sign the image. If there are multiple matches, Amazon ECR generates multiple signatures.
Note
If you verify signatures manually, you still need to install the Notation CLI.
Note
Amazon ECR managed signing is available in all AWS Regions where container image signing with AWS Signer is available.
Getting started
Follow these steps to configure managed signing. You provide Amazon ECR with a reference to a Signer signing profile and, optionally, filters that restrict which repositories should have their images signed.
Considerations
The following limitations and capabilities apply to managed signing:
-
Cross-region signing is not supported — Signing profiles must be in the same region as your Amazon ECR registry. You cannot use a signing profile from one region to sign images in a registry located in a different region.
-
Cross-account signing is supported — Signing profiles can be in different accounts than your Amazon ECR registry. This enables organizations to centrally manage signing profiles while allowing developers in other accounts to use them. For more information, see Set up cross-account signing for Signer in the AWS Signer Developer Guide.
-
Signatures cannot be signed — You cannot sign signatures themselves. Only container images can be signed.