Commit Graph

2858 Commits

Author SHA1 Message Date
Andrew Gaul 468b126dd8 JCLOUDS-1594: Allow overriding S3 signer
Previously s3 always used v2 and aws-s3 always used v4.  Now s3
defaults to v2 and can override to v4.  Note that this does not change
BlobRequestSigner.
2022-01-12 22:24:45 +09:00
SATYANAN-ANAND c95ddff020
JCLOUDS-1591: Fix NPE in ClientCredentialsClaims 2021-12-27 16:26:28 +09:00
Andrew Gaul 3bbb0b446a JCLOUDS-1590: Promote glacier to core 2021-12-18 00:11:40 +09:00
Andrew Gaul afa92c7478 Merge remote-tracking branch 'jclouds-labs-aws-local/promote-glacier-moved' into promoted-glacier 2021-12-17 13:55:10 +09:00
Andrew Gaul 66ef18c6ae JCLOUDS-1589: Upgrade to log4j 2.16.0
This addresses a critical CVE:

https://logging.apache.org/log4j/2.x/security.html
2021-12-17 13:33:38 +09:00
Andrew Gaul dbd8eb1dab JCLOUDS-1589: Upgrade to log4j 2.16.0
This addresses a critical CVE:

https://logging.apache.org/log4j/2.x/security.html
2021-12-16 23:56:09 +09:00
Andrew Gaul b0592c5afa Next development version 2.5.0-SNAPSHOT 2021-09-19 08:59:59 +09:00
Andrew Gaul e8e78689e6 Next development version 2.4.0-SNAPSHOT 2021-09-19 08:58:25 +09:00
Andrew Gaul 720e92c54a Prefer case-insenstive header comparisons
Follows up to #116.
2021-07-29 20:01:27 +09:00
didixith 779bc2db19
JCLOUDS-1516: specify host name when creating bucket 2021-07-10 11:35:16 +09:00
i831992 2791f47046 JCLOUDS-1580 - Add support for lowercase metadata headers
The issue happens if a cloud provider returns lowercase metadata headers, for example: "x-object-meta-apiversion" instead of "X-Object-Meta-ApiVersion"

In that case, BlobStore.blobMetadata(CONTAINER, PATH).getUserMetadata()
incorrectly returns an empty map.

This happens because the code is looking for the exact String "-Meta-" (case-sensitive).

This checkin allows to handle metadata headers of any case, and also adds a unit test for that situation.
2021-06-23 09:59:26 +09:00
Andrew Gaul 09dfab4277 Next development version 2.4.0-SNAPSHOT 2021-04-14 23:14:10 +09:00
Andrew Gaul 7ad7890ad0 Next development version 2.4.0-SNAPSHOT 2021-04-14 23:07:54 +09:00
Timur Alperovich 04feb8f848 Parse out of order ListBuckets response elements
Currently, jclouds assumes that the ListBuckets response follows a
specific order: the <Owner> tag, followed by the <Buckets> tag. Within
the <Owner> tag, jclouds further assumes that the <ID> must occur before
the <DisplayName> tag. If the XML body does not adhere to this order,
the parser throws a NullPointerException.

