73 Commits
Author SHA1 Message Date
Luke McCrone be715d06db test: skips removal, some updates 2026-10-13 18:39:42 -03:00
Luke McCrone 382ee1f326 test: more skips removals, more rest/go error checking code cleanup 2026-10-13 11:17:28 -03:00
Ben McClellandandGitHub 66debdbfbf Merge pull request #2492 from versity/test/remove_skips
test: some skips removals, cleanup, possible log deletion fix
2026-10-08 12:00:46 -07:00
Luke McCrone 921de79f54 test: some skips removals, cleanup, possible log deletion fix 2026-10-07 19:35:40 -03:00
niksis02 bbad4b5988 fix: store bucket default retention on each object at write time and support Object Lock fields in browser POST
The bucket default retention was never stored on objects: protection was computed at delete time from the live bucket rule (`CreatedAt` + period), so changing or removing the rule unlocked existing objects, `COMPLIANCE` ones included, and a rule set N days ago stopped protecting even new objects. The posix and azure backends now store the rule's retention, `{Mode, now + Days/Years}` truncated to milliseconds, as the object's own retention whenever a write sets no Object Lock parameters: `PutObject` (which also covers POST, RDMA and `CopyObject`), `CreateMultipartUpload` (the rule and start time are fixed at creation, as S3 does) and the unversioned in-place self-copy, which applied no lock settings before. As on S3, any explicit `x-amz-object-lock-legal-hold`, `ON` or `OFF`, means the default retention is not applied. The bucket-rule fallback in `checkObject` and `BucketLockConfig.CreatedAt` are removed, so objects written before this change lose bucket-derived protection, and an expired retention no longer skips the legal hold check.

`PutObjectLockConfiguration` now rejects a `DefaultRetention` with a mode but no `Days`/`Years` with `InvalidRequest` "DefaultRetention must specify a fixed retention (Days or Years) or a DefaultEventHold.", and a `<Rule>` without `DefaultRetention` with `MalformedXML`. Azure `CopyObject` with the `COPY` metadata directive no longer copies the source's `Objectretention`/`Objectlegalhold` metadata to the destination.

Browser POST uploads now validate and apply the `x-amz-object-lock-mode`, `x-amz-object-lock-retain-until-date` and `x-amz-object-lock-legal-hold` form fields. They require `s3:PutObjectRetention`/`s3:PutObjectLegalHold`, for anonymous uploads too, and return `ErrMissingObjectLockConfigurationNoSpaces` on buckets without Object Lock after authorization. A denied POST names the actions in S3's order: retention, legal hold, tagging, then `s3:PutObject`.

`NoSuchObjectLockConfiguration` now returns 404 without a trailing period. `x-amz-object-lock-retain-until-date` on HEAD and GET has millisecond precision and omits zero milliseconds, `GetObjectRetention` returns `<Retention>` with a `.000Z` date, and posix and azure `GetObject` now return the Object Lock headers.
2026-10-04 22:01:57 +02:00
Lennard GeißlerandBen McClelland 1a68d10e50 fix: return Marker when the request omits it
ListObjects omitted the Marker element when the request had no marker.
S3 returns an empty Marker element in this case, allowing clients to read
the field without a presence check.

The backend converts an empty marker to a nil pointer and encoding/xml omits
nil pointers. Restore the request marker in the controller after the backend
call so the behavior is consistent across backends.

Update the controller, integration, and REST coverage to verify that an
empty Marker element is returned.

Fixes #2191
2026-09-26 10:40:50 -07:00
Barry Loongandniksis02 25f9790c0a fix(s3api): strip aws-chunked only for streaming uploads
- Replace `StripAwsChunkedEncoding` with `ParseContentEncoding`, which drops
  the token only when `x-amz-content-sha256` names a streaming payload type,
  so a client that sends `aws-chunked` on a hex-payload request keeps it
- Revert the `CopyObject` and `CreateMultipartUpload` call sites: both routes
  are registered with `streamBody` false, so a streaming payload type is
  rejected before the controller and the token can only be a stored value
- Reject `aws-chunked` combined with `UNSIGNED-PAYLOAD` in the authentication
  middleware, beside the existing payload-type validation, with a new
  `InvalidArgAwsChunkedUnsignedPayload`
- Add REST tests for the three cases: stripped from a chunked upload, kept on
  a hex-payload request, and rejected with `UNSIGNED-PAYLOAD`
- Add `CONTENT_ENCODING` to the PutObject REST script and a
  `check_content_encoding` driver for HeadObject
