mirror of
https://github.com/versity/versitygw.git
synced 2026-01-06 19:56:27 +00:00
Fixes #1428 The `x-amz-expected-bucket-owner` header in S3 specifies the account ID of the expected bucket owner. If the account ID provided does not match the actual owner of the bucket, the request fails with an HTTP 403 Forbidden (AccessDenied) error. If the provided account ID is not 12 characters long, S3 returns a 400 Bad Request error. In our case, we expect the header to contain the bucket owner’s access key ID, and we skip validation errors related to the access key ID, since there is no validation mechanism for user access key IDs. If the provided value does not match the bucket owner’s access key ID, the gateway returns an AccessDenied error. A few integration tests are added for random actions, as this feature applies to all actions, but it is unnecessary to add test cases for every single one.