DigitalOcean spaces does not adhere to this order and returns the
<DisplayName> tag before the <ID> tag. The patch changes the parser to
not depend on the order of the tags.
2021-04-04 20:06:26 +09:00
Jean-Noël Rouvignac 0b89ee0825
S3 APIs: Remove the dependency to com.jamesmurty.utils:java-xmlbuilder (#98)
XMLBuilder is a very nice fluent API for building XML documents.
However, it is only used by a tiny portion of jclouds: the s3 api. The
use of the XMLBuilder class requires a dependency to
com.jamesmurty.utils:java-xmlbuilder jar and a transitive
dependency to the net.iharder:base64 jar (superseded by
java.util.Base64 in java 8). They are 18kb each approximately and they
not OSGi compatible. They are not huge, but they represent more API
surface and more things to change when trying to use jclouds in an OSGi
context (they need to be replaced by OSGi compatible bundles like
org.apache.servicemix.bundles.java-xmlbuilder).

This commit replaces the use of XMLBuilder by a direct use of the
javax.xml and org.w3c.dom APIs.

I hope retesting will be minimal, and most of this code is covered by
unit tests.
2021-03-01 15:01:10 +01:00
Jean-Noël Rouvignac f6f3f99024
Avoid using the guice injector int ests which triggers an NPE 2021-03-01 11:49:24 +01:00
gurkerl83 50462ca940 Upgrade OKHttp dependency
The JClouds project module upgrades the okhttp server library and related dependencies such as mockwebserver from 2.2.0 to 3.14.9. The vendor switched the groupId declaration from com.squareup.okhttp to com.squareup.okhttp3.

Adjust imports and api calls for newer okhttp vers
2021-02-12 18:57:56 +09:00
gurkerl83 3d753a48d2 Clear rule for bouncycastle exclusion
- Mock-Webserver v2.2.0 - Vendor, defined dependency bcprov-jdk15on > Previously, the dependency got excluded; otherwise, it conflicted with the existing bouncy castle version used in JClouds.
- Mock-Webserver v3.14.9 - The vendor does not define a bouncy castle dependency anymore; instead, it moved to the okhttp-tls module.

- Introduce the okhttp-tls module for tests in the core module. The following APIs (Docker, Elastic-Stack) and providers Softlayer extend their respective MockTest from BaseMockWebServerTest. The mock base test is located in the test jar of JClouds core module.
- Due to conflicting bouncy castle classes in the classpath, those which get loaded from the okhttp-tls module, and those defined in JClouds bouncy castle module, the bouncy castle dependency of okhttp-tls has to get skipped for the two APIs and providers mentioned.

Side note:
The JClouds GAE driver module also requires the new okhttp-tls dependency because of the following chain of inheritance.
Different from the situation above, the bouncy castle classes of the okhttp-tls got not excluded.
GaeHttpCommandExecutorServiceIntegrationTest -> BaseHttpCommandExecutorServiceIntegrationTest -> BaseMockWebServerTest

The reason for this is unknown to me.
2021-02-12 18:57:46 +09:00
korlov42 44ff69d144 JCLOUDS-1551: Update version of OkHttp 3.14.9 2021-02-12 18:57:46 +09:00
Andrew Gaul 56ad552344 Force application/x-directory for directories
Paths created by Files.createParentDirs lack extended attributes and
thus Content-Type for directories.
2021-02-03 21:36:28 +09:00
Andrew Gaul dabc0ab6a9 Allow setting BlobAccess in LocalBlobStore.putBlob
This addresses a race condition with filesystem users.
2021-02-01 19:37:47 +09:00
gurkerl83 47f51347a2 Remove Guice multibindings
Since Guice 4.2, multibindings support has moved to Guice core. Before that, you need to depend on the guice-multibindings extension. For reference https://github.com/google/guice/wiki/Multibindings
2021-01-31 22:03:59 +09:00
Jean-Noël Rouvignac 647af7e365
Simplify S3 code that uses java-xml-builder (#93)
* animal sniffer should be on java18, just like `<jdk.version>`

* Only use XMLBuilder's elem() and text() methods to have similar looking code

* Remove unnecessary call to XMLBuilder's up() because the returned value is never used

* Simplify code

* Deduplicate code

* Make the code more explicit by returning the rootBuilder
2021-01-21 21:54:44 +09:00
gurkerl83 fd7fe5c01c Sync OSGi handling with Apache JClouds Project
This project, the aws-lab version of Apache JClouds, share the exact build instructions as the primary Apache JClouds project with all its modules.
Apache JClouds is shifting its strategy in handling OSGi configuration. Instead of using the Maven Bundle Plugin, a wrapper of the BND plugin, the BND plugin gets used directly.
- Remove the OSGi configuration from each module. The configuration gets served to the BND through dedicated configuration / bnd files.
- Onboard bnd-configuration files, one per module.

Ignore bnd files in rat plugin
2020-12-07 09:30:29 +09:00
gurkerl83 9215bfcb70 In the final state of this feature, a rebase on Master was executed. In resolving a merge problem with the Maven project file "JClouds Project," an important instruction got overwritten, to generate test jars for each module. This modification re-adds this ability for all modules. Counter versa, defining this build step repeatedly, e.g., in the api/oauth module, is no longer required. Also, correct a typo, add groupId.
Note: Previously, the maven jar plugin contained a configuration embedded in each module's generated manifest files. The configuration got relocated to the project/bnd.bnd file in a previous commit, and gets handled through the bnd plugin.
2020-10-26 19:58:41 +09:00
gurkerl83 32f6c4d50f Remove the OSGi configuration from each module. The approach of defining OSGi configuration through common properties and serving them to the bundle plugin gets no longer used; instead, OSGi configuration gets defined in each module's dedicated bnd file. 2020-10-26 19:58:41 +09:00
gurkerl83 7a9cd345a6 Onboard bnd-configuration files, one per module 2020-10-26 19:58:41 +09:00
gurkerl83 d82868cc47 Replace embedded and repackaged GSON library
Replace substituted GSON package names with those provided from the vendor.
Reduce OSGi-metadata declaration of core-module because the artificial package org.jclouds.json.gson.internal was removed.
Remove the Gson module its children Gson bundle, and Gson shaded.
Remove duplication conflict and check-style rules due to the removal of the internal Gson module.
Add maven repository where a custom version of the Gson library gets hosted, which exports all packages.

Remove particular repository

Remove the declaration of the repository that serves a custom build GSON version. The build uses GSON in its original form of the vendor, which gets distributed through the standard distribution channel. The identifiers for group, artifact, and version correspond to the latest stable release of GSON.

Integrate GSON library in Clouds Core Bundle

The change contained in the commit puts the GSON library into the classpath of the JClouds core module.
After several tests with Karaf and Karaf JClouds, especially if the Maven identifier matches the original GSON library, there are only a limited number of ways to keep the deployment effort low.

Specifically, Karaf has a set of predefined Maven repositories that can be easily customized. The order in which a particular repository is resolved into the customized GSON library is more difficult. In normal OSGi applications, which do not have such a management function, I imagine this configuration to be more complicated.  Sure, a unique identifier would help, but then we are back to step 1.

Although I honestly don't like to see this kind of approach in a codebase I'm working with, there are not many alternatives to the main aspect of deployment mentioned above.

Maybe the approach can still ease the problem in the short term. In a further mid-term step, however, this problem must be addressed in general.
2020-10-26 19:58:41 +09:00
Andrew Gaul 1cd28c93c4 Remove unintended executable permissions
Fixed via:

find -executable -not -type d -name \*.java -exec chmod -x {} \;
2020-10-19 13:13:34 +09:00
Tamas Cservenak d65047c87b
JCLOUDS-1552: Do not attempt to parse empty payload (#82) 2020-09-21 15:46:25 +02:00
Andrew Gaul 3e25b835c6 JCLOUDS-1333: Fix Guava 21 issues 2020-06-25 19:29:06 +09:00
Sam Ottenhoff 8762fbaf8e JCLOUDS-1473 add INTELLIGENT_TIERING enum 2020-06-25 09:11:33 +09:00
Andrew Gaul 62767a1461 JCLOUDS-1333: JCLOUDS-1334: JCLOUDS-1470: Require Java 8 and Guava 22
This allows compatibility with Guava 29.  Also unwind some older
workarounds.
2020-06-25 08:11:30 +09:00
ikky888 69ca45720d
JCLOUDS-1541: Add Middle East (Bahrain) region to the AWS EC2 and S3 providers list 2020-04-04 10:48:01 +09:00
Colm O hEigeartaigh 99ef891e76 JCLOUDS-1540 - Update Snakeyaml 2020-03-03 17:41:33 +09:00
Ignasi Barrera f5b29c7028 Next development version 2.3.0-SNAPSHOT 2019-10-21 10:32:43 +02:00
Ignasi Barrera 7221844fac Apache jclouds 2.2.0-rc1 release 2019-10-21 10:32:43 +02:00
Ignasi Barrera 644fb4a511 Next development version 2.3.0-SNAPSHOT 2019-10-13 11:00:35 +02:00
Ignasi Barrera 0aef8ca79f Apache jclouds 2.2.0-rc1 release 2019-10-13 11:00:06 +02:00
Ignasi Barrera a2cbdd3385 Etag is not supported in OSX 2019-10-13 10:32:50 +02:00
Roded Bahat a248697c06 JCLOUDS-1509: read AWS response data with the UTF-8 charset explicitly
AWS response data is encoded in UTF-8. Creating a String from said data
using the JVM's default charset results in incorrect encoding on
environments in which the JVM's default charset is not UTF-8.

https://issues.apache.org/jira/browse/JCLOUDS-1509
2019-08-08 15:32:25 +03:00
Ignasi Barrera b8606a10dd
JCLOUDS-1166: Relocate the gson internal packge to be able to keep using it (#35)
* JCLOUDS-1166: Relocate the gson internal packge to be able to keep using it

* Fixes

* Fix import order and shaded jar

* More fixes

* Proper dependency configuration

* Fix typos

* Bring back duplicate exclusions
2019-06-17 17:43:29 +02:00
Andrew Gaul a70ca2d25c Convert a handful of HTTP URLs to HTTPS 2019-05-21 20:52:22 +09:00
Sergi Castro 3e855c26be
Add ARM architecture to ec2 image and the related instance types 2019-05-14 09:00:31 +02:00
Olaf Flebbe 92a3c68838 JCLOUDS-1497: Fix checkstyle-suppressions for jcloud-labs (#27)
* Fix NoWhitespaceBefore Checkstyle Violation

* checkstyle updates: remove suppressionsfilter from checkstyle.xml

* suppressions now done in maven-checkstyle-plugin
2019-05-07 11:49:54 +02:00
Olaf Flebbe d51d6e44bc JCLOUDS-1496: Update maven-compiler-plugin for increased JDK compatibility (#25)
* JCLOUDS-1496: Update maven-compiler-plugin for increased JDK compatibility

* increase maven-compiler-plugin version

* A space change to trigger jenkins again

* Another space change to trigger jenkins again
2019-04-24 16:12:45 +02:00
Olaf Flebbe 2fbf10c9c9 JCLOUDS-1495: maven plugins are not correctly referred to (#24) 2019-04-10 19:54:09 -07:00
Andrew Gaul a1c9ce8217 JCLOUDS-1494: Add S3 Deep Archive tier
Also test Glacier tier now that Amazon allows creating objects with
this storage class.
2019-04-06 18:46:14 +09:00
Dani Estevez 6fda1736ad Adds EU North 1 region (Stockholm) 2019-03-15 12:00:20 -04:00
Dani Estevez 1c9322e41c Adds China North West Region (Ningxia) 2019-03-15 12:00:20 -04:00