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
package s3vectors
import (
"net/http"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3tables"
)
type IAMAuthorizer interface {
EvaluateIAMPolicy(r *http.Request, action, resource string, policyContext *s3tables.PolicyContext) (allowed, denied bool)
}
func (s *Server) checkPermission(r *http.Request, action, principal, owner, policy, resource string, ctx *s3tables.PolicyContext) bool {
if authorizer, ok := s.authenticator.(IAMAuthorizer); ok {
allowed, denied := authorizer.EvaluateIAMPolicy(r, action, resource, ctx)
if denied {
return false
}
if allowed {
copyContext := *ctx
copyContext.IdentityActions = append(append([]string{}, ctx.IdentityActions...), action)
ctx = ©Context
}
}
return s3tables.CheckPermissionWithContext(action, principal, owner, policy, resource, ctx)
}