SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
s3tables: align getPrincipalFromRequest with account ID for IAM compatibility
Chris Lua689c1e05210
diff --git a/weed/s3api/s3tables/handler.go b/weed/s3api/s3tables/handler.goindex 57a2cd16e1..428315fee8 100644--- a/weed/s3api/s3tables/handler.go+++ b/weed/s3api/s3tables/handler.go@@ -154,17 +154,14 @@ func (h *S3TablesHandler) HandleRequest(w http.ResponseWriter, r *http.Request,// Principal/authorization helpersfunc (h *S3TablesHandler) getPrincipalFromRequest(r *http.Request) string {- // Prioritize identity from context (set by IAM middleware)- if identityName := s3_constants.GetIdentityNameFromContext(r); identityName != "" {- return identityName- }-- // Fallback to the authenticated account ID+ // Prefer the authenticated account ID from the request header. This is the same+ // identifier used as the "owner" in permission checks, so keeping them aligned+ // avoids mismatches (e.g. username vs. account ID) when IAM is enabled.if accountID := r.Header.Get(s3_constants.AmzAccountId); accountID != "" {return accountID}- // Default to handler's default account ID+ // Default to handler's configured account IDreturn h.accountID}