mirror of
https://github.com/floci-io/floci.git
synced 2026-11-30 00:45:17 -05:00
PutObjectTagging and DeleteObjectTagging ignored versionId and changed the current version. GetObjectTagging dropped it in the controller, so it read the current version too, and the service took versionId=null as the current version even on a key that has no null version. All three now act on the version named. "null" names only the null version, the object stored without a version id; on a key that has none the request answers NoSuchVersion. Each returns the version it acted on in x-amz-version-id. A request on a delete marker, named or current, answers 405 MethodNotAllowed with Method and ResourceType, and with x-amz-delete-marker: true, as S3 does. A put or delete runs under the bucket monitor that writes, deletes and the lifecycle sweep hold, so a version deleted between the lookup and the write is not written back. Since they act on the version named, a request naming one is now checked as s3:GetObjectVersionTagging, s3:PutObjectVersionTagging or s3:DeleteObjectVersionTagging, carrying s3:versionid, in place of the base tagging action. Part 1 kept these requests on the base actions because the operations changed the current version. The s3:ExistingObjectTag lookup already read the version named, so the tags a condition sees are now those of the version the request changes. The IAM condition context still reads s3:ExistingObjectTag for versionId=null from the current version, which GetObject still serves for it, so a deny on those tags keeps applying. Refs #5716