Wykres commitów

460 Commity (0c72a601c9bc2e8c12a693a9e2cb04ac35034b58)

Autor SHA1 Wiadomość Data
Daniel del Castillo 45e4d6348f Add JUnit Rule to project
This provides a convenience mechanism when writing tests.  Fixes #261.
2018-03-01 10:35:47 -08:00
Adrian Woodhead 9e50004fa8 Shade and relocate Jetty dependencies
Fixes #263
2018-02-23 10:29:27 -08:00
Andrew Gaul 19807d0c2a Add support for storage classes
Supported for head, get, put, multipart put, and list objects.  Not
supported for list multipart uploads and copy objects.  Fixes #234.
2018-02-22 00:23:54 -08:00
Andrew Gaul 4f14a8419f Upgrade to jclouds 2.1.0
B2 and GCS now included in allblobstore.  Update signing tests which
now pass.  Improve invalid range read error handling.  Address Guava
18 warnings.  Fixes #191.  Fixes #209.  Changelog:

https://jclouds.apache.org/releasenotes/2.1.0/
2018-02-22 00:23:41 -08:00
Andrew Gaul 05d7f201ad Correct typos
Found via codespell.
2018-02-07 20:20:28 -08:00
Andrew Gaul a1e9fb301a Upgrade from findbugs 3.0.4 to spotbugs 3.1.1
Also suppress a few warnings.  Release notes:

https://github.com/spotbugs/spotbugs/blob/3.1.1/CHANGELOG.md
2018-01-09 16:10:23 -08:00
Andrew Gaul ff13aae981 Prevent NullPointerException
Found via spotbugs.
2018-01-09 15:52:20 -08: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 6658f964f2 Handle permission errors during bucket creation
This commit requires jclouds 2.1.0.  References #122.
2018-01-09 12:48:04 -08:00
Philipp Marx 24a3d64134 Test for chunked encoding with anonymous access
References #145.
2018-01-09 00:20:14 -08:00
Andrew Gaul d4968397ba Implement multi-byte read in NullBlobStore
This can improve performance.  Found via error-prone 2.2.0.
2018-01-09 00:01:09 -08:00
Andrew Gaul 357f8e4197 Prefer Splitter over String.split
The latter has surprising semantics.  Found via error-prone 2.2.0.
2018-01-09 00:01:09 -08:00
Andrew Gaul 757a9dc855 Compare signatures with constant time comparison
Fixes #250.
2018-01-08 23:23:09 -08:00
Andrew Gaul a80e75a20f Add test for anonymous authentication
Fixes #200.
2018-01-08 22:56:28 -08:00
Andrew Gaul c410df593d Parameterize TestUtils.startS3Proxy 2018-01-08 22:56:28 -08:00
Random Coder 0f26d65846 Add check for non anonymous identity before extracting auth header
Fixes #251.
2018-01-08 22:56:18 -08:00
Andrew Gaul 2905b720b8 Update copyright year 2018-01-04 14:57:47 -08:00
Andrew Gaul aee169e403 Check stream closed in read
This matches TestUtils.randomByteSource.
2018-01-04 14:54:54 -08:00
baul ddfba4e7a4 v2/v4 auth improve
* 15 minitues timeskew
* Add x-amz-date header or query parameter check
* Change the timeskew logic to first get client req auth type
* When v2,x-amz-date header format is rfc2616,when v4,is iso8601
* If have both x-amz-date header and date header in v2 auth,date value in
  stringtosign is x-amz-date header value,CanonicalizedAmzHeaders
  have no x-amz-header.
  Ref Delete example in site:
  http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
* Fix v2 query auth:
  If expires is nil ,does not mean that the auth type is not query
  auth type.
  Ref http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html#RESTAuthenticationQueryStringAuth
  It says that 'Additionally, you can limit a pre-signed request by specifying an expiration time.'
2018-01-02 17:32:49 -08:00
Andrew Gaul 94bf8ca88e Add missing @Nullable 2017-12-23 08:03:29 -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 f48bd352c4 Consume S3Object InputStream
Previously these tests leaked HTTP connections from the AWS SDK pool.
2017-11-08 11:41:35 -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 a09c9e1998 Treat directories as relative paths
When listing blobs foo/1 and foo/2 with prefix foo and delimiter /,
jclouds returns foo as a relative path, except for Atmos which returns
foo as a directory.  Treat the latter like the former to allow listing
pseudo-directories with Atmos.
fb0f321303 introduced this regression.
Fixes #244.
2017-10-31 11:43:22 -07:00
Andrew Gaul 35d7c48475 Read-only middleware
Fixes #217.
2017-10-08 18:11:14 -07:00
Andrew Gaul 3dd7cfcd42 Address long narrowing issues
Found via error-prone 2.1.0.
2017-08-21 19:46:34 -07:00
Andrew Gaul f6c3ab9e75 Add @Nullable annotations where appropriate
Found via error-prone 2.1.0.
2017-08-21 19:46:33 -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 233559bb2b Do not ignore x-amz-storage-class if not STANDARD
Clients can set the ignore unknown headers parameter to preserve the
existing behavior.  References #234.
2017-08-16 18:04:52 -07:00
Andrew Gaul 1a639d1062 Upgrade s3-tests 2017-08-16 14:11:40 -07:00
Andrew Gaul d4802ec54f Emit InvalidArgument on CopyPart invalid range
References kahing/goofys#212.
2017-08-06 23:24:58 -07:00
Andrew Gaul 93b80f6373 Do not escape / when URL encoding
This allows clients to list pseudo-directories with slashes in them.
References kahing/goofys#213.
2017-08-02 23:06:13 -07:00
Andrew Gaul 9e406531bb Set response Content-Type to application/xml 2017-07-24 18:40:03 -07:00
Andrew Gaul 1e5ebadee4 Do not allow anonymous access to list buckets
Fixes #236.
2017-07-22 16:11:29 -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
Chaithanya Ganta 23705a879b Moving signature creation logic to a separate class
Signed-off-by: Chaithanya Ganta <ganta@adobe.com>
2017-07-07 09:06:04 -07:00
Chaithanya Ganta 84885fa8cd Throw proper S3 error code for invalid buck name
INVALID_BUCKET_NAME for container creation request, else NO_SUCH_BUCKET
2017-06-02 13:47:51 +02:00
Chaithanya Ganta 6b92cc06f4 Validate bucket name before processing any request 2017-06-02 13:47:51 +02:00
Andrew Gaul 742820a93d Allow capitals as first character in bucket name
Curiously Amazon permits mixed case but documents that only lowercase
letters are allowed:

https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

Fixes #226.
2017-05-24 22:02:48 -07:00
Rached Ben Mustapha e23e9b78e4 Handle HttpResponseException in S3ProxyHandlerJetty 2017-05-12 12:33:40 -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 9c74851c43 Address error-prone 2.0.19 issues 2017-05-06 17:00:38 -07:00
Andrew Gaul e21b467110 Improve IP address validation 2017-05-06 12:27:46 -07:00
Michael Wittig 4f14b8607a HTTP POST Requests using AWS Signature Version 4 2017-05-05 12:11:54 -07:00