Skip to content

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.

fix: default policy storeType to memory when not specified (#7754)

Chris Lu60649460b223
diff --git a/weed/s3api/s3api_server.go b/weed/s3api/s3api_server.go
index bf1a44e543..464ca1c8b1 100644
--- a/weed/s3api/s3api_server.go
+++ b/weed/s3api/s3api_server.go
@@ -653,6 +653,11 @@ func loadIAMManagerFromConfig(configPath string, filerAddressProvider func() str
DefaultEffect: sts.EffectDeny,
StoreType: sts.StoreTypeMemory,
}
+ } else if configRoot.Policy.StoreType == "" {
+ // If policy config exists but storeType is not specified, use memory store
+ // This ensures JSON-defined policies are stored in memory and work correctly
+ configRoot.Policy.StoreType = sts.StoreTypeMemory
+ glog.V(1).Infof("Policy storeType not specified; using memory store for JSON config-based setup")
}
// Create IAM configuration