craftcms / aws-s3

Amazon S3 volume type for Craft CMS.
https://plugins.craftcms.com/aws-s3
MIT License
60 stars 28 forks source link

No support for S3-compatible object storage (e.g: Wasabi)? Getting STS related error when trying #171

Open rija opened 7 months ago

rija commented 7 months ago

Description

Hello,

we are trying to setup Craft assets to use Wasabi, which is a S3-compatible object storage service. We have installed the aws-s3 plugin to that effect. When we trigger the uploading of the asset we get an error

Error executing "GetSessionToken" on "https://sts.amazonaws.com"; AWS HTTP error: Client error: `POST https://sts.amazonaws.com` resulted in a `403 Forbidden` response: <ErrorResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/"> <Error> <Type>Sender</Type> <Code>InvalidCli (truncated...) InvalidClientTokenId (client): The security token included in the request is invalid.

Which kind of make sense given the connection details we are supplying are for a Wasabi S3 endpoint.

Being S3-compatible, Wasabi does support the STS related idioms like GetSessionToken

When reading the aws-s3 documentation, I didn't see any references on specifying endpoints, so the AWS ones are probably hard-coded.

Could you consider adding such support? A lot of big object storage services offers an S3-compatible API and for organisations like us who do multi-cloud a lot, we benefit from that facility.

Best.

Steps to reproduce

  1. Configure aws-s3 with following values:

    OBJECT_STORAGE_ENDPOINT="https://s3.ap-northeast-1.wasabisys.com/"
    OBJECT_STORAGE_BUCKET="cms-assets"
    OBJECT_STORAGE_KEY="xxxx"
    OBJECT_STORAGE_SECRET_KEY="xxxxxxxxxx"
    OBJECT_STORAGE_REGION="ap-northeast-1"
    OBJECT_STORAGE_SUBPATH="/dev"
  2. Setup an asset that use the object storage file system

  3. Create an entry type that has an image field with an asset location set to the above asset

  4. Make a new entry, upload a file and save the form

Additional info

mightyfineyall commented 2 months ago

Any updates on this? We'd like to use Vultr s3 compatible object storage and I think it would cause the same issue.

daltonrooney commented 1 month ago

This issue appears to be a duplicate of https://github.com/craftcms/aws-s3/issues/67, which has remained open for nearly 5 years, so I'm guessing it's not a priority. 🤔

We've been using the Fortrabbit Object Storage plugin with Backblaze B2. It works well, for the most part, although I would love to see a first party S3-compatible storage plugin.

Kristomen commented 2 weeks ago

This issue appears to be a duplicate of #67, which has remained open for nearly 5 years, so I'm guessing it's not a priority. 🤔

We've been using the Fortrabbit Object Storage plugin with Backblaze B2. It works well, for the most part, although I would love to see a first party S3-compatible storage plugin.

I have installed and configured Fortrabbit Object Storage in CraftCMS 5, but it is not working properly. Here are the issues I am facing:

There is no official plugin that supports MinIO or other S3-compatible services.

I have verified the permissions, and they are correct. I should mention that when I had CraftCMS 4 and the "Generic Object Storage Volume" plugin, it worked. Additionally, I checked using Rclone Browser, through which I can browse files, upload, and delete without any issues.