AWS AmazonECR: Registry policy now requires ecr:ReplicateImageDelete for delete replication
Summary
Updated the cross-account registry policy requirements to state that when replication of deletes is enabled, the registry policy must also grant the internal `ecr:ReplicateImageDelete` API action, and that failed `ReplicateImageDelete` calls are recorded in CloudTrail.
Security assessment
The change documents a new required IAM permission (`ecr:ReplicateImageDelete`) in the cross-account registry policy and notes CloudTrail auditing of failed replication API calls. This is IAM permission/authorization guidance with audit implications, but it documents a feature requirement rather than fixing a specific vulnerability.
Evidence
+Your registry policy must grant permission for the `ecr:ReplicateImage` API action. When you enable replication of deletes for a replication rule, your registry policy must also grant permission for the `ecr:ReplicateImageDelete` API action. These are internal Amazon ECR APIs that can replicate images, image deletions, and image tag removals between Regions or accounts. You can also grant permission for the ` ecr:CreateRepository` permission, which allows Amazon ECR to create repositories in your registry if they don't exist already. If the `ecr:CreateRepository` permission isn't provided, a repository with the same name as the source repository must be created manually in your registry. If neither is done, replication fails. Any failed `CreateRepository`, `ReplicateImage`, or `ReplicateImageDelete` API actions show up in CloudTrail.
Diff
diff --git a/AmazonECR/latest/userguide/registry-permissions-create-replication.md b/AmazonECR/latest/userguide/registry-permissions-create-replication.md index a3da0f9..8c224f4 100644 --- a//AmazonECR/latest/userguide/registry-permissions-create-replication.md +++ b//AmazonECR/latest/userguide/registry-permissions-create-replication.md @@ -11 +11 @@ The cross account policy type is used to grant permissions to an AWS principal, -A registry policy must grant permission for the `ecr:ReplicateImage` API action. This API is an internal Amazon ECR API that can replicate images between Regions or accounts. You can also grant permission for the ` ecr:CreateRepository` permission, which allows Amazon ECR to create repositories in your registry if they don't exist already. If the `ecr:CreateRepository` permission isn't provided, a repository with the same name as the source repository must be created manually in your registry. If neither is done, replication fails. Any failed `CreateRepository` or `ReplicateImage` API actions show up in CloudTrail. +Your registry policy must grant permission for the `ecr:ReplicateImage` API action. When you enable replication of deletes for a replication rule, your registry policy must also grant permission for the `ecr:ReplicateImageDelete` API action. These are internal Amazon ECR APIs that can replicate images, image deletions, and image tag removals between Regions or accounts. You can also grant permission for the ` ecr:CreateRepository` permission, which allows Amazon ECR to create repositories in your registry if they don't exist already. If the `ecr:CreateRepository` permission isn't provided, a repository with the same name as the source repository must be created manually in your registry. If neither is done, replication fails. Any failed `CreateRepository`, `ReplicateImage`, or `ReplicateImageDelete` API actions show up in CloudTrail.