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

jclouds s3 endpoint seemingly not supporting <bucketname>.s3.provider.com endpoints #759

Open
Jayd603 opened this issue Jan 11, 2025 · 4 comments

Comments

@Jayd603
Copy link

Jayd603 commented Jan 11, 2025

I am testing this with digital ocean spaces. They support assigning a unique access key to one bucket and the endpoint given is bucketname.nyc3.digitaloceanspaces.com ... I am getting access denied when using that as an endpoint. When I use just nyc3.digitaloceanspaces.com then I can work with the bucket but need to call it directly with s3cmd ls s3://bucketname/ etc.

Not a big deal at all, just curious if this is supposed to work or not. It would be just slightly nicer to be in the correct root directory and not have to reference the bucket.

@gaul
Copy link
Owner

gaul commented Jan 11, 2025

What does your s3proxy.conf look like? Do you use the s3 provider (correct) or the aws-s3 provider (incorrect)?

@Jayd603
Copy link
Author

Jayd603 commented Jan 11, 2025

the s3 provider (not AWS). pretty basic config using the docker container:

docker run -d --restart=unless-stopped --net=host --name=s3-jamesd -e S3PROXY_AUTHORIZATION=aws-v2-or-v4 -e S3PROXY_IDENTITY=jamesd -e S3PROXY_CREDENTIAL='xxx' -e S3PROXY_ENDPOINT="http://127.0.0.1:32335" -e S3PROXY_CORS_ALLOW_ALL="true" -e S3PROXY_IGNORE_UNKNOWN_HEADERS="true" -e JCLOUDS_PROVIDER="s3" -e S3PROXY_V4_MAX_NON_CHUNKED_REQ_SIZE="310000000" -e JCLOUDS_ENDPOINT="https://bucketname.nyc3.digitaloceanspaces.com" -e JCLOUDS_IDENTITY="xxx" -e JCLOUDS_CREDENTIAL="xxx" andrewgaul/s3proxy:latest

when using the bucketname in the endpoint:
jd@jd-desktop-1:~/Apps$ s3cmd ls s3://
ERROR: S3 error: 403 (AccessDenied): Forbidden
jd@jd-desktop-1:~/Apps$ s3cmd ls s3://dyni-jamesd/
ERROR: Access to bucket 'dyni-jamesd' was denied
ERROR: S3 error: 403 (AccessDenied): Forbidden

when not using it:
jd@jd-desktop-1:~/Apps$ s3cmd ls s3://
ERROR: S3 error: 403 (AccessDenied): Forbidden
jd@jd-desktop-1:~/Apps$ s3cmd ls s3://dyni-jamesd/
                          DIR  s3://dyni-jamesd/Backups/
jd@jd-desktop-1:~/Apps$

@gaul
Copy link
Owner

gaul commented Jan 12, 2025

Could you try setting jclouds.s3.virtual-host-buckets=true in s3proxy.conf?

@Jayd603
Copy link
Author

Jayd603 commented Jan 12, 2025

I set that and it is listed in the process list in the docker container -Djclouds.s3.virtual-host-buckets=true and I am seeing the same behavior as before.

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

No branches or pull requests

2 participants