Wykres commitów

349 Commity (60f8366d3325edbfd2819cb03a9863bd4724c5a1)

Autor SHA1 Wiadomość Data
jixinchi 60f8366d33
Add DELETE and HEAD methods for CORS and CORS headers for all responses 2023-10-18 11:34:50 +09:00
Steve b134e81406
Add Access-Control-Allow-Credentials header
Fixes #415
2023-09-26 20:38:22 +09:00
Andrew Gaul 4706b1760f Log headers at trace instead of debug 2023-08-28 20:57:47 -07:00
Lars Hagen a4cf4dcd1f fix issues reported by modernizer 2.6.0 2023-08-17 23:08:38 +09:00
Szymon Draszkiewicz cf4db284a6 fixed marker being saved under wrong key in marker cache 2023-07-10 21:24:01 +09:00
Andrew Gaul 99c1486fd3 Add and ignore x-amz-api-version
Fixes #497.
2023-05-16 21:35:11 +09:00
Andrew Gaul bbbacaa442 Require Java 11
Jetty 11 requires this.  Also address some Modernizer issues.
References #422.
2022-08-08 21:24:58 +09:00
Andrew Gaul d375011388 Upgrade to Jetty 11.0.11
Jetty 9 is EOL.  This requires Java 11 and updating some Java EE
imports.  Fixes #422.
2022-08-08 21:17:40 +09:00
Florin Peter 217308abd7
Support for transparent encryption
Co-authored-by: Florin Peter <Florin-Alexandru.Peter@t-systems.com>
2022-03-26 22:05:08 +09:00
Liam 0c3d81feb2 Make S3Proxy compatible with ExAws by checking for parameter presence 2022-02-10 09:54:24 +09:00
Tamas Cservenak 075ff7f126 Update build
In general update the ancient build plugins
around.

Changes:
* bring all maven plugins to latest versions
* update checkstyle (as pre 8.41 is not supported anymore)
* update checkstyle rules
* make checkstyle plugin not fail the build (as there are issues)
* fix maven-shade-plugin warnings about dupe resource
* fix modernizer issue as it fails the build
* make build reproducible

Added comment about parent POM: the currently used parent is
10 years old, moreover, if you look in Maven Central,
the GA is unmaintained (last release was in 2014). Better introduce
own parent POM, or just copy whatever needed into this POM
(related to staging) and stop using the ancient POM.
2022-01-22 19:07:24 +09:00
Andrew Gaul b6c2dc9b9c Re-use XmlMapper instances
These can be expensive to create:

https://stackoverflow.com/a/57671444
2021-10-31 19:31:55 +09:00
Andrew Gaul 4700fb3a69 Check if Authorization header is empty
This resolves s3-tests failures that we missed due to busted CI.
Perhaps caused by a newer boto version?
2021-09-08 20:37:04 +09:00
Andrew Gaul 899956f80f Fix Checkstyle violation 2021-08-21 08:13:02 +09:00
Peter Zeller f4ea296adf support Iso8601 in date headers 2021-08-21 08:02:06 +09:00
Andrew Gaul ac539f5219 Handle possibly-null Content-Length
References #357.
2021-05-04 19:28:17 +09:00
Mikko Kortelainen 99ff5f950b add getters for S3AuthorizationHeader fields and make fields private 2021-04-29 15:08:04 +09:00
Andrew Gaul 85b2fa0321 Check ETag AtomicReference value not its reference 2021-04-12 16:59:13 +09:00
Andrew Gaul 1f79d30df5 Update copyright year 2021-03-29 21:04:28 +09:00
Andrew Gaul b625476493 Update java.version to 1.8
This was implied by the jclouds 2.3.0 upgrade.  Also address
modernizer warnings.
2021-03-19 21:32:42 +09:00
Andrew Gaul 37e843a6ef Allow GCS backend to upload more than 32 parts
This recursively combines up to 32 sets of 32 parts, allowing 1024
part multipart uploads.  Fixes #330.
2021-03-07 17:53:00 +09:00
snoe925 4a6a3f2f4a
Make CORS handling optional
If corsRules is null, construct the default rules.  Also add HEAD method for CORS

Co-authored-by: Shannon Noe <shannon.noe@drwholdings.com>
2021-03-07 11:30:26 +09:00
Andrew Gaul bc50a18954 Enforce maximum multipart copy size of 5 GB
This matches AWS and makes S3Proxy more useful for testing.
References s3fs-fuse/s3fs-fuse#1547.
2021-02-07 19:58:12 +09:00
Andrew Gaul 7e74e859e5 Add configurable limit for single-part object size 2021-02-03 23:22:22 +09:00
D044166 5b818f4e0a Better support for AllowOrigins *
If the Allowed Origin * is configured, the ACCESS_CONTROL_ALLOW_ORIGIN
header in CORS responses will contain * as well.
The ACCESS_CONTROL_ALLOW_METHODS header will always include all allowed
methods.