2026-09-22 02:03:09 +04:00
Luke McCrone 642b65f1f1 test: website redirect test, multipart upload util cleanup, install updates 2026-09-13 11:36:46 -03:00
Luke McCrone d62052b2be test: allow versitygw command customization, website testing, s3 config fix 2026-08-31 18:42:23 -03:00
Luke McCrone 5e284e8a87 test: parallel docker testing, some misc cleanup/fixes 2026-08-10 18:15:27 -03:00
Luke McCrone d038507e0d test: website - initial tests 2026-07-31 14:04:12 -03:00
Luke McCrone 4f3ae6c34d test: bucket resetting code cleanup 2026-07-20 11:19:18 -03:00
Luke McCrone 3362fb83c3 test: ListParts query tests 2026-07-09 17:35:18 -03:00
Luke McCrone d41ea78799 test: go executable, base install script 2026-06-30 17:15:57 -03:00
Luke McCrone dba147380e test: README updates, speed up some file integrity checks 2026-06-23 20:37:14 -03:00
Luke McCrone 2fa0a2df89 test: ListObjectVersions query tests 2026-06-17 16:42:17 -03:00
Luke McCrone 3a35e37b5c test: jailing, logging, executable cleanups 2026-06-10 12:46:27 -03:00
Luke McCrone f826f13a64 test: jailing work (base) 2026-06-09 14:55:47 -03:00
Luke McCrone 179fdc0352 test: ListMultipartUpload query tests, related cleanup 2026-05-28 09:30:59 -03:00
Luke McCrone 48f79a6171 test: ListObjects util code reorg, return value/multipart fixes 2026-05-20 14:30:41 -03:00
Luke McCrone fd8e4cd69c test: HeadObject query tests, more util code changes 2026-05-14 11:15:15 -03:00
Luke McCrone 37d6ca03ed test: util code cleanup 2026-05-11 16:34:54 -03:00
Luke McCrone 6608c53612 test: DeleteObjects payload testing 2026-05-08 14:46:54 -03:00
Luke McCrone 317767b15b test: add test tags 2026-05-05 19:07:56 -03:00
Luke McCrone 9a21c5a1e0 test: GetObject - add query tests, go/bats improved header/object reply handling 2026-04-28 21:10:09 -03:00
Luke McCrone 29f378ea5e test: initial bats test tagging system, shellcheck fix 2026-04-21 18:48:40 -03:00
Luke McCrone 1632c8c006 test: ListObjectsV2 query updates, file updates, bash cleanup 2026-04-14 18:50:10 -03:00
Luke McCrone d7d9179db0 test: ListObjectsV1 updates, file code changes, multipart updates 2026-04-07 15:24:20 -03:00
Luke McCrone 8feed3b333 test: ListObjects encoding-type tests 2026-03-30 10:24:03 -03:00
Luke McCrone ccd0ba2762 test: remove eval, go command generation overhaul 2026-03-27 15:00:56 -03:00
Luke McCrone a96def085d test: test_common.sh updates, bucket/file creation updates, hardcode fixes 2026-03-20 14:09:00 -03:00
Luke McCrone 7975b9bbaa test: listobjects delimiter/prefix test, skips removal, go query improvement 2026-03-17 16:07:47 -03:00
Luke McCrone 7308c65591 test: ListBuckets - bucket region, more default param tests 2026-03-13 09:30:39 -03:00
Luke McCrone 038ae5e1ea test: update functions, transfer/remove some utils files 2026-03-04 14:15:00 -03:00
Luke McCrone 7b201777c3 test: CORS response header tests 2026-03-03 10:54:21 -03:00
Luke McCrone 05ace90683 test: README, some test updates 2026-02-25 19:26:34 -03:00
Luke McCrone 2bd5ffe8bc test: remove obsolete recording code 2026-02-24 15:15:06 -03:00
Luke McCrone 5fc7357a03 test: REST CORS - initial tests 2026-02-19 20:19:05 -03:00
Luke McCrone e810d4204d test: not-implemented type test, first template usage 2026-02-11 16:52:20 -03:00
Luke McCrone 44fa5fa178 test: some not-implemented's, add list-object-v2 working test 2026-02-05 10:14:08 -03:00
Luke McCrone 17adbeca9e test: S3 command coverage reporting 2026-01-30 18:51:02 -03:00
Luke McCrone 1f9856110d test: PutObject object lock tests and updates, delete bucket test 2026-01-26 16:58:49 -03:00
Luke McCrone a4d341fc4e test: speed up/reorganize REST tests, openssl logging 2026-01-22 15:54:47 -03:00
Luke McCrone c0e6a08e1e test: s3cmd - different regions, skips removal 2026-01-14 17:24:41 -03:00
Luke McCrone 2a23686c87 test: PutObject, locking, versioning, retention testing 2026-01-13 19:38:16 -03:00
Luke McCrone dff20b5b9d test: test matrix setup overhaul, fix some region/iam issues 2026-01-06 12:55:18 -03:00
Ben McClellandandGitHub 841a012ce0 Merge pull request #1728 from versity/sis/get-object-empty-tagging
fix: removes the NoSuchTagSet error in GetObjectTagging
2026-01-03 20:51:08 -08:00
Luke McCrone 841b3d61a4 test: policy status, policy command updates 2026-01-02 19:15:00 -03:00
Luke McCrone fa2e677370 test: empty tag test correction 2026-01-02 17:02:50 -03:00
Luke McCrone 5d8d054fdc test: add skips check YML, remove old skips, add new issues 2025-12-22 15:16:58 -03:00