S3Mock

A simple mock implementation of the AWS S3 API startable as Docker image, TestContainer, JUnit 4 rule, JUnit Jupiter extension or TestNG listener

APACHE-2.0 License

Stars
785

Bot releases are visible (Hide)

S3Mock - 2.5.0

Published by afranken about 2 years ago

  • Features and fixes
    • Add Spring Component Index to S3Mock (fixes #751)
    • Bucket lifecycle
      • S3Mock now validates incoming Bucket names.
        • S3 SDKs (for Java) validated the names before sending, so this should not matter for most use-cases.
      • S3Mock now throws errors on duplicate creation (409 Conflict) / deletion (404 Not Found)
        • These errors are defined in the S3 API, the S3Mock just never implemented them.
    • DTOs
      • Fix names, methods, return values to match AWS API
      • Remove internal field "path" from Bucket serializations. Fortunately this did not break AWS SDKs in the past, since the "path" field is not expected in those responses.
    • Various other fixes like
      • Removal of duplicated / simplification of code where possible
      • Add (hopefully useful?) logging with all incoming parameters on errors.
      • Fix IntelliJ IDEA warnings
      • Better assertions in tests
      • Fix various JavaDoc issues, add links to S3 API where possible
  • Refactorings
    • Major refactoring towards smaller classes with well-defined responsibilities.
      • Many of the existing lines of code in the S3Mock core were changed, moved or removed.
      • All IntegrationTests were/are still green, HTTP API did not change (other than fixed listed above)
    • Refactor into layers Controller -> Service -> Store
      • Controllers handle request/response only, Services implement higher level functionality on top of their stores, Stores read and write data from/to disk.
      • Handle Multipart requests in MultipartController -> MultipartService -> MultipartStore
      • Handle Bucket requests in BucketController -> BucketService -> BucketStore
      • Handle Object requests in ObjectController -> ObjectService -> ObjectStore
      • Code and documentation cleanup
      • Let BucketStore store BucketMetadata just like S3ObjectMetadata locally. For now, only store the "core" metadata like creationDate and name.
      • Store object keys in BucketMetadata, assign UUIDs (fixes #94)
      • Store objects in UUID folders, clean up name usage
    • Extract header helper methods into HeaderUtil from FileStoreController / ObjectController.
  • Version updates
    • Bump maven-javadoc-plugin from 3.4.0 to 3.4.1
    • Bump aws-v2.version from 2.17.248 to 2.17.263
    • Bump aws-java-sdk-s3 from 1.12.278 to 1.12.292
    • Bump checkstyle from 10.3.2 to 10.3.3
    • Bump maven-checkstyle-plugin from 3.1.2 to 3.2.0
    • Bump spring-boot.version from 2.7.2 to 2.7.3
S3Mock - 2.4.16

Published by afranken about 2 years ago

  • Features and fixes
    • Fix ListMultiPartUploads for Amazon SDK Java v2 (fixes #734)
  • Refactorings
    • Add Maven Wrapper for reliable builds
    • Add Spring Boot "devtools" for better local development
    • Add "debug" profile that logs request output and enables JMX and all actuator endpoints
  • Version updates
    • Bump aws-java-sdk-s3 from 1.12.267 to 1.12.278
    • Bump aws-v2.version from 2.17.239 to 2.17.248
    • Bump docker-maven-plugin from 0.40.1 to 0.40.2
    • Bump alpine from 3.16.1 to 3.16.2 in /docker
    • Bump checkstyle from 10.3.1 to 10.3.2
S3Mock - 2.4.14

Published by afranken about 2 years ago

  • Features and fixes
    • Fix broken SSL handshake (fixes #706)
    • Fix KMS key handling (fixes #702)
    • Allow listing a MultiPartUpload with no parts (fixes #694)
  • Refactorings
    • Add sortpom-maven-plugin, run sortpom
      • To run manually, execute mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort
    • Enable Kotlin compiler for integration-tests only.
  • Version updates
    • Bump alpine from 3.16.0 to 3.16.1 in /docker
    • Bump aws-java-sdk-s3 from 1.12.240 to 1.12.267
    • Bump aws-v2.version from 2.17.211 to 2.17.239
    • Bump spring-boot.version from 2.7.0 to 2.7.2
    • Bump kotlin.version from 1.7.0 to 1.7.10
    • Bump testng from 7.6.0 to 7.6.1
    • Bump testcontainers.version from 1.17.2 to 1.17.3
    • Bump checkstyle from 10.3 to 10.3.1
    • Bump maven-deploy-plugin from 3.0.0-M2 to 3.0.0
    • Bump docker-maven-plugin from 0.40.0 to 0.40.1
    • Bump sortpom-maven-plugin from 3.1.3 to 3.2.0
    • Bump maven-install-plugin from 3.0.0-M1 to 3.0.1
    • Bump maven-resources-plugin from 3.2.0 to 3.3.0
    • Bump exec-maven-plugin from 3.0.0 to 3.1.0
S3Mock - 2.4.13

Published by afranken over 2 years ago

  • Features and fixes
    • Adds missing x-amz-server-side-encryption and x-amz-server-side-encryption-aws-kms-key-id header (fixes #639)
  • Version updates
    • Bump alpine from 3.15.4 to 3.16.0 in /docker
    • Bump aws-java-sdk-s3 from 1.12.212 to 1.12.240
    • Bump aws-v2.version from 2.17.182 to 2.17.211
    • Bump spring-boot.version from 2.6.7 to 2.7.0
    • Bump kotlin.version from 1.6.21 to 1.7.0
    • Bump testng from 7.5 to 7.6.0
    • Bump docker/setup-qemu-action from 1 to 2
    • Bump checkstyle from 10.2 to 10.3
    • Bump docker-maven-plugin from 0.39.1 to 0.40.0
    • Bump maven-failsafe-plugin from 3.0.0-M6 to 3.0.0-M7
    • Bump maven-surefire-plugin from 3.0.0-M6 to 3.0.0-M7
    • Bump maven-release-plugin from 3.0.0-M5 to 3.0.0-M6
    • Bump maven-enforcer-plugin from 3.0.0 to 3.1.0
S3Mock - 2.4.10

Published by afranken over 2 years ago

  • Features and fixes
    • ListParts returns 404 on unknown upload id (fixes #475)
    • Allow CopyObject of key to same key in the same bucket (fixes #468)
    • Fix handling of userMetadata in CopyObject REPLACE and COPY cases (fixes #468 again, fixes #569)
    • Add multipart tests for "small" last part (fixes #524)
  • Refactorings
    • Migrate integration tests to kotlin
  • Version updates
    • Bump alpine from 3.15.0 to 3.15.4 in /docker
    • Bump aws-java-sdk-s3 from 1.12.170 to 1.12.212
    • Bump aws-v2.version from 2.17.141 to 2.17.182
    • Bump spring-boot.version from 2.6.3 to 2.6.7
    • Bump spring-security-oauth2 from 2.5.1.RELEASE to 2.5.2.RELEASE
    • Bump testcontainers.version from 1.16.3 to 1.17.1
    • Bump maven-surefire-plugin from 3.0.0-M5 to 3.0.0-M6
    • Bump maven-failsafe-plugin from 3.0.0-M5 to 3.0.0-M6
    • Bump maven-compiler-plugin from 3.10.0 to 3.10.1
    • Bump maven-clean-plugin from 3.1.0 to 3.2.0
    • Bump maven-dependency-plugin from 3.2.0 to 3.3.0
    • Bump kotlin.version from 1.6.10 to 1.6.21
    • Bump maven-javadoc-plugin from 3.3.2 to 3.4.0
    • Bump checkstyle from 9.3 to 10.2
S3Mock - 2.4.9

Published by afranken over 2 years ago

  • Verify source key exists on CopyObject and CopyObjectPart (fixes #459)
  • Various refactorings
    • Tagging does not have a "versionId" property in S3 API.
    • CompleteMultipartUpload children are of type "CompletedPart".
    • BatchDeleteResponse children are of type "DeletedObject".
    • DeleteResult contains Error elements for failed deletes.
    • Fixed JavaDoc of various classes and methods
    • Add deprecation notice / documentation (fixes #418)
    • Remove unnecessary methods and constructors
    • Rename classes to better match their counterpart in S3 API
    • Convert Integration Test to Kotlin
  • Various patch and minor version updates:
    • Bump aws-java-sdk-s3 from 1.12.162 to 1.12.170
    • Bump aws-v2.version from 2.17.133 to 2.17.141
    • Bump docker-maven-plugin from 0.39.0 to 0.39.1
S3Mock - 2.4.8

Published by afranken over 2 years ago

  • Let S3Mock run with custom application.properties on classpath (fixes #434)
  • Change Docker image entrypoint to exec form (fixes #421)
  • Various patch and minor version updates:
    • Bump aws-java-sdk-s3 from 1.12.150 to 1.12.162
    • Bump aws-v2.version from 2.17.120 to 2.17.133
    • Bump docker-maven-plugin from 0.38.1 to 0.39.0
    • Bump maven-javadoc-plugin from 3.3.1 to 3.3.2
    • Bump maven-compiler-plugin from 3.9.0 to 3.10.0
S3Mock - 2.4.7

Published by afranken over 2 years ago

  • getObjectTagging incorrectly returns JSON instead of XML (fixes #406)
S3Mock - 2.4.6

Published by afranken over 2 years ago

  • Docker image is now available as multi arch for both amd64 and arm64 platforms.
S3Mock - 2.4.1

Published by afranken over 2 years ago

  • Make contextPath of FileStoreController configurable (Fixes #388)
  • Add multi-part upload checks, S3 has a minimum size allowed of 5MB (Fixes #392)
  • Handle Content-MD5 header. (Fixes #208)
  • Etags are Hex encoded digests. (Fixes #208)
  • Various refactorings
    • Introduce @Configuration for packages.
    • Move all remaining DTOs to "dto" package.
    • Rename "domain" package to "store".
    • Reduced visibility of some classes and methods to package / private.
    • Use Java 17 for CI and release.
  • Various patch and minor version updates:
    • Bump aws-java-sdk-s3 from 1.12.131 to 1.12.150
    • Bump aws-v2.version from 2.17.102 to 2.17.120
    • Bump xmlunit-assertj3 from 2.8.4 to 2.9.0
    • Bump spring-boot.version from 2.6.2 to 2.6.3
    • Bump testcontainers.version from 1.16.2 to 1.16.3
    • Bump maven-compiler-plugin from 3.8.1 to 3.9.0
    • Bump maven-release-plugin from 3.0.0-M4 to 3.0.0-M5
    • Bump maven-jar-plugin from 3.2.0 to 3.2.2
    • Bump testng from 7.4.0 to 7.5
S3Mock - 2.3.3

Published by afranken almost 3 years ago

  • Fix MultipartUpload without range (fixes #341)
  • Treat empty delimiter as null (fixes #306)
  • Fix -DskipDocker (fixes #344)
  • Various patch and minor version updates:
    • Bump maven-deploy-plugin from 3.0.0-M1 to 3.0.0-M2
    • Bump spring-boot.version from 2.6.1 to 2.6.2
    • Bump aws-java-sdk-s3 from 1.12.130 to 1.12.131
    • Bump checkstyle from 9.2 to 9.2.1
S3Mock - 2.3.2

Published by afranken almost 3 years ago

  • Set only one CORS header (fixes #74 - again)
  • Using official Alpine Docker container with JDK17 from APK to run alpine:3.15.0
    • This is in preparation of multi-arch release
  • Add examples for validKmsKeys and initialBuckets configuration (fixes #322)
  • Added dependabot, merged various patch and minor version updates:
    • Bump spring-boot from 2.3.12.RELEASE to 2.6.1
    • Bump aws-v2 from 2.17.73 to 2.17.102
    • Bump aws-java-sdk-s3 from 1.12.15 to 1.12.130
    • Bump commons-io from 2.10.0 to 2.11.0
    • Bump jaxb-api from 2.3.0 to 2.3.1
    • Bump checkstyle from 8.44 to 9.2
    • Bump xmlunit-assertj3 from 2.8.2 to 2.8.4
    • Bump maven-resources-plugin from 3.1.0 to 3.2.0
    • Bump maven-checkstyle-plugin from 3.1.1 to 3.1.2
    • Bump maven-enforcer-plugin from 3.0.0-M3 to 3.0.0
    • Bump maven-javadoc-plugin from 3.2.0 to 3.3.1
    • Bump docker-maven-plugin from 0.36.1 to 0.38.1
    • Bump Log4j2 to 2.15.0 (not actively used, just in case)
S3Mock - 2.2.3

Published by afranken almost 3 years ago

  • Set bucket for multipart uploads, return by bucket. (Fixes #292)
S3Mock - 2.2.2

Published by afranken about 3 years ago

  • Adds option "retainFilesOnExit" to keep files after exit. Default is to remove all files. (Fixes #286)
  • Fixes ignored "root" environment variable in Docker (Fixes #289)
  • Support CORS headers from any host (fixes #74)
S3Mock - 2.2.1

Published by afranken about 3 years ago

  • Fixes copy part / copy object encoding issues (Fixes #279)
S3Mock - 2.2.0

Published by afranken about 3 years ago

S3Mock - 2.1.36

Published by afranken over 3 years ago

  • Delete all files on JVM shutdown (Fixes #249)
  • Extract Docker build and integration tests to separate modules
  • Docker build and integration test is now optional, run with "-DskipDocker" to skip the Docker build and the integration tests. (Fixes #235)
S3Mock - 2.1.34

Published by afranken over 3 years ago

  • ETag value in response body now enclosed in quotation marks
  • All dates are formatted in UTC timezone (Fixes #203)
  • "CommonPrefixes" are now serialized als multiple elements containing one "Prefix" (Fixes #215)
  • Removed several superfluous / erroneous elements like "truncated" or "part" from various responses
S3Mock - 2.1.33

Published by afranken over 3 years ago

  • Updated spring-boot to 2.3.12.RELEASE
  • Updated aws-java-sdk-s3 to 1.12.15
  • Updated awssdk V2 to 2.16.93
  • Updated commons-codec to 1.15
  • Updated commons-io to 2.10.0
  • Updated junit-jupiter to 5.7.0
  • Updated testng to 7.4.0
  • Updated base Docker image to alpine-3.13_glibc-2.33
  • Updated JDK bundled in Docker image to 11.0.11_9
  • Removed unneeded junit-bom import
  • Updated checkstyle to 8.44
  • Fixed potential NPE in FileStore
S3Mock - 2.1.32

Published by afranken over 3 years ago

  • Fixes getS3Object with absolute path (Fixes #245 and #248)