This is inline with a native S3 CORS response and will help esp. in CDN
caching scenarios. All requested Origins can now be served with a cached
response.
2021-01-26 12:38:48 +09:00
Falk Reimann d7281b1b1e CORS header for MultiPart Requests
Adding CORS headers `Access-Control-Allow-Origin` and
`Access-Control-Allow-Methods` in Multipart Reposnes if the
`Origin` Header is included in the Request and does match the
CORS rules.
2020-09-28 22:14:40 +09:00
Andrew Gaul 78fb790910 Upgrade to jclouds 2.3.0 2020-07-24 18:39:27 +09:00
Andrew Gaul 08c822c28a Rebase onto latest s3-tests
Uncovered an issue with incorrect escaping.
2020-07-18 12:52:13 +09:00
Andrew Gaul 0613da2fcb Handle empty list blobs with opaque markers (Azure)
Fixes #326.
2020-07-17 19:06:44 +09:00
Andrew Gaul 34b844fcaf Do not accept multipart sizes less than 5 MB
Continue to enforce greater minimum blob sizes when storage backend
requires it.  Fixes #324.
2020-06-24 22:59:48 +09:00
Andrew Gaul 51ce7a91ad Update copyright year 2020-05-02 19:50:19 +09:00
n.fraison 9d21a73591 Use original uri to compute canonical_request in s3v4 signature
Currently canonical_request is based on a canonical_uri for which bucket name is prepend
if dns path style is used which is not compatible with s3v4 signature mechanism
2020-04-25 12:57:27 +09:00
Andrew Gaul 0ff8ec0e97 Do not emit error code when stream is committed
If an error occurs when writing the body of a response, e.g.,
TimeoutException, previously S3Proxy would try to emit the AWS error
code.  Since this stream was already opened and closed, this failed
and Jetty emitted this warning:

Could not send response error 500: java.lang.IllegalStateException:
STREAM

References #303.
2019-11-10 12:57:58 +09:00
Andrew Gaul 6291e93582 Update copyright year 2019-10-22 10:26:10 -07:00
Andrew Gaul f3f0913dc8 Honor fetch-owner parameter during ListV2
In practice this emits bogus information.  Found via s3-tests.
2019-10-21 09:58:11 -07:00
Daan Kerkhofs 9abc9931f7 Fixes 299 Emit 404 for non-existing bucket during GetBucketAcl 2019-09-06 09:52:14 -07:00
Andrew Gaul 3571f354f1 Configure findbugs-slf4f
Also fix some logging nits.
2019-08-09 21:13:12 -07:00
Andrew Gaul 3beef5662a Fix error-prone 2.3.3 warnings 2019-07-09 10:29:55 -07:00
Andrew Gaul 7b1c46fb65 Include KeyCount in List V2 responses
Found via s3-tests.
2019-07-02 14:56:18 -07:00
Andrew Gaul 30b8677831 Remove another useless debug message 2019-07-02 00:19:38 -07:00
Timur Alperovich e37300dd3f UploadPartCopy: Fail if improper source range.
S3Proxy should check the format of the x-amz-copy-source-range value
when handling an UploadPartCopy request. The patch changes the behavior
to return an InvalidArgument error along with the matching error
description to AWS S3. To match the error format, the S3Exception class
is modified to return the actual error message, rather than the String
version of the error code.

Corresponding tests will be added to ceph/s3-tests.

Fixes: #304
2019-06-24 16:03:47 -07:00
Andrew Gaul 1966efc269 Remove useless debug messages 2019-06-22 09:46:28 -07:00
Andrew Gaul 85d33596f6 Emit request ID in headers as well as XML
Found via s3-tests.
2019-05-20 13:18:21 +09:00
Andrew Gaul b9e0714b2d Limit signed URL duration
Found via s3-tests.
2019-05-20 12:56:59 +09:00
Andrew Gaul 8c9bfe5ea5 Emit MalformedXML for empty complete MPU
Found via s3-tests.
2019-05-20 12:29:11 +09:00
Andrew Gaul 2480d0b01f Only emit delimiter if non-empty
Found via s3-tests.
2019-05-20 12:19:07 +09:00
Andrew Gaul 32fe8d0343 Emit MalformedXML with empty multi delete objects
Cannot test in s3-tests since the boto client prevents this.
Fixes #300.
2019-05-20 10:27:22 +09:00
Andrew Gaul 913d3df765 Emit InvalidRange with over-long range requests
Found via s3-tests.
2019-05-20 09:31:08 +09:00
Andrew Gaul f45d6e7fce Prefer HTTPS links where possible 2019-05-20 09:30:27 +09:00
Andrew Gaul c8d8126b3f Add simple handler for GetBucketPolicy
Fixes #301.
2019-05-10 19:19:56 +07:00