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
refactoring
Chris Lubfabb4159b21
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.goindex c1e8dff1ee..30052878b8 100644--- a/weed/s3api/auth_credentials.go+++ b/weed/s3api/auth_credentials.go@@ -91,7 +91,13 @@ func (iam *IdentityAccessManagement) loadS3ApiConfiguration(fileName string) errreturn nil}+func (iam *IdentityAccessManagement) isEnabled() bool {++ return len(iam.identities) > 0+}+func (iam *IdentityAccessManagement) lookupByAccessKey(accessKey string) (identity *Identity, cred *Credential, found bool) {+for _, ident := range iam.identities {for _, cred := range ident.Credentials {if cred.AccessKey == accessKey {@@ -104,7 +110,7 @@ func (iam *IdentityAccessManagement) lookupByAccessKey(accessKey string) (identifunc (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) http.HandlerFunc {- if len(iam.identities) == 0 {+ if iam.isEnabled() {return f}