Repository navigation
Description
Split from #475. The record-and-echo half is #492 and is milestoned; this carries items
2–5 of #475's own priority order, which interact with each other and are worth designing
together rather than piecemeal.
Depends on #492 — every item here is a resolution rule over the fields #492 stores.
1. CopyObject does not inherit the source's encryption
The sharpest case, and the one #475's reporter found two live bugs behind. S3 encrypts the
destination according to the request; a copy naming nothing gets the bucket default,
not the source's encryption. So an in-place CopyObject for a metadata change, or an
automatic storage-tier transition, silently moves an SSE-KMS object off the customer
managed key.
Same asymmetry family as the MetadataDirective behaviour already documented in
s3_copy_metadata.go:73 — worth following that precedent, since a reader who understands
one will expect the other.
2. Multipart records it on the create only
CreateMultipartUpload carries the encryption for the upload as a whole; UploadPart
restating it is rejected; CompleteMultipartUpload surfaces it on the assembled
object.
S3SystemMetadata is embedded in both S3Object and S3MultipartUpload precisely so the
two write paths cannot disagree (#406), so this may fall out naturally. But #475 flags a
real design question: the resolution rules differ enough that SSE may want its own struct
rather than joining that family — the way Content-Type and the storage class deliberately
stayed out. Decide that explicitly.
3. Bucket default encryption
PutBucketEncryption / GetBucketEncryption / DeleteBucketEncryption, so a request
naming nothing resolves to the bucket's setting rather than to absent.
This is what makes "off" testable as distinct from "unencrypted": S3 has applied SSE-S3
to all new objects unconditionally since January 2023, so a real bucket never stores an
object with no encryption at all. Note the interaction with #492's criterion that an object
written with no headers echoes none — that criterion exists to keep "no header sent"
observable, and this item changes it, so the change has to be deliberate and documented
rather than a side effect.
4. The invalid combinations
Each is a combination a caller can produce and currently gets silent success for — the
tracker's recurring shape, where the consumer's error branch is unreachable:
x-amz-server-side-encryption-aws-kms-key-idsent withAES256→InvalidArgumentx-amz-server-side-encryption-bucket-key-enabledwithoutaws:kms→InvalidArgument- an unrecognized algorithm token →
InvalidArgument UploadPartcarrying encryption headers → 400
Per #487, each message needs its own corroborating source — a capture or a parity-tested
reimplementation — or it ships as substrate's own text and says so in the comment.
Acceptance criteria
- A
CopyObjectnaming no encryption does not inherit the source's; it takes the
bucket default, and there is a test for the in-place metadata-change case
specifically. -
CreateMultipartUploadrecords it,UploadPartrestating it is refused,
CompleteMultipartUploadsurfaces it on the assembled object. - The three bucket-encryption operations round-trip, and a
PutObjectnaming nothing
resolves to the bucket's default. - Each of the four rejections returns its code and a 400, with provenance stated.
-
docs/services.mdcovers the resolution order — request, then bucket default — and
theCopyObjectasymmetry alongside the existingMetadataDirectivenote.
Not milestoned: this wants a design pass on the resolution rules before it is scheduled.
SSE-C remains out of scope.
Activity
feat(s3): record the server-side-encryption headers and echo them (#492…
scttfrdmn commentedon Sep 20, 2026
Left unmilestoned deliberately in the roadmap pass that assigned the other 84 open issues to v0.121.0–v0.127.0.
This is one of three S3 server-side-encryption issues — with #475 (an encrypted write is indistinguishable from an unencrypted one) and #507 (the
emailAddressgrantee) — and they are one coherent feature needing a single design pass, not three independent defects.This one is the largest of the three and the one that sets the model: CopyObject, multipart, bucket defaults and the invalid-combination 400s cannot each pick their own SSE representation. #475 is effectively the storage question this answers, so the two should be scoped together and #475 should not be "fixed" first with a narrower model.
scttfrdmn commentedon Oct 3, 2026
#1351 changed what an SDK sees for this issue's operations, but did not implement them. The S3
router used to reach each method's default by absence. Before #1351:
DeleteBucketCorsandDeleteBucketEncryptionreachedDeleteBucket, and deleted the bucket.PutBucketCorsandPutBucketEncryptionreachedCreateBucket, which answered 200 and stored nothing.Get…calls answered aListBucketResult.Each of these operations is now named for what it is (
emulator/s3_subresources.go) and refusedwith
NotImplemented/501. It is also authorized as its own action rather than ass3:DeleteBucket.This issue stays open. Implementing the operations is still its work. When it lands, remove the
entries from
s3UnroutedBucketSubresourcesand add the routed tests inparseS3Operationin theirplace.
scttfrdmn commentedon Oct 5, 2026
Moved into v0.123.0. This is the last S3 piece foray's deploy needs (#1274 assigned
PutBucketEncryptionhere by name), so landing it lets #1274 close with the milestone.chore(release): v0.123.0
chore(release): v0.123.0 (#1406)