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

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

Open
rija opened this issue Nov 16, 2023 · 3 comments
Labels

Comments

@rija
Copy link

rija commented Nov 16, 2023

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"
  1. Setup an asset that use the object storage file system
  2. Create an entry type that has an image field with an asset location set to the above asset
  3. Make a new entry, upload a file and save the form

Additional info

  • Craft version: 4.5.6.1
  • PHP version: 8.2.10
  • Database driver & version: PostgreSQL 15.4
  • Plugins & versions: Amazon S3 2.0.3
@rija rija added the bug label Nov 16, 2023
@mightyfineyall
Copy link

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

@daltonrooney
Copy link

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.

@Kristomen
Copy link

Kristomen commented Jun 12, 2024

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:
- Folders are being deleted only in CraftCMS, but not on the object storage server. There are no errors during deletion. Delete files works
- The Assets index is not functioning correctly. There are no errors, but the Fortrabbit Object Storage system does not see previously uploaded files on the MinIO server.
- Uploading files to the MinIO server works!
- There are no errors in the CraftCMS logs.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants