[PR #4] [MERGED] The s3 signingMethod parameter supports customization. #10

Closed
opened 2026-02-16 09:18:54 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-cloud-kit/pull/4
Author: @Jint-Tian
Created: 7/12/2025
Status: Merged
Merged: 7/29/2025
Merged by: @41tair

Base: mainHead: main


📝 Commits (2)

  • daa4c94 The s3 signingMethod parameter supports customization.
  • 9f0f256 default v4

📊 Changes

2 files changed (+35 additions, -7 deletions)

View changed files

📝 oss/oss.go (+1 -0)
📝 oss/s3/s3.go (+34 -7)

📄 Description

Enhancements to S3 Storage Configuration

This update improves the S3 storage configuration in the oss/oss.go and oss/s3/s3.go files by introducing support for the SignatureVersion parameter. The changes include:

  • Added SignatureVersion string to the s3 struct in oss/oss.go to allow specification of the signature version.
  • Updated NewS3Storage in oss/s3/s3.go to accept and pass the SignatureVersion from the input arguments.
  • Implemented conditional credential handling based on SignatureVersion:
    • If set to 'unsigned', uses aws.AnonymousCredentials.
    • Otherwise, defaults to aws.NewStaticCredentialsProvider with the provided credentials.
  • Introduced a normalizeSignatureVersion function to standardize input values, mapping 'unsigned' to "" and defaulting to "v4" for other cases.
  • Enhanced the endpoint resolver to incorporate the SignatureVersion and SigningMethod for customized S3 operations.

These modifications provide greater flexibility and control over S3 storage configurations, supporting both unsigned access and standard signed requests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-cloud-kit/pull/4 **Author:** [@Jint-Tian](https://github.com/Jint-Tian) **Created:** 7/12/2025 **Status:** ✅ Merged **Merged:** 7/29/2025 **Merged by:** [@41tair](https://github.com/41tair) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`daa4c94`](https://github.com/langgenius/dify-cloud-kit/commit/daa4c94967640cd71f8d569cdfe24e024f8c089f) The s3 signingMethod parameter supports customization. - [`9f0f256`](https://github.com/langgenius/dify-cloud-kit/commit/9f0f256c350b94c6a59a289bb8441be66d0d04a2) default v4 ### 📊 Changes **2 files changed** (+35 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `oss/oss.go` (+1 -0) 📝 `oss/s3/s3.go` (+34 -7) </details> ### 📄 Description # Enhancements to S3 Storage Configuration This update improves the S3 storage configuration in the `oss/oss.go` and `oss/s3/s3.go` files by introducing support for the `SignatureVersion` parameter. The changes include: - Added `SignatureVersion string` to the `s3` struct in `oss/oss.go` to allow specification of the signature version. - Updated `NewS3Storage` in `oss/s3/s3.go` to accept and pass the `SignatureVersion` from the input arguments. - Implemented conditional credential handling based on `SignatureVersion`: - If set to `'unsigned'`, uses `aws.AnonymousCredentials`. - Otherwise, defaults to `aws.NewStaticCredentialsProvider` with the provided credentials. - Introduced a `normalizeSignatureVersion` function to standardize input values, mapping `'unsigned'` to `""` and defaulting to `"v4"` for other cases. - Enhanced the endpoint resolver to incorporate the `SignatureVersion` and `SigningMethod` for customized S3 operations. These modifications provide greater flexibility and control over S3 storage configurations, supporting both unsigned access and standard signed requests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:18:54 -05:00
yindo closed this issue 2026-02-16 09:18:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-cloud-kit#10