From 36c5d36809f009feee289a169bd7363c8f77b405 Mon Sep 17 00:00:00 2001 From: Will Dollman Date: Wed, 21 Jun 2023 16:10:07 +0100 Subject: [PATCH] Pull upstream (#3) * Upgrade spotbugs to 4.7.3 Release notes: https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md#473---2022-10-15 * Bump maven-jar-plugin from 3.2.2 to 3.3.0 Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.2.2 to 3.3.0. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.2.2...maven-jar-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jar-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-resources-plugin from 3.2.0 to 3.3.0 Bumps [maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/apache/maven-resources-plugin/releases) - [Commits](https://github.com/apache/maven-resources-plugin/compare/maven-resources-plugin-3.2.0...maven-resources-plugin-3.3.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-resources-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-assembly-plugin from 3.4.1 to 3.4.2 Bumps [maven-assembly-plugin](https://github.com/apache/maven-assembly-plugin) from 3.4.1 to 3.4.2. - [Release notes](https://github.com/apache/maven-assembly-plugin/releases) - [Commits](https://github.com/apache/maven-assembly-plugin/compare/maven-assembly-plugin-3.4.1...maven-assembly-plugin-3.4.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-assembly-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Suppress spurious md5 deprecation warnings * Remove unneeded AliasBlobStore directory methods These are not needed and generate deprecation warnings. * Upgrade to error-prone 2.16 Release notes: https://github.com/google/error-prone/releases/tag/v2.16 * Bump jetty-servlet from 11.0.11 to 11.0.13 Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 11.0.11 to 11.0.13. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.11...jetty-11.0.13) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlet dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-shade-plugin from 3.3.0 to 3.4.1 Bumps [maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.3.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.3.0...maven-shade-plugin-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0 Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.1.2 to 3.2.0. - [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases) - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.1.2...maven-checkstyle-plugin-3.2.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump slf4j.version from 1.7.36 to 2.0.6 Bumps `slf4j.version` from 1.7.36 to 2.0.6. Updates `slf4j-api` from 1.7.36 to 2.0.6 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.6) Updates `jcl-over-slf4j` from 1.7.36 to 2.0.6 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.36...v_2.0.6) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-major - dependency-name: org.slf4j:jcl-over-slf4j dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Bump logback-classic from 1.2.11 to 1.4.5 Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.2.11 to 1.4.5. - [Release notes](https://github.com/qos-ch/logback/releases) - [Commits](https://github.com/qos-ch/logback/compare/v_1.2.11...v_1.4.5) --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-javadoc-plugin from 3.4.0 to 3.4.1 Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.0...maven-javadoc-plugin-3.4.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-install-plugin from 3.0.1 to 3.1.0 Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.0.1 to 3.1.0. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.0.1...maven-install-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Configure Dependabot for monthly notifications * Upgrade to jclouds 2.6.0-SNAPSHOT Shuffle some test teardown methods to satisfy newer testng. References #473. * Bump assertj-core from 3.23.1 to 3.24.2 Bumps assertj-core from 3.23.1 to 3.24.2. --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-checkstyle-plugin from 3.2.0 to 3.2.1 Bumps [maven-checkstyle-plugin](https://github.com/apache/maven-checkstyle-plugin) from 3.2.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-checkstyle-plugin/releases) - [Commits](https://github.com/apache/maven-checkstyle-plugin/compare/maven-checkstyle-plugin-3.2.0...maven-checkstyle-plugin-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-checkstyle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-enforcer-plugin from 3.1.0 to 3.2.1 Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.1.0 to 3.2.1. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.1.0...enforcer-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-enforcer-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump commons-fileupload from 1.4 to 1.5 Bumps commons-fileupload from 1.4 to 1.5. --- updated-dependencies: - dependency-name: commons-fileupload:commons-fileupload dependency-type: direct:production ... Signed-off-by: dependabot[bot] * Bump maven-deploy-plugin from 3.0.0 to 3.1.0 Bumps [maven-deploy-plugin](https://github.com/apache/maven-deploy-plugin) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/apache/maven-deploy-plugin/releases) - [Commits](https://github.com/apache/maven-deploy-plugin/compare/maven-deploy-plugin-3.0.0...maven-deploy-plugin-3.1.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-deploy-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump surefire.version from 3.0.0-M8 to 3.0.0-M9 Bumps `surefire.version` from 3.0.0-M8 to 3.0.0-M9. Updates `surefire-junit47` from 3.0.0-M8 to 3.0.0-M9 Updates `surefire-testng` from 3.0.0-M8 to 3.0.0-M9 Updates `surefire-junit-platform` from 3.0.0-M8 to 3.0.0-M9 Updates `maven-surefire-plugin` from 3.0.0-M8 to 3.0.0-M9 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M8...surefire-3.0.0-M9) --- updated-dependencies: - dependency-name: org.apache.maven.surefire:surefire-junit47 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.surefire:surefire-testng dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.surefire:surefire-junit-platform dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-compiler-plugin from 3.10.1 to 3.11.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump maven-assembly-plugin from 3.4.2 to 3.5.0 Bumps [maven-assembly-plugin](https://github.com/apache/maven-assembly-plugin) from 3.4.2 to 3.5.0. - [Release notes](https://github.com/apache/maven-assembly-plugin/releases) - [Commits](https://github.com/apache/maven-assembly-plugin/compare/maven-assembly-plugin-3.4.2...maven-assembly-plugin-3.5.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-assembly-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump jetty-servlet from 11.0.13 to 11.0.14 Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 11.0.13 to 11.0.14. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.13...jetty-11.0.14) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlet dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Add S3PROXY_JAVA_OPTS environment variable * Bump logback-classic from 1.4.5 to 1.4.6 Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.4.5 to 1.4.6. - [Release notes](https://github.com/qos-ch/logback/releases) - [Commits](https://github.com/qos-ch/logback/compare/v_1.4.5...v_1.4.6) --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-install-plugin from 3.1.0 to 3.1.1 Bumps [maven-install-plugin](https://github.com/apache/maven-install-plugin) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-install-plugin/releases) - [Commits](https://github.com/apache/maven-install-plugin/compare/maven-install-plugin-3.1.0...maven-install-plugin-3.1.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-install-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump maven-javadoc-plugin from 3.4.1 to 3.5.0 Bumps [maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.4.1...maven-javadoc-plugin-3.5.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Bump surefire.version from 3.0.0-M9 to 3.0.0 Bumps `surefire.version` from 3.0.0-M9 to 3.0.0. Updates `surefire-junit47` from 3.0.0-M9 to 3.0.0 Updates `surefire-testng` from 3.0.0-M9 to 3.0.0 Updates `surefire-junit-platform` from 3.0.0-M9 to 3.0.0 Updates `maven-surefire-plugin` from 3.0.0-M9 to 3.0.0 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M9...surefire-3.0.0) --- updated-dependencies: - dependency-name: org.apache.maven.surefire:surefire-junit47 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.surefire:surefire-testng dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.surefire:surefire-junit-platform dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump slf4j.version from 2.0.6 to 2.0.7 Bumps `slf4j.version` from 2.0.6 to 2.0.7. Updates `slf4j-api` from 2.0.6 to 2.0.7 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.6...v_2.0.7) Updates `jcl-over-slf4j` from 2.0.6 to 2.0.7 - [Release notes](https://github.com/qos-ch/slf4j/releases) - [Commits](https://github.com/qos-ch/slf4j/compare/v_2.0.6...v_2.0.7) --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.slf4j:jcl-over-slf4j dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Configure Keystore through environment variables * Fix variable typo * Configure Secure Endpoint with environment variable * Set default non chunked request size value * Expose 443 port for TLS/secure endpoint feature * Improve TLS Support documentation * Align SSL/TLS terminology * Update s3-tests submodule References #479. * Bump jetty-servlet from 11.0.14 to 11.0.15 Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 11.0.14 to 11.0.15. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-11.0.14...jetty-11.0.15) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlet dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Bump logback-classic from 1.4.6 to 1.4.7 Bumps [logback-classic](https://github.com/qos-ch/logback) from 1.4.6 to 1.4.7. - [Release notes](https://github.com/qos-ch/logback/releases) - [Commits](https://github.com/qos-ch/logback/compare/v_1.4.6...v_1.4.7) --- updated-dependencies: - dependency-name: ch.qos.logback:logback-classic dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update s3-tests Fixes #479. * Add and ignore x-amz-api-version Fixes #497. * Cleanup the build workflow --------- Signed-off-by: dependabot[bot] Co-authored-by: Andrew Gaul Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andrew Gaul Co-authored-by: Srujan Deshpande Co-authored-by: Yann Defretin Co-authored-by: Yann Defretin Co-authored-by: Timur Alperovich --- .github/dependabot.yml | 2 +- .github/workflows/ci-main.yml | 49 +++------------ Dockerfile | 4 +- README.md | 4 ++ pom.xml | 61 ++++++------------- s3-tests | 2 +- .../java/org/gaul/s3proxy/AliasBlobStore.java | 15 ----- .../java/org/gaul/s3proxy/AwsHttpHeaders.java | 1 + .../java/org/gaul/s3proxy/S3ProxyHandler.java | 1 + src/main/resources/run-docker-container.sh | 6 +- .../org/gaul/s3proxy/AliasBlobStoreTest.java | 7 ++- .../s3proxy/EncryptedBlobStoreLiveTest.java | 9 +-- .../gaul/s3proxy/JcloudsBucketsLiveTest.java | 9 +-- .../JcloudsS3BlobIntegrationLiveTest.java | 9 +-- .../s3proxy/JcloudsS3BlobSignerLiveTest.java | 9 +-- .../gaul/s3proxy/JcloudsS3ClientLiveTest.java | 9 +-- ...JcloudsS3ContainerIntegrationLiveTest.java | 9 +-- 17 files changed, 78 insertions(+), 128 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5b063201..23a3bbe5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: - package-ecosystem: "maven" # See documentation for possible values directory: "/" # Location of package manifests schedule: - interval: "daily" + interval: "monthly" diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index c46371de..627a4efd 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -3,7 +3,6 @@ on: push: branches: - "master" - - "develop" pull_request: branches: - "*" @@ -19,7 +18,6 @@ jobs: container_version: ${{ fromJSON(steps.docker_action_meta.outputs.json).labels['org.opencontainers.image.version'] }} container_revision: ${{ fromJSON(steps.docker_action_meta.outputs.json).labels['org.opencontainers.image.revision'] }} container_base: ${{ fromJSON(steps.docker_action_meta.outputs.json).tags[0] }} - new_release_version: ${{ steps.version.outputs.new_release_version }} steps: - name: Checkout uses: actions/checkout@v3 @@ -31,9 +29,6 @@ jobs: run: echo "::set-output name=defined::true" env: MY_KEY: ${{ secrets.DOCKER_PASS }} - - uses: actions/setup-node@v2 - with: - node-version: "14" - name: Docker meta id: docker_action_meta uses: docker/metadata-action@v4.0.1 @@ -44,9 +39,7 @@ jobs: tags: | type=sha,format=long type=sha - type=semver,pattern={{version}},value=${{ steps.version.outputs.new_release_version }} - type=semver,pattern={{major}},value=${{ steps.version.outputs.new_release_version }} - type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.new_release_version }} + type=match,pattern=s3proxy-(.*),group=1 type=ref,event=branch type=ref,event=pr type=ref,event=tag @@ -60,7 +53,6 @@ jobs: with: submodules: "recursive" - # These steps are quick and will work or if fail only because of external issues - uses: actions/setup-java@v2 with: distribution: "temurin" @@ -74,7 +66,7 @@ jobs: #Run tests - name: Maven Set version run: | - mvn versions:set -DnewVersion=${{ needs.meta.outputs.new_release_version }} + mvn versions:set -DnewVersion=${{ needs.meta.outputs.version }} - name: Maven Package run: | mvn package -DskipTests @@ -99,7 +91,6 @@ jobs: runs-on: ubuntu-latest needs: [runTests, meta] steps: - #Yes we need code - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 with: @@ -109,7 +100,6 @@ jobs: with: name: pom path: . - # These steps are quick and will work or if fail only because of external issues - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx @@ -122,7 +112,7 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASS }} - - name: Login to DockerHub + - name: Login to GHCR uses: docker/login-action@v2.0.0 if: github.event_name != 'pull_request' with: @@ -130,7 +120,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - #Generate Meta - name: Build and push uses: docker/build-push-action@v3 with: @@ -145,37 +134,13 @@ jobs: REVISION=${{ needs.meta.outputs.container_revision }} cache-from: type=registry,ref=${{ needs.meta.outputs.container_base }} cache-to: type=inline - - uses: actions/setup-node@v2 - with: - node-version: "14" - - name: Setup regctl - if: github.event_name != 'pull_request' && needs.meta.outputs.dockerhub-publish == 'true' - run: | - curl -L https://github.com/regclient/regclient/releases/download/v0.3.5/regctl-linux-amd64 >/tmp/regctl - chmod 755 /tmp/regctl - - name: Docker meta - if: github.event_name != 'pull_request' && needs.meta.outputs.dockerhub-publish == 'true' - id: docker_action_meta - uses: docker/metadata-action@v4.0.1 - with: - images: andrewgaul/s3proxy - flavor: | - latest=false - tags: | - type=sha - type=semver,pattern={{version}},value=${{ needs.meta.outputs.new_release_version }} - type=semver,pattern={{major}},value=${{ needs.meta.outputs.new_release_version }} - type=semver,pattern={{major}}.{{minor}},value=${{ needs.meta.outputs.new_release_version }} - type=ref,event=branch - type=ref,event=pr - type=ref,event=tag - labels: | - org.opencontainers.image.licenses=Apache-2.0 - name: Publish to Docker if: github.event_name != 'pull_request' && needs.meta.outputs.dockerhub-publish == 'true' run: | + curl -L https://github.com/regclient/regclient/releases/download/v0.3.5/regctl-linux-amd64 >/tmp/regctl + chmod 755 /tmp/regctl for line in $CONTAINER_DEST_TAGS; do echo working on "$line"; /tmp/regctl image copy $SOURCE_CONTAINER $line; done env: - SOURCE_CONTAINER: ${{ needs.meta.outputs.new_release_version }} - CONTAINER_DEST_TAGS: ${{ steps.docker_action_meta.outputs.tags }} + SOURCE_CONTAINER: ${{ needs.meta.outputs.container_version }} + CONTAINER_DEST_TAGS: ${{ needs.meta.outputs.container_tags }} diff --git a/Dockerfile b/Dockerfile index 4378aae1..cac39f7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,8 @@ ENV \ S3PROXY_IDENTITY="local-identity" \ S3PROXY_CREDENTIAL="local-credential" \ S3PROXY_VIRTUALHOST="" \ + S3PROXY_KEYSTORE_PATH="keystore.jks" \ + S3PROXY_KEYSTORE_PASSWORD="password" \ S3PROXY_CORS_ALLOW_ALL="false" \ S3PROXY_CORS_ALLOW_ORIGINS="" \ S3PROXY_CORS_ALLOW_METHODS="" \ @@ -34,5 +36,5 @@ ENV \ JCLOUDS_KEYSTONE_PROJECT_DOMAIN_NAME="" \ JCLOUDS_FILESYSTEM_BASEDIR="/data" -EXPOSE 80 +EXPOSE 80 443 ENTRYPOINT ["/opt/s3proxy/run-docker-container.sh"] diff --git a/README.md b/README.md index a1053336..ab13d096 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,10 @@ S3Proxy can modify its behavior based on middlewares: * [read-only](https://github.com/gaul/s3proxy/wiki/Middleware-read-only) * [sharded backend containers](https://github.com/gaul/s3proxy/wiki/Middleware-sharded-backend) +## SSL Support + +S3Proxy can listen on HTTPS by setting the `secure-endpoint` and [configuring a keystore](http://wiki.eclipse.org/Jetty/Howto/Configure_SSL#Generating_Keys_and_Certificates_with_JDK_keytool). You can read more about how configure S3Proxy for SSL Support in [the dedicated wiki page](https://github.com/gaul/s3proxy/wiki/SSL-support) with Docker, Kubernetes or simply Java. + ## Limitations S3Proxy has broad compatibility with the S3 API, however, it does not support: diff --git a/pom.xml b/pom.xml index 70da7ce3..efd0fd6d 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.2.1 enforce-maven @@ -100,17 +100,17 @@ org.apache.maven.plugins maven-install-plugin - 3.0.1 + 3.1.1 org.apache.maven.plugins maven-deploy-plugin - 3.0.0 + 3.1.0 org.apache.maven.plugins maven-checkstyle-plugin - 3.1.2 + 3.2.1 check @@ -139,12 +139,12 @@ org.apache.maven.plugins maven-resources-plugin - 3.2.0 + 3.3.0 org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 ${java.version} ${java.version} @@ -153,27 +153,13 @@ -Xlint -XDcompilePolicy=simple - -Xplugin:ErrorProne - -Xep:CanIgnoreReturnValueSuggester:OFF - -Xep:DefaultCharset:OFF - -Xep:HidingField:OFF - -Xep:JavaUtilDate:OFF - -Xep:ProtectedMembersInFinalClass:OFF - - - - com.google.errorprone - error_prone_core - 2.15.0 - - org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.3.0 @@ -186,7 +172,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.5.0 attach-javadocs @@ -199,7 +185,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.3.0 + 3.4.1 package @@ -237,7 +223,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.4.1 + 3.5.0 src/main/assembly/jar-with-dependencies.xml @@ -294,7 +280,7 @@ - all + classes 1 -Xmx512m true @@ -312,14 +298,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.7.1.1 - - - com.github.spotbugs - spotbugs - 4.7.1 - - + 4.7.3.0 Max CrossSiteScripting,DefaultEncodingDetector,FindNullDeref @@ -382,10 +361,10 @@ UTF-8 11 - 2.5.0 - 1.7.36 + 2.6.0-SNAPSHOT + 2.0.7 ${project.groupId}.shaded - 2.22.2 + 3.0.0 @@ -419,7 +398,7 @@ ch.qos.logback logback-classic - 1.2.11 + 1.4.7 javax.xml.bind @@ -459,7 +438,7 @@ commons-fileupload commons-fileupload - 1.4 + 1.5 commons-codec @@ -486,12 +465,12 @@ assertj-core test - 1.7.1 + 3.24.2 org.eclipse.jetty jetty-servlet - 11.0.11 + 11.0.15 org.slf4j @@ -529,7 +508,7 @@ org.testng testng - 6.8.21 + 7.5 test diff --git a/s3-tests b/s3-tests index f5d5faf4..bae8f04c 160000 --- a/s3-tests +++ b/s3-tests @@ -1 +1 @@ -Subproject commit f5d5faf49d1efc94cd8e976ec0fac33e6ed04c4e +Subproject commit bae8f04cfa5328f608347617896890cd219c021a diff --git a/src/main/java/org/gaul/s3proxy/AliasBlobStore.java b/src/main/java/org/gaul/s3proxy/AliasBlobStore.java index b1d5797a..5ecb10c7 100644 --- a/src/main/java/org/gaul/s3proxy/AliasBlobStore.java +++ b/src/main/java/org/gaul/s3proxy/AliasBlobStore.java @@ -193,21 +193,6 @@ public boolean deleteContainerIfEmpty(String container) { return delegate().deleteContainerIfEmpty(getContainer(container)); } - @Override - public boolean directoryExists(String container, String directory) { - return delegate().directoryExists(getContainer(container), directory); - } - - @Override - public void createDirectory(String container, String directory) { - delegate().createDirectory(getContainer(container), directory); - } - - @Override - public void deleteDirectory(String container, String directory) { - delegate().deleteDirectory(getContainer(container), directory); - } - @Override public boolean blobExists(String container, String name) { return delegate().blobExists(getContainer(container), name); diff --git a/src/main/java/org/gaul/s3proxy/AwsHttpHeaders.java b/src/main/java/org/gaul/s3proxy/AwsHttpHeaders.java index 2efef2a4..f4e91873 100644 --- a/src/main/java/org/gaul/s3proxy/AwsHttpHeaders.java +++ b/src/main/java/org/gaul/s3proxy/AwsHttpHeaders.java @@ -18,6 +18,7 @@ final class AwsHttpHeaders { static final String ACL = "x-amz-acl"; + static final String API_VERSION = "x-amz-api-version"; static final String CONTENT_SHA256 = "x-amz-content-sha256"; static final String COPY_SOURCE = "x-amz-copy-source"; static final String COPY_SOURCE_IF_MATCH = "x-amz-copy-source-if-match"; diff --git a/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java b/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java index 6636cd8a..0b9cdd15 100644 --- a/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java +++ b/src/main/java/org/gaul/s3proxy/S3ProxyHandler.java @@ -163,6 +163,7 @@ public class S3ProxyHandler { /** All supported x-amz- headers, except for x-amz-meta- user metadata. */ private static final Set SUPPORTED_X_AMZ_HEADERS = ImmutableSet.of( AwsHttpHeaders.ACL, + AwsHttpHeaders.API_VERSION, AwsHttpHeaders.CONTENT_SHA256, AwsHttpHeaders.COPY_SOURCE, AwsHttpHeaders.COPY_SOURCE_IF_MATCH, diff --git a/src/main/resources/run-docker-container.sh b/src/main/resources/run-docker-container.sh index 6b4f4032..2326d8c6 100755 --- a/src/main/resources/run-docker-container.sh +++ b/src/main/resources/run-docker-container.sh @@ -1,9 +1,13 @@ #!/bin/sh exec java \ + $S3PROXY_JAVA_OPTS \ -DLOG_LEVEL="${LOG_LEVEL}" \ -Ds3proxy.endpoint="${S3PROXY_ENDPOINT}" \ + -Ds3proxy.secure-endpoint="${S3PROXY_SECURE_ENDPOINT}" \ -Ds3proxy.virtual-host="${S3PROXY_VIRTUALHOST}" \ + -Ds3proxy.keystore-path="${S3PROXY_KEYSTORE_PATH}" \ + -Ds3proxy.keystore-password="${S3PROXY_KEYSTORE_PASSWORD}" \ -Ds3proxy.authorization="${S3PROXY_AUTHORIZATION}" \ -Ds3proxy.identity="${S3PROXY_IDENTITY}" \ -Ds3proxy.credential="${S3PROXY_CREDENTIAL}" \ @@ -15,7 +19,7 @@ exec java \ -Ds3proxy.encrypted-blobstore="${S3PROXY_ENCRYPTED_BLOBSTORE}" \ -Ds3proxy.encrypted-blobstore-password="${S3PROXY_ENCRYPTED_BLOBSTORE_PASSWORD}" \ -Ds3proxy.encrypted-blobstore-salt="${S3PROXY_ENCRYPTED_BLOBSTORE_SALT}" \ - -Ds3proxy.v4-max-non-chunked-request-size="${S3PROXY_V4_MAX_NON_CHUNKED_REQ_SIZE}" \ + -Ds3proxy.v4-max-non-chunked-request-size="${S3PROXY_V4_MAX_NON_CHUNKED_REQ_SIZE:-33554432}" \ -Djclouds.provider="${JCLOUDS_PROVIDER}" \ -Djclouds.identity="${JCLOUDS_IDENTITY}" \ -Djclouds.credential="${JCLOUDS_CREDENTIAL}" \ diff --git a/src/test/java/org/gaul/s3proxy/AliasBlobStoreTest.java b/src/test/java/org/gaul/s3proxy/AliasBlobStoreTest.java index 7e817ad8..1208456d 100644 --- a/src/test/java/org/gaul/s3proxy/AliasBlobStoreTest.java +++ b/src/test/java/org/gaul/s3proxy/AliasBlobStoreTest.java @@ -123,6 +123,7 @@ public void testAliasBlob() throws IOException { createContainer(aliasContainerName); String blobName = TestUtils.createRandomBlobName(); ByteSource content = TestUtils.randomByteSource().slice(0, 1024); + @SuppressWarnings("deprecation") String contentMD5 = Hashing.md5().hashBytes(content.read()).toString(); Blob blob = aliasBlobStore.blobBuilder(blobName).payload(content) .build(); @@ -143,6 +144,7 @@ public void testAliasMultipartUpload() throws IOException { createContainer(aliasContainerName); String blobName = TestUtils.createRandomBlobName(); ByteSource content = TestUtils.randomByteSource().slice(0, 1024); + @SuppressWarnings("deprecation") HashCode contentHash = Hashing.md5().hashBytes(content.read()); Blob blob = aliasBlobStore.blobBuilder(blobName).build(); MultipartUpload mpu = aliasBlobStore.initiateMultipartUpload( @@ -156,9 +158,10 @@ public void testAliasMultipartUpload() throws IOException { parts.add(part); String mpuETag = aliasBlobStore.completeMultipartUpload(mpu, parts.build()); + @SuppressWarnings("deprecation") + HashCode contentHash2 = Hashing.md5().hashBytes(contentHash.asBytes()); assertThat(mpuETag).isEqualTo( - String.format("\"%s-1\"", - Hashing.md5().hashBytes(contentHash.asBytes()))); + String.format("\"%s-1\"", contentHash2)); blob = aliasBlobStore.getBlob(aliasContainerName, blobName); try (InputStream actual = blob.getPayload().openStream(); InputStream expected = content.openStream()) { diff --git a/src/test/java/org/gaul/s3proxy/EncryptedBlobStoreLiveTest.java b/src/test/java/org/gaul/s3proxy/EncryptedBlobStoreLiveTest.java index da328a9d..724e6c9f 100644 --- a/src/test/java/org/gaul/s3proxy/EncryptedBlobStoreLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/EncryptedBlobStoreLiveTest.java @@ -48,7 +48,7 @@ import org.jclouds.s3.domain.S3Object; import org.jclouds.s3.reference.S3Constants; import org.testng.SkipException; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @SuppressWarnings("UnstableApiUsage") @@ -64,10 +64,11 @@ public final class EncryptedBlobStoreLiveTest extends S3ClientLiveTest { private S3Proxy s3Proxy; private BlobStoreContext context; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override diff --git a/src/test/java/org/gaul/s3proxy/JcloudsBucketsLiveTest.java b/src/test/java/org/gaul/s3proxy/JcloudsBucketsLiveTest.java index fa22c0a7..376f79c0 100644 --- a/src/test/java/org/gaul/s3proxy/JcloudsBucketsLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/JcloudsBucketsLiveTest.java @@ -32,7 +32,7 @@ import org.jclouds.s3.reference.S3Constants; import org.jclouds.s3.services.BucketsLiveTest; import org.testng.SkipException; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @Test(testName = "JcloudsBucketsLiveTest") @@ -46,10 +46,11 @@ public final class JcloudsBucketsLiveTest extends BucketsLiveTest { private BlobStoreContext context; private String blobStoreType; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override diff --git a/src/test/java/org/gaul/s3proxy/JcloudsS3BlobIntegrationLiveTest.java b/src/test/java/org/gaul/s3proxy/JcloudsS3BlobIntegrationLiveTest.java index d349cb5f..bc66827b 100644 --- a/src/test/java/org/gaul/s3proxy/JcloudsS3BlobIntegrationLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/JcloudsS3BlobIntegrationLiveTest.java @@ -27,7 +27,7 @@ import org.jclouds.s3.blobstore.integration.S3BlobIntegrationLiveTest; import org.jclouds.s3.reference.S3Constants; import org.testng.SkipException; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @Test(testName = "JcloudsS3BlobIntegrationLiveTest") @@ -42,10 +42,11 @@ public final class JcloudsS3BlobIntegrationLiveTest private BlobStoreContext context; private String blobStoreType; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override diff --git a/src/test/java/org/gaul/s3proxy/JcloudsS3BlobSignerLiveTest.java b/src/test/java/org/gaul/s3proxy/JcloudsS3BlobSignerLiveTest.java index 23e49e58..6f333b38 100644 --- a/src/test/java/org/gaul/s3proxy/JcloudsS3BlobSignerLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/JcloudsS3BlobSignerLiveTest.java @@ -25,7 +25,7 @@ import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.s3.blobstore.integration.S3BlobSignerLiveTest; import org.jclouds.s3.reference.S3Constants; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @Test(testName = "JcloudsS3BlobSignerLiveTest") @@ -38,10 +38,11 @@ public final class JcloudsS3BlobSignerLiveTest extends S3BlobSignerLiveTest { private S3Proxy s3Proxy; private BlobStoreContext context; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override diff --git a/src/test/java/org/gaul/s3proxy/JcloudsS3ClientLiveTest.java b/src/test/java/org/gaul/s3proxy/JcloudsS3ClientLiveTest.java index 3602f1cb..53bf919d 100644 --- a/src/test/java/org/gaul/s3proxy/JcloudsS3ClientLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/JcloudsS3ClientLiveTest.java @@ -36,7 +36,7 @@ import org.jclouds.s3.domain.S3Object; import org.jclouds.s3.reference.S3Constants; import org.testng.SkipException; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @Test(testName = "JcloudsS3ClientLiveTest") @@ -50,10 +50,11 @@ public final class JcloudsS3ClientLiveTest extends S3ClientLiveTest { private BlobStoreContext context; private String blobStoreType; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override diff --git a/src/test/java/org/gaul/s3proxy/JcloudsS3ContainerIntegrationLiveTest.java b/src/test/java/org/gaul/s3proxy/JcloudsS3ContainerIntegrationLiveTest.java index 6d060b23..a19168ce 100644 --- a/src/test/java/org/gaul/s3proxy/JcloudsS3ContainerIntegrationLiveTest.java +++ b/src/test/java/org/gaul/s3proxy/JcloudsS3ContainerIntegrationLiveTest.java @@ -26,7 +26,7 @@ import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest; import org.jclouds.s3.reference.S3Constants; import org.testng.SkipException; -import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterSuite; import org.testng.annotations.Test; @Test(testName = "JcloudsS3ContainerIntegrationLiveTest") @@ -41,10 +41,11 @@ public final class JcloudsS3ContainerIntegrationLiveTest private BlobStoreContext context; private String blobStoreType; - @AfterClass - public void tearDown() throws Exception { - s3Proxy.stop(); + @AfterSuite + @Override + public void destroyResources() throws Exception { context.close(); + s3Proxy.stop(); } @Override