Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework presign function to allow signature of clients with dedicated endpoint #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nemunaire
Copy link

Hi,

It is not possible to use the presign function with custom endpoint (non-AWS), especially with endpoint that includes bucket name in path instead of virtual host: the hostname is systematically tweaked to add the unwanted bucket name.
See knadh/listmonk#1782

Here is a patch to allow this library to presign URL for Minio and other non-AWS S3 providers. Perhaps it lacks a force_path_style attribute something to mock the aws library behavior in this case.

As the Endpoint (in fact hostname) is redundant in presign request, I remove it in favor of the endpoint given in the s3 client.

Tested with Minio and Oracle Cloud Infrastructure, should be tested with AWS S3 (I don't have an account).

@nemunaire nemunaire changed the title Rework presign to allow signature of endpoint given clients Rework presign function to allow signature of clients with dedicated endpoint Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant