mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 08:31:53 -05:00
S3 answers a bucket only in its own Region. A SigV4 request signed for another Region now gets 301 PermanentRedirect with the bucket's Region in x-amz-bucket-region and Bucket and Endpoint in the error, and a HEAD gets the status and header with no body, which is what the SDKs' redirect handling follows. ListBuckets, GetBucketLocation and CreateBucket are served from every Region, and unsigned, presigned and SigV4A requests and buckets in another partition are served as before. A bucket stored without a Region is redirected from the default one, where ListBuckets reports it. floci-duck now signs each bucket's requests for that bucket's Region through temporary DuckDB secrets that end with the request, so Athena, S3 Select, Redshift and the CUR reports keep reading and writing buckets outside the default Region. floci.services.s3.region-redirect (FLOCI_SERVICES_S3_REGION_REDIRECT, default true) turns the redirect off. Signed-off-by: Hector Ventura <hectorvent@gmail.com>