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: configurable access for anonymous user
Chris Lu2b74abf7661f
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.goindex db5f4c8a31..851f6d4a34 100644--- a/weed/s3api/auth_credentials.go+++ b/weed/s3api/auth_credentials.go@@ -107,6 +107,16 @@ func (iam *IdentityAccessManagement) lookupByAccessKey(accessKey string) (identireturn nil, nil, false}+func (iam *IdentityAccessManagement) lookupAnonymous() (identity *Identity, found bool) {++ for _, ident := range iam.identities {+ if ident.Name == "anonymous" {+ return ident, true+ }+ }+ return nil, false+}+func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) http.HandlerFunc {if !iam.isEnabled() {@@ -127,6 +137,7 @@ func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) httfunc (iam *IdentityAccessManagement) authRequest(r *http.Request, action Action) ErrorCode {var identity *Identityvar s3Err ErrorCode+ var found boolswitch getRequestAuthType(r) {case authTypeStreamingSigned:return ErrNone@@ -146,7 +157,10 @@ func (iam *IdentityAccessManagement) authRequest(r *http.Request, action Action)glog.V(3).Infof("jwt auth type")return ErrNotImplementedcase authTypeAnonymous:- return ErrAccessDenied+ identity, found = iam.lookupAnonymous()+ if !found {+ return ErrAccessDenied+ }default:return ErrNotImplemented}