Ben McClelland
54490f55cc
chore: cleanup staticcheck errors
2024-08-13 11:09:14 -07:00
Ben McClelland
a36d974942
fix: copy-object with replace metadata-directive
...
In copy-object, if the source and destination are the same then
X-Amz-Metadata-Directive must be set to "REPLACE" in order to use
this api call to update the metadata of the object in place.
The default X-Amz-Metadata-Directive is "COPY" if not specified.
"COPY" is only valid if source and destination are not the same
object.
When "REPLACE" selected, metadata does not have to differ for the
call to be successful. The "REPLACE" always sets the incoming
metadata (even if empty or the same as the source).
Fixes #734
2024-08-13 10:52:47 -07:00
jonaustin09
23fd0d3fdd
fix: Fixed PutBucketAcl action error handling, removed the bucket owner check for all the acl options
2024-08-12 15:27:03 -04:00
Ben McClelland and GitHub
cbf03c30ce
Merge pull request #726 from versity/fix/iam-get-root-user
...
Root user credentials in IAM services
2024-08-12 10:18:36 -07:00
jonaustin09
34b7fd6ee7
fix: Added the root user data in the iam services records
2024-08-09 16:14:51 -04:00
Ben McClelland
e92b36a12c
fix: non-existing object delete response
...
The expected response code for deleting non-existing objects is
expected to be 204 (No Content) instead of NoSuchKey. The tests
are updated to validate expected responses.
Fixes #724
2024-08-08 11:46:36 -07:00
Ben McClelland
797376a235
fix: head/get/delete/copy directory object should fail when corresponding file object exists
...
The API hanlders and backend were stripping trailing "/" in object
paths. So if an object exists and a request came in for head/get/delete/copy
for that same name but with a trailing "/" indicating request should
be for directory object, the "/" would be stripped and the request
would be handlied for the incorrect file object.
This fix adds in checks to handle the case with the training "/"
in the request.
Fixes #709
2024-08-05 11:55:32 -07:00
Ben McClelland
61a97e94db
fix: set default content type to binary/octet-stream
...
AWS uses binary/octet-stream for the default content type if the
client doesn't specify the content type. Change the default for
the gateway to match this behavior.
Fixes #697
2024-08-02 09:02:57 -07:00
jonaustin09
5e484f2355
fix: Fixed CopySource parsing to handle the values starting with '/' in CopyObject action in posix and azure backends.
2024-07-22 11:30:32 -04:00
jonaustin09
23a40d86a2
fix: Removed the bucket ACL owner check for admin and root users
2024-07-17 09:39:00 -04:00
jonaustin09
828eb93bee
fix: Added 'Type' property support in bucket ACL Grantee schema
2024-07-16 18:17:16 -04:00
jonaustin09
2843cdbd45
fix: Fixed ChangeBucketOwnership action implementation to update the bucket acl
2024-07-11 13:45:01 -04:00
jonaustin09
e773872c48
feat: Implemented response body streaming for GetObject action
2024-07-08 15:56:24 -04:00
jonaustin09 and Ben McClelland
7545e6236c
feat: Implement bucket ownership controls
...
Bucket ACLs are now disabled by default the same as AWS.
By default the object ownership is BucketOwnerEnforced
which means that bucket ACLs are disabled. If one attempts
to set bucket ACL the following error is returned both in
the gateway and on AWS:
ErrAclNotSupported: {
Code: "AccessControlListNotSupported",
Description: "The bucket does not allow ACLs",
HTTPStatusCode: http.StatusBadRequest,
},
ACls can be enabled with PutBucketOwnershipControls
Changed bucket canned ACL translation
New backend interface methods:
PutBucketOwnershipControls
GetBucketOwnershipControls
DeleteBucketOwnershipControls
Added these to metrics
2024-06-28 21:03:09 -07:00
jonaustin09
329fae5203
fix: Changed bucket policy validation error messages
2024-06-24 13:14:28 -04:00
jonaustin09
fe19bfaed9
fix: Changed exceeding range error for the source object in UploadPartCopy action
2024-06-20 14:12:03 -04:00
jonaustin09
7ea386aec9
fix: Bug fixing for azure backend. Added a new integration test case for ListParts
2024-06-11 16:14:35 -04:00
Ben McClelland and GitHub
a7110c28b6
Merge pull request #607 from versity/fix/get-obj-exc-range
...
GetObject exceeding range
2024-06-04 11:54:39 -07:00
Ben McClelland
a896b3660b
fix: remove deprecated WithEndpointResolver s3 client option
2024-06-04 11:09:29 -07:00
jonaustin09
0fb6bf6267
fix: Removed exceeding invalid range error when calling GetObject action
2024-06-04 13:25:56 -04:00
jonaustin09 and Ben McClelland
dbfd9e5171
fix: Removed required request body check for PutBucketAcl action
2024-05-29 14:13:38 -07:00
jonaustin09
d10ffd8707
fix: Fixed GetObject action invalid range error: when the same index of bytes is specified: bytes=0-0
2024-05-29 16:32:01 -04:00
jonaustin09
9e8458a09f
feat: Added integration tests for bypass governance retention functionality
2024-05-28 15:17:25 -04:00
jonaustin09
fb27e2703e
feat: Implemented to logic to bypass governance retention
2024-05-24 13:50:41 -04:00
jonaustin09
6fb102056d
fix: Changed WORM protection implementation to prevent root/admin users to overwrite objects in governance mode or if legal hold is set up
2024-05-23 16:56:21 -04:00
jonaustin09 and Ben McClelland
43f509d971
fix: Added missing properties support for CreateMultipartUpload action: ContentType, ObjectLock, Tagging, Metadata
2024-05-22 12:16:55 -07:00
jonaustin09
8eac24c78c
fix: Changed bucket policy document validation to handle object containing 'AWS' prop in principal field
2024-05-21 10:48:38 -04:00
Ben McClelland and GitHub
069ff181d6
Merge pull request #578 from versity/fix/566-getobject-by-range-resp-status
...
GetObject by range success response status code
2024-05-20 13:36:43 -07:00
jonaustin09
e38c63448d
fix: Changed GetObject by range success status code from 200 to 206
2024-05-20 14:48:02 -04:00
jonaustin09
b971467446
fix: Changed the logic to return BucketAlreadyOwnedByYou error when user tries to create an existing bucket owned by him
2024-05-20 12:07:33 -04:00
Ben McClelland and GitHub
28f901ef0e
Merge pull request #576 from versity/fix/560-put-obj-legal-hold-status-validation
...
PutObjectLegalHold status validation
2024-05-17 10:01:07 -07:00
jonaustin09
4bde84eafd
fix: Added status property validation for PutObjectLegalHold action
2024-05-17 12:39:27 -04:00
Jon Austin and GitHub
fa9635e6fa
Merge branch 'main' into fix/559-put-obj-retention-mode-validation
2024-05-17 20:07:46 +04:00
jonaustin09
6d313f5a72
fix: Added mode property validation for PutObjectRetention action
2024-05-17 11:53:25 -04:00
jonaustin09
f4cc93f00d
fix: Added validation for PubObjectLockConfiguration action ObjectLockEnabled and Mode fields
2024-05-17 09:50:23 -04:00
jonaustin09
c7bb2f286a
fix: Fixes #557 , Added years and days validation in PutObjectLockConfiguration action
2024-05-16 17:31:39 -04:00
jonaustin09
fab1ddb86e
fix: Fixes #556 , Changed errors from InvalidRequest to MalformedXML when calling PutObjectLockConfiguration with invalid request body or both days and years specified
2024-05-16 11:59:03 -04:00
jonaustin09
5acf1f332a
fix: Fixes #555 , Added the logic to return InvalidBucketState when calling PutObjectLockConfiguration action on not object lock enabled bucket
2024-05-16 11:30:35 -04:00
Ben McClelland
f722f515ae
chore: add missing copyright headers to files
2024-05-06 16:16:31 -07:00
jonaustin09
481c9246c6
feat: HeadObject ation multipart upload case
2024-05-03 18:10:32 -04:00
jonaustin09 and Ben McClelland
b4cd35f60b
feat: error refactoring and enable object lock in backends
...
Added support to enable object lock on bucket creation in posix and azure
backends.
Implemented the logic to add object legal hold and retention on object creation
in azure and posix backends.
Added the functionality for HeadObject to return object lock related headers.
Added integration tests for these features.
2024-05-02 15:23:48 -07:00
Ben McClelland
3fc8956baf
fix: increase valid timestampe window from 1 to 15 minutes
...
According to:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationTimeStamp
The valid time wondow for authenticated requests is 15 minutes,
and when outside of that window should return RequestTimeTooSkewed.
2024-05-01 13:56:34 -07:00
jonaustin09
0c3771ae2d
feat: Added GetObjectAttributes actions implementation in posix, azure and s3 backends. Added integration tests for GetObjectAttributes action
2024-04-29 15:31:53 -04:00
jonaustin09 and Ben McClelland
00476ef70c
feat: Closes #490 , Added integration tests for object lock actions
2024-04-22 13:13:40 -07:00
jonaustin09
84ce40fb54
fix: Fixes #487 , added response headers for HeadBucket action
2024-04-18 13:27:45 -04:00
Ben McClelland
17b1dbe025
fix: return non 0 exit status for cli admin error
...
Fixes #505 . This returns the body as an error when the http status
for the admin request is non-success.
2024-04-08 17:29:02 -07:00
jonaustin09
e6203c5765
feat: Closes #441 , Added access control integration tests, fixed some bugs in bucket policy and acl access checking flow
2024-03-28 14:52:56 -04:00
Ben McClelland and GitHub
4d02ac21c5
Merge pull request #460 from versity/bucket-policies
...
Bucket Policy
2024-03-25 15:19:46 -07:00
jonaustin09
754c221c4d
feat: Added bucket policy access verifier function implementation. Changed the default behaviour of bucket ACLs. Fixed the supported actions list for bucket policy. Implemented Copy* actions access checker function
2024-03-25 16:00:35 -04:00
jonaustin09
af641e5368
feat: Added integration test cases for Put/Get/DeleteBucketPolicy actions. Made some bug fixes in these actions implementations
2024-03-20 17:31:52 -04:00