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
s3: allow -s3.config and -s3.iam.config to work together (#7727)
Chris Lu6fb3ec968d64
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.goindex eab237b0b3..7b5d9a262f 100644--- a/weed/s3api/auth_credentials.go+++ b/weed/s3api/auth_credentials.go@@ -610,19 +610,19 @@ func (iam *IdentityAccessManagement) authRequest(r *http.Request, action Action)}// Only check IAM if bucket policy didn't explicitly allow- // This ensures bucket policies can independently grant access (AWS semantics)if !policyAllows {- // Use enhanced IAM authorization if available, otherwise fall back to legacy authorization- if iam.iamIntegration != nil {- // Always use IAM when available for unified authorization+ // Traditional identities (with Actions from -s3.config) use legacy auth,+ // JWT/STS identities (no Actions) use IAM authorization+ if len(identity.Actions) > 0 {+ if !identity.canDo(action, bucket, object) {+ return identity, s3err.ErrAccessDenied+ }+ } else if iam.iamIntegration != nil {if errCode := iam.authorizeWithIAM(r, identity, action, bucket, object); errCode != s3err.ErrNone {return identity, errCode}} else {- // Fall back to existing authorization when IAM is not configured- if !identity.canDo(action, bucket, object) {- return identity, s3err.ErrAccessDenied- }+ return identity, s3err.ErrAccessDenied}}}