Wykres commitów

52 Commity (1dac9ccd123e068cbf5c856dcaf2f9ba408363ff)

Autor SHA1 Wiadomość Data
Andrew Gaul 1dac9ccd12 Address Checkstyle violations 2023-12-26 13:47:18 +09:00
Raul Sampedro 5682b10c71 add regex middleware 2023-10-03 20:53:45 +09:00
Lars Hagen ff347352bf
Clear system property for credentials for file paths
jclouds will override the passed in credentials if the system property is present
2023-09-26 20:37:04 +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
Timur Alperovich a2e9e22719 Fix a bug in blobstore locator
558efb7b29 introduced a bug where if anonymous access is
configured, the bucket locator hits a null pointer exception. There is
an additional bug where if an incorrect identity is used with the
blobstore locator (as in, the request identity does not match the
configured bucket's blobstore identity), another null pointer exception
can be triggered.

The patch creates a new GlobBlobStoreLocator class and adds tests to it,
as it is difficult to test Main.java directly. The blobstore locator
logic is also reworked to fix the above bugs.
2021-10-24 18:20:25 +09:00
Timur Alperovich 558efb7b29 Allow differentiating blob stores by buckets
Allows differentiating the backend blob stores by configured buckets.
The commit allows using the same s3proxy credentials across the
different backends and relies on the bucket names to disambiguate them.

If no buckets are configured, the prior blob store selection algorithm
is used, which returns the first configured blob store for the specified
identity.

The patch supports the glob syntax, which allows specifying groups of
buckets more easily. However, there is no checking for overlapping
globs.

Fixes: #371
2021-10-20 16:53:48 +09:00
Timur Alperovich 35fea54d63 Alias middleware to remap backend buckets
Alias middleware implements a way to remap backend buckets to a
configurable front-end name. The mappings are configured as:
s3proxy.alias-blobstore.<s3proxy bucket> = <backend bucket>

A single bucket cannot be mapped to multiple names.
2021-09-11 21:57:56 +09:00
Timur Alperovich 0d8f9aa96d Add Sharded Bucket middleware
Adds the sharded bucket middleware, which allows for splitting objects
across multiple backend buckets for a given virtual bucket. The
middleware should be configured as:
s3proxy.sharded-blobstore.<bucket name>.shards=<number of shards>
s3proxy.sharded-blobstore.<bucket name>.prefix=<prefix>.

All shards are named <prefix>-<index>, where index is an
integer from 0 to <number of shards> - 1. If the <prefix> is not
supplied, the <bucket name> is used as the prefix.

Listing the virtual bucket and multipart uploads are not supported. When
listing all containers, the shards are elided from the result.

Fixes #325
Fixes #351
2021-06-05 23:23:38 +09:00
Andrew Gaul 1f79d30df5 Update copyright year 2021-03-29 21:04:28 +09:00
Andrew Gaul 51ce7a91ad Update copyright year 2020-05-02 19:50:19 +09:00
Andrew Gaul 6291e93582 Update copyright year 2019-10-22 10:26:10 -07:00
Andrew Gaul 3571f354f1 Configure findbugs-slf4f
Also fix some logging nits.
2019-08-09 21:13:12 -07:00
Andrew Gaul f45d6e7fce Prefer HTTPS links where possible 2019-05-20 09:30:27 +09:00
Maciej c88072b8ef Do not eagerly initialize BlobStore
This prevents OpenStack blobstores from matching regions incorrectly, basing on a value of the endpoint variable. OVH has different URLs for each storage endpoint, which does not match the auth endpoint.
2019-03-06 23:26:43 +09:00
Andrew Gaul 3d4a5db3d2 Avoid NullPointerException when provider not set
Found via spotbugs.
2018-01-09 13:48:29 -08:00
Andrew Gaul fa3394e0ab Ensure propertiesFiles is not null
This allows a usage check to succeed.
2018-01-09 13:45:05 -08:00
Andrew Gaul 2905b720b8 Update copyright year 2018-01-04 14:57:47 -08:00
Andrew Gaul d380661f76 Use a single jclouds thread pool for all backends
S3Proxy does not seem to use the jclouds thread pools but limiting
this to one makes sense for multiple configurations.  References #180.
2017-11-08 18:11:17 -08:00
Andrew Gaul 11f82ec997 Factor out properties parsing into Builder 2017-11-08 17:34:09 -08:00
Andrew Gaul 732a24d990 Allow limiting the number of Jetty threads
Also name Jetty threads more specifically.  References #180.
2017-11-08 15:25:57 -08:00
Andrew Gaul 251082f7e7 Support multiple configurations
Fixes #11.
2017-11-07 17:06:57 -08:00
Andrew Gaul 6ee33b89f9 Refactor S3Proxy properties parsing
Also convert a few calls to System.exit into IllegalArgumentException.
References #11.
2017-11-07 14:27:24 -08:00
Andrew Gaul 35d7c48475 Read-only middleware
Fixes #217.
2017-10-08 18:11:14 -07:00
Andrew Gaul 51aa2e7fcd Address modern Guava deprecations 2017-08-21 15:04:41 -07:00
Andrew Gaul 39c289d649 Allow Docker environment to ignore unknown headers 2017-08-16 18:04:52 -07:00
Andrew Gaul 17294be152 Do not set endpoint if it is an empty string
Also do not pass along endpoint as an override if we set it via the
builder.  Fixes #229.
2017-07-08 19:45:22 -07:00
Andrew Gaul 525c6e2275 Override PrintStream.write as well as print
args4j inconsistently uses both methods for output.  Workaround for
kohsuke/args4j#149.
2017-05-08 11:33:12 -07:00
Kishore battula 84ec8e22da added whether console is attached or not 2017-05-08 11:33:12 -07:00
Andrew Gaul 8db6ce2a92 Replace parameters whitelist with blacklist
Mimic Amazon behavior of ignoring unknown parameters and only emit
NotImplemented when present in blacklist.  Fixes #189.
2017-04-25 14:03:43 -07:00
Andrew Gaul 6b30e66127 Do not set virtual host when it is an empty string
References #210.
2017-04-25 12:52:24 -07:00
shenghu 8b2d056d40 Allow endpoint of s3proxy to have service path
Sometimes the service is not the only one under a domain.
This commit adds s3proxy.service-path to allow s3proxy to be deployed
with a context path. Fixes #48.
2017-03-12 16:55:49 -07:00
Andrew Gaul 7116f29199 Add NullBlobStore
This throws away all data during object creation and reconstructs it
with NUL bytes.  Clients can use this middleware for performance
testing or to simulate very large objects.  Fixes #131.
2017-03-08 22:53:16 -08:00
Andrew Gaul 5ee5cf6c53 Prepend S3Proxy version in User-Agent header
This only includes the version in the main package and not the unit
test.  Fixes #136.
2017-02-27 09:48:37 -08:00
Philipp Marx d6ca2fb280 Add support for ignoring unknown parameters
Presigned URLs may contain additional parameters in the URL which will
be used “as is” by the client uploading/downloading content from S3.

CLOSES #138
2017-02-22 10:39:37 -08:00
Andrew Gaul 05c5643681 Update copyright year 2017-02-15 23:15:16 -08:00
Andrew Gaul 04657867b8 Add configuration for AWS authentication V4
Supports aws-v2, aws-v4, aws-v2-or-v4, and none.  Fixes #156.
2016-11-14 00:59:46 -08:00
Andrew Gaul 01f956052e Add property to include permissive CORS response
References #142.
2016-07-19 03:20:07 -07:00
Andrew Gaul 2296b8228b Add configuration to ignore unknown headers
Fixes #130.
2016-03-12 23:15:45 -07:00
Andrew Gaul eece05f02e Fix path-based GCS credentials
Providing both credential and the credential property used only the
latter, which was not expanded when credential is a file.  Also expand
credential in tests.  References #128.
2016-03-09 13:35:02 -08:00
Andrew Gaul 6292d28c9c Add EventualBlobStore
This models eventually-consistent behavior.  This implementation uses
two buckets and client writes going to the first bucket and reads to
the second.  Operations later replicate from the first to the second
with a variable delays.  A more complete implementation could flap
between the strongly- and eventually-consistent buckets and arbitrary
reorder operations which conclude with last-writer wins.  Fixes #65.
2016-03-01 17:13:39 -08:00
Andrew Gaul 0351ee73dc Expand GCS credential files into PEMs 2016-02-26 17:45:33 -08:00
Andrew Gaul 3c8f68feb2 Update copyright year to 2016 2016-01-09 21:14:59 -08:00
Andrew Gaul a5c9f28e0a Make V4_MAX_NON_CHUNKED_REQUEST_SIZE configurable
Also default to 32 MB since goofys via aws-sdk-go uses 8 MB requests.
2016-01-09 20:33:28 -08:00
Andrew Gaul 23cff3a61d Do not require credentials for local blobstores 2015-12-14 16:01:35 -08:00
Andrew Gaul 9e033c677f Require credentials for aws-v2 authentication 2015-12-14 15:48:19 -08:00
Andrew Gaul 0faa68ccfc Honor jclouds.region with Swift blobstores
jclouds has inconsistent support for regions due to provider
differences.  AWS providers a single global namespace while Swift
scopes per-endpoint.  Tested with Rackspace Cloud Files in HKG and ORD
regions.  Fixes #81.
2015-10-14 13:08:29 -07:00
Andrew Gaul 1d8dfea9c7 Use args4j for argument parsing 2015-09-01 11:12:34 -07:00
Nate Rosenblum f40693f214 Terminate on s3proxy start failure
E.g. when bind(2) fails.
2015-08-22 16:28:02 -07:00
Ka-Hing Cheung f17d968a33 allow endpoint to be missing when secure endpoint is set 2015-05-13 17:45:51 -07:00
Ka-Hing Cheung 6e4ebad1c8 add a way to listen to both http and https 2015-05-13 17:45:51 -07:00