You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
jclouds s3 endpoint seemingly not supporting <bucketname>.s3.provider.com endpoints #759
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.
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.
Sorry for the long delay here. I traced this properly and there are two independent things going on, neither of which is fixed by the endpoint.
The endpoint must name the service, never a bucket. S3Proxy addresses the bucket itself, so whatever endpoint it is given gets the bucket appended. Running master against a backend that logs what it receives, a client request for s3://dyni-jamesd/ arrives as:
GET /dyni-jamesd?list-type=2&max-keys=1000
With JCLOUDS_ENDPOINT=https://dyni-jamesd.nyc3.digitaloceanspaces.com, DigitalOcean therefore sees https://dyni-jamesd.nyc3.digitaloceanspaces.com/dyni-jamesd?list-type=2 — the bucket named twice. That is structural rather than a missing setting, so a bucket-scoped endpoint cannot work.
My suggestion of jclouds.s3.virtual-host-buckets=true was wrong and could not have helped: it moves the bucket into the hostname, which would have produced dyni-jamesd.dyni-jamesd.nyc3.digitaloceanspaces.com. That property no longer exists in the upcoming 4.0.0, which replaces the jclouds providers with the AWS SDK and always uses path-style addressing for non-AWS endpoints.
The 403 from s3cmd ls s3:// is your credential, not the endpoint. Your output shows it failing with both endpoints, while s3cmd ls s3://dyni-jamesd/ succeeds with the regional one — so the bucket-scoped key is allowed to list that bucket but not to list the account's buckets. S3Proxy passes the backend's error through untouched; I confirmed that a backend answering 403 to GET / produces exactly the 403 you saw, while the bucket listing returns 200 in the same run.
So the configuration you already found is the correct one: keep JCLOUDS_ENDPOINT=https://nyc3.digitaloceanspaces.com and address the bucket by name.
On being "in the correct root directory": S3 has no way to express this. Objects cannot live at the root of an endpoint, and ls s3:// is ListBuckets by definition, so the closest equivalent is having that call return just the bucket you can use.
Activity
gaul commentedon Jan 11, 2025
What does your
s3proxy.conflook like? Do you use thes3provider (correct) or theaws-s3provider (incorrect)?Jayd603 commentedon Jan 11, 2025
the s3 provider (not AWS). pretty basic config using the docker container:
gaul commentedon Jan 12, 2025
Could you try setting
jclouds.s3.virtual-host-buckets=trueins3proxy.conf?Jayd603 commentedon 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.
gaul commentedon Aug 2, 2026
Sorry for the long delay here. I traced this properly and there are two independent things going on, neither of which is fixed by the endpoint.
The endpoint must name the service, never a bucket. S3Proxy addresses the bucket itself, so whatever endpoint it is given gets the bucket appended. Running master against a backend that logs what it receives, a client request for
s3://dyni-jamesd/arrives as:With
JCLOUDS_ENDPOINT=https://dyni-jamesd.nyc3.digitaloceanspaces.com, DigitalOcean therefore seeshttps://dyni-jamesd.nyc3.digitaloceanspaces.com/dyni-jamesd?list-type=2— the bucket named twice. That is structural rather than a missing setting, so a bucket-scoped endpoint cannot work.My suggestion of
jclouds.s3.virtual-host-buckets=truewas wrong and could not have helped: it moves the bucket into the hostname, which would have produceddyni-jamesd.dyni-jamesd.nyc3.digitaloceanspaces.com. That property no longer exists in the upcoming 4.0.0, which replaces the jclouds providers with the AWS SDK and always uses path-style addressing for non-AWS endpoints.The 403 from
s3cmd ls s3://is your credential, not the endpoint. Your output shows it failing with both endpoints, whiles3cmd ls s3://dyni-jamesd/succeeds with the regional one — so the bucket-scoped key is allowed to list that bucket but not to list the account's buckets. S3Proxy passes the backend's error through untouched; I confirmed that a backend answering 403 toGET /produces exactly the 403 you saw, while the bucket listing returns 200 in the same run.So the configuration you already found is the correct one: keep
JCLOUDS_ENDPOINT=https://nyc3.digitaloceanspaces.comand address the bucket by name.On being "in the correct root directory": S3 has no way to express this. Objects cannot live at the root of an endpoint, and
ls s3://is ListBuckets by definition, so the closest equivalent is having that call return just the bucket you can use.