Chris Lu
a524b4f485
Object locking need to persist the tags and set the headers ( #6994 )
...
* fix object locking read and write
No logic to include object lock metadata in HEAD/GET response headers
No logic to extract object lock metadata from PUT request headers
* add tests for object locking
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_object_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* refactor
* add unit tests
* sync versions
* Update s3_worm_integration_test.go
* fix legal hold values
* lint
* fix tests
* racing condition when enable versioning
* fix tests
* validate put object lock header
* allow check lock permissions for PUT
* default to OFF legal hold
* only set object lock headers for objects that are actually from object lock-enabled buckets
fix --- FAIL: TestAddObjectLockHeadersToResponse/Handle_entry_with_no_object_lock_metadata (0.00s)
* address comments
* fix tests
* purge
* fix
* refactoring
* address comment
* address comment
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_object_handlers_put.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_object_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* avoid nil
* ensure locked objects cannot be overwritten
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-16 23:00:25 -07:00
Chris Lu
dde1cf63c2
S3 Object Lock: ensure x-amz-bucket-object-lock-enabled header ( #6990 )
...
* ensure x-amz-bucket-object-lock-enabled header
* fix tests
* combine 2 metadata changes into one
* address comments
* Update s3api_bucket_handlers.go
* Update weed/s3api/s3api_bucket_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update test/s3/retention/object_lock_reproduce_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update test/s3/retention/object_lock_validation_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update test/s3/retention/s3_bucket_object_lock_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_bucket_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_bucket_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update test/s3/retention/s3_bucket_object_lock_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update weed/s3api/s3api_bucket_handlers.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* package name
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-15 23:21:58 -07:00
Chris Lu
7cb1ca1308
Add policy engine ( #6970 )
2025-07-13 16:21:36 -07:00
Chris Lu
d892538d32
More efficient copy object ( #6665 )
...
* it compiles
* refactored
* reduce to 4 concurrent chunk upload
* CopyObjectPartHandler
* copy a range of the chunk data, fix offset size in copied chunks
* Update s3api_object_handlers_copy.go
What the PR Accomplishes:
CopyObjectHandler - Now copies entire objects by copying chunks individually instead of downloading/uploading the entire file
CopyObjectPartHandler - Handles copying parts of objects for multipart uploads by copying only the relevant chunk portions
Efficient Chunk Copying - Uses direct chunk-to-chunk copying with proper volume assignment and concurrent processing (limited to 4 concurrent operations)
Range Support - Properly handles range-based copying for partial object copies
* fix compilation
* fix part destination
* handling small objects
* use mkFile
* copy to existing file or part
* add testing tools
* adjust tests
* fix chunk lookup
* refactoring
* fix TestObjectCopyRetainingMetadata
* ensure bucket name not conflicting
* fix conditional copying tests
* remove debug messages
* add custom s3 copy tests
2025-07-11 18:51:32 -07:00
Tom Crasset
c5f21b2b01
fix S3 per-user-directory Policy ( #6443 )
...
* fix S3 per-user-directory Policy
* Delete docker/config.json
* add tests
* remove logs
* undo modifications of weed/shell/command_volume_balance.go
* remove modifications of docker-compose
* fix failing test
---------
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com >
2025-01-17 01:03:17 -08:00
Konstantin Lebedev
33537ae29f
[s3] fix s3 test_multipart_get_part ( #5476 )
...
* try fix s3 test_multipart_get_part
* add passed s3 tests
* fix SeaweedFSUploadId
* rm spaces
* convert part request to range
* add passed s3 tests of multipart
2024-04-14 10:41:32 -07:00
Konstantin Lebedev
35cba720a5
[s3] add s3 pass test_multipart_upload ( #5474 )
...
add s3 pass test_multipart_upload
2024-04-07 11:51:22 -07:00
Konstantin Lebedev
170b63d6f8
[filer.backup] add param uploader_part_size for S3sink ( #5352 )
...
* fix: install cronie
* chore: refactor configure S3Sink
* chore: refactor cinfig
* add filer-backup compose file
* fix: X-Amz-Meta-Mtime and resolve with comments
* fix: attr mtime
* fix: MaxUploadPartst is reduced to the maximum allowable
* fix: env and force set max MaxUploadParts
* fix: env WEED_SINK_S3_UPLOADER_PART_SIZE_MB
2024-03-07 08:35:51 -08:00
LHHDZ
bf5e45b66a
add acl helper functionalities ( #3831 )
2022-10-12 20:15:16 -07:00
LHHDZ
e9584d9661
add ownership rest apis ( #3765 )
2022-10-01 19:18:00 -07:00
chrislu
9fce75607d
s3: report http.StatusOK if the directory is explicitly created
...
fix https://github.com/seaweedfs/seaweedfs/issues/3457
2022-08-23 01:16:46 -07:00
chrislu
27732ecfa4
move s3 related constants from package http to s3_constants
2022-05-30 22:57:41 -07:00