Support S3 Compatible Blob Storage Providers#22962
Merged
Merged
Conversation
- Introduced a new property `ServiceURL` in `AwsBlobProviderConfiguration` to allow custom service URLs for S3-compatible APIs like MinIO and DigitalOcean Spaces. - Updated `AwsBlobProviderConfigurationNames` to include the new `ServiceURL` constant. - Modified `DefaultAmazonS3ClientFactory` to utilize the `ServiceURL` when creating the S3 client configuration, enabling support for custom endpoints.
…ientFactory - Created `AwsBlobProviderConfiguration_Tests` to validate ServiceURL setting and retrieval. - Implemented `DefaultAmazonS3ClientFactory_Tests` to ensure S3 client creation with and without custom ServiceURL. - Tests cover scenarios for both S3-compatible services and default AWS S3 behavior.
- Updated the AWS provider documentation to clarify support for S3-compatible storage services, including MinIO, DigitalOcean Spaces, and others. - Added details on configuring the `ServiceURL` property for S3-compatible APIs. - Included example configurations for MinIO, DigitalOcean Spaces, and Wasabi to assist users in setting up their environments.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for S3-compatible blob storage providers by introducing a custom ServiceURL configuration to the AWS provider. Key changes include:
- Adding a new ServiceURL property and corresponding constant to the AWS provider configuration.
- Updating the DefaultAmazonS3ClientFactory to construct the S3 client using a custom client configuration if ServiceURL is provided.
- Enhancing tests and documentation to cover both scenarios with and without a custom ServiceURL.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo/Abp/BlobStoring/Aws/DefaultAmazonS3ClientFactory_Tests.cs | Added tests to verify S3 client creation with and without a custom ServiceURL. |
| framework/test/Volo.Abp.BlobStoring.Aws.Tests/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration_Tests.cs | Introduced tests to validate setting and retrieving the ServiceURL. |
| framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/DefaultAmazonS3ClientFactory.cs | Updated S3 client factory to take advantage of the new ServiceURL configuration. |
| framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfigurationNames.cs | Declared a constant for the ServiceURL configuration key. |
| framework/src/Volo.Abp.BlobStoring.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs | Added the ServiceURL property with appropriate documentation. |
| docs/en/framework/infrastructure/blob-storing/index.md | Updated documentation to mention S3 compatibility via ServiceURL configuration. |
| docs/en/framework/infrastructure/blob-storing/aws.md | Enhanced documentation to include detailed examples for configuring S3-compatible services. |
Member
Author
|
AWS SDK v4.0 is not compatible with 3rd party S3 APIs yet due to Payload Signing and SignCheck. ( |
maliming
reviewed
Jul 17, 2025
- Add DisablePayloadSigning configuration to send UNSIGNED-PAYLOAD instead of streaming chunked signature, required by R2 - Make CreateS3ClientConfig async to allow subclasses to do I/O - Document trailing-slash behavior of ServiceURL - Extend test module to use external bucket with per-run prefix cleanup - Document DisablePayloadSigning in aws.md and link from index.md
- Skip container wiring in test module when AWS credentials are absent - Dispose AmazonS3Client in test cleanup - Validate Region or ServiceURL early in DefaultAmazonS3ClientFactory - Normalize trailing slash in ServiceURL test assertions - Clarify Region and ServiceURL coupling in XML docs and aws.md
- Clear configuration entry when Region or ServiceURL is set to null - Annotate DeleteObjectsAsync prefix and continuationToken as nullable - Replace vague Region placeholder in aws.md example
maliming
approved these changes
Jun 1, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #22962 +/- ##
==========================================
+ Coverage 49.40% 49.44% +0.04%
==========================================
Files 3670 3670
Lines 123599 123638 +39
Branches 9453 9459 +6
==========================================
+ Hits 61068 61137 +69
+ Misses 60711 60664 -47
- Partials 1820 1837 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
ServiceURLandDisablePayloadSigningconfiguration to the AWS Blob provider so it works with S3-compatible services (Cloudflare R2, MinIO, Backblaze B2, Wasabi, DigitalOcean Spaces).DisablePayloadSigning = truemakes the SDK sendUNSIGNED-PAYLOADinstead of the streaming chunked signature that AWS SDK v4 uses by default. Required for Cloudflare R2 (rejects streaming signing with501 NotImplemented); leavefalsefor AWS S3 and MinIO.Test module reads
ServiceURL/DisablePayloadSigning/ContainerName/CreateContainerIfNotExistsfrom user secrets, so the existingBlobContainer_Testsbase can target any S3-compatible service. WhenContainerNameis supplied the test prefixes every object withabp-aws-test-run-{guid}/so cleanup deletes only what this run created.Locally tested end-to-end against a real Cloudflare R2 bucket and a Docker MinIO instance — both pass the full Save / Get / Delete / Exists / multi-tenant integration suite.
Closes #25503.