Skip to content

Support S3 Compatible Blob Storage Providers#22962

Merged
maliming merged 10 commits into
devfrom
aws-service-url
Jun 1, 2026
Merged

Support S3 Compatible Blob Storage Providers#22962
maliming merged 10 commits into
devfrom
aws-service-url

Conversation

@enisn

@enisn enisn commented May 26, 2025

Copy link
Copy Markdown
Member

Adds ServiceURL and DisablePayloadSigning configuration to the AWS Blob provider so it works with S3-compatible services (Cloudflare R2, MinIO, Backblaze B2, Wasabi, DigitalOcean Spaces).

DisablePayloadSigning = true makes the SDK send UNSIGNED-PAYLOAD instead of the streaming chunked signature that AWS SDK v4 uses by default. Required for Cloudflare R2 (rejects streaming signing with 501 NotImplemented); leave false for AWS S3 and MinIO.

Test module reads ServiceURL / DisablePayloadSigning / ContainerName / CreateContainerIfNotExists from user secrets, so the existing BlobContainer_Tests base can target any S3-compatible service. When ContainerName is supplied the test prefixes every object with abp-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.

enisn added 4 commits May 26, 2025 15:15
- 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.
@enisn enisn requested review from hikalkan and maliming May 26, 2025 12:27
@enisn enisn added the feature label May 26, 2025
@enisn enisn added this to the 10.0-preview milestone May 26, 2025
@enisn enisn requested a review from Copilot May 26, 2025 12:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@enisn enisn marked this pull request as draft May 26, 2025 13:22
@enisn

enisn commented May 26, 2025

Copy link
Copy Markdown
Member Author

AWS SDK v4.0 is not compatible with 3rd party S3 APIs yet due to Payload Signing and SignCheck. (STREAMING-AWS4-HMAC-SHA256-PAYLOAD)

@ismcagdas ismcagdas modified the milestones: 10.0-preview, 10.1-preview Sep 16, 2025
@skoc10 skoc10 modified the milestones: 10.1-preview, 10.1-final Dec 30, 2025
@skoc10 skoc10 changed the base branch from dev to rel-10.1 December 30, 2025 08:22
@skoc10 skoc10 modified the milestones: 10.1-final, 10.1-patch Feb 18, 2026
@skoc10 skoc10 modified the milestones: 10.1-patch, 10.2-patch Mar 30, 2026
@skoc10 skoc10 modified the milestones: 10.2-patch, 10.2-patch-final Apr 15, 2026
@skoc10 skoc10 modified the milestones: 10.2-patch-final, backlog Apr 28, 2026
@maliming maliming removed this from the backlog milestone Jun 1, 2026
@maliming maliming added this to the 10.6-preview milestone Jun 1, 2026
- 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
@maliming maliming changed the base branch from rel-10.1 to dev June 1, 2026 05:34
@maliming maliming marked this pull request as ready for review June 1, 2026 05:35
@maliming maliming requested a review from Copilot June 1, 2026 05:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Comment thread docs/en/framework/infrastructure/blob-storing/aws.md Outdated
- 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread docs/en/framework/infrastructure/blob-storing/aws.md Outdated
- 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.

@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.50000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.44%. Comparing base (c7b7b87) to head (fd3dc1f).
⚠️ Report is 18 commits behind head on dev.

Files with missing lines Patch % Lines
...bp/BlobStoring/Aws/AwsBlobProviderConfiguration.cs 55.55% 6 Missing and 2 partials ⚠️
...bp/BlobStoring/Aws/DefaultAmazonS3ClientFactory.cs 71.42% 7 Missing and 1 partial ⚠️
...ng.Aws/Volo/Abp/BlobStoring/Aws/AwsBlobProvider.cs 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming maliming modified the milestones: 10.6-preview, 10.5-preview Jun 1, 2026
@maliming maliming merged commit 52f2d18 into dev Jun 1, 2026
6 checks passed
@maliming maliming deleted the aws-service-url branch June 1, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare R2 BLOB Storage integration

5 participants