Summary
Amazon ECR returns 405 Method Not Allowed when pushing OCI 1.1 referrer manifests (manifests containing artifactType and subject fields) via oras copy -r. The same operation succeeds against Azure ACR, which fully supports OCI 1.1. This appears related to #2306.
Environment
- ORAS CLI: v1.3.0 (Homebrew)
- ECR region: us-east-1
- Source registry: ghcr.io (GitHub Container Registry)
- Source image:
ghcr.io/buoyantio/extension-init:enterprise-2.19.4-fips
Description
The source image includes an SPDX SBOM referrer that conforms to the OCI Image 1.1 specification, using the artifactType and subject fields introduced in that spec:
oras discover ghcr.io/buoyantio/extension-init:enterprise-2.19.4-fips
ghcr.io/buoyantio/extension-init@sha256:979085578a3e094c016ca31f84b1f6ecd9a823863d95fda712e5c589dbebf134
└── application/spdx+json
└── sha256:08c1ef07d76dfb86f9236371b39ee3888639cc7c77a2e4535e304191f77cbd49
The referrer manifest includes both OCI 1.1 fields:
{
"schemaVersion": 2,
"mediaType": "...",
"artifactType": "application/spdx+json",
"config": {...},
"layers": [...],
"subject": {
"mediaType": "application/vnd.oci.image.index.v1+json",
"digest": "sha256:979085578a3e094c016ca31f84b1f6ecd9a823863d95fda712e5c589dbebf134",
"size": 518
},
"annotations": {...}
}
Steps to reproduce
- Create an ECR repository:
aws ecr create-repository --region us-east-1 \
--repository-name test/buoyantio/extension-init
- Authenticate with ECR:
aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin <account-id>.dkr.ecr.us-east-1.amazonaws.com
- Attempt a recursive copy:
oras copy -r \
ghcr.io/buoyantio/extension-init@sha256:979085578a3e094c016ca31f84b1f6ecd9a823863d95fda712e5c589dbebf134 \
<account-id>.dkr.ecr.us-east-1.amazonaws.com/test/buoyantio/extension-init:enterprise-2.19.4-fips
Expected behavior
The image index and its SPDX SBOM referrer are both pushed to ECR, consistent with AWS's announced OCI 1.1 support.
Actual behavior
The base image layers are pushed successfully, but ECR rejects the referrer manifest with:
PUT ".../manifests/sha256:2d0586ea25f4..." → 405 Method Not Allowed
{
"errors": [{
"code": "UNSUPPORTED",
"message": "Invalid parameter at 'ImageManifest' failed to satisfy constraint: 'Invalid JSON syntax'"
}]
}
The error suggests ECR's manifest validation is rejecting the OCI 1.1 referrer manifest, despite the manifest being valid JSON and conforming to the spec.
Comparison with Azure ACR
The identical oras copy -r operation completes successfully against Azure ACR, which announced OCI 1.1 support in 2024. Both the image digest and the SPDX SBOM referrer are copied without errors.
Current workaround
Dropping the -r flag copies the image without referrers:
oras cp \
ghcr.io/buoyantio/extension-init@sha256:979085578a3e094c016ca31f84b1f6ecd9a823863d95fda712e5c589dbebf134 \
<account-id>.dkr.ecr.us-east-1.amazonaws.com/test/buoyantio/extension-init:enterprise-2.19.4-fips
This succeeds but does not copy the SPDX SBOM referrer, which breaks supply-chain attestation workflows.
Related issues
Summary
Amazon ECR returns
405 Method Not Allowedwhen pushing OCI 1.1 referrer manifests (manifests containingartifactTypeandsubjectfields) viaoras copy -r. The same operation succeeds against Azure ACR, which fully supports OCI 1.1. This appears related to #2306.Environment
ghcr.io/buoyantio/extension-init:enterprise-2.19.4-fipsDescription
The source image includes an SPDX SBOM referrer that conforms to the OCI Image 1.1 specification, using the
artifactTypeandsubjectfields introduced in that spec:The referrer manifest includes both OCI 1.1 fields:
{ "schemaVersion": 2, "mediaType": "...", "artifactType": "application/spdx+json", "config": {...}, "layers": [...], "subject": { "mediaType": "application/vnd.oci.image.index.v1+json", "digest": "sha256:979085578a3e094c016ca31f84b1f6ecd9a823863d95fda712e5c589dbebf134", "size": 518 }, "annotations": {...} }Steps to reproduce
Expected behavior
The image index and its SPDX SBOM referrer are both pushed to ECR, consistent with AWS's announced OCI 1.1 support.
Actual behavior
The base image layers are pushed successfully, but ECR rejects the referrer manifest with:
The error suggests ECR's manifest validation is rejecting the OCI 1.1 referrer manifest, despite the manifest being valid JSON and conforming to the spec.
Comparison with Azure ACR
The identical
oras copy -roperation completes successfully against Azure ACR, which announced OCI 1.1 support in 2024. Both the image digest and the SPDX SBOM referrer are copied without errors.Current workaround
Dropping the
-rflag copies the image without referrers:This succeeds but does not copy the SPDX SBOM referrer, which breaks supply-chain attestation workflows.
Related issues